Get PictureInPictureParams from top activity
Task#getPictureInPictureParams used to get the params from root activity and it is okay doing so without autoEnterPip since the activity to be pinned will be put in a task with one and only one activity. With autoEnterPip, it it possible that the root activity has no PictureInPictureParams being attached when the transition starts in Launcher side, switch to use the PictureInPictureParams tied to the top visible activity here. Fixes also - when this happens, we need to reset the window crop leash on the original task in FullscreenTaskListener#onTaskInfoChanged - ensure the reparented task inherits the current bounds - ensure we do not hide the leash in Task#setHasBeenVisible by setting mHasBeenVisible=true on the newly created task Video: http://rcll/aaaaaabFQoRHlzixHdtY/gIO4G5dybW7tJWXihkhXfE Bug: 177335910 Test: see video Change-Id: I198443b93b7d8cc11108f0d0606f98eac58c07b7
Loading
Please register or sign in to comment