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

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

Merge "Use alternative way to fix split select page snapping issue" into sc-v2-dev

parents 22d7524f b3a93865
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -37,12 +37,12 @@ import com.android.launcher3.statemanager.StateManager.StateListener;
import com.android.quickstep.FallbackActivityInterface;
import com.android.quickstep.GestureState;
import com.android.quickstep.RecentsActivity;
import com.android.quickstep.util.GroupTask;
import com.android.quickstep.util.SplitSelectStateController;
import com.android.quickstep.util.TaskViewSimulator;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.quickstep.util.GroupTask;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;

@@ -206,10 +206,6 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta

    @Override
    public void onStateTransitionStart(RecentsState toState) {
        if (toState == HOME) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverviewStateEnabled(true);
        setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()));
        setOverviewFullscreenEnabled(toState.isFullScreen());
@@ -218,6 +214,10 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta

    @Override
    public void onStateTransitionComplete(RecentsState finalState) {
        if (finalState == HOME) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        boolean isOverlayEnabled = finalState == DEFAULT || finalState == MODAL_TASK;
        setOverlayEnabled(isOverlayEnabled);
        setFreezeViewVisibility(false);
+4 −4
Original line number Diff line number Diff line
@@ -92,10 +92,6 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun

    @Override
    public void onStateTransitionStart(LauncherState toState) {
        if (toState == NORMAL || toState == SPRING_LOADED) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverviewStateEnabled(toState.overviewUi);
        setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()));
        setOverviewFullscreenEnabled(toState.getOverviewFullscreenProgress() == 1);
@@ -104,6 +100,10 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun

    @Override
    public void onStateTransitionComplete(LauncherState finalState) {
        if (finalState == NORMAL || finalState == SPRING_LOADED) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        boolean isOverlayEnabled = finalState == OVERVIEW || finalState == OVERVIEW_MODAL_TASK;
        setOverlayEnabled(isOverlayEnabled);
        setFreezeViewVisibility(false);
+2 −1
Original line number Diff line number Diff line
@@ -3185,6 +3185,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                                }
                            }
                        }
                        pageBeginTransition();
                        setCurrentPage(pageToSnapTo);
                        // Update various scroll-dependent UI.
                        dispatchScrollChanged();
@@ -4024,7 +4025,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T

    /** TODO(b/181707736) More gracefully handle exiting split selection state */
    private void resetFromSplitSelectionState() {
        if (!showAsGrid()) {
        if (!mActivity.getDeviceProfile().overviewShowAsGrid) {
            int pageToSnapTo = mCurrentPage;
            if (mSplitHiddenTaskViewIndex <= pageToSnapTo) {
                pageToSnapTo += 1;