Finish unfold Shell transition when fold is merged in
This CL addresses an issue with UnfoldTransitionHandler
that it doesn't finish the animation when the following order of the events happens:
- [unfolded the device]
- handleRequest(unfold transition) -> returns WCT
- [folded the device]
- handleRequest(fold transition) -> returns null
- onStateChangeFinished() -> mAnimationFinished is set to 'true'
- onFoldedStateChanged(true) -> mAnimationFinished is set to 'false'
- startAnimation() -> waits for the onStateChangeFinished which
will never be executed as it has been fired already,
onFoldedStateChanged() doesn't finish the transition because
it was invoked before startAnimation()
This is fixed by finishing the unfold transition when merge
request with fold Shell transition is received.
Bug: 372319646
Test: atest UnfoldTransitionHandlerTest
Test: fold multiple times quickly using a script
=> verify all transitions are finished
Flag: EXEMPT bugfix
Change-Id: I1069e3a1b8ba607a0a6f5f3e697f2579966ea146
2 files changed