Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -8,16 +8,6 @@ flag { bug: "232195501" } 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" Loading services/core/java/com/android/server/wm/ActivityRecord.java +0 −13 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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, Loading services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +0 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -8,16 +8,6 @@ flag { bug: "232195501" } 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" Loading
services/core/java/com/android/server/wm/ActivityRecord.java +0 −13 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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, Loading
services/core/java/com/android/server/wm/WindowState.java +1 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading
services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +0 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading