Fix some cases when enabling hierarchical animation
- Fix split-screen primary stack's thumbnail won't animate:
- in ActivityRecord#attachThumbnailAnimation, using WC#getAnimatingContainer
to align the current animating layer.
- Fix animation surface position shifted when launching activity in
split-screen secondary stack:
- Using WC#getRelativeDisplayedPosition in WC#getAnimationAdapter
to get relative position of leash parent.
Also, refined below logics:
- Refine logics in WindowContainer#getAnimationBounds with
getDisplayBounds for fixing a regression issue that launching activity
from split screen secondary stack the animation will moving to top stack rather
then moving to bottom stack.
Bug: 142617871
Bug: 131661052
Test: Refectoring CL, all existing tests passed.
Test: Manual testing for:
1) Enable hierarchical animation flag by using adb command:
adb shell setprop persist.wm.hierarchical_animations 1
2) Entering split-screen mode from recents app.
3) Make sure task scroll-up thumbnail animation for split-screen primary
stack can animated.
4) Launch app to split-screen secondary stack, make sure launching
animation position will right below divider instead going to top-side
of screen.
Change-Id: I3ccc39ab1f3f02cecff8631512dc94f2f01c4be3
2 files changed