Fix ShadeHeader flickers due to insets and corner radius when the window moves display
This fixes a one-frame flicker when moving the shade window between displays. There were 2 root causes: 1. Wrong insets for one frame 2. Wrong display corner radius for one frame 1. For the wrong insets, the issue was that we were reading insets values during composition (from LocalDisplayCutout). However, the updated insets (after the display change) were propagated to the root view only after composition. In this cl insets are passed as a State instead of a Stateflow, and read during the layout phase in ShadeHeader. A few adjustments have been made to have a single way to get the cutout. 2. Display corner radius were also propagated with a state flow, and were updated after a display change. This caused a one-frame delay between when they were set to the StateFlow and when they were used from the ScreenDecorProvider composable. Now ScreenDecorProvider just gets the corner radius itself, caching the value using the display unique id. Bug: 417960167 Flag: com.android.systemui.shade_window_goes_around Flag: com.android.systemui.scene_container Test: Verify the shade header flicker when moving the window between displays is not there anymore Change-Id: Ie5c4d5215a3abff6b45c865ee90f95ca312771fd
Loading
Please register or sign in to comment