Merge "Fix restoring surface for child windows" into nyc-dev

This commit is contained in:
Chong Zhang
2016-04-28 23:18:27 +00:00
committed by Android (Google) Code Review

View File

@@ -390,8 +390,8 @@ class AppWindowToken extends WindowToken {
} }
boolean hasSavedSurface() { boolean hasSavedSurface() {
for (int i = windows.size() -1; i >= 0; i--) { for (int i = allAppWindows.size() -1; i >= 0; i--) {
final WindowState ws = windows.get(i); final WindowState ws = allAppWindows.get(i);
if (ws.hasSavedSurface()) { if (ws.hasSavedSurface()) {
return true; return true;
} }
@@ -408,8 +408,8 @@ class AppWindowToken extends WindowToken {
// Check if we have enough drawn windows to mark allDrawn= true. // Check if we have enough drawn windows to mark allDrawn= true.
int numInteresting = 0; int numInteresting = 0;
int numDrawn = 0; int numDrawn = 0;
for (int i = windows.size() - 1; i >= 0; i--) { for (int i = allAppWindows.size() - 1; i >= 0; i--) {
WindowState w = windows.get(i); WindowState w = allAppWindows.get(i);
if (w.hasSavedSurface()) { if (w.hasSavedSurface()) {
w.restoreSavedSurface(); w.restoreSavedSurface();
} }
@@ -429,8 +429,8 @@ class AppWindowToken extends WindowToken {
} }
void destroySavedSurfaces() { void destroySavedSurfaces() {
for (int i = windows.size() - 1; i >= 0; i--) { for (int i = allAppWindows.size() - 1; i >= 0; i--) {
WindowState win = windows.get(i); WindowState win = allAppWindows.get(i);
win.destroySavedSurface(); win.destroySavedSurface();
} }
mAnimatingWithSavedSurface = false; mAnimatingWithSavedSurface = false;