summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-10-16 22:01:35 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-10-16 14:17:07 +0000
commitf3ba6a641db5f812d9e392697218254052a7f6ad (patch)
tree172b402f0848ad697f1fdaa40bef57a17f38fce1 /rs/java/android/renderscript/ProgramStore.java
parent5cef13b7d86db71d9d727fd17b84c6598a4ded3b (diff)
Do not update lru list for dead process
There were multiple wrong states yield a no harm result: The updateLruProcessLocked only adds the given process to lru list if the process doesn't have activity. In R it was no problem because the activities are not detached from process when handling crash, updateProcessInfo is not called from ActivityRecord#setState with DESTROYED state. Commit 7fce339 fixed the case but introduced another bug that WindowProcessController#handleAppDied adds the inactive activity list to the active list that causes hasActivities returns true, so it is still no harm because update-lru will ignore the process with activity. And then commit 8f7dd59 corrects the inconsistent state accidentally by the added field mHasActivities. That corrects the return value of hasActivitiesOrRecentTasks. So updateLruProcessLocked takes effect to add the dead process into to lru list, which leads to the method getPackageProcessState gets old process state from a dead process record (pid=0). Fixes: 170487962 Test: OneTimePermissionTest#testStickyServiceMaintainsPermissionOnRestart Change-Id: I4449a5581cac678fd362cc22ad2754f0aada5482
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions