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

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

Remove outdated wallpaper visibility update

The code was added in e9e9bca8 (2009).
The current logic relies on isOnScreen() of wallpaper target.
Such as WallpaperController#mFindWallpaperTargetFunction use it
to decide wallpaper target and WindowStateAnimator#
prepareSurfaceLocked uses it to hideWallpapers.

This avoids wallpaper becomes visible again right after hiding
it. Such as wallpaper target's isOnScreen() returns false because
it's close transition is done, i.e. token.isVisible() is false.
But isVisible() can still be true because it doesn't consider
the visibility of WindowToken for non-wallpaper window
(see wouldBeVisibleIfPolicyIgnored).

Though it can also be fixed by changing from checking isVisible()
to isOnScreen(). It is better to avoid multiple similar entries
to change wallpaper visibility. Also updateWallpaperTokens should
only be called after updating target (updateWallpaperWindowsTarget)
in case the target is no longer valid.

Bug: 330457044
Bug: 329916266
Test: atest ActivityTransitionTests# \
            testCustomTransitionCanOverrideBackgroundColor
Change-Id: I6c294b510f4b6f53d31e276a98564222e64e7f44
parent eb10002c
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