Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d42e0982 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove enabled flag reset_draw_state_on_client_invisible" into main

parents 1c4ccb8e 7714488e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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"
+0 −13
Original line number Diff line number Diff line
@@ -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,
+1 −2
Original line number Diff line number Diff line
@@ -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();
+0 −1
Original line number Diff line number Diff line
@@ -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());