summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorFiona Campbell <flc@google.com>2021-05-14 15:33:15 +0100
committerFiona Campbell <flc@google.com>2021-06-15 16:13:04 +0100
commit37427762b3a71d5c52e42c4a7b7ac8d5b17c457f (patch)
tree6c98162c306aa8ad3c359c480d0d45fff44a7bef /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent8968116543614bebd3df00eb09b107938c0c2d0d (diff)
Fix memory leak in BrightnessSynchronizer
Previously, a queue would be written to, a lot more often than items were removed from it. This caused it to grow massively. This cl changes the way that the synchronizer works, updating both values when needed and avoiding potential race conditions. It's relevant to note that mDisplayManager.setBrightness will only change the value if it is different, but Settings.System.putIntForUser will set it regardless, therefore causing a second "int changed" message to be sent. Bug: 177523959 Test: manual Test: loop this command: adb shell settings put system screen_brightness \ $((RANDOM%100)) Test: loop this command: adb shell settings put system \ screen_brightness_float 0.$((RANDOM%100)) Change-Id: I6cafb48c204ce5245c4450a6098473e06c334667
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions