Skip to content
Commit 06f9bb38 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Centralize assignment of pip enter animation type

In PipTransition, the places to check enter animation type
may have different orders with different scenarios.

Assume swiping a fullscreen landscape app which can enter PiP
to portrait home:

Api request on foreground:
  augmentRequest -> startEnterAnimation -> handleRotateDisplay
Api request on going to background:
  startEnterAnimation -> handleRotateDisplay

Swipe to home:
 Auto-pip:
  augmentRequest -> handleRotateDisplay -> startEnterAnimation
 No auto-pip:
  handleRotateDisplay -> startEnterAnimation

To reduce the complexity of animation type management, assign
the type at entry of entering pip: PipTaskOrganizer#onTaskAppeared
Then PipTransition only needs to read it.

Note that for swiping auto-pip, the type is always ignored
because the animation is done by recents animation.

Bug: 276438425
Test: Swipe a landscape app into pip in portrait without auto-pip.
      The PiP should fade in after the swipe animation.

Change-Id: I98e459fb9913d713cd3b8d44dbb691af61862c56
parent 9338d0cc
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