From 5ed4492aabcc0fb4f9a736cba03aa71af1cb8d3f Mon Sep 17 00:00:00 2001 From: alansley Date: Wed, 4 Dec 2024 14:45:15 +1100 Subject: [PATCH] Adjusted microphone -> phoneCall use call which allows foreground services to work from locked screens --- app/src/main/AndroidManifest.xml | 49 ++++++++++--------- .../securesms/service/WebRtcCallService.kt | 2 +- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 78d098fc90..1b0f6a7b13 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,38 +29,41 @@ android:name="android.hardware.touchscreen" android:required="false" /> - + + + + + - - - - + + + + + + + + + + - - - - + + + + + - - - - + - - - - - - - + + @@ -314,8 +317,10 @@ - = 30) ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE else 0 + if (Build.VERSION.SDK_INT >= 30) ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL else 0 ) } catch (e: IllegalStateException) { Log.e(TAG, "Failed to setCallInProgressNotification as a foreground service for type: ${type}, trying to update instead", e)