Checks if StateMachine is null before calling callbacks.
Bug-Id:
26176787
Change-Id: I7ee92326e99e18a3b7045ccf098b52acfaff9a15
*/
@Override
public final void handleMessage(Message msg) {
- mSm.onPreHandleMessage(msg);
if (!mHasQuit) {
+ if (mSm != null) {
+ mSm.onPreHandleMessage(msg);
+ }
+
if (mDbg) mSm.log("handleMessage: E msg.what=" + msg.what);
/** Save the current message */
// We need to check if mSm == null here as we could be quitting.
if (mDbg && mSm != null) mSm.log("handleMessage: X");
+
+ if (mSm != null) {
+ mSm.onPostHandleMessage(msg);
+ }
}
- mSm.onPostHandleMessage(msg);
}
/**