Add uid to PendingStartActivityUids when activity resumed.
Previously we add uid to PendingStartActivityUids at activity start. Now we also add uid to PendingStartActivityUids at activity resumed because we can not wait for updateOomAdj() to be run by a runnable that WindowManager send to DisplayThread at activity resumed. At ActivityManagerService.getProcessStatesAndOomScoresForPIDs(), if the ProcessRecord is in PendingStartActivityUids, we hard code the ProcessRecord to be PROCESS_STATE_TOP and FOREGROUND_APP_ADJ, ahead of result of updateOomAdj() the comes later. Bug: 155143386, 157180494 Test: Reproduce steps of 155143386, swipe between GCA and Snapchat, camera access is allowed after swipe. Change-Id: Ia11b0e3400e4df851b250beb01dcfda43580668b
Loading
Please register or sign in to comment