diff options
author | Kweku Adams <kwekua@google.com> | 2019-12-10 16:32:55 -0800 |
---|---|---|
committer | Kweku Adams <kwekua@google.com> | 2019-12-10 17:10:22 -0800 |
commit | 79a0faf869c24ba7b86116f28c4e431fe717da8c (patch) | |
tree | 12bde44bdc2ae880c68c87ce74de0eb519a2330a /rs/java/android/renderscript/ProgramVertexFixedFunction.java | |
parent | 4324208bfaf9993e54c01773d24c6b2add652f44 (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
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions