diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index 3908edec7da512a68e6e96fae66be074d7ec50b2..ca19f71bd391897ffcde227a8a9788104c347584 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -615,7 +615,14 @@ public class CommandQueue extends IStatusBar.Stub implements args.argi2 = state1; args.argi3 = state2; args.argi4 = animate ? 1 : 0; - mHandler.obtainMessage(MSG_DISABLE, args).sendToTarget(); + Message msg = mHandler.obtainMessage(MSG_DISABLE, args); + 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(); + } } }