summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetsProvider.cpp
diff options
context:
space:
mode:
author Max Bires <jbires@google.com> 2021-08-13 08:59:29 -0700
committer Max Bires <jbires@google.com> 2021-08-17 06:43:46 +0000
commitc9be198afefa9e27c2f0c836d4a3788e5f69e805 (patch)
treec193445f2e7451a27513fd4ada8a8f8da436c2d6 /libs/androidfw/AssetsProvider.cpp
parent4eaa49eeb615d129ea6174f20d2373d9eba84452 (diff)
Fixing a condition that can cause deadlock
Callbacks on ServiceConnection happen on the main UI thread for an application. Since the thread that calls bindService then immediately blocks to wait for the service to be connected, this will cause a deadlock if key operations are happening on the main UI thread. This bug has likely not been detected yet since key operations are not supposed to be performed on the main UI thread, however it was uncovered in a similar application during other testing. This fix ensures the ServiceConnection object's callbacks will be triggered from a separate thread from the calling thread. Bug: 196571032 Test: Apps that run key operations on the UI thread don't hang. Change-Id: I630a0ef2560a8ebd962de54c65e3d6277133a1cb Merged-In: I630a0ef2560a8ebd962de54c65e3d6277133a1cb
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions