diff options
| -rw-r--r-- | core/java/android/bluetooth/BluetoothPbap.java | 3 | ||||
| -rw-r--r-- | core/java/android/bluetooth/BluetoothProfileConnector.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/bluetooth/BluetoothPbap.java b/core/java/android/bluetooth/BluetoothPbap.java index c000e56e7b04..8ee38d3e1260 100644 --- a/core/java/android/bluetooth/BluetoothPbap.java +++ b/core/java/android/bluetooth/BluetoothPbap.java @@ -23,7 +23,6 @@ import android.annotation.SdkConstant; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; -import android.bluetooth.annotations.RequiresLegacyBluetoothPermission; import android.compat.annotation.UnsupportedAppUsage; import android.content.Attributable; import android.content.AttributionSource; @@ -170,7 +169,7 @@ public class BluetoothPbap implements BluetoothProfile { mContext.getPackageManager(), 0); intent.setComponent(comp); if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, - UserHandle.CURRENT_OR_SELF)) { + UserHandle.CURRENT)) { Log.e(TAG, "Could not bind to Bluetooth Pbap Service with " + intent); return false; } diff --git a/core/java/android/bluetooth/BluetoothProfileConnector.java b/core/java/android/bluetooth/BluetoothProfileConnector.java index a254291f57db..ecd5e4077de9 100644 --- a/core/java/android/bluetooth/BluetoothProfileConnector.java +++ b/core/java/android/bluetooth/BluetoothProfileConnector.java @@ -103,7 +103,7 @@ public abstract class BluetoothProfileConnector<T> { mContext.getPackageManager(), 0); intent.setComponent(comp); if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, - UserHandle.CURRENT_OR_SELF)) { + UserHandle.CURRENT)) { logError("Could not bind to Bluetooth Service with " + intent); return false; } |