summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Daniel <danieljkim@google.com> 2022-12-23 02:14:45 +0000
committer Daniel Kim <danieljkim@google.com> 2022-12-28 20:55:30 +0000
commit99e2b6c13f4eb0bc02f8f9770ccda6144c2f9ae8 (patch)
treee160328eef62c315d025a42301f7c38e526b75fd /libs/androidfw/ApkParsing.cpp
parentfa71876cc023e55bd939cf7f39a991abbb2eb4f9 (diff)
Fix deadlock by not acquiring lock when reporting proximity
There is a deadlock situation from AttentionManagerService acquiring lock before callings back to its clients with the proximity update. This can cause a deadlock because the clients, while holding their own locks, can call AttentionManagerService again. Thread 1: Acquires attention lock -> AttentionManager Service reports proximityUpdate to VoiceInteraction -> tries to acquire voice lock Thread 2: Acquires voice lock -> VoiceService tries to cancel proximity updates -> tries to acquire attention lock The deadlock can be fixed by removing the acquiring attention lock step before reporting proximityUpdates to the clients. Bug: 261143716 Test: atest CtsAttentionServiceDeviceTestCases Change-Id: I9f7d520cbcfd57032a9476853acad025fd7a6b95 Merged-In: I9f7d520cbcfd57032a9476853acad025fd7a6b95 (cherry picked from commit a28af297d370fa3bcea14e0b6883343433a35d9c)
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions