ignore false positive warning wrt foreground service
This commit is contained in:
parent
35c8d31d42
commit
e83a0af277
|
@ -110,10 +110,12 @@
|
|||
android:name="com.google.android.gms.car.application"
|
||||
android:resource="@xml/automotive_app_desc" />
|
||||
|
||||
<!-- The warning that systemExempted requires alarm permission is incorrect because doze white list is sufficient -->
|
||||
<service
|
||||
android:name=".services.XmppConnectionService"
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="specialUse|systemExempted|microphone|camera">
|
||||
android:foregroundServiceType="specialUse|systemExempted|microphone|camera"
|
||||
tools:ignore="ForegroundServicePermission">
|
||||
<property
|
||||
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
||||
android:value="im" />
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue