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

Commit c2cf61d5 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

PBAP: Fix NullPointerException in stop()

Check mSessionStatusHandler and mHandlerThread != null before
invocation.

Test: Carkits with PBAP
Bug: 69417672
Change-Id: Id4443bff525a21267a3008ac5e53888148a8bed9
parent c94d362d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -541,8 +541,12 @@ public class BluetoothPbapService extends ProfileService implements IObexConnect
        if (VERBOSE) {
            Log.v(TAG, "stop()");
        }
        if (mSessionStatusHandler != null) {
            mSessionStatusHandler.obtainMessage(SHUTDOWN).sendToTarget();
        }
        if (mHandlerThread != null) {
            mHandlerThread.quitSafely();
        }
        if (mContactChangeObserver == null) {
            Log.i(TAG, "Avoid unregister when receiver it is not registered");
            return true;