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

Commit 6556aa93 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removed old stack member variable in RecentsView"

parents 31f56e48 b7164cd0
Loading
Loading
Loading
Loading
+10 −13
Original line number Original line Diff line number Diff line
@@ -95,7 +95,6 @@ public class RecentsView extends FrameLayout {
    private static final int SHOW_STACK_ACTION_BUTTON_DURATION = 134;
    private static final int SHOW_STACK_ACTION_BUTTON_DURATION = 134;
    private static final int HIDE_STACK_ACTION_BUTTON_DURATION = 100;
    private static final int HIDE_STACK_ACTION_BUTTON_DURATION = 100;


    private TaskStack mStack;
    private TaskStackView mTaskStackView;
    private TaskStackView mTaskStackView;
    private TextView mStackActionButton;
    private TextView mStackActionButton;
    private TextView mEmptyView;
    private TextView mEmptyView;
@@ -195,7 +194,6 @@ public class RecentsView extends FrameLayout {
     * Called from RecentsActivity when the task stack is updated.
     * Called from RecentsActivity when the task stack is updated.
     */
     */
    public void updateStack(TaskStack stack, boolean setStackViewTasks) {
    public void updateStack(TaskStack stack, boolean setStackViewTasks) {
        mStack = stack;
        if (setStackViewTasks) {
        if (setStackViewTasks) {
            mTaskStackView.setTasks(stack, true /* allowNotifyStackChanges */);
            mTaskStackView.setTasks(stack, true /* allowNotifyStackChanges */);
        }
        }
@@ -212,7 +210,7 @@ public class RecentsView extends FrameLayout {
     * Returns the current TaskStack.
     * Returns the current TaskStack.
     */
     */
    public TaskStack getStack() {
    public TaskStack getStack() {
        return mStack;
        return mTaskStackView.getStack();
    }
    }


    /*
    /*
@@ -251,8 +249,7 @@ public class RecentsView extends FrameLayout {
    /** Launches the task that recents was launched from if possible */
    /** Launches the task that recents was launched from if possible */
    public boolean launchPreviousTask() {
    public boolean launchPreviousTask() {
        if (mTaskStackView != null) {
        if (mTaskStackView != null) {
            TaskStack stack = mTaskStackView.getStack();
            Task task = getStack().getLaunchTarget();
            Task task = stack.getLaunchTarget();
            if (task != null) {
            if (task != null) {
                TaskView taskView = mTaskStackView.getChildViewForTask(task);
                TaskView taskView = mTaskStackView.getChildViewForTask(task);
                EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null,
                EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null,
@@ -437,8 +434,9 @@ public class RecentsView extends FrameLayout {


    public final void onBusEvent(LaunchTaskEvent event) {
    public final void onBusEvent(LaunchTaskEvent event) {
        mLastTaskLaunchedWasFreeform = event.task.isFreeformTask();
        mLastTaskLaunchedWasFreeform = event.task.isFreeformTask();
        mTransitionHelper.launchTaskFromRecents(mStack, event.task, mTaskStackView, event.taskView,
        mTransitionHelper.launchTaskFromRecents(getStack(), event.task, mTaskStackView,
                event.screenPinningRequested, event.targetTaskBounds, event.targetTaskStack);
                event.taskView, event.screenPinningRequested, event.targetTaskBounds,
                event.targetTaskStack);
    }
    }


    public final void onBusEvent(DismissRecentsToHomeAnimationStarted event) {
    public final void onBusEvent(DismissRecentsToHomeAnimationStarted event) {
@@ -514,8 +512,7 @@ public class RecentsView extends FrameLayout {
                        EventBus.getDefault().send(new DockedFirstAnimationFrameEvent());
                        EventBus.getDefault().send(new DockedFirstAnimationFrameEvent());
                        // Remove the task and don't bother relaying out, as all the tasks will be
                        // Remove the task and don't bother relaying out, as all the tasks will be
                        // relaid out when the stack changes on the multiwindow change event
                        // relaid out when the stack changes on the multiwindow change event
                        mTaskStackView.getStack().removeTask(event.task, null,
                        getStack().removeTask(event.task, null, true /* fromDockGesture */);
                                true /* fromDockGesture */);
                    }
                    }
                };
                };


@@ -536,7 +533,7 @@ public class RecentsView extends FrameLayout {
                MetricsLogger.action(mContext, MetricsEvent.ACTION_WINDOW_DOCK_DRAG_DROP,
                MetricsLogger.action(mContext, MetricsEvent.ACTION_WINDOW_DOCK_DRAG_DROP,
                        event.task.getTopComponent().flattenToShortString());
                        event.task.getTopComponent().flattenToShortString());
            } else {
            } else {
                EventBus.getDefault().send(new DragEndCancelledEvent(mStack, event.task,
                EventBus.getDefault().send(new DragEndCancelledEvent(getStack(), event.task,
                        event.taskView));
                        event.taskView));
            }
            }
        } else {
        } else {
@@ -598,7 +595,7 @@ public class RecentsView extends FrameLayout {
    public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) {
    public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) {
        RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
        RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
        if (!launchState.launchedViaDockGesture && !launchState.launchedFromApp
        if (!launchState.launchedViaDockGesture && !launchState.launchedFromApp
                && mStack.getTaskCount() > 0) {
                && getStack().getTaskCount() > 0) {
            animateBackgroundScrim(1f,
            animateBackgroundScrim(1f,
                    TaskStackAnimationHelper.ENTER_FROM_HOME_TRANSLATION_DURATION);
                    TaskStackAnimationHelper.ENTER_FROM_HOME_TRANSLATION_DURATION);
        }
        }
@@ -797,8 +794,8 @@ public class RecentsView extends FrameLayout {
        writer.print(" [0x"); writer.print(id); writer.print("]");
        writer.print(" [0x"); writer.print(id); writer.print("]");
        writer.println();
        writer.println();


        if (mStack != null) {
        if (getStack() != null) {
            mStack.dump(innerPrefix, writer);
            getStack().dump(innerPrefix, writer);
        }
        }
        if (mTaskStackView != null) {
        if (mTaskStackView != null) {
            mTaskStackView.dump(innerPrefix, writer);
            mTaskStackView.dump(innerPrefix, writer);