Loading core/java/android/view/inputmethod/EditorInfo.java +2 −4 Original line number Diff line number Diff line Loading @@ -304,13 +304,11 @@ public class EditorInfo implements InputType, Parcelable { * name. The system had not verified the consistency between the package name here and * application's uid. Consider to use {@link InputBinding#getUid()}, which is trustworthy. * Starting from Android MNC, the system verifies the consistency between this package name * and application uid before {@link EditorInfo} is passed to the input method as long as the * application sets a non-empty package name.</p> * and application uid before {@link EditorInfo} is passed to the input method.</p> * * <p><strong>Editor authors:</strong> Starting from Android MNC, the application is no longer * able to establish input connections if the package name provided here is inconsistent with * application's uid. Note that the system does accept an empty string for an arbitrary * application uid.</p> * application's uid.</p> */ public String packageName; Loading services/core/java/com/android/server/InputMethodManagerService.java +6 −10 Original line number Diff line number Diff line Loading @@ -1323,22 +1323,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } InputBindResult startInputUncheckedLocked(@NonNull ClientState cs, IInputContext inputContext, EditorInfo attribute, int controlFlags) { IInputContext inputContext, @NonNull EditorInfo attribute, int controlFlags) { // If no method is currently selected, do nothing. if (mCurMethodId == null) { return mNoBinding; } if (attribute != null) { // We accept an empty package name as a valid data. if (!TextUtils.isEmpty(attribute.packageName) && !InputMethodUtils.checkIfPackageBelongsToUid(mAppOpsManager, cs.uid, if (!InputMethodUtils.checkIfPackageBelongsToUid(mAppOpsManager, cs.uid, attribute.packageName)) { Slog.e(TAG, "Rejecting this client as it reported an invalid package name." + " uid=" + cs.uid + " package=" + attribute.packageName); return mNoBinding; } } if (mCurClient != cs) { // Was the keyguard locked when switching over to the new client? Loading Loading
core/java/android/view/inputmethod/EditorInfo.java +2 −4 Original line number Diff line number Diff line Loading @@ -304,13 +304,11 @@ public class EditorInfo implements InputType, Parcelable { * name. The system had not verified the consistency between the package name here and * application's uid. Consider to use {@link InputBinding#getUid()}, which is trustworthy. * Starting from Android MNC, the system verifies the consistency between this package name * and application uid before {@link EditorInfo} is passed to the input method as long as the * application sets a non-empty package name.</p> * and application uid before {@link EditorInfo} is passed to the input method.</p> * * <p><strong>Editor authors:</strong> Starting from Android MNC, the application is no longer * able to establish input connections if the package name provided here is inconsistent with * application's uid. Note that the system does accept an empty string for an arbitrary * application uid.</p> * application's uid.</p> */ public String packageName; Loading
services/core/java/com/android/server/InputMethodManagerService.java +6 −10 Original line number Diff line number Diff line Loading @@ -1323,22 +1323,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } InputBindResult startInputUncheckedLocked(@NonNull ClientState cs, IInputContext inputContext, EditorInfo attribute, int controlFlags) { IInputContext inputContext, @NonNull EditorInfo attribute, int controlFlags) { // If no method is currently selected, do nothing. if (mCurMethodId == null) { return mNoBinding; } if (attribute != null) { // We accept an empty package name as a valid data. if (!TextUtils.isEmpty(attribute.packageName) && !InputMethodUtils.checkIfPackageBelongsToUid(mAppOpsManager, cs.uid, if (!InputMethodUtils.checkIfPackageBelongsToUid(mAppOpsManager, cs.uid, attribute.packageName)) { Slog.e(TAG, "Rejecting this client as it reported an invalid package name." + " uid=" + cs.uid + " package=" + attribute.packageName); return mNoBinding; } } if (mCurClient != cs) { // Was the keyguard locked when switching over to the new client? Loading