Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,10 @@ oneway interface IStatusBar * * @param displayId the ID of the display to notify. * @param types the internal insets types of the bars are about to show transiently. * @param isGestureOnSystemBar whether the gesture to show the transient bar was a gesture on * one of the bars itself. */ void showTransient(int displayId, in int[] types); void showTransient(int displayId, in int[] types, boolean isGestureOnSystemBar); /** * Notifies System UI to abort the transient state of system bars, which prevents the bars being Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +10 −2 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, private @Behavior int mBehavior; private boolean mTransientShown; private boolean mTransientShownFromGestureOnSystemBar; private int mNavBarMode = NAV_BAR_MODE_3BUTTON; private LightBarController mLightBarController; private final LightBarController mMainLightBarController; Loading Loading @@ -872,6 +873,9 @@ public class NavigationBar implements View.OnAttachStateChangeListener, + windowStateToString(mNavigationBarWindowState)); pw.println(" mNavigationBarMode=" + BarTransitions.modeToString(mNavigationBarMode)); pw.println(" mTransientShown=" + mTransientShown); pw.println(" mTransientShownFromGestureOnSystemBar=" + mTransientShownFromGestureOnSystemBar); dumpBarTransitions(pw, "mNavigationBarView", mNavigationBarView.getBarTransitions()); mNavigationBarView.dump(pw); } Loading Loading @@ -990,7 +994,8 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } @Override public void showTransient(int displayId, @InternalInsetsType int[] types) { public void showTransient(int displayId, @InternalInsetsType int[] types, boolean isGestureOnSystemBar) { if (displayId != mDisplayId) { return; } Loading @@ -999,6 +1004,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } if (!mTransientShown) { mTransientShown = true; mTransientShownFromGestureOnSystemBar = isGestureOnSystemBar; handleTransientChanged(); } } Loading @@ -1017,12 +1023,14 @@ public class NavigationBar implements View.OnAttachStateChangeListener, private void clearTransient() { if (mTransientShown) { mTransientShown = false; mTransientShownFromGestureOnSystemBar = false; handleTransientChanged(); } } private void handleTransientChanged() { mNavigationBarView.onTransientStateChanged(mTransientShown); mNavigationBarView.onTransientStateChanged(mTransientShown, mTransientShownFromGestureOnSystemBar); final int barMode = barMode(mTransientShown, mAppearance); if (updateBarMode(barMode) && mLightBarController != null) { mLightBarController.onNavigationBarModeChanged(barMode); Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +6 −1 Original line number Diff line number Diff line Loading @@ -447,12 +447,17 @@ public class NavigationBarView extends FrameLayout implements mRegionSamplingHelper.setWindowHasBlurs(hasBlurs); } void onTransientStateChanged(boolean isTransient) { void onTransientStateChanged(boolean isTransient, boolean isGestureOnSystemBar) { mEdgeBackGestureHandler.onNavBarTransientStateChanged(isTransient); // The visibility of the navigation bar buttons is dependent on the transient state of // the navigation bar. if (mNavBarOverlayController.isNavigationBarOverlayEnabled()) { // Always allow the overlay if in non-gestural nav mode, otherwise, only allow showing // the overlay if the user is swiping directly over a system bar boolean allowNavBarOverlay = !QuickStepContract.isGesturalMode(mNavBarMode) || isGestureOnSystemBar; isTransient = isTransient && allowNavBarOverlay; mNavBarOverlayController.setButtonState(isTransient, /* force */ false); } } Loading packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ public class TaskbarDelegate implements CommandQueue.Callbacks, } @Override public void showTransient(int displayId, int[] types) { public void showTransient(int displayId, int[] types, boolean isGestureOnSystemBar) { if (displayId != mDisplayId) { return; } Loading packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +14 −4 Original line number Diff line number Diff line Loading @@ -343,10 +343,18 @@ public class CommandQueue extends IStatusBar.Stub implements String packageName) { } /** * @see IStatusBar#showTransient(int, int[]). * @see IStatusBar#showTransient(int, int[], boolean). */ default void showTransient(int displayId, @InternalInsetsType int[] types) { } /** * @see IStatusBar#showTransient(int, int[], boolean). */ default void showTransient(int displayId, @InternalInsetsType int[] types, boolean isGestureOnSystemBar) { showTransient(displayId, types); } /** * @see IStatusBar#abortTransient(int, int[]). */ Loading Loading @@ -1019,9 +1027,10 @@ public class CommandQueue extends IStatusBar.Stub implements } @Override public void showTransient(int displayId, int[] types) { public void showTransient(int displayId, int[] types, boolean isGestureOnSystemBar) { synchronized (mLock) { mHandler.obtainMessage(MSG_SHOW_TRANSIENT, displayId, 0, types).sendToTarget(); mHandler.obtainMessage(MSG_SHOW_TRANSIENT, displayId, isGestureOnSystemBar ? 1 : 0, types).sendToTarget(); } } Loading Loading @@ -1404,8 +1413,9 @@ public class CommandQueue extends IStatusBar.Stub implements case MSG_SHOW_TRANSIENT: { final int displayId = msg.arg1; final int[] types = (int[]) msg.obj; final boolean isGestureOnSystemBar = msg.arg2 != 0; for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).showTransient(displayId, types); mCallbacks.get(i).showTransient(displayId, types, isGestureOnSystemBar); } break; } Loading Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,10 @@ oneway interface IStatusBar * * @param displayId the ID of the display to notify. * @param types the internal insets types of the bars are about to show transiently. * @param isGestureOnSystemBar whether the gesture to show the transient bar was a gesture on * one of the bars itself. */ void showTransient(int displayId, in int[] types); void showTransient(int displayId, in int[] types, boolean isGestureOnSystemBar); /** * Notifies System UI to abort the transient state of system bars, which prevents the bars being Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +10 −2 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, private @Behavior int mBehavior; private boolean mTransientShown; private boolean mTransientShownFromGestureOnSystemBar; private int mNavBarMode = NAV_BAR_MODE_3BUTTON; private LightBarController mLightBarController; private final LightBarController mMainLightBarController; Loading Loading @@ -872,6 +873,9 @@ public class NavigationBar implements View.OnAttachStateChangeListener, + windowStateToString(mNavigationBarWindowState)); pw.println(" mNavigationBarMode=" + BarTransitions.modeToString(mNavigationBarMode)); pw.println(" mTransientShown=" + mTransientShown); pw.println(" mTransientShownFromGestureOnSystemBar=" + mTransientShownFromGestureOnSystemBar); dumpBarTransitions(pw, "mNavigationBarView", mNavigationBarView.getBarTransitions()); mNavigationBarView.dump(pw); } Loading Loading @@ -990,7 +994,8 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } @Override public void showTransient(int displayId, @InternalInsetsType int[] types) { public void showTransient(int displayId, @InternalInsetsType int[] types, boolean isGestureOnSystemBar) { if (displayId != mDisplayId) { return; } Loading @@ -999,6 +1004,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } if (!mTransientShown) { mTransientShown = true; mTransientShownFromGestureOnSystemBar = isGestureOnSystemBar; handleTransientChanged(); } } Loading @@ -1017,12 +1023,14 @@ public class NavigationBar implements View.OnAttachStateChangeListener, private void clearTransient() { if (mTransientShown) { mTransientShown = false; mTransientShownFromGestureOnSystemBar = false; handleTransientChanged(); } } private void handleTransientChanged() { mNavigationBarView.onTransientStateChanged(mTransientShown); mNavigationBarView.onTransientStateChanged(mTransientShown, mTransientShownFromGestureOnSystemBar); final int barMode = barMode(mTransientShown, mAppearance); if (updateBarMode(barMode) && mLightBarController != null) { mLightBarController.onNavigationBarModeChanged(barMode); Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +6 −1 Original line number Diff line number Diff line Loading @@ -447,12 +447,17 @@ public class NavigationBarView extends FrameLayout implements mRegionSamplingHelper.setWindowHasBlurs(hasBlurs); } void onTransientStateChanged(boolean isTransient) { void onTransientStateChanged(boolean isTransient, boolean isGestureOnSystemBar) { mEdgeBackGestureHandler.onNavBarTransientStateChanged(isTransient); // The visibility of the navigation bar buttons is dependent on the transient state of // the navigation bar. if (mNavBarOverlayController.isNavigationBarOverlayEnabled()) { // Always allow the overlay if in non-gestural nav mode, otherwise, only allow showing // the overlay if the user is swiping directly over a system bar boolean allowNavBarOverlay = !QuickStepContract.isGesturalMode(mNavBarMode) || isGestureOnSystemBar; isTransient = isTransient && allowNavBarOverlay; mNavBarOverlayController.setButtonState(isTransient, /* force */ false); } } Loading
packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ public class TaskbarDelegate implements CommandQueue.Callbacks, } @Override public void showTransient(int displayId, int[] types) { public void showTransient(int displayId, int[] types, boolean isGestureOnSystemBar) { if (displayId != mDisplayId) { return; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +14 −4 Original line number Diff line number Diff line Loading @@ -343,10 +343,18 @@ public class CommandQueue extends IStatusBar.Stub implements String packageName) { } /** * @see IStatusBar#showTransient(int, int[]). * @see IStatusBar#showTransient(int, int[], boolean). */ default void showTransient(int displayId, @InternalInsetsType int[] types) { } /** * @see IStatusBar#showTransient(int, int[], boolean). */ default void showTransient(int displayId, @InternalInsetsType int[] types, boolean isGestureOnSystemBar) { showTransient(displayId, types); } /** * @see IStatusBar#abortTransient(int, int[]). */ Loading Loading @@ -1019,9 +1027,10 @@ public class CommandQueue extends IStatusBar.Stub implements } @Override public void showTransient(int displayId, int[] types) { public void showTransient(int displayId, int[] types, boolean isGestureOnSystemBar) { synchronized (mLock) { mHandler.obtainMessage(MSG_SHOW_TRANSIENT, displayId, 0, types).sendToTarget(); mHandler.obtainMessage(MSG_SHOW_TRANSIENT, displayId, isGestureOnSystemBar ? 1 : 0, types).sendToTarget(); } } Loading Loading @@ -1404,8 +1413,9 @@ public class CommandQueue extends IStatusBar.Stub implements case MSG_SHOW_TRANSIENT: { final int displayId = msg.arg1; final int[] types = (int[]) msg.obj; final boolean isGestureOnSystemBar = msg.arg2 != 0; for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).showTransient(displayId, types); mCallbacks.get(i).showTransient(displayId, types, isGestureOnSystemBar); } break; } Loading