diff options
| author | 2013-10-23 21:19:24 +0000 | |
|---|---|---|
| committer | 2013-10-23 21:19:24 +0000 | |
| commit | c72b18b72eb75c2040bf686b06d52d79bdc7a24a (patch) | |
| tree | 4a396dd361d3971ce4101212eabc02cb46b9860c | |
| parent | 3e1a9eaca6b5e1c699c9962e3932298751829660 (diff) | |
| parent | 36439b43121751ae94e703da52b2763aa17d0720 (diff) | |
Merge "Decouple IME_ACTIVE and IME_VISIBLE for hardware keyboards." into klp-dev
| -rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 794d274da5fa..562a50fafd1b 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -879,8 +879,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final boolean isScreenSecurelyLocked = isScreenLocked && mKeyguardManager.isKeyguardSecure(); final boolean inputShown = mInputShown && (!isScreenLocked || mInputBoundToKeyguard); - mImeWindowVis = (!isScreenSecurelyLocked && (inputShown || hardKeyShown)) ? - (InputMethodService.IME_ACTIVE | InputMethodService.IME_VISIBLE) : 0; + final boolean inputActive = !isScreenSecurelyLocked && (inputShown || hardKeyShown); + // We assume the softkeyboard is shown when the input is active as long as the + // hard keyboard is not shown. + final boolean inputVisible = inputActive && !hardKeyShown; + mImeWindowVis = (inputActive ? InputMethodService.IME_ACTIVE : 0) + | (inputVisible ? InputMethodService.IME_VISIBLE : 0); updateImeWindowStatusLocked(); } |