Use stashedTaskbarHeight for IME insets override
Previously [1] we removed the explicit insetsSizeOverride from the Taskbar for the IME window, as we now [2] enable hiding the IME nav bar. This would now send the normal insets the taskbar reports. When running on pre/postsubmit, with test harness setup, the non-transient taskbar would show, which is bigger than the IME's navigation bar height. Due to the current logic in InsetsSource#calculateInsets, this leads to the IME window receiving top navigation bar insets instead of bottom. As the IME nav bar is now treated as a (fixed on bottom) caption bar, the two would no longer overlap, and thus lead to a double insets dispatch, and also a (temporarily) bigger IME window, for IMEs that set their decorView height to WRAP_CONTENT (e.g. MockIME used in testing). This instead keeps the previous insetsSizeOverride for IME, and uses the stashedTasbarHeight when in gesture nav, which should account for both transient and normal taskbars. [1]: I86079cb6670a2ae3b6fa883694f8af81df212408 [2]: I8793db69fb846046300d5a56b3b0060138ef4cd5 Bug: 297000797 Test: atest WindowInsetsControllerTests#testDispatchApplyWindowInsetsCount_ime Change-Id: I102a8bc1f8869ebbce9f8f1fefa651d49a9538ec
Loading
Please register or sign in to comment