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

Commit be8a1247 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Don't start recents if no transition is happening

am: 84afb1a9

Change-Id: I611eb5e1c41c1a70e2c5c8d3999b87c1aed28ba8
parents be7facd1 84afb1a9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ public class AppTransition implements Dump {

    void goodToGo(AppWindowAnimator topOpeningAppAnimator, AppWindowAnimator topClosingAppAnimator,
            ArraySet<AppWindowToken> openingApps, ArraySet<AppWindowToken> closingApps) {
        int appTransition = mNextAppTransition;
        mNextAppTransition = TRANSIT_UNSET;
        mAppTransitionState = APP_STATE_RUNNING;
        notifyAppTransitionStartingLocked(
@@ -382,7 +383,7 @@ public class AppTransition implements Dump {
                topOpeningAppAnimator != null ? topOpeningAppAnimator.animation : null,
                topClosingAppAnimator != null ? topClosingAppAnimator.animation : null);
        mService.getDefaultDisplayContentLocked().getDockedDividerController()
                .notifyAppTransitionStarting(openingApps);
                .notifyAppTransitionStarting(openingApps, appTransition);

        // Prolong the start for the transition when docking a task from recents, unless recents
        // ended it already then we don't need to wait.
+4 −2
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import static android.view.WindowManager.DOCKED_RIGHT;
import static android.view.WindowManager.DOCKED_TOP;
import static com.android.server.wm.AppTransition.DEFAULT_APP_TRANSITION_DURATION;
import static com.android.server.wm.AppTransition.TOUCH_RESPONSE_INTERPOLATOR;
import static com.android.server.wm.AppTransition.TRANSIT_NONE;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerService.H.NOTIFY_DOCKED_STACK_MINIMIZED_CHANGED;
@@ -493,7 +494,7 @@ public class DockedStackDividerController implements DimLayerUser {
        checkMinimizeChanged(false /* animate */);
    }

    void notifyAppTransitionStarting(ArraySet<AppWindowToken> openingApps) {
    void notifyAppTransitionStarting(ArraySet<AppWindowToken> openingApps, int appTransition) {
        final boolean wasMinimized = mMinimizedDock;
        checkMinimizeChanged(true /* animate */);

@@ -502,7 +503,8 @@ public class DockedStackDividerController implements DimLayerUser {
        // any case that was missed in ActivityStarter.postStartActivityUncheckedProcessing because
        // we couldn't retrace the launch of the app in the docked stack to the launch from
        // homescreen.
        if (wasMinimized && mMinimizedDock && containsAppInDockedStack(openingApps)) {
        if (wasMinimized && mMinimizedDock && containsAppInDockedStack(openingApps)
                && appTransition != TRANSIT_NONE) {
            mService.showRecentApps(true /* fromHome */);
        }
    }