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

Commit 67e72609 authored by William Escande's avatar William Escande
Browse files

SystemServer: check null when Bluetooth crash

Bug: 366119162
Fix: 366119162
Test: m Bluetooth
Test: start bluetooth, make the bluetooth crash, service should recover
Flag: Exempt, P0 regression fixing
Change-Id: I457ee96fc460c389ff7015a4cae838d857938632
parent 9bea7d83
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1134,6 +1134,10 @@ class BluetoothManagerService {
        Log.d(TAG, "unbindAndFinish(): mAdapter=" + mAdapter + " isBinding=" + isBinding());

        mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
        if (mAdapter == null) {
            // mAdapter can be null when Bluetooth crashed and sent SERVICE_DISCONNECTED
            return;
        }
        long currentTimeMs = System.currentTimeMillis();

        try {