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

Commit 38232a18 authored by Hansong Zhang's avatar Hansong Zhang Committed by android-build-merger
Browse files

Merge "AVRCP, HIDD: Fix crash if stop() is called before start()" into pi-dev am: 36aff502

am: 81cd634b

Change-Id: If2e85da936dad6cd44a1ecf330172c50149f42b7
parents 3f5cca9a 81cd634b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -657,6 +657,11 @@ public class HidDeviceService extends ProfileService {
            Log.d(TAG, "stop()");
        }

        if (sHidDeviceService == null) {
            Log.w(TAG, "stop() called before start()");
            return true;
        }

        setHidDeviceService(null);
        if (mNativeAvailable) {
            mHidDeviceNativeInterface.cleanup();
+5 −0
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@ public class AvrcpTargetService extends ProfileService {
    protected boolean stop() {
        Log.i(TAG, "Stopping the AVRCP Target Service");

        if (sInstance == null) {
            Log.w(TAG, "stop() called before start()");
            return true;
        }

        sInstance = null;
        unregisterReceiver(mReceiver);