Merge "Fix rotation shell transition" into sc-v2-dev am: 438d1c5327 am: 73b1669842

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15073147

Change-Id: I8c154645b64f56cae76b1017d17a616760b14daa
This commit is contained in:
Evan Rosky
2021-07-13 21:44:46 +00:00
committed by Automerger Merge Worker
2 changed files with 9 additions and 3 deletions

View File

@@ -8186,7 +8186,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (shouldRelaunchLocked(changes, mTmpConfig) || forceNewConfig) {
// Aha, the activity isn't handling the change, so DIE DIE DIE.
configChangeFlags |= changes;
startFreezingScreenLocked(globalChanges);
if (!mAtmService.getTransitionController().isShellTransitionsEnabled()) {
startFreezingScreenLocked(globalChanges);
}
forceNewConfig = false;
preserveWindow &= isResizeOnlyChange(changes);
final boolean hasResizeChange = hasResizeChange(changes & ~info.getRealConfigChanged());

View File

@@ -2403,6 +2403,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
@Override
void removeImmediately() {
if (!mRemoved) {
// Destroy surface before super call. The general pattern is that the children need
// to be removed before the parent (so that the sync-engine tracking works). Since
// WindowStateAnimator is a "virtual" child, we have to do it manually here.
mWinAnimator.destroySurfaceLocked(getSyncTransaction());
}
super.removeImmediately();
if (mRemoved) {
@@ -2444,8 +2450,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
disposeInputChannel();
mWinAnimator.destroySurfaceLocked(mTmpTransaction);
mTmpTransaction.apply();
mSession.windowRemovedLocked();
try {
mClient.asBinder().unlinkToDeath(mDeathRecipient, 0);