summaryrefslogtreecommitdiff
path: root/ravenwood/scripts/extract-last-soong-commands.py
diff options
context:
space:
mode:
author panhaihui <panhaihui@xiaomi.com> 2024-12-24 19:35:53 +0800
committer haihui pan <panhaihui@xiaomi.com> 2024-12-24 04:38:55 -0800
commit5f10bcb64ff0ec591ba0e526a73606711e473add (patch)
tree791ec16074f3832c8af102d6aff38de32daaf1a3 /ravenwood/scripts/extract-last-soong-commands.py
parent2f8b519d3f7deeb14a48c168b670c3815c06751e (diff)
[Bugfix] avoid deadLock caused by onAuthenticationPrompt()
call chain 1: VirtualDeviceManagerService$LocalService.onAuthenticationPrompt() -> VirtualDeviceImpl.showToastWhereUidIsRunning() -> ... -> WindowManagerService.addWindowToken() call chain 2: RootWindowContainer.onDisplayAdded() -> RootWindowContainer.getDisplayContentOrCreate() -> DisplayContent.<init> -> DisplayPolicy.<init> -> ContextImpl.createDisplayContext() -> ContextImpl.setDisplay() -> ... -> VirtualDeviceManager.getDeviceIdForDisplayId() -> VirtualDeviceManagerService.getVirtualDevicesSnapshot() Getting mVirtualDeviceManagerLock first in onAuthenticationPrompt() and then getting WMS lock in addWindowToken() is an inappropriate lock order in the above call chain 1. This is inconsistent with the method of getting WMS lock first and then mVirtualDeviceManagerLock in call chain 2. so it will cause deadlock and cause watchdog. showToastWhereUidIsRunning should be executed outside the mVirtualDeviceManagerLock like in onCameraAccessBlocked() method to avoid deadlock. Bug: 385854410 Test: Manual test Change-Id: I087cdc184ddf3fb5548517ed6e1139809d3da6c3 Signed-off-by: panhaihui <panhaihui@xiaomi.com>
Diffstat (limited to 'ravenwood/scripts/extract-last-soong-commands.py')
0 files changed, 0 insertions, 0 deletions