Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7fb1ca4c authored by himanshuz's avatar himanshuz Committed by Himanshu Gupta
Browse files

Adding a way to communicate user space for AppOp changes.

Currently, AppOpps Manager just provides package name to its
upstream listeners, which detemine the correct app by utiliing
context bound package manager APIs.
However, this gives issues for MediaProvider, as root user and
clone user both share the MediaProvider of root user,
providing no way for MP process to know if an AppOp was intended
for root user or cloned user app.

By adding a new hidden API which takes userId and is overridden
by MP, we can convey the desired userId to MP process.
Using this userId, MP can clear media_grants for correct userId
(user 0 or cloned user), in case a corresponding app_op is recieved.

For other impl, the original functionality of not getting userId
is retained.

Test: atest CtsAppOpsTestCases CtsAppOps2TestCases
Bug: 278843665, 278644253
Change-Id: I7ff844dae27757492f31c795432600cab48b2bb5
parent 70ad8581
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