Don't request sync again for reparented WC
When a WC is reparented, a sync request can be initiated again to account for any config changes. However, this can cause deadlocks in the client since the app may already have produced a sync buffer and that buffer is now held in a sync transaction. The app can't produce any more buffers since it has ran out and just gets stuck waiting. The previous buffer will never get applied since BLASTSyncEngine is waiting for the next buffer to return from the sync request. Disable the second sync request for now and handle a real solution later. Test: No ANR in split gmail + messages on 60hz device Bug: 214320347 Change-Id: I5e11925de848781ddc34793f118b739703cc8ca2
This commit is contained in:
@@ -3741,8 +3741,16 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
}
|
||||
// Otherwise this is the "root" of a synced subtree, so continue on to preparation.
|
||||
}
|
||||
|
||||
// This container's situation has changed so we need to restart its sync.
|
||||
mSyncState = SYNC_STATE_NONE;
|
||||
// We cannot reset the sync without a chance of a deadlock since it will request a new
|
||||
// buffer from the app process. This could cause issues if the app has run out of buffers
|
||||
// since the previous buffer was already synced and is still held in a transaction.
|
||||
// Resetting syncState violates the policies outlined in BlastSyncEngine.md so for now
|
||||
// disable this when shell transitions is disabled.
|
||||
if (mTransitionController.isShellTransitionsEnabled()) {
|
||||
mSyncState = SYNC_STATE_NONE;
|
||||
}
|
||||
prepareSync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user