Merge "Show ime switch icon when there is a hard keyboard" into honeycomb
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1148,9 +1148,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
|
||||
if (DEBUG) Slog.w(TAG, "Ignoring hideSoftInput of uid "
|
||||
+ uid + ": " + client);
|
||||
mStatusBar.setIMEButtonVisible(mCurToken, false);
|
||||
return false;
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
mStatusBar.setIMEButtonVisible(mCurToken, false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user