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

Commit aaf71761 authored by Anubhav Gupta's avatar Anubhav Gupta Committed by Android Git Automerger
Browse files

am f99a9737: Check for AVRCP handler validity before cleanup

* commit 'f99a9737':
  Check for AVRCP handler validity before cleanup
parents 7e34c2a4 f99a9737
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -82,14 +82,13 @@ public class AvrcpControllerService extends ProfileService {
    }
    }


    protected boolean cleanup() {
    protected boolean cleanup() {
        if (mHandler != null) {
            mHandler.removeCallbacksAndMessages(null);
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            Looper looper = mHandler.getLooper();
        if (looper != null) {
            if (looper != null) looper.quit();
            looper.quit();
        }
        }


        clearAvrcpControllerService();
        clearAvrcpControllerService();

        cleanupNative();
        cleanupNative();


        return true;
        return true;