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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user