Clear the TF#mPausingActivity before complete finishing the Activity
The Activity state was set to PAUSED when the Activity reported
paused. Since the Activity was also finishing, AR#completeFinishing
was called (and it happened before clear the TF#mPausingActivity).
In that case, the TF#mPausingActivity is incorrectly reset to null
while there was another Activity started pausing in #completeFinishing.
Activity#A paused
-> TF#completePause
-> AR#completeFinishing
… -> resuming Activity B and pausing Activity B
(sets TF#mPausingActivity to B)
-> setPausingActivity to null in TF#completePause
Once the other Activity paused, it was not added to the stopping
list because the Activity was already invisible.
Bug: 339586518
Test: steps on the bug
Change-Id: I978d81eaa380b7c7a3dcfe85dd23dca1f0bef58c
1 file changed