Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f8342d7 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Finish recents animation on task dismissal only if the task is a live tile task" into sc-dev

parents 1e70c235 d537968b
Loading
Loading
Loading
Loading
+13 −7
Original line number Original line Diff line number Diff line
@@ -2372,13 +2372,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                if (success) {
                if (success) {
                    if (shouldRemoveTask) {
                    if (shouldRemoveTask) {
                        if (taskView.getTask() != null) {
                        if (taskView.getTask() != null) {
                            if (LIVE_TILE.get() && taskView.isRunningTask()) {
                                finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                                finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                                    () -> {
                                        () -> removeTaskInternal(taskView));
                                UI_HELPER_EXECUTOR.getHandler().postDelayed(() ->
                            } else {
                                        ActivityManagerWrapper.getInstance().removeTask(
                                removeTaskInternal(taskView);
                                                taskView.getTask().key.id),
                            }
                                        REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
                            });
                            mActivity.getStatsLogManager().logger()
                            mActivity.getStatsLogManager().logger()
                                    .withItemInfo(taskView.getItemInfo())
                                    .withItemInfo(taskView.getItemInfo())
                                    .log(LAUNCHER_TASK_DISMISS_SWIPE_UP);
                                    .log(LAUNCHER_TASK_DISMISS_SWIPE_UP);
@@ -2424,6 +2423,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        return anim;
        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
     * @return {@code true} if one of the task thumbnails would intersect/overlap with the
     *         {@link #mSplitPlaceholderView}
     *         {@link #mSplitPlaceholderView}