Generalize back animation and transition sequence...
for both shell and legacy transition system. The general sequence will be: 1. Create animation leash in core, pass to remote animation runner. 2. Remote animation finish, collect finish transaction before transition happen. Apply finish transaction here if back event won't trigger. 3. Check whether next transition is triggered from back gesture via checking the open/close targets. The 3rd step introduce another change, which to let the back transition happen. Instead of consume next transition, we should try to find out whether the participant was the animation target, because we cannot assume what the opening target will do in resume stage. For example, the opening activity could finish itself, or start another activity at onResume, so in either case, the opening activity will become closing activity. We can only ensure that activity will participant in next transition. So the more robust way should be, find out those targets which were animated. For shell transition, and add a flag to the corresponding change, then the transition handler can determine what to do based on the targets. For legacy transition, ignore those targets when estimate the transition type in AppTransitionController#getTransitCompatType. Bug: 238474994 Bug: 131727607 Test: varify transition can be handled for some unexpected scenario: 1. launch new activity when close app. 2. launch singleInstance activity when close app. Test: do back gesture on both shell/legacy transiton system, verify no flicker happen whenever the back is triggered. Change-Id: I9364be25c608f7b5797577d26b57bc7d6f2dde9c
Loading
Please register or sign in to comment