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

Commit fafecabb authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Only call reset() when transitioning to a State that doesn't have...

Merge "Only call reset() when transitioning to a State that doesn't have RecentView visible" into main
parents d3e1d7ba 0033148e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
        }
        setStateWithAnimationInternal(toState, config, builder);
        builder.addEndListener(success -> {
            if (!success) {
            if (!success && !toState.isRecentsViewVisible) {
                mRecentsView.reset();
            }
        });
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
        // While animating into recents, update the visible task data as needed
        setter.addOnFrameCallback(() -> mRecentsView.loadVisibleTaskData(FLAG_UPDATE_ALL));
        setter.addEndListener(success -> {
            if (!success) {
            if (!success && !toState.isRecentsViewVisible()) {
                mRecentsView.reset();
            }
        });
+1 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ import static android.app.ActivityTaskManager.INVALID_TASK_ID;

import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS;
import static com.android.quickstep.fallback.RecentsState.DEFAULT;
import static com.android.quickstep.fallback.RecentsState.HOME;
import static com.android.quickstep.fallback.RecentsState.MODAL_TASK;
import static com.android.quickstep.fallback.RecentsState.OVERVIEW_SPLIT_SELECT;

@@ -271,7 +270,7 @@ public class FallbackRecentsView<CONTAINER_TYPE extends Context & RecentsViewCon

    @Override
    public void onStateTransitionComplete(RecentsState finalState) {
        if (finalState == HOME) {
        if (!finalState.isRecentsViewVisible()) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
+1 −5
Original line number Diff line number Diff line
@@ -18,14 +18,11 @@ package com.android.quickstep.views;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.window.flags.DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY;

import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.CLEAR_ALL_BUTTON;
import static com.android.launcher3.LauncherState.EDIT_MODE;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT;
import static com.android.launcher3.LauncherState.SPRING_LOADED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SPLIT_SELECTION_EXIT_HOME;

import android.annotation.TargetApi;
@@ -173,8 +170,7 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher

    @Override
    public void onStateTransitionComplete(LauncherState finalState) {
        if (finalState == NORMAL || finalState == SPRING_LOADED  || finalState == EDIT_MODE
                || finalState == ALL_APPS) {
        if (!finalState.isRecentsViewVisible) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }