diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2018-02-02 13:25:31 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@google.com> | 2018-02-03 02:11:45 +0000 |
| commit | ad357d1839760849fcbcb8cbdce34003e8831acd (patch) | |
| tree | e7419b90deb12e00cf7d4fbb9e1237cf9d4b6783 /core/java/android/app/AppOpsManager.java | |
| parent | 4a740846223aa58af065e2256fb0caa0ce6f9c53 (diff) | |
Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.
This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.
Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
Diffstat (limited to 'core/java/android/app/AppOpsManager.java')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index e923fb217bea..4c9fb74c9c80 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -1670,7 +1670,7 @@ public class AppOpsManager { /** @hide */ public void resetAllModes() { try { - mService.resetAllModes(UserHandle.myUserId(), null); + mService.resetAllModes(mContext.getUserId(), null); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } |
