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

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

Consider multiple show-when-locked activities for wallpaper

2 problems:
- ActivityRecord#mShowWhenLocked was not involved, i.e. if the
  app uses Activity#setShowWhenLocked rather than
  FLAG_SHOW_WHEN_LOCKED, the condition needsShowWhenLockedWallpaper
  is never satisfied.
- The useTopWallpaperAsTarget was always true if there exists one
  non fullscreen show-when-locked activity even if the wallpaper
  can be occluded by the opaque show-when-locked activity behind.

The first one is fixed by checking WindowState#canShowWhenLocked.
The second one is fixed by updating mNeedsShowWhenLockedWallpaper
when going through all windows from top to bottom.

Note that with shell transition, if the wallpaper becomes visible
unexpectedly, it will be collected into transition. And because
the wallpaper surface will be put on transition root surface that
may have higher z-order, which will cause the wallpaper to be
flickering when switching show-when-locked activities with scene
transition (covert to translucent).

Fix: 286172268
Test: WallpaperControllerTests#testShowWhenLockedWallpaperTarge
Change-Id: Ic029c9c42472f7061020e4ca47e325be1ee53787
parent f80ef935
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