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

Commit c49f8bb9 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Use blast sync for aod with display switch

So the display can turn on after the AOD has presented the
redrawn appearance of new size.

Bug: 337154331
Test: Enter aod low power mode in folded state.
      Unfold the device and check the aod should not flicker.
Flag: com.android.window.flags.blast_sync_notification_shade_on_display_switch

Change-Id: I6e46e01dc44dca31b05a31766ad4f4c46080b91f
parent d24f7b2d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -18,6 +18,16 @@ flag {
    }
}

flag {
    name: "blast_sync_notification_shade_on_display_switch"
    namespace: "windowing_frontend"
    description: "Make the buffer content of notification shade synchronize with display switch"
    bug: "337154331"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
  name: "edge_to_edge_by_default"
  namespace: "windowing_frontend"
+10 −0
Original line number Diff line number Diff line
@@ -194,6 +194,16 @@ public class DeferredDisplayUpdater implements DisplayUpdater {
            final Rect startBounds = new Rect(0, 0, mDisplayContent.mInitialDisplayWidth,
                    mDisplayContent.mInitialDisplayHeight);
            final int fromRotation = mDisplayContent.getRotation();
            if (Flags.blastSyncNotificationShadeOnDisplaySwitch() && physicalDisplayUpdated) {
                final WindowState notificationShade =
                        mDisplayContent.getDisplayPolicy().getNotificationShade();
                if (notificationShade != null && notificationShade.isVisible()
                        && mDisplayContent.mAtmService.mKeyguardController.isKeyguardOrAodShowing(
                                mDisplayContent.mDisplayId)) {
                    Slog.i(TAG, notificationShade + " uses blast for display switch");
                    notificationShade.mSyncMethodOverride = BLASTSyncEngine.METHOD_BLAST;
                }
            }

            mDisplayContent.mAtmService.deferWindowLayout();
            try {