Start full screen mode on first tap when HW keyborad is connected.

LatinIME checks hardware keyboard presence and software keyboard
visibility to decide whether to start full screen mode.
This doesn't work well with the recent update on "Show input method"
(Bug: 22517687, Id4d332e3909590c68345e).

On the first tap, software keyboard is not shown and hardware keyboard
is connected; so full screen mode is not started. However,
onEvaluateInputViewShown may return true ant software keyboard may be
brought up.
In this care, on the second tap, software keyboard is visible so full
screen mode will be started regardless of hardware keyboard presence.

This CL checks onEvaluateInputViewShown to decide whether to start
full screen mode.

Bug: 27234709
Change-Id: I587262cc36e5fccc59620b4bd2d2c3c05c72232f
This commit is contained in:
Keisuke Kuroyanagi 2016-03-15 18:42:46 +09:00
parent f836c0f641
commit 48adccf349

View file

@ -716,7 +716,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private boolean isImeSuppressedByHardwareKeyboard() {
final KeyboardSwitcher switcher = KeyboardSwitcher.getInstance();
return switcher.isImeSuppressedByHardwareKeyboard(
return !onEvaluateInputViewShown() && switcher.isImeSuppressedByHardwareKeyboard(
mSettings.getCurrent(), switcher.getKeyboardSwitchState());
}