Fix Taskbar offset in launcher

This cl includes: adding support to stash controller to get device locked state. Use different taskbar offset before and after lock screen.

Test: Manual
Bug: 407589216
Flag: EXEMPT bugfix
Change-Id: I55b27d39049458c741efc9bec365cdbc27d4e012
This commit is contained in:
Jagrut Desai
2025-04-01 17:37:59 -07:00
parent f0ab519440
commit cef287164f
2 changed files with 7 additions and 1 deletions
@@ -426,6 +426,10 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
return mIsStashed;
}
public boolean isDeviceLocked() {
return hasAnyFlag(FLAG_STASHED_DEVICE_LOCKED);
}
/**
* Sets the hotseat stashed.
* b/373429249 - we might change this behavior if we remove the scrim, that's why we're keeping
@@ -959,11 +959,13 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
launcherDp.numShownHotseatIcons);
boolean isToHome = mControllers.uiController.isIconAlignedWithHotseat();
boolean isDeviceLocked = mControllers.taskbarStashController.isDeviceLocked();
// If Hotseat is not the top element, Taskbar should maintain in-app state as it fades out,
// or fade in while already in in-app state.
Interpolator interpolator = mIsHotseatIconOnTopWhenAligned ? LINEAR : FINAL_FRAME;
int offsetY = taskbarDp.getTaskbarOffsetY();
int offsetY =
isDeviceLocked ? taskbarDp.getTaskbarOffsetY() : launcherDp.getTaskbarOffsetY();
setter.setFloat(mTaskbarIconTranslationYForHome, VALUE, -offsetY, interpolator);
setter.setFloat(mTaskbarNavButtonTranslationY, VALUE, -offsetY, interpolator);
setter.setFloat(mTaskbarNavButtonTranslationYForInAppDisplay, VALUE, offsetY, interpolator);