Prevent calls crashing due to background restrictions.

This commit is contained in:
Cody Henthorne
2025-01-10 13:51:53 -05:00
committed by Greyson Parrelli
parent a63fd5a584
commit 919648b94b
3 changed files with 15 additions and 1 deletions

View File

@@ -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();
}
}