summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-01-20 19:47:43 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-20 19:47:43 -0800
commit0e5bf5051b02bc382fb7e6c975511af499b31624 (patch)
treeb77095db8e09a0e30057fe25da9133770415a8cf /core/java/android/inputmethodservice/InputMethodService.java
parentcdd5626da62cb2dc013cded470e264232617f635 (diff)
parent865b97761cc58053f45a8b06b531d60d8e482c3a (diff)
Merge "Show ime switch icon when there is a hard keyboard" into honeycomb
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 4d25bac067d4..f35a43863457 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -393,6 +393,10 @@ public class InputMethodService extends AbstractInputMethodService {
if (onShowInputRequested(flags, false)) {
showWindow(true);
}
+ // If user uses hard keyboard, IME button should always be shown.
+ if (!onEvaluateInputViewShown()) {
+ mImm.setIMEButtonVisible(mToken, true);
+ }
if (resultReceiver != null) {
resultReceiver.send(wasVis != isInputViewShown()
? InputMethodManager.RESULT_SHOWN
@@ -557,7 +561,7 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public int touchableInsets;
}
-
+
/**
* You can call this to customize the theme used by your IME's window.
* This theme should typically be one that derives from
@@ -573,7 +577,7 @@ public class InputMethodService extends AbstractInputMethodService {
}
mTheme = theme;
}
-
+
@Override public void onCreate() {
mTheme = Resources.selectSystemTheme(mTheme,
getApplicationInfo().targetSdkVersion,
@@ -699,6 +703,10 @@ public class InputMethodService extends AbstractInputMethodService {
// Otherwise hide the window.
hideWindow();
}
+ // If user uses hard keyboard, IME button should always be shown.
+ if (!onEvaluateInputViewShown()) {
+ mImm.setIMEButtonVisible(mToken, true);
+ }
}
}
@@ -1386,10 +1394,10 @@ public class InputMethodService extends AbstractInputMethodService {
}
mInputViewStarted = false;
mCandidatesViewStarted = false;
+ mImm.setIMEButtonVisible(mToken, false);
if (mWindowVisible) {
mWindow.hide();
mWindowVisible = false;
- mImm.setIMEButtonVisible(mToken, false);
onWindowHidden();
mWindowWasVisible = false;
}