fix: use microphone foreground service type instead of phoneCall

phoneCall type requires MANAGE_OWN_CALLS on SDK 34+, which needs
the app to be a default dialer. microphone type only requires
RECORD_AUDIO which is already granted via runtime permission.

https://claude.ai/code/session_017hZm7yu7CzmcQgZGSaqSXS
This commit is contained in:
Claude
2026-04-02 01:58:21 +00:00
parent 7643fc05f1
commit b01ddc8958
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -39,7 +39,7 @@
<!-- Audio/Video Playback -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<!-- Phone calls -->
@@ -228,7 +228,7 @@
<service
android:name=".service.call.CallForegroundService"
android:foregroundServiceType="phoneCall"
android:foregroundServiceType="microphone"
android:stopWithTask="true"
android:exported="false" />
@@ -62,7 +62,7 @@ class CallForegroundService : Service() {
NOTIFICATION_ID,
notification,
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL
ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
} else {
0
},