mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Finish recents animation on task dismissal only if the task is a live tile task" into sc-dev
This commit is contained in:
@@ -2372,13 +2372,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
if (success) {
|
||||
if (shouldRemoveTask) {
|
||||
if (taskView.getTask() != null) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> {
|
||||
UI_HELPER_EXECUTOR.getHandler().postDelayed(() ->
|
||||
ActivityManagerWrapper.getInstance().removeTask(
|
||||
taskView.getTask().key.id),
|
||||
REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
|
||||
});
|
||||
if (LIVE_TILE.get() && taskView.isRunningTask()) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> removeTaskInternal(taskView));
|
||||
} else {
|
||||
removeTaskInternal(taskView);
|
||||
}
|
||||
mActivity.getStatsLogManager().logger()
|
||||
.withItemInfo(taskView.getItemInfo())
|
||||
.log(LAUNCHER_TASK_DISMISS_SWIPE_UP);
|
||||
@@ -2424,6 +2423,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
return anim;
|
||||
}
|
||||
|
||||
private void removeTaskInternal(TaskView taskView) {
|
||||
UI_HELPER_EXECUTOR.getHandler().postDelayed(() ->
|
||||
ActivityManagerWrapper.getInstance().removeTask(
|
||||
taskView.getTask().key.id),
|
||||
REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if one of the task thumbnails would intersect/overlap with the
|
||||
* {@link #mSplitPlaceholderView}
|
||||
|
||||
Reference in New Issue
Block a user