mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Do not animate icon alignment in phone mode
With the existing code, there is a rare case that mIconAlignControllerLazy is set from unfolded state, and then go to small screen, and we will reuse mIconAlignControllerLazy to animate, only to find out that scaleX for the icon view is infinity. Instead, we should unset mIconAlignControllerLazy in phone mode. Fixes: 274517647 Test: manual Change-Id: I3200761e5f4c6df0d89744f22e38bfe7fc7846cc
This commit is contained in:
@@ -435,6 +435,11 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
* 1 => fully aligned
|
||||
*/
|
||||
public void setLauncherIconAlignment(float alignmentRatio, DeviceProfile launcherDp) {
|
||||
if (isPhoneMode(launcherDp)) {
|
||||
mIconAlignControllerLazy = null;
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isHotseatIconOnTopWhenAligned =
|
||||
mControllers.uiController.isHotseatIconOnTopWhenAligned();
|
||||
boolean isStashed = mControllers.taskbarStashController.isStashed();
|
||||
@@ -463,11 +468,6 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
*/
|
||||
private AnimatorPlaybackController createIconAlignmentController(DeviceProfile launcherDp) {
|
||||
PendingAnimation setter = new PendingAnimation(100);
|
||||
if (TaskbarManager.isPhoneMode(launcherDp)) {
|
||||
// No animation for icons in small-screen
|
||||
return setter.createPlaybackController();
|
||||
}
|
||||
|
||||
mOnControllerPreCreateCallback.run();
|
||||
DeviceProfile taskbarDp = mActivity.getDeviceProfile();
|
||||
Rect hotseatPadding = launcherDp.getHotseatLayoutPadding(mActivity);
|
||||
|
||||
Reference in New Issue
Block a user