Fix weird task launch animation
Sometimes a weird task launch animation can be observed where the task is animated to fullscreen before animated again from center to the left side of the screen. This is caused by stateManager.moveToRestState() call that internally animates FULLSCREEN_PROGRESS to 0 based on its launcher state (normal). The implementation right now finishes the recents animation after this call, instead of before. We should finish the recents animation first before doing the recents view clean up work. Fixes: 184878444 Test: manual Change-Id: Ib24fcf5ecb12e1a1357441427daface2778e1008
This commit is contained in:
@@ -484,7 +484,6 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mIsClickableAsLiveTile = false;
|
||||
RecentsView recentsView = getRecentsView();
|
||||
RemoteAnimationTargets targets = recentsView.getLiveTileParams().getTargetSet();
|
||||
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(false);
|
||||
|
||||
AnimatorSet anim = new AnimatorSet();
|
||||
TaskViewUtils.composeRecentsLaunchAnimator(
|
||||
@@ -493,10 +492,13 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mActivity.getStateManager(), recentsView,
|
||||
recentsView.getDepthController());
|
||||
anim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animator) {
|
||||
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(true);
|
||||
recentsView.finishRecentsAnimation(false, null);
|
||||
mIsClickableAsLiveTile = true;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user