Let AppOpsService evaluate access for soundtrigger
Since the introduction of a background mode for record audio permission the app ops check the soundtrigger service does was broken. This is because the existence of the background permission now allows for the audio app op to be in the MODE_FOREGROUND state. Before the background mode, the soundtrigger service checked the AppOp's raw state because it knew that the client apps needed access to the app even if it was in the background. Now that the background mode exists the AppOpsService can use the app's permissions + proc state + capabilities to correctly evaluate whether the app should have access. Apps with the foreground-only permission are still going to work because the service binds to them with the include_capabilities flag. Later on we can remove this binding flag and mandate that soundtrigger clients add the background permission to their manifest. Bug: 172632101 Test: 1P app is able to work Change-Id: Ic5134ea0bcabdb289315d87bbc5405a0f0128c61
Loading
Please register or sign in to comment