am f09993ca: am 1a546dca: Merge "Fixed the problem ime invisible status despite being the icon that appears in the statusbar."
* commit 'f09993ca1d01823f9c60c0be45a8169e09dd27d7':
Fixed the problem ime invisible status despite being the icon that appears in the statusbar.
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 2b15afd..4881d14 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -431,7 +431,7 @@
}
}
// If user uses hard keyboard, IME button should always be shown.
- boolean showing = onEvaluateInputViewShown();
+ boolean showing = isInputViewShown();
mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0),
mBackDisposition);
if (resultReceiver != null) {
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 8315ac4..3baa565 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1498,7 +1498,9 @@
if (mStatusBar != null) {
mStatusBar.setImeWindowStatus(token, vis, backDisposition);
}
- final boolean iconVisibility = (vis & InputMethodService.IME_ACTIVE) != 0;
+ final boolean iconVisibility = ((vis & (InputMethodService.IME_ACTIVE)) != 0)
+ && (mWindowManagerService.isHardKeyboardAvailable()
+ || (vis & (InputMethodService.IME_VISIBLE)) != 0);
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null && iconVisibility && needsToShowImeSwitchOngoingNotification()) {
// Used to load label