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
This commit is contained in:
Arthur Hung
2022-04-29 06:38:26 +00:00
parent 300f68deaf
commit b360eb25d2

View File

@@ -144,7 +144,8 @@ final class ErrorDialogController {
if (mWaitDialog == null) {
return;
}
mWaitDialog.dismiss();
final BaseErrorDialog dialog = mWaitDialog;
mService.mUiHandler.post(dialog::dismiss);
mWaitDialog = null;
}