OSDN Git Service

Wallpaper target selection during animation
authorChong Zhang <chz@google.com>
Fri, 12 Aug 2016 23:03:29 +0000 (16:03 -0700)
committerChong Zhang <chz@google.com>
Mon, 15 Aug 2016 20:08:06 +0000 (20:08 +0000)
commitb0d267043a72d0685f81003be96f07402dc68373
tree8a6ec5d755b1b1cde78d97d260784e561d5c530d
parente543fb29b27afd75eb5b40699f659151cc26b237
Wallpaper target selection during animation

In case of double tapping from Home, there could be two set of
transitions, first is launcher->Recents, followed shortly by
Recents->app. On the second transition, it should be running
a wallpaper close, but because of the way we pick wallpaper
target, sometimes we pick launcher if both launcher & Recents
are animating away. This makes us to run a different animation
which could involve dimming the wallpaper briefly.

Also, findWallpaperTarget() sometimes could toggle between two
valid wallpaper targets, picking either of them gives correct
result for showing the wallpaper, but could result in different
exit transition.

This change prefers the visible target if there is only one
visible, otherwise the one in opening or closing app list. This
helps maybeUpdateTransitToWallpaper to better choose transition.

bug: 30831873
Change-Id: I0eaa89bdc35f5f51875d5cbeceba11ce40f4791f
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/WallpaperController.java