Prevent premature window replacement.
maybeRemoveReplacedWindows is called when any window has reported drawing, we have to verify that we have actually ourselves drawn, before commencing the replacement. Bug: 26668339 Change-Id: Iabfc2e813989381f9f20f3bb111100911405686b
This commit is contained in:
@@ -1573,7 +1573,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
}
|
||||
for (int i = mAppToken.allAppWindows.size() - 1; i >= 0; i--) {
|
||||
final WindowState win = mAppToken.allAppWindows.get(i);
|
||||
if (win.mWillReplaceWindow && win.mReplacingWindow == this) {
|
||||
if (win.mWillReplaceWindow && win.mReplacingWindow == this && hasDrawnLw()) {
|
||||
if (DEBUG_ADD_REMOVE) Slog.d(TAG, "Removing replaced window: " + win);
|
||||
win.mWillReplaceWindow = false;
|
||||
win.mAnimateReplacingWindow = false;
|
||||
|
||||
Reference in New Issue
Block a user