Fix crash in setAdditionalInputMethodSubtypes
Bug: 5142455 Change-Id: I5eca4c1a3d9a964db04c819fc671670ef1b81817
This commit is contained in:
@@ -1682,7 +1682,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
for (int i = 0; i < packageNum; ++i) {
|
for (int i = 0; i < packageNum; ++i) {
|
||||||
if (packageInfos[i].equals(imi.getPackageName())) {
|
if (packageInfos[i].equals(imi.getPackageName())) {
|
||||||
mFileManager.addInputMethodSubtypes(imi, subtypes);
|
mFileManager.addInputMethodSubtypes(imi, subtypes);
|
||||||
buildInputMethodListLocked(mMethodList, mMethodMap);
|
final long ident = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
|
buildInputMethodListLocked(mMethodList, mMethodMap);
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(ident);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1707,7 +1712,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
long ident = Binder.clearCallingIdentity();
|
final long ident = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
setInputMethodLocked(id, subtypeId);
|
setInputMethodLocked(id, subtypeId);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user