summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wale Ogunwale <ogunwale@google.com> 2023-07-20 01:27:39 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-07-20 01:27:39 +0000
commit7c56d980587046f144bd34af8ca9739840935670 (patch)
treefb8f9e113b2ea14787ec3e76ed52efaede866361
parentf9195f0868a9d892574589cc79b961b66f9e7779 (diff)
parent2a5ccc71d642d3342c8985e27defc180a4153f7f (diff)
Merge "Clean up postWindowRemoveStartingWindowCleanUp" into udc-dev am: 050f26ee5e am: 2a5ccc71d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23736106 Change-Id: I9a273611fc4da87005d8d3ac6a93d81b5d06b783 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java29
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java2
2 files changed, 8 insertions, 23 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 64b37d496dbc..f6fa51e3018a 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -4516,7 +4516,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
mTransitionChangeFlags |= FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;
}
// Post cleanup after the visibility and animation are transferred.
- fromActivity.postWindowRemoveStartingWindowCleanup(tStartingWindow);
+ fromActivity.postWindowRemoveStartingWindowCleanup();
fromActivity.mVisibleSetFromTransferredStartingWindow = false;
mWmService.updateFocusedWindowLocked(
@@ -7430,27 +7430,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
}
- void postWindowRemoveStartingWindowCleanup(WindowState win) {
- // TODO: Something smells about the code below...Is there a better way?
- if (mStartingWindow == win) {
- ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Notify removed startingWindow %s", win);
- removeStartingWindow();
- } else if (mChildren.size() == 0) {
- // If this is the last window and we had requested a starting transition window,
- // well there is no point now.
- ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Nulling last startingData");
- mStartingData = null;
- if (mVisibleSetFromTransferredStartingWindow) {
- // We set the visible state to true for the token from a transferred starting
- // window. We now reset it back to false since the starting window was the last
- // window in the token.
- setVisible(false);
- }
- } else if (mChildren.size() == 1 && mStartingSurface != null && !isRelaunching()) {
- // If this is the last window except for a starting transition window,
- // we need to get rid of the starting transition.
- ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Last window, removing starting window %s", win);
- removeStartingWindow();
+ void postWindowRemoveStartingWindowCleanup() {
+ if (mChildren.size() == 0 && mVisibleSetFromTransferredStartingWindow) {
+ // We set the visible state to true for the token from a transferred starting
+ // window. We now reset it back to false since the starting window was the last
+ // window in the token.
+ setVisible(false);
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index d9ff91f126b6..10687001f9a8 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2020,7 +2020,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
if (win.mActivityRecord != null) {
- win.mActivityRecord.postWindowRemoveStartingWindowCleanup(win);
+ win.mActivityRecord.postWindowRemoveStartingWindowCleanup();
}
if (win.mAttrs.type == TYPE_WALLPAPER) {