mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Merge "Dispatch onAnimationStart and End to maintain proper state" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8baae80cdf
@@ -240,6 +240,7 @@ public class AllSetActivity extends Activity {
|
||||
maybeResumeOrPauseBackgroundAnimation();
|
||||
if (mSwipeProgress.value >= 1) {
|
||||
finishAndRemoveTask();
|
||||
dispatchLauncherAnimStartEnd();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,6 +252,18 @@ public class AllSetActivity extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be called when we have successfully reached Launcher, so we dispatch to animation
|
||||
* listeners to ensure the state matches the visual animation that just occurred.
|
||||
*/
|
||||
private void dispatchLauncherAnimStartEnd() {
|
||||
if (mLauncherStartAnim != null) {
|
||||
mLauncherStartAnim.dispatchOnStart();
|
||||
mLauncherStartAnim.dispatchOnEnd();
|
||||
mLauncherStartAnim = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -259,6 +272,7 @@ public class AllSetActivity extends Activity {
|
||||
if (mBackgroundAnimatorListener != null) {
|
||||
mAnimatedBackground.removeAnimatorListener(mBackgroundAnimatorListener);
|
||||
}
|
||||
dispatchLauncherAnimStartEnd();
|
||||
}
|
||||
|
||||
private AnimatedFloat createSwipeUpProxy(GestureState state) {
|
||||
|
||||
Reference in New Issue
Block a user