Only link rotation transform of visible activity to wallpaper

Since commit ae07877, the task animating by recents will be the
wallpaper target. When swiping from a landscape app to portrait home,
the landscape app is still wallpaper target (they are animating, i.e.
opening and closing, so wallpaper target won't update). That causes
a unnecessary propogation of rotation transform to wallpaper. Then
the configuration of wallpaper needs to be updated so the transition
cannot commit visibility in time. The result is that the landscape
app flickers a while after going to home.

Fixes: 155724535
Test: WallpaperControllerTests#testFixedRotationRecentsAnimatingTask

Change-Id: Ic131459a75f40c90d4a662c608a49e66b0cd2257
2 files changed