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
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user