appium/appium-adb — pull request #59 by amake (2014-11-05 00:54:36+00:00)
Title: Make isSoftKeyboardPresent handle UI-less keyboards

Currently `isSoftKeyboardPresent` will simply return `true` when an IME is present, whether or not the IME has a closeable UI. This is problematic because some kinds of keyboards (hardware keyboards, Appium UnicodeIME) are detected as "present" but have no UI to hide, thus leading `hideKeyboard` in `android-controller.js` to perform a back-button press when it's not safe to do so.

With the current behavior it is an error to attempt `hideKeyboard` when no keyboard is present at all. To retain this behavior, `isSoftKeyboardPresent` must return two pieces of information: whether or not a keyboard is present, and whether or not the keyboard is closeable.