summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wilsonshih <wilsonshih@google.com> 2023-08-28 10:48:36 +0000
committer wilsonshih <wilsonshih@google.com> 2023-08-28 10:59:22 +0000
commitd7388a82918147aa407aa56bfff067ecc75e81b2 (patch)
treefc14a0058513ae5b84c4902940b7760f61f0fe2c
parentfae78ad75ae4e72133d44ae821399ef9a8236321 (diff)
Fix starting window stuck because of the remove status.
Regression from ag/24405299. There can be another collecting transition happen while previous transaction commit. So there should not reset the mRemoveAfterTransaction during onSyncTransactionCommitted. Bug: 295458327 Test: launch app from portrait to landscape directly. Verify the starting window would be removed after the rotation transition finish Change-Id: Ib10aa0ecf67ca3905afc4e87bdb86eb56b81bfb6
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java2
-rw-r--r--services/core/java/com/android/server/wm/StartingData.java2
2 files changed, 1 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 062126daffc8..9d4397127023 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -225,7 +225,6 @@ import static com.android.server.wm.IdentifierProto.USER_ID;
import static com.android.server.wm.LetterboxConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
import static com.android.server.wm.LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_COPY_TO_CLIENT;
-import static com.android.server.wm.StartingData.AFTER_TRANSACTION_IDLE;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_REMOVE_DIRECTLY;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_PREDICT_BACK;
@@ -2861,7 +2860,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else if (lastData.mRemoveAfterTransaction == AFTER_TRANSACTION_COPY_TO_CLIENT) {
removeStartingWindow();
}
- lastData.mRemoveAfterTransaction = AFTER_TRANSACTION_IDLE;
}
void removeStartingWindowAnimation(boolean prepareAnimation) {
diff --git a/services/core/java/com/android/server/wm/StartingData.java b/services/core/java/com/android/server/wm/StartingData.java
index a23547ef1d5b..2d281c476ec2 100644
--- a/services/core/java/com/android/server/wm/StartingData.java
+++ b/services/core/java/com/android/server/wm/StartingData.java
@@ -76,7 +76,7 @@ public abstract class StartingData {
* This starting window should be removed after applying the start transaction of transition,
* which ensures the app window has shown.
*/
- @AfterTransaction int mRemoveAfterTransaction;
+ @AfterTransaction int mRemoveAfterTransaction = AFTER_TRANSACTION_IDLE;
/** Whether to prepare the removal animation. */
boolean mPrepareRemoveAnimation;