From 4855f45cec21ae6f352123bbaa57e0f6ae04c7af Mon Sep 17 00:00:00 2001 From: James O'Leary Date: Mon, 25 Feb 2019 12:29:50 -0500 Subject: [PATCH] Make status bar full screen when assist UI is present * Adds new state 'assistShowing' to StatusBarWindowController Test: manual / existing tests pass (atest SystemUITests) Bug: 126177988 Change-Id: I6433d82ecc0228cb87685bf3f0759bfa7cd26935 --- .../phone/StatusBarWindowController.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java index e1a77b00f3ca1..ce69a489737af 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java @@ -246,7 +246,7 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat private boolean isExpanded(State state) { return !state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.panelVisible || state.keyguardFadingAway || state.bouncerShowing - || state.headsUpShowing || state.bubblesShowing + || state.headsUpShowing || state.bubblesShowing || state.assistShowing || state.scrimsVisibility != ScrimController.VISIBILITY_FULLY_TRANSPARENT); } @@ -489,6 +489,21 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat return mCurrentState.bubblesShowing; } + /** + * Sets whether assist UI is showing on the screen. + */ + public void setAssistShowing(boolean assistShowing) { + mCurrentState.assistShowing = assistShowing; + apply(mCurrentState); + } + + /** + * The assist UI showing state for the status bar. + */ + public boolean getAssistShowing() { + return mCurrentState.assistShowing; + } + /** * Sets if there is a bubble being expanded on the screen. */ @@ -558,6 +573,7 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat boolean notTouchable; boolean bubblesShowing; boolean bubbleExpanded; + boolean assistShowing; /** * The {@link StatusBar} state from the status bar.