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

Commit 25b5ea4d authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Move insets freeze to visibleRequested change" into sc-dev am: 84d0442e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13733986

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2f1b3fac80db532786d368b0a94e916a7489443b
parents 209dfb2f 84d0442e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4383,6 +4383,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            return;
        }
        mVisibleRequested = visible;
        setInsetsFrozen(!visible);
        if (app != null) {
            mTaskSupervisor.onProcessActivityStateChanged(app, false /* forceBatch */);
        }
+0 −7
Original line number Diff line number Diff line
@@ -4101,13 +4101,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     */
    void onWindowAnimationFinished(@NonNull WindowContainer wc, int type) {
        if (type == ANIMATION_TYPE_APP_TRANSITION || type == ANIMATION_TYPE_RECENTS) {
            // Unfreeze the insets state of the frozen target when the animation finished if exists.
            final Task task = wc.asTask();
            if (task != null) {
                task.forAllWindows(w -> {
                    w.clearFrozenInsetsState();
                }, true /* traverseTopToBottom */);
            }
            removeImeSurfaceImmediately();
        }
    }
+0 −8
Original line number Diff line number Diff line
@@ -2684,14 +2684,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
            @Nullable ArrayList<WindowContainer> sources) {
        final Task task = asTask();
        if (task != null && !enter && !task.isHomeOrRecentsRootTask()) {
            if (AppTransition.isClosingTransitOld(transit)) {
                // Freezes the insets state when the window is in app exiting transition, to
                // ensure the exiting window won't receive unexpected insets changes from the
                // next window.
                task.forAllWindows(w -> {
                    w.freezeInsetsState();
                }, true /* traverseTopToBottom */);
            }
            mDisplayContent.showImeScreenshot();
        }
        final Pair<AnimationAdapter, AnimationAdapter> adapters = getAnimationAdapter(lp,
+1 −1
Original line number Diff line number Diff line
@@ -797,7 +797,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * {@link InsetsStateController#notifyInsetsChanged}.
     */
    boolean isReadyToDispatchInsetsState() {
        return isVisible() && mFrozenInsetsState == null;
        return isVisibleRequested() && mFrozenInsetsState == null;
    }

    void seamlesslyRotateIfAllowed(Transaction transaction, @Rotation int oldRotation,
+9 −0
Original line number Diff line number Diff line
@@ -736,4 +736,13 @@ class WindowToken extends WindowContainer<WindowState> {
    boolean isFromClient() {
        return mFromClientToken;
    }

    /** @see WindowState#freezeInsetsState() */
    void setInsetsFrozen(boolean freeze) {
        if (freeze) {
            forAllWindows(WindowState::freezeInsetsState, true /* traverseTopToBottom */);
        } else {
            forAllWindows(WindowState::clearFrozenInsetsState, true /* traverseTopToBottom */);
        }
    }
}
Loading