Skip to content
Commit 1e85ca80 authored by Evan Severson's avatar Evan Severson
Browse files

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
parent fded2b6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment