Apply PictureInPictureParam only if it's changed
There is a race condition in the PiP that gets triggered more easily recently. When the entering PiP animation finishes, there could be an immediate onTaskInfoChanged requested from onPipTransitionFinished callback. We try to apply new PictureInPictureParams within onTaskInfoChanged, due to a previous change (ag/18380631), the PictureInPictureParams would be applied forcibly when there is a deferred TaskInfo. This ends up an immediate PiP resizing right after the entering animation finishes and causes flicker sometimes. The underlying issue for b/232104080 is that the aspect ratio for resizing is not get updated. We have changed how to handle size since then and it does not seem to be the case anymore. Fixing the race condition by applying change only if there are meaningful diffs in the TaskInfo. Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dU5DRHER2dt0sE7gSZQ3ru Bug: 319471015 Test: manual, follow the reproduce steps, see also video Test: manual, make sure no regression for b/232104080 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:33eb97afd782264958a0e3886fe56cedc50d2fb1) Merged-In: I2f1b827747818e07de4aba2763a5cac896354a61 Change-Id: I2f1b827747818e07de4aba2763a5cac896354a61 24D1-dev is based on 24Q2-release. Therefore, we merged this CL to 24D1-dev.
Loading
Please register or sign in to comment