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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user