Merge "Fix status bar not hiding quickly" into oc-dev

am: b0806f1006

Change-Id: Ie20ce6f63587222c2c0552078cf2846534cfa4c7
This commit is contained in:
Jason Monk
2017-04-20 22:26:58 +00:00
committed by android-build-merger

View File

@@ -171,7 +171,14 @@ public class CommandQueue extends IStatusBar.Stub {
mDisable1 = state1;
mDisable2 = state2;
mHandler.removeMessages(MSG_DISABLE);
mHandler.obtainMessage(MSG_DISABLE, state1, state2, animate).sendToTarget();
Message msg = mHandler.obtainMessage(MSG_DISABLE, state1, state2, animate);
if (Looper.myLooper() == mHandler.getLooper()) {
// If its the right looper execute immediately so hides can be handled quickly.
mHandler.handleMessage(msg);
msg.recycle();
} else {
msg.sendToTarget();
}
}
}