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

Skip to content
Commit 27fc6918 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

UserManager more consistently @UserHandleAware

Some methods in UserManager are @UserHandleAware but some are not, which
is confusing and sometimes means that no userId-version of the API
exists.

Here, we make them more consistently @UserHandleAware.

Since this is a behaviour-breaking change, we gate it by SDK version.

We introduce annotation parameters to help explain this gating and any
permission requirements that only apply when the context user differs
from the calling using.

We change the documentation to say "context user" rather than "calling
user", as is done for all @UserHandleAware methods. Note, however, that
this also applies to public APIs (which have no concept of context-based
userIds), but that is consistent with current usage.

For hidden APIs, where feasible, we do not gate.

Test: atest com.android.server.pm.UserManagerTest
Test: atest android.multiuser.cts.UserManagerTest
Bug: 183155436
Change-Id: Ief94abc321bb243ce25b9baae95e554ef015d180
parent afb99dd5
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