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

Commit b436a328 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am bab00057: am c6f2d17a: Merge "Add mHasQuit to fix an NPE in StateMachine." into jb-mr2-dev

* commit 'bab00057':
  Add mHasQuit to fix an NPE in StateMachine.
parents b993c039 bab00057
Loading
Loading
Loading
Loading
+28 −22
Original line number Diff line number Diff line
@@ -672,6 +672,9 @@ public class StateMachine {

    private static class SmHandler extends Handler {

        /** true if StateMachine has quit */
        private boolean mHasQuit = false;

        /** The debug flag */
        private boolean mDbg = false;

@@ -773,6 +776,7 @@ public class StateMachine {
         */
        @Override
        public final void handleMessage(Message msg) {
            if (!mHasQuit) {
                if (mDbg) mSm.log("handleMessage: E msg.what=" + msg.what);

                /** Save the current message */
@@ -797,6 +801,7 @@ public class StateMachine {
                // We need to check if mSm == null here as we could be quitting.
                if (mDbg && mSm != null) mSm.log("handleMessage: X");
            }
        }

        /**
         * Do any transitions
@@ -908,6 +913,7 @@ public class StateMachine {
            mInitialState = null;
            mDestState = null;
            mDeferredMessages.clear();
            mHasQuit = true;
        }

        /**