Don't wait for windows which are goneForLayout

Gone for layout means that relayout won't be requested from
that window. This means that the sync engine would end up
waiting forever since there won't be a draw if there's no
layout.

Bug: 161980187
Test: everything works like normal, but later CLs don't get
      hung up here.
Change-Id: I96d5a68012a71ec27ede1168d03f5240244823aa
This commit is contained in:
[1;3C
2020-09-10 15:55:06 -07:00
parent a32bde83cd
commit b1574e7aa9

View File

@@ -5872,6 +5872,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
@Override
boolean prepareForSync(BLASTSyncEngine.TransactionReadyListener waitingListener,
int waitingId) {
// If the window is goneForLayout, relayout won't be called so we'd just wait forever.
if (isGoneForLayout()) {
return false;
}
boolean willSync = setPendingListener(waitingListener, waitingId);
if (!willSync) {
return false;