Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -54830,6 +54830,7 @@ package android.view.inputmethod { public final class InputMethodManager { method public void dispatchKeyEventFromInputMethod(@Nullable android.view.View, @NonNull android.view.KeyEvent); method public void displayCompletions(android.view.View, android.view.inputmethod.CompletionInfo[]); method @Nullable public android.view.inputmethod.InputMethodInfo getCurrentInputMethodInfo(); method @Nullable public android.view.inputmethod.InputMethodSubtype getCurrentInputMethodSubtype(); method @NonNull public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodList(); method @NonNull public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable android.view.inputmethod.InputMethodInfo, boolean); core/api/system-current.txt +8 −0 Original line number Diff line number Diff line Loading @@ -16633,6 +16633,14 @@ package android.view.displayhash { } package android.view.inputmethod { public final class InputMethodManager { method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public android.view.inputmethod.InputMethodInfo getCurrentInputMethodInfoAsUser(@NonNull android.os.UserHandle); } } package android.view.translation { public final class TranslationCapability implements android.os.Parcelable { core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +15 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,21 @@ final class IInputMethodManagerGlobalInvoker { } } @AnyThread @Nullable @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true) static InputMethodInfo getCurrentInputMethodInfoAsUser(@UserIdInt int userId) { final IInputMethodManager service = getService(); if (service == null) { return null; } try { return service.getCurrentInputMethodInfoAsUser(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @AnyThread @NonNull @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true) Loading core/java/android/view/inputmethod/InputMethodInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,28 @@ public final class InputMethodInfo implements Parcelable { mIsVrOnly = isVrOnly; } /** * @hide */ public InputMethodInfo(InputMethodInfo source) { mId = source.mId; mSettingsActivityName = source.mSettingsActivityName; mIsDefaultResId = source.mIsDefaultResId; mIsAuxIme = source.mIsAuxIme; mSupportsSwitchingToNextInputMethod = source.mSupportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = source.mInlineSuggestionsEnabled; mSupportsInlineSuggestionsWithTouchExploration = source.mSupportsInlineSuggestionsWithTouchExploration; mSuppressesSpellChecker = source.mSuppressesSpellChecker; mShowInInputMethodPicker = source.mShowInInputMethodPicker; mIsVrOnly = source.mIsVrOnly; mService = source.mService; mSubtypes = source.mSubtypes; mHandledConfigChanges = source.mHandledConfigChanges; mSupportsStylusHandwriting = source.mSupportsStylusHandwriting; mForceDefault = source.mForceDefault; } InputMethodInfo(Parcel source) { mId = source.readString(); mSettingsActivityName = source.readString(); Loading core/java/android/view/inputmethod/InputMethodManager.java +33 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresFeature; import android.annotation.RequiresPermission; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; import android.annotation.UiThread; Loading Loading @@ -1597,6 +1599,37 @@ public final class InputMethodManager { return IInputMethodManagerGlobalInvoker.getInputMethodList(userId, directBootAwareness); } /** * Returns the {@link InputMethodInfo} of the currently selected input method (for the process's * user). * * <p>On multi user environment, this API returns a result for the calling process user.</p> */ @Nullable public InputMethodInfo getCurrentInputMethodInfo() { // We intentionally do not use UserHandle.getCallingUserId() here because for system // services InputMethodManagerInternal.getCurrentInputMethodInfoForUser() should be used // instead. return IInputMethodManagerGlobalInvoker.getCurrentInputMethodInfoAsUser( UserHandle.myUserId()); } /** * Returns the {@link InputMethodInfo} for currently selected input method for the given user. * * @param user user to query. * @hide */ @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL) @Nullable @SystemApi @SuppressLint("UserHandle") public InputMethodInfo getCurrentInputMethodInfoAsUser(@NonNull UserHandle user) { Objects.requireNonNull(user); return IInputMethodManagerGlobalInvoker.getCurrentInputMethodInfoAsUser( user.getIdentifier()); } /** * Returns the list of enabled input methods. * Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -54830,6 +54830,7 @@ package android.view.inputmethod { public final class InputMethodManager { method public void dispatchKeyEventFromInputMethod(@Nullable android.view.View, @NonNull android.view.KeyEvent); method public void displayCompletions(android.view.View, android.view.inputmethod.CompletionInfo[]); method @Nullable public android.view.inputmethod.InputMethodInfo getCurrentInputMethodInfo(); method @Nullable public android.view.inputmethod.InputMethodSubtype getCurrentInputMethodSubtype(); method @NonNull public java.util.List<android.view.inputmethod.InputMethodInfo> getEnabledInputMethodList(); method @NonNull public java.util.List<android.view.inputmethod.InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable android.view.inputmethod.InputMethodInfo, boolean);
core/api/system-current.txt +8 −0 Original line number Diff line number Diff line Loading @@ -16633,6 +16633,14 @@ package android.view.displayhash { } package android.view.inputmethod { public final class InputMethodManager { method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public android.view.inputmethod.InputMethodInfo getCurrentInputMethodInfoAsUser(@NonNull android.os.UserHandle); } } package android.view.translation { public final class TranslationCapability implements android.os.Parcelable {
core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +15 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,21 @@ final class IInputMethodManagerGlobalInvoker { } } @AnyThread @Nullable @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true) static InputMethodInfo getCurrentInputMethodInfoAsUser(@UserIdInt int userId) { final IInputMethodManager service = getService(); if (service == null) { return null; } try { return service.getCurrentInputMethodInfoAsUser(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @AnyThread @NonNull @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true) Loading
core/java/android/view/inputmethod/InputMethodInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -339,6 +339,28 @@ public final class InputMethodInfo implements Parcelable { mIsVrOnly = isVrOnly; } /** * @hide */ public InputMethodInfo(InputMethodInfo source) { mId = source.mId; mSettingsActivityName = source.mSettingsActivityName; mIsDefaultResId = source.mIsDefaultResId; mIsAuxIme = source.mIsAuxIme; mSupportsSwitchingToNextInputMethod = source.mSupportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = source.mInlineSuggestionsEnabled; mSupportsInlineSuggestionsWithTouchExploration = source.mSupportsInlineSuggestionsWithTouchExploration; mSuppressesSpellChecker = source.mSuppressesSpellChecker; mShowInInputMethodPicker = source.mShowInInputMethodPicker; mIsVrOnly = source.mIsVrOnly; mService = source.mService; mSubtypes = source.mSubtypes; mHandledConfigChanges = source.mHandledConfigChanges; mSupportsStylusHandwriting = source.mSupportsStylusHandwriting; mForceDefault = source.mForceDefault; } InputMethodInfo(Parcel source) { mId = source.readString(); mSettingsActivityName = source.readString(); Loading
core/java/android/view/inputmethod/InputMethodManager.java +33 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresFeature; import android.annotation.RequiresPermission; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; import android.annotation.UiThread; Loading Loading @@ -1597,6 +1599,37 @@ public final class InputMethodManager { return IInputMethodManagerGlobalInvoker.getInputMethodList(userId, directBootAwareness); } /** * Returns the {@link InputMethodInfo} of the currently selected input method (for the process's * user). * * <p>On multi user environment, this API returns a result for the calling process user.</p> */ @Nullable public InputMethodInfo getCurrentInputMethodInfo() { // We intentionally do not use UserHandle.getCallingUserId() here because for system // services InputMethodManagerInternal.getCurrentInputMethodInfoForUser() should be used // instead. return IInputMethodManagerGlobalInvoker.getCurrentInputMethodInfoAsUser( UserHandle.myUserId()); } /** * Returns the {@link InputMethodInfo} for currently selected input method for the given user. * * @param user user to query. * @hide */ @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL) @Nullable @SystemApi @SuppressLint("UserHandle") public InputMethodInfo getCurrentInputMethodInfoAsUser(@NonNull UserHandle user) { Objects.requireNonNull(user); return IInputMethodManagerGlobalInvoker.getCurrentInputMethodInfoAsUser( user.getIdentifier()); } /** * Returns the list of enabled input methods. * Loading