Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -167,4 +167,9 @@ oneway interface IStatusBar * Notifies System UI that the display is ready to show system decorations. */ void onDisplayReady(int displayId); /** * Notifies System UI whether the recents animation is running or not. */ void onRecentsAnimationStateChanged(boolean running); } packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +20 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< private static final int MSG_SHOW_CHARGING_ANIMATION = 44 << MSG_SHIFT; private static final int MSG_SHOW_PINNING_TOAST_ENTER_EXIT = 45 << MSG_SHIFT; private static final int MSG_SHOW_PINNING_TOAST_ESCAPE = 46 << MSG_SHIFT; private static final int MSG_RECENTS_ANIMATION_STATE_CHANGED = 47 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; Loading Loading @@ -281,10 +282,16 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< * @see IStatusBar#onDisplayReady(int) */ default void onDisplayReady(int displayId) { } /** * @see DisplayManager.DisplayListener#onDisplayRemoved(int) */ default void onDisplayRemoved(int displayId) { } /** * @see IStatusBar#onRecentsAnimationStateChanged(boolean) */ default void onRecentsAnimationStateChanged(boolean running) { } } @VisibleForTesting Loading Loading @@ -785,6 +792,14 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< } } @Override public void onRecentsAnimationStateChanged(boolean running) { synchronized (mLock) { mHandler.obtainMessage(MSG_RECENTS_ANIMATION_STATE_CHANGED, running ? 1 : 0, 0) .sendToTarget(); } } private void handleShowImeButton(int displayId, IBinder token, int vis, int backDisposition, boolean showImeSwitcher) { if (displayId == INVALID_DISPLAY) return; Loading Loading @@ -1071,6 +1086,11 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< mCallbacks.get(i).onDisplayReady(msg.arg1); } break; case MSG_RECENTS_ANIMATION_STATE_CHANGED: for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).onRecentsAnimationStateChanged(msg.arg1 > 0); } break; } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -2156,6 +2156,11 @@ public class StatusBar extends SystemUI implements DemoMode, } } @Override public void onRecentsAnimationStateChanged(boolean running) { setInteracting(StatusBarManager.WINDOW_NAVIGATION_BAR, running); } protected @TransitionMode int computeStatusBarMode(int oldVal, int newVal) { return computeBarMode(oldVal, newVal); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -358,4 +358,11 @@ public class CommandQueueTest extends SysuiTestCase { waitForIdleSync(); verify(mCallbacks).onDisplayRemoved(eq(SECONDARY_DISPLAY)); } @Test public void testOnRecentsAnimationStateChanged() { mCommandQueue.onRecentsAnimationStateChanged(true); waitForIdleSync(); verify(mCallbacks).onRecentsAnimationStateChanged(eq(true)); } } services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -108,4 +108,9 @@ public interface StatusBarManagerInternal { * @param displayId display ID */ void onDisplayReady(int displayId); /** * Notifies System UI whether the recents animation is running. */ void onRecentsAnimationStateChanged(boolean running); } Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -167,4 +167,9 @@ oneway interface IStatusBar * Notifies System UI that the display is ready to show system decorations. */ void onDisplayReady(int displayId); /** * Notifies System UI whether the recents animation is running or not. */ void onRecentsAnimationStateChanged(boolean running); }
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +20 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< private static final int MSG_SHOW_CHARGING_ANIMATION = 44 << MSG_SHIFT; private static final int MSG_SHOW_PINNING_TOAST_ENTER_EXIT = 45 << MSG_SHIFT; private static final int MSG_SHOW_PINNING_TOAST_ESCAPE = 46 << MSG_SHIFT; private static final int MSG_RECENTS_ANIMATION_STATE_CHANGED = 47 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; Loading Loading @@ -281,10 +282,16 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< * @see IStatusBar#onDisplayReady(int) */ default void onDisplayReady(int displayId) { } /** * @see DisplayManager.DisplayListener#onDisplayRemoved(int) */ default void onDisplayRemoved(int displayId) { } /** * @see IStatusBar#onRecentsAnimationStateChanged(boolean) */ default void onRecentsAnimationStateChanged(boolean running) { } } @VisibleForTesting Loading Loading @@ -785,6 +792,14 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< } } @Override public void onRecentsAnimationStateChanged(boolean running) { synchronized (mLock) { mHandler.obtainMessage(MSG_RECENTS_ANIMATION_STATE_CHANGED, running ? 1 : 0, 0) .sendToTarget(); } } private void handleShowImeButton(int displayId, IBinder token, int vis, int backDisposition, boolean showImeSwitcher) { if (displayId == INVALID_DISPLAY) return; Loading Loading @@ -1071,6 +1086,11 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController< mCallbacks.get(i).onDisplayReady(msg.arg1); } break; case MSG_RECENTS_ANIMATION_STATE_CHANGED: for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).onRecentsAnimationStateChanged(msg.arg1 > 0); } break; } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -2156,6 +2156,11 @@ public class StatusBar extends SystemUI implements DemoMode, } } @Override public void onRecentsAnimationStateChanged(boolean running) { setInteracting(StatusBarManager.WINDOW_NAVIGATION_BAR, running); } protected @TransitionMode int computeStatusBarMode(int oldVal, int newVal) { return computeBarMode(oldVal, newVal); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -358,4 +358,11 @@ public class CommandQueueTest extends SysuiTestCase { waitForIdleSync(); verify(mCallbacks).onDisplayRemoved(eq(SECONDARY_DISPLAY)); } @Test public void testOnRecentsAnimationStateChanged() { mCommandQueue.onRecentsAnimationStateChanged(true); waitForIdleSync(); verify(mCallbacks).onRecentsAnimationStateChanged(eq(true)); } }
services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -108,4 +108,9 @@ public interface StatusBarManagerInternal { * @param displayId display ID */ void onDisplayReady(int displayId); /** * Notifies System UI whether the recents animation is running. */ void onRecentsAnimationStateChanged(boolean running); }