Make setAdditionalInputMethodSubtypes async

Bug: 5120261
Change-Id: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
This commit is contained in:
satok
2011-09-02 18:50:15 +09:00
parent 117999d1f4
commit ee5e77cafe
5 changed files with 10 additions and 20 deletions

View File

@ -1668,13 +1668,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
@Override
public boolean setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes) {
public void setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes) {
// By this IPC call, only a process which shares the same uid with the IME can add
// additional input method subtypes to the IME.
if (TextUtils.isEmpty(imiId) || subtypes == null || subtypes.length == 0) return false;
if (TextUtils.isEmpty(imiId) || subtypes == null || subtypes.length == 0) return;
synchronized (mMethodMap) {
final InputMethodInfo imi = mMethodMap.get(imiId);
if (imi == null) return false;
if (imi == null) return;
final PackageManager pm = mContext.getPackageManager();
final String[] packageInfos = pm.getPackagesForUid(Binder.getCallingUid());
if (packageInfos != null) {
@ -1688,12 +1688,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
} finally {
Binder.restoreCallingIdentity(ident);
}
return true;
return;
}
}
}
}
return false;
return;
}
private void setInputMethodWithSubtypeId(IBinder token, String id, int subtypeId) {