diff options
| author | 2018-10-30 22:22:14 +0000 | |
|---|---|---|
| committer | 2018-10-30 22:22:14 +0000 | |
| commit | 022cf30d17f30cbd029f21dc4ff57d447b9ab1ea (patch) | |
| tree | 5c6aa4309fdd1af93a174fd11c20069195e15dff | |
| parent | 8a7d8bceb58f282832f7836504c3a9a5736f5534 (diff) | |
| parent | ad796fcaa165046437a1dd5d36248d73912c8583 (diff) | |
Merge "Be the current user to get A2DP proxy" into pi-dev
| -rw-r--r-- | core/java/android/bluetooth/BluetoothA2dp.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java index 94fd138ca6e8..864e6903be97 100644 --- a/core/java/android/bluetooth/BluetoothA2dp.java +++ b/core/java/android/bluetooth/BluetoothA2dp.java @@ -29,6 +29,7 @@ import android.os.Binder; import android.os.IBinder; import android.os.ParcelUuid; import android.os.RemoteException; +import android.os.UserHandle; import android.util.Log; import com.android.internal.annotations.GuardedBy; @@ -261,7 +262,7 @@ public final class BluetoothA2dp implements BluetoothProfile { ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0); intent.setComponent(comp); if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, - mContext.getUser())) { + UserHandle.CURRENT_OR_SELF)) { Log.e(TAG, "Could not bind to Bluetooth A2DP Service with " + intent); return false; } |