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

Commit a457ebbd authored by Erik Kline's avatar Erik Kline
Browse files

Have WakeupMessage call Handler#dispatchMessage()

Handler has no fewer than three ways by which a message might be
handled:

    [1] the msg itself contains a callback (msg.callback.run())

    [2] the Handler was instantiated with a Handler.Callback
        (mCallback.handleMessage(msg))

    [3] the Handler instance was a subclass and could have
        overridden handleMessage()

Handler#dispatchMessage() tries to find the correct way to dispatch
a message, check the above in the above order.

Bug: 21859053
Change-Id: I284cf7ace93af167d95d13b297ec42d4bed15992
parent bdb81a0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class WakeupMessage implements AlarmManager.OnAlarmListener {
        }
        if (stillScheduled) {
            Message msg = mHandler.obtainMessage(mCmd, mArg1, mArg2, mObj);
            mHandler.handleMessage(msg);
            mHandler.dispatchMessage(msg);
            msg.recycle();
        }
    }