mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Fix some state issues with user-controlled animations
Previously, user-controlled animations weren't properly being canceled when a non-user-controlled animation started, e.g. when hitting home. Thus, we could end in the wrong or inconsistent state because the user-controlled animation's end runnable was still used. Now we add a cleanup callback for when we reset the user-controlled animation for one that isn't user-controlled. Also fixed a couple typos. Tests (easier with animation durations extended): - Swipe up and hit home before reaching overview -> land on home - Go to overview, swipe down slightly (before threshold to go to workspace) and let go -> return to overview without flash (recents was resetting) - Swipe up, press home while swiping -> goes home, stops responding to drag - Start dismissing task and hit home before it finishes (or while dragging) -> goes home, stops responding to drag Bug: 78249220 Change-Id: If11d8999e3fadba38c987b25af67cd2304cd859b
This commit is contained in:
@@ -159,7 +159,7 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
AnimatorSetBuilder builder, AnimationConfig config) {
|
||||
float targetProgress = toState.getVerticalProgress(mLauncher);
|
||||
if (Float.compare(mProgress, targetProgress) == 0) {
|
||||
setAlphas(toState, config.getProperSetter(builder));
|
||||
setAlphas(toState, config.getPropertySetter(builder));
|
||||
// Fail fast
|
||||
onProgressAnimationEnd();
|
||||
return;
|
||||
@@ -174,7 +174,7 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
|
||||
builder.play(anim);
|
||||
|
||||
setAlphas(toState, config.getProperSetter(builder));
|
||||
setAlphas(toState, config.getPropertySetter(builder));
|
||||
}
|
||||
|
||||
private void setAlphas(LauncherState toState, PropertySetter setter) {
|
||||
|
||||
Reference in New Issue
Block a user