mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Prevent calls crashing due to background restrictions.
This commit is contained in:
committed by
Greyson Parrelli
parent
a63fd5a584
commit
919648b94b
@@ -20,6 +20,7 @@ import org.thoughtcrime.securesms.notifications.NotificationChannels;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.service.webrtc.ActiveCallManager;
|
||||
import org.thoughtcrime.securesms.util.ConversationUtil;
|
||||
import org.thoughtcrime.securesms.util.DeviceProperties;
|
||||
|
||||
/**
|
||||
* Manages the state of the WebRtc items in the Android notification bar.
|
||||
@@ -232,6 +233,6 @@ public class CallNotificationBuilder {
|
||||
}
|
||||
|
||||
private static boolean deviceVersionSupportsIncomingCallStyle() {
|
||||
return Build.VERSION.SDK_INT >= API_LEVEL_CALL_STYLE;
|
||||
return Build.VERSION.SDK_INT >= API_LEVEL_CALL_STYLE && !DeviceProperties.isBackgroundRestricted();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user