Sync input transaction for startActivitySync
The method should be only used for tests. The tests usually expect a stable state to proceed next step after the method returns. By using syncInputTransactions(waitForAnimations=true), it can cover both the purpose of [1] and [2]. [1]: Ifd7bfd41b39518518f4013fad80c3acd1e8b2354 [2]: I5457ab67ac574530dc1aa84549ca11e7e3f0d714 The original mEnterAnimationComplete is unable to handle trampoline activities, i.e. the target activity launches another activity in its onCreate. Then the target activity may not receive animation complete or its onStop will clear the animation complete state, and waitForEnterAnimationComplete doesn't know what's the next activity to wait for. That always leads to a 5s timeout. While syncInputTransactions can wait for global transition, so it can return once the entire consecutive launch sequence is done. Bug: 330043325 Flag: TEST_ONLY Test: atest CtsWindowManagerDeviceActivity:ActivityLifecycleTests Change-Id: Iea1e2840bbcb8dcde1a80340c4ae42e26ebf009a
Loading
Please register or sign in to comment