mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
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:
parent
db61d693c4
commit
1dbcffe40b
1
app/proguard/proguard.pro
vendored
1
app/proguard/proguard.pro
vendored
@ -2,6 +2,7 @@
|
|||||||
-keepattributes SourceFile,LineNumberTable
|
-keepattributes SourceFile,LineNumberTable
|
||||||
-keep class org.whispersystems.** { *; }
|
-keep class org.whispersystems.** { *; }
|
||||||
-keep class org.thoughtcrime.securesms.** { *; }
|
-keep class org.thoughtcrime.securesms.** { *; }
|
||||||
|
-keep class org.thoughtcrime.securesms.components.menu.** { *; }
|
||||||
-keep class org.session.** { *; }
|
-keep class org.session.** { *; }
|
||||||
-keepclassmembers class ** {
|
-keepclassmembers class ** {
|
||||||
public void onEvent*(**);
|
public void onEvent*(**);
|
||||||
|
@ -148,12 +148,11 @@ public class PassphrasePromptActivity extends BaseActionBarActivity {
|
|||||||
// Finish and proceed with the next intent.
|
// Finish and proceed with the next intent.
|
||||||
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
||||||
if (nextIntent != null) {
|
if (nextIntent != null) {
|
||||||
|
try {
|
||||||
startActivity(nextIntent);
|
startActivity(nextIntent);
|
||||||
// try {
|
} catch (java.lang.SecurityException e) {
|
||||||
// startActivity(nextIntent);
|
Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.", e);
|
||||||
// } catch (java.lang.SecurityException e) {
|
}
|
||||||
// Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@ -660,7 +660,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
updateSubtitle()
|
updateSubtitle()
|
||||||
showOrHideInputIfNeeded()
|
showOrHideInputIfNeeded()
|
||||||
binding?.toolbarContent?.profilePictureView?.root?.update(threadRecipient)
|
binding?.toolbarContent?.profilePictureView?.root?.update(threadRecipient)
|
||||||
binding!!.toolbarContent.conversationTitleView.text = when {
|
binding?.toolbarContent?.conversationTitleView?.text = when {
|
||||||
threadRecipient.isLocalNumber -> getString(R.string.note_to_self)
|
threadRecipient.isLocalNumber -> getString(R.string.note_to_self)
|
||||||
else -> threadRecipient.toShortString()
|
else -> threadRecipient.toShortString()
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import android.os.IBinder
|
|||||||
import android.os.ResultReceiver
|
import android.os.ResultReceiver
|
||||||
import android.telephony.PhoneStateListener
|
import android.telephony.PhoneStateListener
|
||||||
import android.telephony.TelephonyManager
|
import android.telephony.TelephonyManager
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
@ -199,7 +200,7 @@ class WebRtcCallService: Service(), CallManager.WebRtcListener {
|
|||||||
private val serviceExecutor = Executors.newSingleThreadExecutor()
|
private val serviceExecutor = Executors.newSingleThreadExecutor()
|
||||||
private val timeoutExecutor = Executors.newScheduledThreadPool(1)
|
private val timeoutExecutor = Executors.newScheduledThreadPool(1)
|
||||||
private val hangupOnCallAnswered = HangUpRtcOnPstnCallAnsweredListener {
|
private val hangupOnCallAnswered = HangUpRtcOnPstnCallAnsweredListener {
|
||||||
startService(hangupIntent(this))
|
ContextCompat.startForegroundService(this, hangupIntent(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
private var networkChangedReceiver: NetworkChangeReceiver? = null
|
private var networkChangedReceiver: NetworkChangeReceiver? = null
|
||||||
|
@ -78,7 +78,7 @@ class CallMessageProcessor(private val context: Context, private val textSecureP
|
|||||||
private fun incomingHangup(callMessage: CallMessage) {
|
private fun incomingHangup(callMessage: CallMessage) {
|
||||||
val callId = callMessage.callId ?: return
|
val callId = callMessage.callId ?: return
|
||||||
val hangupIntent = WebRtcCallService.remoteHangupIntent(context, callId)
|
val hangupIntent = WebRtcCallService.remoteHangupIntent(context, callId)
|
||||||
context.startService(hangupIntent)
|
ContextCompat.startForegroundService(context, hangupIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun incomingAnswer(callMessage: CallMessage) {
|
private fun incomingAnswer(callMessage: CallMessage) {
|
||||||
@ -91,7 +91,7 @@ class CallMessageProcessor(private val context: Context, private val textSecureP
|
|||||||
sdp = sdp,
|
sdp = sdp,
|
||||||
callId = callId
|
callId = callId
|
||||||
)
|
)
|
||||||
context.startService(answerIntent)
|
ContextCompat.startForegroundService(context, answerIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleIceCandidates(callMessage: CallMessage) {
|
private fun handleIceCandidates(callMessage: CallMessage) {
|
||||||
|
@ -385,6 +385,7 @@
|
|||||||
<item name="scroll_to_bottom_button_background">@color/classic_dark_1</item>
|
<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="scroll_to_bottom_button_border">@color/classic_dark_3</item>
|
||||||
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
|
<item name="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
|
||||||
|
<item name="message_selected">@color/classic_dark_1</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Classic.Light">
|
<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_background">@color/classic_light_4</item>
|
||||||
<item name="scroll_to_bottom_button_border">@color/classic_light_2</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="conversation_unread_count_indicator_background">@color/classic_dark_4</item>
|
||||||
|
<item name="message_selected">@color/classic_light_5</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -548,6 +550,7 @@
|
|||||||
<item name="scroll_to_bottom_button_background">@color/ocean_dark_4</item>
|
<item name="scroll_to_bottom_button_background">@color/ocean_dark_4</item>
|
||||||
<item name="scroll_to_bottom_button_border">?colorPrimary</item>
|
<item name="scroll_to_bottom_button_border">?colorPrimary</item>
|
||||||
<item name="conversation_unread_count_indicator_background">@color/ocean_dark_4</item>
|
<item name="conversation_unread_count_indicator_background">@color/ocean_dark_4</item>
|
||||||
|
<item name="message_selected">@color/ocean_dark_1</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -633,6 +636,7 @@
|
|||||||
<item name="conversation_pinned_background_color">?colorCellBackground</item>
|
<item name="conversation_pinned_background_color">?colorCellBackground</item>
|
||||||
<item name="conversation_unread_background_color">@color/ocean_light_5</item>
|
<item name="conversation_unread_background_color">@color/ocean_light_5</item>
|
||||||
<item name="conversation_pinned_icon_color">?android:textColorPrimary</item>
|
<item name="conversation_pinned_icon_color">?android:textColorPrimary</item>
|
||||||
|
<item name="message_selected">@color/ocean_light_5</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user