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

Skip to content
Commit f649375c authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Reduce unnecessary collecting for wallpaper with shell transition

The adjustWallpaperWindows is a heavy operation (including assigning
layer), and it has no direct relation with ensure visibility of task.
Especially if there are several tasks, it may increase overhead with
dozens milliseconds in a transition. The original problem should be
fixed by collecting wallpaper token instead of window state.
(Because Transition only recognizes wallpaper by token)

Also
 - Reduce re-assigning layer if visibility is not changed.
 - Collect wallpaper token only when the requested visibility is
   different, that reduces lots of checking transition participants.
 - Update wallpaper visibility before playing transition, which is
   similar to legacy adjustWallpaperWindowsForAppTransitionIfNeeded.

Bug: 206487939
Bug: 187461719
Test: WallpaperControllerTests#testWallpaperTokenVisibility
Test: adb shell setprop  persist.debug.shell_transit 1; reboot
      Check 3 cases:
      1. Rotate display -> latency reduced.
      2. Launch app in different orientation from home
         -> wallpaper is not rotated.
      3. Launch an opaque app from home and it launches a
         non-opaque app immediately -> wallpaper should not flash.
Change-Id: I1819f6aad23eb103f97c9d33bc2ad68db0e6c4ed
parent 07d5ae6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment