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

Commit 21167f01 authored by Becky Qiu's avatar Becky Qiu
Browse files

[Overview Actions] Hide other tasks for select mode UI.

Test:local
Bug:139828243

Change-Id: Idc9c6a0e354b9df7f48f3ce93b560fdc4999fc3a
parent 9c40c83d
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
import android.animation.LayoutTransition.TransitionListener;
@@ -700,6 +699,21 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
        return taskViewCount;
    }

    /**
     * Updates UI for a modal task, including hiding other tasks.
     */
    public void updateUiForModalTask(TaskView taskView, boolean isTaskOverlayModal) {
        int currentIndex = indexOfChild(taskView);
        TaskView previousTask = getTaskViewAt(currentIndex - 1);
        TaskView nextTask = getTaskViewAt(currentIndex + 1);
        if (previousTask != null) {
            previousTask.setVisibility(isTaskOverlayModal ? View.INVISIBLE : View.VISIBLE);
        }
        if (nextTask != null) {
            nextTask.setVisibility(isTaskOverlayModal ? View.INVISIBLE : View.VISIBLE);
        }
    }

    protected void onTaskStackUpdated() { }

    public void resetTaskVisuals() {
+7 −0
Original line number Diff line number Diff line
@@ -245,6 +245,13 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
        return mSnapshotView.getTaskOverlay().isOverlayModal();
    }

    /** Updates UI based on whether the task is modal. */
    public void updateUiForModalTask() {
        if (getRecentsView() != null) {
            getRecentsView().updateUiForModalTask(this, isTaskOverlayModal());
        }
    }

    public TaskMenuView getMenuView() {
        return mMenuView;
    }