mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Finish recents animation on task dismissal only if the task is a live tile task am: 2591768d54
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15072976 Change-Id: I9607f75e34453a8f92915370b83db03891933657
This commit is contained in:
@@ -2421,12 +2421,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
if (success) {
|
||||
if (shouldRemoveTask) {
|
||||
if (dismissedTaskView.getTask() != null) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> {
|
||||
UI_HELPER_EXECUTOR.getHandler().postDelayed(() ->
|
||||
ActivityManagerWrapper.getInstance().removeTask(
|
||||
dismissedTaskId), REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
|
||||
});
|
||||
if (LIVE_TILE.get() && dismissedTaskView.isRunningTask()) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> removeTaskInternal(dismissedTaskId));
|
||||
} else {
|
||||
removeTaskInternal(dismissedTaskId);
|
||||
}
|
||||
mActivity.getStatsLogManager().logger()
|
||||
.withItemInfo(dismissedTaskView.getItemInfo())
|
||||
.log(LAUNCHER_TASK_DISMISS_SWIPE_UP);
|
||||
@@ -2472,6 +2472,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
return anim;
|
||||
}
|
||||
|
||||
private void removeTaskInternal(int dismissedTaskId) {
|
||||
UI_HELPER_EXECUTOR.getHandler().postDelayed(
|
||||
() -> ActivityManagerWrapper.getInstance().removeTask(dismissedTaskId),
|
||||
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