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

Commit 0cdf92f9 authored by Thales Lima's avatar Thales Lima Committed by Alex Chau
Browse files

launcher: change default state for RecentsActivity

When the user presses the home button, because fallback Recents doesn't
have a way to change the state, we rely on `onStop` to reset the state.
This makes the state be cleared correctly.

Fixes 192254944
Test: follow the bug

Change-Id: I177b09392214d078373e3852517b57d9172d944d
parent b574095b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@ import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DU
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_DURATION;
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_PRE_DELAY;
import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
import static com.android.launcher3.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
import static com.android.quickstep.TaskViewUtils.createRecentsWindowAnimator;
@@ -75,7 +75,6 @@ import com.android.quickstep.util.RecentsAtomicAnimationFactory;
import com.android.quickstep.util.SplitSelectStateController;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.SplitPlaceholderView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
@@ -287,7 +286,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mStateManager = new StateManager<>(this, RecentsState.DEFAULT);
        mStateManager = new StateManager<>(this, RecentsState.BG_LAUNCHER);

        mOldConfig = new Configuration(getResources().getConfiguration());
        initDeviceProfile();
+2 −2
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ public class RecentsState implements BaseState<RecentsState> {
    private static final int FLAG_OVERVIEW_UI = BaseState.getFlag(7);

    public static final RecentsState DEFAULT = new RecentsState(0,
            FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID | FLAG_SCRIM
                    | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI);
            FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID
                    | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI);
    public static final RecentsState MODAL_TASK = new ModalState(1,
            FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_MODAL
                    | FLAG_SHOW_AS_GRID | FLAG_SCRIM | FLAG_LIVE_TILE | FLAG_OVERVIEW_UI);