Revert^2 "Add test for Custom IME Switcher button visibility"
This adds tests for a new Custom IME Swithcer button visibility API.
These cover three button navigation mode, as well as gesture navigation
mode.
To facilitate testing, this also updates the GestureNavSwitchHelper to
allow setting the navigation mode to three button navigation, and to
expose AutoClosables to clean up any test state at the end of the run.
The existing adb shell commands in GestureNavSwitchHelper were failing
on HSUM as they were incorrectly defaulting to user 0, but are now using
--user current.
Checking the current navigation mode was done by accesing an internal
system resource, which was returning incorrect values on instant app
mode, and non-instant app mode for some targets. This is now done by
checking the enabled state of the navigation mode overlay.
Flag: android.view.inputmethod.ime_switcher_revamp_api
Bug: 358031444
Test: atest InputMethodServiceTest#testOnCustomImeSwitcherButtonRequestedVisible_gestureNav
InputMethodServiceTest#testOnCustomImeSwitcherButtonRequestedVisible_threeButtonNav
Change-Id: I53976018918533d2016b97933fc5cb31bb85e85b
3 files changed