Add a functionarity for showing / hiding IME button on the system bar

Bug: 3077030

- IME communicates with status bar directly.

Change-Id: Ic5b6b5b7a2b8ea62372dcc9b9c36d81b9f2db651
This commit is contained in:
satok
2010-10-29 11:37:18 +09:00
parent e12774d4a8
commit 06487a58be
12 changed files with 99 additions and 13 deletions

View File

@@ -940,6 +940,23 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
}
public void setIMEButtonVisible(IBinder token, boolean visible) {
int uid = Binder.getCallingUid();
long ident = Binder.clearCallingIdentity();
try {
if (token == null || mCurToken != token) {
Slog.w(TAG, "Ignoring setIMEButtonVisible of uid " + uid + " token: " + token);
return;
}
synchronized (mMethodMap) {
mStatusBar.setIMEButtonVisible(visible);
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
void updateFromSettingsLocked() {
// We are assuming that whoever is changing DEFAULT_INPUT_METHOD and
// ENABLED_INPUT_METHODS is taking care of keeping them correctly in