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

Commit c169faaa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix opening/closing apps isn't add during device rotating"

parents 551b7702 3b8bbc8e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3990,7 +3990,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        // If we are preparing an app transition, then delay changing
        // the visibility of this token until we execute that transition.
        if (okToAnimate() && appTransition.isTransitionSet()) {
        // Note that we ignore display frozen since we want the opening / closing transition type
        // can be updated correctly even display frozen, and it's safe since in applyAnimation will
        // still check DC#okToAnimate again if the transition animation is fine to apply.
        if (okToAnimate(true /* ignoreFrozen */) && appTransition.isTransitionSet()) {
            if (visible) {
                displayContent.mOpeningApps.add(this);
                mEnteringAnimation = true;
+2 −2
Original line number Diff line number Diff line
@@ -624,8 +624,8 @@ public class AppTransitionController {
            // If we start the app transition at this point, we will interrupt it halfway with a
            // new rotation animation after the old one finally finishes. It's better to defer the
            // app transition.
            if (screenRotationAnimation != null && screenRotationAnimation.isAnimating() &&
                    mDisplayContent.getDisplayRotation().needsUpdate()) {
            if (screenRotationAnimation != null && screenRotationAnimation.isAnimating()
                    && mDisplayContent.getDisplayRotation().needsUpdate()) {
                ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
                        "Delaying app transition for screen rotation animation to finish");
                return false;
+10 −2
Original line number Diff line number Diff line
@@ -3988,15 +3988,23 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    }

    boolean okToDisplay() {
        return okToDisplay(false);
    }

    boolean okToDisplay(boolean ignoreFrozen) {
        if (mDisplayId == DEFAULT_DISPLAY) {
            return !mWmService.mDisplayFrozen
            return (!mWmService.mDisplayFrozen || ignoreFrozen)
                    && mWmService.mDisplayEnabled && mWmService.mPolicy.isScreenOn();
        }
        return mDisplayInfo.state == Display.STATE_ON;
    }

    boolean okToAnimate() {
        return okToDisplay() &&
        return okToAnimate(false);
    }

    boolean okToAnimate(boolean ignoreFrozen) {
        return okToDisplay(ignoreFrozen) &&
                (mDisplayId != DEFAULT_DISPLAY || mWmService.mPolicy.okToAnimate());
    }

+5 −1
Original line number Diff line number Diff line
@@ -2036,7 +2036,11 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
    }

    boolean okToAnimate() {
        return mDisplayContent != null && mDisplayContent.okToAnimate();
        return okToAnimate(false /* ignoreFrozen */);
    }

    boolean okToAnimate(boolean ignoreFrozen) {
        return mDisplayContent != null && mDisplayContent.okToAnimate(ignoreFrozen);
    }

    @Override