Taskbar should animate immediately when tapping a live tile

Fixes: 194728948
Test: manual
Change-Id: Ia2bf9e4d050367ac08e3308a308f19f04577c49e
This commit is contained in:
Tracy Zhou
2021-08-04 22:31:08 -07:00
parent 3093dbb89e
commit ae0c16dd0c
3 changed files with 67 additions and 29 deletions
@@ -584,6 +584,7 @@ public class TaskView extends FrameLayout implements Reusable {
}
});
anim.start();
recentsView.onTaskLaunchedInLiveTileMode();
} else {
launchTaskAnimated();
}
@@ -614,12 +615,14 @@ public class TaskView extends FrameLayout implements Reusable {
ActivityOptionsWrapper opts = mActivity.getActivityLaunchOptions(this, null);
if (ActivityManagerWrapper.getInstance()
.startActivityFromRecents(mTask.key, opts.options)) {
if (ENABLE_QUICKSTEP_LIVE_TILE.get() &&
getRecentsView().getRunningTaskViewId() != -1) {
RecentsView recentsView = getRecentsView();
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && recentsView.getRunningTaskViewId() != -1) {
recentsView.onTaskLaunchedInLiveTileMode();
// Return a fresh callback in the live tile case, so that it's not accidentally
// triggered by QuickstepTransitionManager.AppLaunchAnimationRunner.
RunnableList callbackList = new RunnableList();
getRecentsView().addSideTaskLaunchCallback(callbackList);
recentsView.addSideTaskLaunchCallback(callbackList);
return callbackList;
}
return opts.onEndCallback;