summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothA2dp.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-03-19 18:06:58 -0700
committerDianne Hackborn <hackbod@google.com>2014-03-20 10:10:03 -0700
commit4ebffef0752d467f15199f1626d0a55648a17f9b (patch)
treeca4f4993ba0f3b8a62fa84310de4e689d73d9167 /framework/java/android/bluetooth/BluetoothA2dp.java
parenta00d04bb647962db3dcdfc891cbc58b4bc00a708 (diff)
Get rid of not specifying a user errors in bluetooth.
W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothInputDevice.doBind:262 android.bluetooth.BluetoothInputDevice.<init>:255 android.bluetooth.BluetoothAdapter.getProfileProxy:1365 W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothPan.doBind:148 android.bluetooth.BluetoothPan.<init>:140 android.bluetooth.BluetoothAdapter.getProfileProxy:1368 W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothMap.doBind:108 android.bluetooth.BluetoothMap.<init>:101 android.bluetooth.BluetoothAdapter.getProfileProxy:1374 W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothPbap.doBind:163 android.bluetooth.BluetoothPbap.<init>:156 com.android.settings.bluetooth.PbapServerProfile.<init>:68 Change-Id: I0a1e24ee71aef7d796fcee5692b9d19462a93637
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothA2dp.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothA2dp.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothA2dp.java b/framework/java/android/bluetooth/BluetoothA2dp.java
index 6f929f261a..7b709acd91 100644
--- a/framework/java/android/bluetooth/BluetoothA2dp.java
+++ b/framework/java/android/bluetooth/BluetoothA2dp.java
@@ -162,7 +162,8 @@ public final class BluetoothA2dp implements BluetoothProfile {
Intent intent = new Intent(IBluetoothA2dp.class.getName());
ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
intent.setComponent(comp);
- if (comp == null || !mContext.bindService(intent, mConnection, 0)) {
+ if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
+ android.os.Process.myUserHandle())) {
Log.e(TAG, "Could not bind to Bluetooth A2DP Service with " + intent);
return false;
}