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

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

Merge "Remove prepareSurface from surface placement" into main

parents ebc01aa2 52e12640
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -31,6 +31,17 @@ flag {
    is_fixed_read_only: true
}

flag {
  name: "remove_prepare_surface_in_placement"
  namespace: "windowing_frontend"
  description: "Reduce unnecessary invocation to improve performance"
  bug: "330721336"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "close_to_square_config_includes_status_bar"
  namespace: "windowing_frontend"
+3 −1
Original line number Diff line number Diff line
@@ -5097,7 +5097,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        } finally {
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        if (!com.android.window.flags.Flags.removePrepareSurfaceInPlacement()) {
            prepareSurfaces();
        }

        // This should be called after the insets have been dispatched to clients and we have
        // committed finish drawing windows.
+2 −0
Original line number Diff line number Diff line
@@ -3416,6 +3416,7 @@ public class ActivityRecordTests extends WindowTestsBase {
        // Remove window during transition, so it is requested to hide, but won't be committed until
        // the transition is finished.
        app.mActivityRecord.onRemovedFromDisplay();
        app.mActivityRecord.prepareSurfaces();

        assertTrue(mDisplayContent.mClosingApps.contains(app.mActivityRecord));
        assertFalse(app.mActivityRecord.isVisibleRequested());
@@ -3433,6 +3434,7 @@ public class ActivityRecordTests extends WindowTestsBase {
    public void testInClosingAnimation_visibilityCommitted_hideSurface() {
        final WindowState app = createWindow(null, TYPE_APPLICATION, "app");
        makeWindowVisibleAndDrawn(app);
        app.mActivityRecord.prepareSurfaces();

        // Put the activity in close transition.
        mDisplayContent.mOpeningApps.clear();