Fix restoring surface for child windows
Use allAppWindows instead of windows, as windows doesn't contain any child windows, it causes the child windows to be not restored until the child window does relayout. bug: 28296945 Change-Id: I7d272e660752002c08349128c3958aa041979c34
This commit is contained in:
@@ -390,8 +390,8 @@ class AppWindowToken extends WindowToken {
|
||||
}
|
||||
|
||||
boolean hasSavedSurface() {
|
||||
for (int i = windows.size() -1; i >= 0; i--) {
|
||||
final WindowState ws = windows.get(i);
|
||||
for (int i = allAppWindows.size() -1; i >= 0; i--) {
|
||||
final WindowState ws = allAppWindows.get(i);
|
||||
if (ws.hasSavedSurface()) {
|
||||
return true;
|
||||
}
|
||||
@@ -408,8 +408,8 @@ class AppWindowToken extends WindowToken {
|
||||
// Check if we have enough drawn windows to mark allDrawn= true.
|
||||
int numInteresting = 0;
|
||||
int numDrawn = 0;
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
WindowState w = windows.get(i);
|
||||
for (int i = allAppWindows.size() - 1; i >= 0; i--) {
|
||||
WindowState w = allAppWindows.get(i);
|
||||
if (w.hasSavedSurface()) {
|
||||
w.restoreSavedSurface();
|
||||
}
|
||||
@@ -429,8 +429,8 @@ class AppWindowToken extends WindowToken {
|
||||
}
|
||||
|
||||
void destroySavedSurfaces() {
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
WindowState win = windows.get(i);
|
||||
for (int i = allAppWindows.size() - 1; i >= 0; i--) {
|
||||
WindowState win = allAppWindows.get(i);
|
||||
win.destroySavedSurface();
|
||||
}
|
||||
mAnimatingWithSavedSurface = false;
|
||||
|
||||
Reference in New Issue
Block a user