[automerge] Hide taskbar when launcher receives nav and keyguard showing 2p: c750e3d3aa

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17358924

Change-Id: I226fc5ade3d197e16479bf46c65328bc87c3fa7d
This commit is contained in:
Vinit Nayak
2022-03-23 21:11:32 +00:00
committed by Presubmit Automerger Backend
@@ -194,8 +194,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
&& (flags & FLAG_SCREEN_PINNING_ACTIVE) == 0)); && (flags & FLAG_SCREEN_PINNING_ACTIVE) == 0));
mPropertyHolders.add(new StatePropertyHolder(mControllers.taskbarDragLayerController mPropertyHolders.add(new StatePropertyHolder(mControllers.taskbarDragLayerController
.getKeyguardBgTaskbar(), .getKeyguardBgTaskbar(), flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0));
flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0, AnimatedFloat.VALUE, 1, 0));
// Force nav buttons (specifically back button) to be visible during setup wizard. // Force nav buttons (specifically back button) to be visible during setup wizard.
boolean isInSetup = !mContext.isUserSetupComplete(); boolean isInSetup = !mContext.isUserSetupComplete();
@@ -297,12 +296,14 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
mNavButtonContainer.requestLayout(); mNavButtonContainer.requestLayout();
} }
// Animate taskbar background when any of these flags are enabled // Animate taskbar background when either..
int flagsToShowBg = FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE // notification shade expanded AND not on keyguard
| FLAG_NOTIFICATION_SHADE_EXPANDED; // back is visible for bouncer
mPropertyHolders.add(new StatePropertyHolder( mPropertyHolders.add(new StatePropertyHolder(
mControllers.taskbarDragLayerController.getNavbarBackgroundAlpha(), mControllers.taskbarDragLayerController.getNavbarBackgroundAlpha(),
flags -> (flags & flagsToShowBg) != 0, AnimatedFloat.VALUE, 1, 0)); flags -> ((flags & FLAG_NOTIFICATION_SHADE_EXPANDED) != 0
&& (flags & FLAG_KEYGUARD_VISIBLE) == 0)
|| (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0));
// Rotation button // Rotation button
RotationButton rotationButton = new RotationButtonImpl( RotationButton rotationButton = new RotationButtonImpl(
@@ -816,6 +817,10 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
this(alphaProperty, enableCondition, MultiValueAlpha.VALUE, 1, 0); this(alphaProperty, enableCondition, MultiValueAlpha.VALUE, 1, 0);
} }
StatePropertyHolder(AnimatedFloat animatedFloat, IntPredicate enableCondition) {
this(animatedFloat, enableCondition, AnimatedFloat.VALUE, 1, 0);
}
<T> StatePropertyHolder(T target, IntPredicate enabledCondition, <T> StatePropertyHolder(T target, IntPredicate enabledCondition,
Property<T, Float> property, float enabledValue, float disabledValue) { Property<T, Float> property, float enabledValue, float disabledValue) {
mEnableCondition = enabledCondition; mEnableCondition = enabledCondition;