mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Hide taskbar while VoiceInteractionWindow is visible
- Fade out icons (or stashed handle if stashed) - Move background to APPLICATION_OVERLAY layer (behind VIW) - Only for gesture nav - On home screen in 3 button mode, translate buttons down when assistant is invoked Test: Invoke assistant, ensure it draws above taskbar background and taskbar stops drawing icons or stashed handle Bug: 225200928 Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9 Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
This commit is contained in:
@@ -35,6 +35,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_N
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
|
||||
import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
|
||||
|
||||
import android.animation.ArgbEvaluator;
|
||||
@@ -105,6 +106,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
private static final int FLAG_DISABLE_BACK = 1 << 9;
|
||||
private static final int FLAG_NOTIFICATION_SHADE_EXPANDED = 1 << 10;
|
||||
private static final int FLAG_SCREEN_PINNING_ACTIVE = 1 << 11;
|
||||
private static final int FLAG_VOICE_INTERACTION_WINDOW_SHOWING = 1 << 12;
|
||||
|
||||
private static final int MASK_IME_SWITCHER_VISIBLE = FLAG_SWITCHER_SUPPORTED | FLAG_IME_VISIBLE;
|
||||
|
||||
@@ -207,9 +209,12 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
boolean isInKidsMode = mContext.isNavBarKidsModeActive();
|
||||
boolean alwaysShowButtons = isThreeButtonNav || isInSetup;
|
||||
|
||||
// Make sure to remove nav bar buttons translation when notification shade is expanded or
|
||||
// IME is showing (add separate translation for IME).
|
||||
int flagsToRemoveTranslation = FLAG_NOTIFICATION_SHADE_EXPANDED | FLAG_IME_VISIBLE;
|
||||
// Make sure to remove nav bar buttons translation when any of the following occur:
|
||||
// - Notification shade is expanded
|
||||
// - IME is showing (add separate translation for IME)
|
||||
// - VoiceInteractionWindow (assistant) is showing
|
||||
int flagsToRemoveTranslation = FLAG_NOTIFICATION_SHADE_EXPANDED | FLAG_IME_VISIBLE
|
||||
| FLAG_VOICE_INTERACTION_WINDOW_SHOWING;
|
||||
mPropertyHolders.add(new StatePropertyHolder(mNavButtonInAppDisplayProgressForSysui,
|
||||
flags -> (flags & flagsToRemoveTranslation) != 0, AnimatedFloat.VALUE,
|
||||
1, 0));
|
||||
@@ -443,6 +448,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
| SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||
boolean isNotificationShadeExpanded = (sysUiStateFlags & shadeExpandedFlags) != 0;
|
||||
boolean isScreenPinningActive = (sysUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0;
|
||||
boolean isVoiceInteractionWindowShowing =
|
||||
(sysUiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0;
|
||||
|
||||
// TODO(b/202218289) we're getting IME as not visible on lockscreen from system
|
||||
updateStateForFlag(FLAG_IME_VISIBLE, isImeVisible);
|
||||
@@ -453,6 +460,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
updateStateForFlag(FLAG_DISABLE_BACK, isBackDisabled);
|
||||
updateStateForFlag(FLAG_NOTIFICATION_SHADE_EXPANDED, isNotificationShadeExpanded);
|
||||
updateStateForFlag(FLAG_SCREEN_PINNING_ACTIVE, isScreenPinningActive);
|
||||
updateStateForFlag(FLAG_VOICE_INTERACTION_WINDOW_SHOWING, isVoiceInteractionWindowShowing);
|
||||
|
||||
if (mA11yButton != null) {
|
||||
// Only used in 3 button
|
||||
@@ -750,6 +758,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
appendFlag(str, flags, FLAG_NOTIFICATION_SHADE_EXPANDED,
|
||||
"FLAG_NOTIFICATION_SHADE_EXPANDED");
|
||||
appendFlag(str, flags, FLAG_SCREEN_PINNING_ACTIVE, "FLAG_SCREEN_PINNING_ACTIVE");
|
||||
appendFlag(str, flags, FLAG_VOICE_INTERACTION_WINDOW_SHOWING,
|
||||
"FLAG_VOICE_INTERACTION_WINDOW_SHOWING");
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user