summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-11-02 20:17:37 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-11-03 15:53:28 +0800
commit66c8cb6b3d22046a421e6dc0443dd28b6f46f18b (patch)
tree92c7fba9543518deaa513ad2f445b1c72a248d6e /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent5b3573cfe4ae6951cd09d4355153868ab0e788e9 (diff)
Update oom score reference state if activity state is changed
Previously, the update of reference state may be scheduled in display thread. That causes a race for the case of activity stopped: when ActivityTaskManagerService#activityStopped is called, it will first set STOPPED state and then invoke trimApplications which will trigger a full oom-adj calculation. But if the scheduled reference state is updated later than the calculation, the adj and process state of the stopped activity may stay at a stale perceptible state temporally. That seems somewhat inconsistent between ATMS and AMS. This change ensures that any activity states change applies to the oom reference state immediately. So any direct or posted oom-adj calculation can refer to the latest state. Also correct the place of setting activity state flags that should be outside of the loop. Bug: 159104503 Bug: 170685888 Test: ActivityLifecycleTests#testRestoreFromKill WindowProcessControllerTests#testComputeOomAdjFromActivities Change-Id: I42bd43f71315dbf8f5d6abc7ab2f742419f0b6da
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions