diff options
| author | 2022-04-29 06:38:26 +0000 | |
|---|---|---|
| committer | 2022-04-29 06:49:42 +0000 | |
| commit | b360eb25d20b3e38af35c5ebea130e4ffbacc20d (patch) | |
| tree | 9ae186b2797298fbcd8ce93b607c89dd31dd6ca9 | |
| parent | 300f68deafae1317783ba3b06961a87116ec2c9c (diff) | |
Prevent deadlock for clearWaitingDialog
Post the dismiss work to prevent the deadlock between the global lock
and the ActivityManagerService.
Bug: 230077383
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: Ie4bbec94d2ac9bd3aaa4f1af8c009c5d81f3ab00
| -rw-r--r-- | services/core/java/com/android/server/am/ErrorDialogController.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ErrorDialogController.java b/services/core/java/com/android/server/am/ErrorDialogController.java index a4e8f92a7480..82f35adbb134 100644 --- a/services/core/java/com/android/server/am/ErrorDialogController.java +++ b/services/core/java/com/android/server/am/ErrorDialogController.java @@ -144,7 +144,8 @@ final class ErrorDialogController { if (mWaitDialog == null) { return; } - mWaitDialog.dismiss(); + final BaseErrorDialog dialog = mWaitDialog; + mService.mUiHandler.post(dialog::dismiss); mWaitDialog = null; } |