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

Commit fa465edd authored by William Escande's avatar William Escande
Browse files

SystemServer X FastBind: prevent double enable

Bug: 328698375
Bug: 332906771
Bug: 332812952
Test: m .
Test: device-boot-health-check with slow devices (see Bug)
Change-Id: Iff5b089fcd3ced6d0d728bc90532244c090d88c2
parent b5594d46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4517,7 +4517,7 @@ public class AdapterService extends Service {
            mHandler.post(() -> init());
        }

        debugLog("enable() - Enable called with quiet mode status =  " + quietMode);
        Log.i(TAG, "enable() - Enable called with quiet mode status =  " + quietMode);
        mQuietmode = quietMode;
        mAdapterStateMachine.sendMessage(AdapterState.BLE_TURN_ON);
    }
+1 −1
Original line number Diff line number Diff line
@@ -1962,7 +1962,7 @@ class BluetoothManagerService {
                        UserHandle.CURRENT)) {
                    mHandler.removeMessages(MESSAGE_TIMEOUT_BIND);
                }
            } else if (mAdapter != null) {
            } else if (!Flags.fastBindToApp() && mAdapter != null) {
                // Enable bluetooth
                try {
                    mAdapter.enable(mQuietEnable, mContext.getAttributionSource());