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

Commit 176ce85d authored by randypfohl's avatar randypfohl
Browse files

Abstracting StatefulActivity from StateManager

Flag: NONE - abstraction with no logic changes.

Test: Built and ran locally, for launcher3 and third party launchers

Bug: 224595066

Change-Id: I9da15bdd649d3a20e98c6552bb9e9abaec72f97f
parent ea913b3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import java.util.function.Consumer

/** Manage recents related operations with desktop tasks */
class DesktopRecentsTransitionController(
    private val stateManager: StateManager<*>,
    private val stateManager: StateManager<*, *>,
    private val systemUiProxy: SystemUiProxy,
    private val appThread: IApplicationThread,
    private val depthController: DepthController?
@@ -64,7 +64,7 @@ class DesktopRecentsTransitionController(

    private class RemoteDesktopLaunchTransitionRunner(
        private val desktopTaskView: DesktopTaskView,
        private val stateManager: StateManager<*>,
        private val stateManager: StateManager<*, *>,
        private val depthController: DepthController?,
        private val successCallback: Consumer<Boolean>?
    ) : RemoteTransitionStub() {
+1 −1
Original line number Diff line number Diff line
@@ -1118,7 +1118,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer
    }

    @Override
    protected void collectStateHandlers(List<StateHandler> out) {
    public void collectStateHandlers(List<StateHandler<LauncherState>> out) {
        super.collectStateHandlers(out);
        out.add(getDepthController());
        out.add(new RecentsViewStateController(this));
+2 −1
Original line number Diff line number Diff line
@@ -154,7 +154,8 @@ public final class FallbackActivityInterface extends

    @Override
    public void onExitOverview(RotationTouchHelper deviceState, Runnable exitRunnable) {
        final StateManager<RecentsState> stateManager = getCreatedContainer().getStateManager();
        final StateManager<RecentsState, RecentsActivity> stateManager =
                getCreatedContainer().getStateManager();
        if (stateManager.getState() == HOME) {
            exitRunnable.run();
            notifyRecentsOfOrientation(deviceState);
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import androidx.annotation.UiThread;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Flags;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.LauncherInitListener;
import com.android.launcher3.LauncherState;
@@ -242,7 +243,8 @@ public final class LauncherActivityInterface extends

    @Override
    public void onExitOverview(RotationTouchHelper deviceState, Runnable exitRunnable) {
        final StateManager<LauncherState> stateManager = getCreatedContainer().getStateManager();
        final StateManager<LauncherState, Launcher> stateManager =
                getCreatedContainer().getStateManager();
        stateManager.addStateListener(
                new StateManager.StateListener<LauncherState>() {
                    @Override
+3 −2
Original line number Diff line number Diff line
@@ -228,8 +228,9 @@ public class OverviewCommandHelper {
        }
        BaseActivityInterface<?, T> activityInterface =
                mOverviewComponentObserver.getActivityInterface();
        RecentsView visibleRecentsView = activityInterface.getVisibleRecentsView();
        RecentsView createdRecentsView;

        RecentsView<?, ?> visibleRecentsView = activityInterface.getVisibleRecentsView();
        RecentsView<?, ?> createdRecentsView;

        Log.d(TAG, "executeCommand: " + cmd
                + " - visibleRecentsView: " + visibleRecentsView);
Loading