mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Keep nav button container and back button stable during SUW
- Disable translations on both the container and back button while in SUW since it's aligned with SUW actions (even in the rare case that a user will set up device lock and then lock/unlock the screen to show the bouncer while in SUW) Bug: 346923810 Flag: EXEMPT bugfix Test: Wipe and go through SUW with device lock Change-Id: I2d500103e8775d8cf52185d43b3b43cc518884e1
This commit is contained in:
@@ -448,14 +448,16 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
mPropertyHolders.add(new StatePropertyHolder(mBackButton,
|
||||
flags -> (flags & FLAG_IME_VISIBLE) != 0,
|
||||
ROTATION_DRAWABLE_PERCENT, 1f, 0f));
|
||||
// Translate back button to be at end/start of other buttons for keyguard
|
||||
// Translate back button to be at end/start of other buttons for keyguard (only after SUW
|
||||
// since it is laid to align with SUW actions while in that state)
|
||||
int navButtonSize = mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.taskbar_nav_buttons_size);
|
||||
boolean isRtl = Utilities.isRtl(mContext.getResources());
|
||||
if (!mContext.isPhoneMode()) {
|
||||
mPropertyHolders.add(new StatePropertyHolder(
|
||||
mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0
|
||||
|| (flags & FLAG_KEYGUARD_VISIBLE) != 0,
|
||||
mBackButton, flags -> mContext.isUserSetupComplete()
|
||||
&& ((flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0
|
||||
|| (flags & FLAG_KEYGUARD_VISIBLE) != 0),
|
||||
VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
|
||||
}
|
||||
|
||||
@@ -1293,7 +1295,10 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
boolean isNavbarOnRight = location.isOnLeft(mNavButtonsView.isLayoutRtl());
|
||||
DeviceProfile dp = mContext.getDeviceProfile();
|
||||
float navBarTargetStartX;
|
||||
if (mContext.shouldStartAlignTaskbar()) {
|
||||
if (!mContext.isUserSetupComplete()) {
|
||||
// Skip additional translations on the nav bar container while in SUW layout
|
||||
return 0;
|
||||
} else if (mContext.shouldStartAlignTaskbar()) {
|
||||
int navBarSpacing = dp.inlineNavButtonsEndSpacingPx;
|
||||
// If the taskbar is start aligned the navigation bar is aligned to the start or end of
|
||||
// the container, depending on the bubble bar location
|
||||
|
||||
Reference in New Issue
Block a user