Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b50d22 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "re-use CURRENT_OR_SELF not CURRENT"

parents 59953d55 367f6ed2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@ public abstract class BluetoothProfileConnector<T> {
    private final String mServiceName;
    private volatile T mService;

    // -3 match with UserHandle.USER_CURRENT_OR_SELF
    private static final UserHandle USER_HANDLE_CURRENT_OR_SELF = UserHandle.of(-3);

    private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
            new IBluetoothStateChangeCallback.Stub() {
        public void onBluetoothStateChange(boolean up) {
@@ -131,7 +134,7 @@ public abstract class BluetoothProfileConnector<T> {
                            0);
                    intent.setComponent(comp);
                    if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
                            UserHandle.CURRENT)) {
                            USER_HANDLE_CURRENT_OR_SELF)) {
                        logError("Could not bind to Bluetooth Service with " + intent);
                        return false;
                    }