Merge "Make IMMS#canShowInputMethodPickerLocked() self-contained"
This commit is contained in:
committed by
Android (Google) Code Review
commit
cf9ca7d7bd
@@ -3961,7 +3961,11 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
if (mCurFocusedWindowClient != null && client != null
|
||||
&& mCurFocusedWindowClient.client.asBinder() == client.asBinder()) {
|
||||
return true;
|
||||
} else if (getCurIntentLocked() != null && InputMethodUtils.checkIfPackageBelongsToUid(
|
||||
}
|
||||
if (mSettings.getCurrentUserId() != UserHandle.getUserId(uid)) {
|
||||
return false;
|
||||
}
|
||||
if (getCurIntentLocked() != null && InputMethodUtils.checkIfPackageBelongsToUid(
|
||||
mAppOpsManager,
|
||||
uid,
|
||||
getCurIntentLocked().getComponent().getPackageName())) {
|
||||
@@ -3974,9 +3978,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
public void showInputMethodPickerFromClient(IInputMethodClient client,
|
||||
int auxiliarySubtypeMode) {
|
||||
synchronized (ImfLock.class) {
|
||||
if (!calledFromValidUserLocked()) {
|
||||
return;
|
||||
}
|
||||
if (!canShowInputMethodPickerLocked(client)) {
|
||||
Slog.w(TAG, "Ignoring showInputMethodPickerFromClient of uid "
|
||||
+ Binder.getCallingUid() + ": " + client);
|
||||
|
||||
Reference in New Issue
Block a user