summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-12-10 16:32:55 -0800
committerKweku Adams <kwekua@google.com>2019-12-11 18:43:11 +0000
commit51802b364a6f3f00fcaf5717eac353c6172edb99 (patch)
treebb02eb87c362487286b2d25be4e23c1dbac53520 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parentcb0b5e206dc3e1608949af263b5a351a17e5b58c (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/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions