Loading core/java/android/view/inputmethod/IInputMethodManagerInvoker.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ final class IInputMethodManagerInvoker { @AnyThread @Nullable InputMethodSubtype getLastInputMethodSubtype() { InputMethodSubtype getLastInputMethodSubtype(@UserIdInt int userId) { try { return mTarget.getLastInputMethodSubtype(); return mTarget.getLastInputMethodSubtype(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading core/java/android/view/inputmethod/InputMethodManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -3517,7 +3517,7 @@ public final class InputMethodManager { @Nullable public InputMethodSubtype getLastInputMethodSubtype() { return mServiceInvoker.getLastInputMethodSubtype(); return mServiceInvoker.getLastInputMethodSubtype(UserHandle.myUserId()); } /** Loading core/java/com/android/internal/view/IInputMethodManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,9 @@ interface IInputMethodManager { List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in @nullable String imiId, boolean allowsImplicitlySelectedSubtypes, int userId); @nullable InputMethodSubtype getLastInputMethodSubtype(); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") InputMethodSubtype getLastInputMethodSubtype(int userId); boolean showSoftInput(in IInputMethodClient client, @nullable IBinder windowToken, int flags, in @nullable ResultReceiver resultReceiver, int reason); Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +12 −4 Original line number Diff line number Diff line Loading @@ -4160,13 +4160,21 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } @Override public InputMethodSubtype getLastInputMethodSubtype() { synchronized (ImfLock.class) { if (!calledFromValidUserLocked()) { return null; public InputMethodSubtype getLastInputMethodSubtype(@UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId) { mContext.enforceCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } synchronized (ImfLock.class) { if (mSettings.getCurrentUserId() == userId) { return mSettings.getLastInputMethodSubtypeLocked(); } final ArrayMap<String, InputMethodInfo> methodMap = queryMethodMapForUser(userId); final InputMethodSettings settings = new InputMethodSettings( mContext.getResources(), mContext.getContentResolver(), methodMap, userId, false); return settings.getLastInputMethodSubtypeLocked(); } } @Override Loading Loading
core/java/android/view/inputmethod/IInputMethodManagerInvoker.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,9 +101,9 @@ final class IInputMethodManagerInvoker { @AnyThread @Nullable InputMethodSubtype getLastInputMethodSubtype() { InputMethodSubtype getLastInputMethodSubtype(@UserIdInt int userId) { try { return mTarget.getLastInputMethodSubtype(); return mTarget.getLastInputMethodSubtype(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
core/java/android/view/inputmethod/InputMethodManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -3517,7 +3517,7 @@ public final class InputMethodManager { @Nullable public InputMethodSubtype getLastInputMethodSubtype() { return mServiceInvoker.getLastInputMethodSubtype(); return mServiceInvoker.getLastInputMethodSubtype(UserHandle.myUserId()); } /** Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,9 @@ interface IInputMethodManager { List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in @nullable String imiId, boolean allowsImplicitlySelectedSubtypes, int userId); @nullable InputMethodSubtype getLastInputMethodSubtype(); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") InputMethodSubtype getLastInputMethodSubtype(int userId); boolean showSoftInput(in IInputMethodClient client, @nullable IBinder windowToken, int flags, in @nullable ResultReceiver resultReceiver, int reason); Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +12 −4 Original line number Diff line number Diff line Loading @@ -4160,13 +4160,21 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } @Override public InputMethodSubtype getLastInputMethodSubtype() { synchronized (ImfLock.class) { if (!calledFromValidUserLocked()) { return null; public InputMethodSubtype getLastInputMethodSubtype(@UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId) { mContext.enforceCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } synchronized (ImfLock.class) { if (mSettings.getCurrentUserId() == userId) { return mSettings.getLastInputMethodSubtypeLocked(); } final ArrayMap<String, InputMethodInfo> methodMap = queryMethodMapForUser(userId); final InputMethodSettings settings = new InputMethodSettings( mContext.getResources(), mContext.getContentResolver(), methodMap, userId, false); return settings.getLastInputMethodSubtypeLocked(); } } @Override Loading