Fix deadlock in IMMS checking hasNavigationBar
Since allowing IMEs to request hiding the fake IME navigation bar in [1], we found that this would still be shown on emulator, which has no system navigation bar, and would thus break some tests. This was fixed in [2], but it looks like that fix can trigger a deadlock as it goes through calling WindowManagerGlobal.getWindowManagerService, which tries to acquire the lock on that class. Instead, I added a path to call hasNavigationBar through WindowManagerInternal, which also skips the IPC step. This will still require the WindowManagerGlobalLock, but the internal class is currently used throughout InputMethodManagerService, so it should be safe here. [1]: I8793db69fb846046300d5a56b3b0060138ef4cd5 [2]: Ide89075836a527d806f28cbeeb8d90334b79428f Test: atest InputMethodServiceTest#testNoNavigationBar_thenImeNoCaptionBar Bug: 300359571 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d136b9bd629295c996367ed01f96a5f3fa658dc7) Merged-In: I4d7a062a9abeaf59218505d384f94e04e1a8ed74 Change-Id: I4d7a062a9abeaf59218505d384f94e04e1a8ed74
Loading
Please register or sign in to comment