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

Commit 6dab7bac authored by Randy Pfohl's avatar Randy Pfohl Committed by Android (Google) Code Review
Browse files

Merge "Enabling Fallback launcher cases" into main

parents 4a3c23a9 9d7141d1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -309,7 +309,9 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL
     * changes in the WM hierarchy (ie. starting recents transition when you are already over home).
     */
    public boolean useSyntheticRecentsTransition() {
        return mRunningTask.isHomeTask() && Flags.enableFallbackOverviewInWindow();
        return mRunningTask.isHomeTask()
                && (Flags.enableFallbackOverviewInWindow()
                        || Flags.enableLauncherOverviewInWindow());
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ public final class OverviewComponentObserver {
            mContainerInterface.onAssistantVisibilityChanged(0.f);
        }

        if (SEPARATE_RECENTS_ACTIVITY.get()) {
        if (SEPARATE_RECENTS_ACTIVITY.get() || Flags.enableLauncherOverviewInWindow()) {
            mIsDefaultHome = false;
            if (defaultHome == null) {
                defaultHome = mMyHomeIntent.getComponent();
@@ -179,7 +179,7 @@ public final class OverviewComponentObserver {
        } else {
            // The default home app is a different launcher. Use the fallback Overview instead.

            if (Flags.enableFallbackOverviewInWindow()) {
            if (Flags.enableLauncherOverviewInWindow() || Flags.enableFallbackOverviewInWindow()) {
                mContainerInterface = FallbackWindowInterface.getInstance();
            } else {
                mContainerInterface = FallbackActivityInterface.INSTANCE;
+2 −1
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ public class RecentsAnimationCallbacks implements
        boolean isOpeningHome = Arrays.stream(appTargets).filter(app -> app.mode == MODE_OPENING
                        && app.windowConfiguration.getActivityType() == ACTIVITY_TYPE_HOME)
                .count() > 0;
        if (appCount == 0 && (!Flags.enableFallbackOverviewInWindow() || isOpeningHome)) {
        if (appCount == 0 && (!(Flags.enableFallbackOverviewInWindow()
                || Flags.enableLauncherOverviewInWindow()) || isOpeningHome)) {
            ActiveGestureProtoLogProxy.logOnRecentsAnimationStartCancelled();
            // Edge case, if there are no closing app targets, then Launcher has nothing to handle
            notifyAnimationCanceled();
+2 −1
Original line number Diff line number Diff line
@@ -295,7 +295,8 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn

        // TODO:(b/365777482) if flag is enabled, but on launcher it will crash.
        if(containerInterface.getCreatedContainer() instanceof RecentsWindowManager
                && Flags.enableFallbackOverviewInWindow()){
                && (Flags.enableFallbackOverviewInWindow()
                        || Flags.enableLauncherOverviewInWindow())) {
            mRecentsAnimationStartPending = getSystemUiProxy().startRecentsActivity(intent, options,
                    mCallbacks, gestureState.useSyntheticRecentsTransition());
            mRecentsWindowsManager.startRecentsWindow(mCallbacks);
+4 −2
Original line number Diff line number Diff line
@@ -675,7 +675,7 @@ public class TouchInteractionService extends Service {
        mDesktopVisibilityController = new DesktopVisibilityController(this);
        mTaskbarManager = new TaskbarManager(
                this, mAllAppsActionManager, mNavCallbacks, mDesktopVisibilityController);
        if(Flags.enableFallbackOverviewInWindow()) {
        if (Flags.enableLauncherOverviewInWindow() || Flags.enableFallbackOverviewInWindow()) {
            mRecentsWindowManager = new RecentsWindowManager(this);
        }
        mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
@@ -1410,8 +1410,10 @@ public class TouchInteractionService extends Service {
    }

    public AbsSwipeUpHandler.Factory getSwipeUpHandlerFactory() {
        boolean recentsInWindow =
                Flags.enableFallbackOverviewInWindow() || Flags.enableLauncherOverviewInWindow();
        return mOverviewComponentObserver.isHomeAndOverviewSame()
                ? mLauncherSwipeHandlerFactory : (Flags.enableFallbackOverviewInWindow()
                ? mLauncherSwipeHandlerFactory : (recentsInWindow
                ? mRecentsWindowSwipeHandlerFactory : mFallbackSwipeHandlerFactory);
    }

Loading