From e83a0af277bccae312fcd3060562e145eb3f8a7b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 20 Oct 2023 20:57:44 +0200 Subject: [PATCH] ignore false positive warning wrt foreground service --- src/main/AndroidManifest.xml | 4 +++- .../siacs/conversations/services/XmppConnectionService.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 56b7865c9..835d94db3 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -110,10 +110,12 @@ android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc" /> + + android:foregroundServiceType="specialUse|systemExempted|microphone|camera" + tools:ignore="ForegroundServicePermission"> diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 137a24c31..71fd9844c 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1466,6 +1466,7 @@ public class XmppConnectionService extends Service { foregroundServiceType = ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA; } else { foregroundServiceType = ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE; + Log.w(Config.LOGTAG,"falling back to special use foreground service type"); } startForeground(id, notification, foregroundServiceType); } else {