Skip to content
Commit 3e93b16f authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan
Browse files

[Role Logic Move] Make RoleManager methods user-aware

Some RoleManager API methods are not multi-user-aware; for example, the
methods named "...FromController", among others. These methods lead to
Binder.getCallingUid().

And, many of those methods are called from the role-controller business
logic.  But, that business logic will will be moving from a per-user app
into SystemServer.  So, we need to make these methods multi-user-aware
to support the Role Business Logic Move project.

To do so, modify these methods to receive the user from the context,
and mark the APIs as @UserHandleAware.

For compatibility reasons, use CompatChanges, which will only enable
this change for callers with targetSdk V+. Since this is the first time
we've used CompatChanges in the Permission APEX, this involves updating
Android.bp files.

Test: atest CtsRoleTestCases
Bug: 303742236
Change-Id: I8efae9ffe083f8e33ea1bd221bc1ed05c1100a13
parent 161934a5
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