Polish the back to home gesture animation to match the spec.

Bug:228533817
Test: Enable back animation from FlagFlipper (Predicitve Back Animation)
and swipe back on Flag Flipper. Try in both portrait and landscape mode.

Change-Id: I7792dc5079698c1b5a7dd3cd06344ba46c4a2da6
This commit is contained in:
Shan Huang
2022-04-07 22:46:13 +00:00
parent d34d3b4834
commit 4ce2b40f91
4 changed files with 110 additions and 55 deletions

View File

@@ -244,8 +244,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
mDragLayerAlpha = mDragLayer.getAlphaProperty(ALPHA_INDEX_TRANSITIONS);
mHandler = new Handler(Looper.getMainLooper());
mDeviceProfile = mLauncher.getDeviceProfile();
mBackAnimationController = new LauncherBackAnimationController(
mDeviceProfile, mLauncher, this);
mBackAnimationController = new LauncherBackAnimationController(mLauncher, this);
Resources res = mLauncher.getResources();
mContentScale = res.getFloat(R.dimen.content_scale);
@@ -1441,6 +1440,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
}
};
anim.addOnUpdateListener(runner);
} else {
// If no floating icon or widget is present, animate the to the default window
// target rect.
anim.addOnUpdateListener(new SpringAnimRunner(targets, targetRect, windowTargetBounds));
}
// Use a fixed velocity to start the animation.