diff options
| author | 2024-12-11 19:41:33 -0800 | |
|---|---|---|
| committer | 2024-12-11 19:41:33 -0800 | |
| commit | d42e0982c31506f8fe8c3d7427c5dc767c406b73 (patch) | |
| tree | 92ae778cea0a8eca3a9750db7b5d611e4d85d6eb | |
| parent | 1c4ccb8e1da0aee399a5e9a95f03a4ed3f0f53af (diff) | |
| parent | 7714488e6e3f9ef7e81efcb063aa8e91e9bd7eae (diff) | |
Merge "Remove enabled flag reset_draw_state_on_client_invisible" into main
4 files changed, 1 insertions, 26 deletions
diff --git a/core/java/android/window/flags/windowing_frontend.aconfig b/core/java/android/window/flags/windowing_frontend.aconfig index 1bd6743b40bd..30668a6c6b1d 100644 --- a/core/java/android/window/flags/windowing_frontend.aconfig +++ b/core/java/android/window/flags/windowing_frontend.aconfig @@ -9,16 +9,6 @@ flag { } flag { - name: "reset_draw_state_on_client_invisible" - namespace: "windowing_frontend" - description: "Reset draw state if the client is notified to be invisible" - bug: "373023636" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "wait_for_transition_on_display_switch" namespace: "windowing_frontend" description: "Waits for Shell transition to start before unblocking the screen after display switch" diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index db9e19abfae2..29a71328127b 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -248,7 +248,6 @@ import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES; import static com.android.server.wm.WindowManagerService.sEnableShellTransitions; import static com.android.server.wm.WindowState.LEGACY_POLICY_VISIBILITY; -import static com.android.server.wm.WindowStateAnimator.HAS_DRAWN; import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT; import static org.xmlpull.v1.XmlPullParser.END_TAG; @@ -5607,18 +5606,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // stopped, then we need to set up to wait for its windows to be ready. if (!isVisible() || mAppStopped) { clearAllDrawn(); - // Reset the draw state in order to prevent the starting window to be immediately - // dismissed when the app still has the surface. - if (!Flags.resetDrawStateOnClientInvisible() - && !isVisible() && !isClientVisible()) { - forAllWindows(w -> { - if (w.mWinAnimator.mDrawState == HAS_DRAWN) { - w.mWinAnimator.resetDrawState(); - // Force add to mResizingWindows, so the window will report drawn. - w.forceReportingResized(); - } - }, true /* traverseTopToBottom */); - } } // In the case where we are making an app visible but holding off for a transition, diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index cebe790bb1b9..90bf053dfbef 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -3311,8 +3311,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Because the client is notified to be invisible, it should no longer be considered as // drawn state. This prevent the app from showing incomplete content if the app is // requested to be visible in a short time (e.g. before activity stopped). - if (Flags.resetDrawStateOnClientInvisible() && !clientVisible && mActivityRecord != null - && mWinAnimator.mDrawState == HAS_DRAWN) { + if (!clientVisible && mActivityRecord != null && mWinAnimator.mDrawState == HAS_DRAWN) { mWinAnimator.resetDrawState(); // Make sure the app can report drawn if it becomes visible again. forceReportingResized(); diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index 1b0d9dc3b170..661d07e09f99 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -3253,7 +3253,6 @@ public class ActivityRecordTests extends WindowTestsBase { assertFalse(activity.isVisibleRequested()); player.start(); - mSetFlagsRule.enableFlags(Flags.FLAG_RESET_DRAW_STATE_ON_CLIENT_INVISIBLE); // ActivityRecord#commitVisibility(false) -> WindowState#sendAppVisibilityToClients(). player.finish(); assertFalse(activity.isVisible()); |