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 | 6edd25f33e4e4bed4fdd9eb815012111e59ad2a7 (patch) | |
tree | 9507d07b714de9f0aaa584a59bb26ded419c7793 /framework/java/android/bluetooth/BluetoothHidHost.java | |
parent | ff4fbb5dfa74559c534623e1b53276346f35e3b7 (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 'framework/java/android/bluetooth/BluetoothHidHost.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHidHost.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHidHost.java b/framework/java/android/bluetooth/BluetoothHidHost.java index 8ad0f9d064..0ca39f169a 100644 --- a/framework/java/android/bluetooth/BluetoothHidHost.java +++ b/framework/java/android/bluetooth/BluetoothHidHost.java @@ -279,7 +279,7 @@ public final class BluetoothHidHost implements BluetoothProfile { ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0); intent.setComponent(comp); if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, - android.os.Process.myUserHandle())) { + mContext.getUser())) { Log.e(TAG, "Could not bind to Bluetooth HID Service with " + intent); return false; } |