Allow BG-FGS-Launch for role EMERGENCY, SYSTEM_GALLERY and SMS.
1. Make permission START_FOREGROUND_SERVICES_FROM_BACKGROUND an "public" and "role" permission. 2. In PermissionController/res/xml/roles.xml (separate CL), add <permission name="android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND" /> to these three roles. 2. Need to add <uses-permission android:name="android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND" /> to EMERGENCY, SYSTEM_GALLERY and SMS app's AndroidManifest.xml file. Bug: 171305836 Test: 1. "adb shell dumpsys role" to find apps for role EMERGENCY, SYSTEM_GALLERY and SMS are com.google.android.apps.safetyhub, com.google.android.apps.photos and com.google.android.apps.messaging. Add <uses-permission android:name="android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND" /> to these apps' AndroidManifest.xml, after app installation, "adb shell dumpsys package" to check these apps have START_FOREGROUND_SERVICES_FROM_BACKGROUND permission. 2. Manual test, create a test app, assign it SMS role, "dumpsys package" to observe permission START_FOREGROUND_SERVICES_FROM_BACKGROUND is granted to this test app. Change-Id: I8370f82eba0751dca3079bd190055f5a8466a5ca
Loading
Please register or sign in to comment