diff --git a/app/proguard/proguard.pro b/app/proguard/proguard.pro index 863701970c..bcbc8dadaf 100644 --- a/app/proguard/proguard.pro +++ b/app/proguard/proguard.pro @@ -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*(**); diff --git a/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java b/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java index 7f7f6f75db..63b42c4936 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java @@ -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(); } diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 7fe583ddbc..a819c3fa22 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -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() } diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt b/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt index 079d7a21ad..0f10a93b0b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt @@ -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 diff --git a/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallMessageProcessor.kt b/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallMessageProcessor.kt index a66dd591f6..f007ace976 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallMessageProcessor.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallMessageProcessor.kt @@ -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) { diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 88f1a6a2f4..4c7dfd1db4 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -385,6 +385,7 @@ @color/classic_dark_1 @color/classic_dark_3 @color/classic_dark_4 + @color/classic_dark_1 @@ -548,6 +550,7 @@ @color/ocean_dark_4 ?colorPrimary @color/ocean_dark_4 + @color/ocean_dark_1 @@ -633,6 +636,7 @@ ?colorCellBackground @color/ocean_light_5 ?android:textColorPrimary + @color/ocean_light_5