Hide task bar when folding before the new config renders the correct task bar

Currently on folding, onConfigurationChange doesn't return about 0.5sec after the small screen turns on. The old bar is visible on the new screen before a visual jump from rendering the new bar.

While the ideal solution is to figure out what causes the delay, we can mitigate the visual jump by dimming the old bar when folded listener returns folded

Test: repeatedly fold and unfold, observe that there is no glare task bar change in task bar area after folding
Bug: 291562764
Change-Id: Ic6834d2d3b7df01a8ef841dde601cdb6a3e481b0
This commit is contained in:
Tracy Zhou committed 2024-02-12 17:06:04 -08:00
1 parent e5451b10e4
commit dfb334f1e1
3 files changed
+58 -1

No files matched your search

@@ -44,6 +44,12 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
private static final boolean DEBUG = SystemProperties.getBoolean(
"persist.debug.draw_taskbar_debug_ui", false);
// Delay to reset the task bar alpha back to 1 after fading it for transition from unfold to
// fold. Normally this is not needed since the new task bar is recreated after fading, but in
// case something goes wrong this provides a fallback mechanism to make sure the task bar is
// visible after the transition finishes.
public static final long TASKBAR_REAPPEAR_DELAY_MS = 2000;
private final TaskbarActivityContext mActivity;
private final TaskbarDragLayer mTaskbarDragLayer;
private final int mFolderMargin;