Remove outdated wallpaper visibility update

The code was added in e9e9bca (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
2 files changed