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

Commit 1ffefc21 authored by Tiger Huang's avatar Tiger Huang
Browse files

Set mEnterAnimationPending to true if a window was not visible

mEnterAnimationPending will be cleared when enter-animation is applied.
However, if a window was already visible, the enter-animation won't be
applied. This CL ensures mEnterAnimationPending is set to true only if a
window was not visible to prevent the state of mEnterAnimationPending
from being leaked.

Bug: 128510422
Test: Manual:
1. Go to Settings > Accessibility > Magnification
   > Magnify with triple-tap.
2. Turn on "Use service".
3. Triple-tap.
4. Press [back] button.
5. See if the orange border is around the entire screen except the
   navigation bar.
Note: 1. ~ 4. should be done within 10 seconds.

Change-Id: Id1a811175214af25ec8014b3f5814cff16d70331
parent 835f260d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2107,7 +2107,7 @@ public class WindowManagerService extends IWindowManager.Stub
            if (shouldRelayout) {
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "relayoutWindow: viewVisibility_1");

                result = win.relayoutVisibleWindow(result, attrChanges, oldVisibility);
                result = win.relayoutVisibleWindow(result, attrChanges);

                try {
                    result = createSurfaceControl(outSurfaceControl, result, win, winAnimator);
+2 −2
Original line number Diff line number Diff line
@@ -4446,7 +4446,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return !mLastSurfaceInsets.equals(mAttrs.surfaceInsets);
    }

    int relayoutVisibleWindow(int result, int attrChanges, int oldVisibility) {
    int relayoutVisibleWindow(int result, int attrChanges) {
        final boolean wasVisible = isVisibleLw();

        result |= (!wasVisible || !isDrawnLw()) ? RELAYOUT_RES_FIRST_TIME : 0;
@@ -4466,7 +4466,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            mDestroying = false;
            mWmService.mDestroySurface.remove(this);
        }
        if (oldVisibility == View.GONE) {
        if (!wasVisible) {
            mWinAnimator.mEnterAnimationPending = true;
        }