From 3196b7ca5cd8046ab7b981e81e5cf62170b7911d Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sun, 5 May 2024 21:39:54 -0700 Subject: [PATCH] Fix 3-button showing up briefly on the AllSet page in setup Fixes: 338883705 Test: Go through setup. Make sure the 3-button doesn't show up anytime during setup Change-Id: Idd62486465d608235abe61b994718311c72cb20c (cherry picked from commit cb8eb189f1fb12e0e79243d706088a99dd26c25c) --- .../launcher3/taskbar/NavbarButtonsViewController.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index 3654e5f286..abb763a405 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -376,6 +376,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_OCCLUDED) != 0; return (flags & FLAG_DISABLE_BACK) == 0 + && (!mContext.isGestureNav() || !mContext.isUserSetupComplete()) && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard); })); // Hide back button in SUW if keyboard is showing (IME draws its own back). @@ -406,8 +407,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT mPropertyHolders.add( new StatePropertyHolder(mHomeButtonAlpha.get( ALPHA_INDEX_KEYGUARD_OR_DISABLE), - flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && - (flags & FLAG_DISABLE_HOME) == 0)); + flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 + && (flags & FLAG_DISABLE_HOME) == 0 && !mContext.isGestureNav())); // Recents button mRecentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS, @@ -425,7 +426,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT }); mPropertyHolders.add(new StatePropertyHolder(mRecentsButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_RECENTS) == 0 - && !mContext.isNavBarKidsModeActive())); + && !mContext.isNavBarKidsModeActive() && !mContext.isGestureNav())); // A11y button mA11yButton = addButton(R.drawable.ic_sysbar_accessibility_button, BUTTON_A11Y,