Avoid getting crashed by slow transition
This avoids extreme cases when the device is slow or the load of
system/systemui is heavy.
SystemUI crashes:
1. OPEN transition T1
2. Swipe up, queued transition T2
3. T1 timed out, moveToPlaying
(added to mPlayingTransitions)
4. T2 starts collecting
5. startTransition of T1
(STATE_PLAYING -> STATE_STARTED)
6. finishTransition from RemoteTransitionHandler
7. Got crash by "Can't finish a non-playing transition"
(in mPlayingTransitions but with STATE_STARTED)
System server crashes:
When executing a non-CHANGE transition with a display change,
(open an activity and request to change display orientation)
if IDisplayChangeWindowCallback#continueDisplayChange is called
from remote after transition timeout, the exception "Trying to
rotate outside a transition" will throw at display thread.
Bug: 265852118
Bug: 261645736
Test: Set break point at WindowOrganizerController#startTransition
to simulate the slowness. Launch app, swipe up, rotate.
The device still works normally after resuming the break point.
Test: CtsWindowManagerDeviceTestCases
Change-Id: Ia0d97823886eff1c935a0cd7f6f6ac6abf3659d5
3 files changed