mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 10:26:52 +00:00
Run animation for liveTile before trying to launch it
* If current TaskView is running live tiles, animate directly when toggling recents button instead of trying to launch the task Fixes: 240231324 Test: Launching a single GroupedTaskView from overview launches as expected in 3 button. Tested adjacent launches as well. Change-Id: I6c060d918d3ae08bee9da1ad9507bb25cf445b96
This commit is contained in:
@@ -689,12 +689,13 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
/**
|
||||
* Launch of the current task (both live and inactive tasks) with an animation.
|
||||
*/
|
||||
public void launchTasks() {
|
||||
public RunnableList launchTasks() {
|
||||
RecentsView recentsView = getRecentsView();
|
||||
RemoteTargetHandle[] remoteTargetHandles = recentsView.mRemoteTargetHandles;
|
||||
RunnableList runnableList = new RunnableList();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask() && remoteTargetHandles != null) {
|
||||
if (!mIsClickableAsLiveTile) {
|
||||
return;
|
||||
return runnableList;
|
||||
}
|
||||
|
||||
mIsClickableAsLiveTile = false;
|
||||
@@ -721,7 +722,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
// here, try to launch the task as a non live tile task.
|
||||
launchTaskAnimated();
|
||||
mIsClickableAsLiveTile = true;
|
||||
return;
|
||||
return runnableList;
|
||||
}
|
||||
|
||||
AnimatorSet anim = new AnimatorSet();
|
||||
@@ -746,13 +747,24 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
launchTaskAnimated();
|
||||
}
|
||||
mIsClickableAsLiveTile = true;
|
||||
runEndCallback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
runEndCallback();
|
||||
}
|
||||
|
||||
private void runEndCallback() {
|
||||
runnableList.executeAllAndDestroy();
|
||||
}
|
||||
});
|
||||
anim.start();
|
||||
recentsView.onTaskLaunchedInLiveTileMode();
|
||||
} else {
|
||||
launchTaskAnimated();
|
||||
return launchTaskAnimated();
|
||||
}
|
||||
return runnableList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user