mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-01 14:16:49 +00:00
Fix crash listening to PSTN pickups on some devices.
We do this as a helpful thing to end a signal call if the user gets a PSTN call, but some Xiaomi devices are crashing because they require unique permissions. But we can just do it optimistically.
This commit is contained in:
@@ -131,7 +131,11 @@ public final class WebRtcCallService extends Service implements SignalAudioManag
|
||||
registerNetworkReceiver();
|
||||
|
||||
if (!AndroidTelecomUtil.getTelecomSupported()) {
|
||||
TelephonyUtil.getManager(this).listen(hangUpRtcOnDeviceCallAnswered, PhoneStateListener.LISTEN_CALL_STATE);
|
||||
try {
|
||||
TelephonyUtil.getManager(this).listen(hangUpRtcOnDeviceCallAnswered, PhoneStateListener.LISTEN_CALL_STATE);
|
||||
} catch (SecurityException e) {
|
||||
Log.w(TAG, "Failed to listen to PSTN call answers!", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user