summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-12-10 16:32:55 -0800
committerSteven Laver <lavers@google.com>2019-12-12 16:57:43 -0800
commitdc7a26c97727707f13d819a63733704c6b3efa42 (patch)
tree0afc1380af712056ac08f2f466259dadb2f0d809 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentbe9ff83150957e22e705dbb86e96e4a61edc7754 (diff)
Avoid lock inversion.
The PowerManager lock (which is used in the Battery Saver code) sits low in the lock hierarchy. NotificationManagerService is higher, so nothing should call into NotificationManagerService with the PowerManager lock held. This change calls into NMS on a background thread so that the call occurs without the PM lock held. Also fixing the cancel notification bug. We create the notifications using notifyAsUser(... UserHandle.ALL). The cancel() call wasn't properly dismissing the notification. Switching to cancelAsUser(UserHandle.ALL) fixes the issue. Bug: 145886051 Test: atest BatterySaverStateMachineTest Test: Manually ensure notification disappears when BS turns on Change-Id: I3315357e810d92938e4a34929235d233b07deebb (cherry picked from commit 79a0faf869c24ba7b86116f28c4e431fe717da8c)
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions