diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java index c7bc51356c765..2f00bc821678b 100644 --- a/services/core/java/com/android/server/wm/WindowContainer.java +++ b/services/core/java/com/android/server/wm/WindowContainer.java @@ -3741,8 +3741,16 @@ class 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(); }