Assert for a smooth width animation in auto enter
In gesture nav mode, auto entering PiP can initially make the layer smaller before it gets larger. However, asserting for area alone is not reliable at all, since the area fluctuates due to crop and scale animations going in the opposite directions. For cases where source rect hint is null a more reliable assertion is to check that the width of the PiP layer first decreases and then increases. Note that we still allow a margin of error of 1px, since around the time of handoff between gesture nav task view simulator and SwipePipToHomeAnimator, crop can get a bit smaller and scale can get a bit larger if swiped aggressively - this can produce off-by-1 errors for width too. Allowing for this margin of error should still leave us capable of catching most of the regressions for this enter PiP case. We do still want to ideally come up with a better way of asserting animation smoothness however (see b/363080056). Bug: 293133362 Flag: EXEMPT bugfix Test: atest AutoEnterPipOnGoToHomeTest Test: atest AutoEnterPipWithSourceRectHintTest Change-Id: I6588e81a6f20dcac444e4e7564917dc5889f913f
Loading
Please register or sign in to comment