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
Loading
Please register or sign in to comment