Play fixes (#1017)

* fix: Prevent crash from recipient modification listener

* fix: Add message selection highlight color

* Handle crash from fingerprint auth

* Update message selection highlight colors

* Handle call answer/hangup processing appropriately

* Add proguard rule for ContextMenuList

* Handle more calls intents

Co-authored-by: charles <charles@oxen.io>
This commit is contained in:
ceokot 2022-10-24 14:24:57 +11:00 committed by GitHub
parent db61d693c4
commit 1dbcffe40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 10 deletions

View File

@ -2,6 +2,7 @@
-keepattributes SourceFile,LineNumberTable
-keep class org.whispersystems.** { *; }
-keep class org.thoughtcrime.securesms.** { *; }
-keep class org.thoughtcrime.securesms.components.menu.** { *; }
-keep class org.session.** { *; }
-keepclassmembers class ** {
public void onEvent*(**);

View File

@ -148,12 +148,11 @@ public class PassphrasePromptActivity extends BaseActionBarActivity {
// Finish and proceed with the next intent.
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
if (nextIntent != null) {
startActivity(nextIntent);
// try {
// startActivity(nextIntent);
// } catch (java.lang.SecurityException e) {
// Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.");
// }
try {
startActivity(nextIntent);
} catch (java.lang.SecurityException e) {
Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.", e);
}
}
finish();
}

View File

@ -660,7 +660,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
updateSubtitle()
showOrHideInputIfNeeded()
binding?.toolbarContent?.profilePictureView?.root?.update(threadRecipient)
binding!!.toolbarContent.conversationTitleView.text = when {
binding?.toolbarContent?.conversationTitleView?.text = when {
threadRecipient.isLocalNumber -> getString(R.string.note_to_self)
else -> threadRecipient.toShortString()
}

View File

@ -12,6 +12,7 @@ import android.os.IBinder
import android.os.ResultReceiver
import android.telephony.PhoneStateListener
import android.telephony.TelephonyManager
import androidx.core.content.ContextCompat
import androidx.core.os.bundleOf
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import dagger.hilt.android.AndroidEntryPoint
@ -199,7 +200,7 @@ class WebRtcCallService: Service(), CallManager.WebRtcListener {
private val serviceExecutor = Executors.newSingleThreadExecutor()
private val timeoutExecutor = Executors.newScheduledThreadPool(1)
private val hangupOnCallAnswered = HangUpRtcOnPstnCallAnsweredListener {
startService(hangupIntent(this))
ContextCompat.startForegroundService(this, hangupIntent(this))
}
private var networkChangedReceiver: NetworkChangeReceiver? = null

View File

@ -78,7 +78,7 @@ class CallMessageProcessor(private val context: Context, private val textSecureP
private fun incomingHangup(callMessage: CallMessage) {
val callId = callMessage.callId ?: return
val hangupIntent = WebRtcCallService.remoteHangupIntent(context, callId)
context.startService(hangupIntent)
ContextCompat.startForegroundService(context, hangupIntent)
}
private fun incomingAnswer(callMessage: CallMessage) {
@ -91,7 +91,7 @@ class CallMessageProcessor(private val context: Context, private val textSecureP
sdp = sdp,
callId = callId
)
context.startService(answerIntent)
ContextCompat.startForegroundService(context, answerIntent)
}
private fun handleIceCandidates(callMessage: CallMessage) {

View File

@ -385,6 +385,7 @@
<item name="scroll_to_bottom_button_background">@color/classic_dark_1</item>
<item name="scroll_to_bottom_button_border">@color/classic_dark_3</item>
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
<item name="message_selected">@color/classic_dark_1</item>
</style>
<style name="Classic.Light">
@ -468,6 +469,7 @@
<item name="scroll_to_bottom_button_background">@color/classic_light_4</item>
<item name="scroll_to_bottom_button_border">@color/classic_light_2</item>
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
<item name="message_selected">@color/classic_light_5</item>
</style>
@ -548,6 +550,7 @@
<item name="scroll_to_bottom_button_background">@color/ocean_dark_4</item>
<item name="scroll_to_bottom_button_border">?colorPrimary</item>
<item name="conversation_unread_count_indicator_background">@color/ocean_dark_4</item>
<item name="message_selected">@color/ocean_dark_1</item>
</style>
@ -633,6 +636,7 @@
<item name="conversation_pinned_background_color">?colorCellBackground</item>
<item name="conversation_unread_background_color">@color/ocean_light_5</item>
<item name="conversation_pinned_icon_color">?android:textColorPrimary</item>
<item name="message_selected">@color/ocean_light_5</item>
</style>
</resources>