Update PAUSE usage state when activity move from RESUMED to STOPPING

In some multitasking scenarios, an activity can be scheduled to move
directly from the RESUMED state to the STOPPED state, bypassing the PAUSED state.
But the activity will cycled through to PAUSED state anyway. Need to
update the PAUSED usage state in this case.

Test: atest com.google.android.gts.playstore.UsageStatsHostTest
Test: atest ActivityRecordTests
Bug: 368228446
Flag: EXEMPT bugfix
Change-Id: Ib66e9627d4c7ed857df9d6ae614e2001ad2d97b6
1 file changed