Loading core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +2 −4 Original line number Diff line number Diff line Loading @@ -373,8 +373,7 @@ final class IInputMethodManagerGlobalInvoker { @Nullable IRemoteInputConnection remoteInputConnection, @Nullable IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, boolean useAsyncShowHideMethod) { @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible) { final IInputMethodManager service = getService(); if (service == null) { return -1; Loading @@ -383,8 +382,7 @@ final class IInputMethodManagerGlobalInvoker { service.startInputOrWindowGainedFocusAsync(startInputReason, client, windowToken, startInputFlags, softInputMode, windowFlags, editorInfo, remoteInputConnection, remoteAccessibilityInputConnection, unverifiedTargetSdkVersion, userId, imeDispatcher, imeRequestedVisible, advanceAngGetStartInputSequenceNumber(), useAsyncShowHideMethod); imeDispatcher, imeRequestedVisible, advanceAngGetStartInputSequenceNumber()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading core/java/android/view/inputmethod/InputMethodManager.java +1 −33 Original line number Diff line number Diff line Loading @@ -442,29 +442,6 @@ public final class InputMethodManager { @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU) public static final long CLEAR_SHOW_FORCED_FLAG_WHEN_LEAVING = 214016041L; // This is a bug id. /** * Use async method for {@link InputMethodManager#showSoftInput(View, int, ResultReceiver)}, * {@link InputMethodManager#showSoftInput(View, int)} and * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int, ResultReceiver)}, * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)} for apps targeting V+. * <p> * Apps can incorrectly rely on {@link InputMethodManager#showSoftInput(View, int)} and * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)} method return type * to interpret result of a request rather than relying on {@link ResultReceiver}. The return * type of the method was never documented to have accurate info of visibility but few apps * incorrectly rely on it. * <p> * Starting Android V, we use async calls into system_server which returns {@code true} if * method call was made but return type doesn't guarantee execution. * Apps targeting older versions will fallback to existing behavior of calling synchronous * methods which had undocumented result in return type. * * @hide */ @ChangeId @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM) private static final long USE_ASYNC_SHOW_HIDE_METHOD = 352594277L; // This is a bug id. /** * Always return {@code true} when {@link #hideSoftInputFromWindow(IBinder, int)} and * {@link #hideSoftInputFromWindow(IBinder, int, ResultReceiver, int, ImeTracker.Token)} is Loading Loading @@ -635,15 +612,6 @@ public final class InputMethodManager { @UnsupportedAppUsage Rect mCursorRect = new Rect(); /** * Version-gating is guarded by bug-fix flag. */ // Note: this is non-static so that it only gets initialized once CompatChanges has // access to the correct application context. private final boolean mAsyncShowHideMethodEnabled = !Flags.compatchangeForZerojankproxy() || CompatChanges.isChangeEnabled(USE_ASYNC_SHOW_HIDE_METHOD); /** Cached value for {@link #isStylusHandwritingAvailable} for userId. */ @GuardedBy("mH") private PropertyInvalidatedCache<Integer, Boolean> mStylusHandwritingAvailableCache; Loading Loading @@ -3505,7 +3473,7 @@ public final class InputMethodManager { servedInputConnection == null ? null : servedInputConnection.asIRemoteAccessibilityInputConnection(), view.getContext().getApplicationInfo().targetSdkVersion, targetUserId, mImeDispatcher, imeRequestedVisible, mAsyncShowHideMethodEnabled); mImeDispatcher, imeRequestedVisible); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); // Create a runnable for delayed notification to the app that the InputConnection is Loading core/java/android/view/inputmethod/flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -112,17 +112,6 @@ flag { } } flag { name: "compatchange_for_zerojankproxy" namespace: "input_method" description: "Version-gate the sync/async nature of IMM#show/hideSoftInput() when using zeroJankProxy." bug: "352594277" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "writing_tools" namespace: "input_method" Loading core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ interface IInputMethodManager { in @nullable IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, int userId, in ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod); int startInputSeq); void showInputMethodPickerFromClient(in IInputMethodClient client, int auxiliarySubtypeMode); Loading services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java +3 −3 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub { IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod); int startInputSeq); InputBindResult startInputOrWindowGainedFocus( @StartInputReason int startInputReason, IInputMethodClient client, Loading Loading @@ -314,12 +314,12 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub { IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod) { int startInputSeq) { mCallback.startInputOrWindowGainedFocusAsync( startInputReason, client, windowToken, startInputFlags, softInputMode, windowFlags, editorInfo, inputConnection, remoteAccessibilityInputConnection, unverifiedTargetSdkVersion, userId, imeDispatcher, imeRequestedVisible, startInputSeq, useAsyncShowHideMethod); startInputSeq); } @Override Loading Loading
core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +2 −4 Original line number Diff line number Diff line Loading @@ -373,8 +373,7 @@ final class IInputMethodManagerGlobalInvoker { @Nullable IRemoteInputConnection remoteInputConnection, @Nullable IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, boolean useAsyncShowHideMethod) { @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible) { final IInputMethodManager service = getService(); if (service == null) { return -1; Loading @@ -383,8 +382,7 @@ final class IInputMethodManagerGlobalInvoker { service.startInputOrWindowGainedFocusAsync(startInputReason, client, windowToken, startInputFlags, softInputMode, windowFlags, editorInfo, remoteInputConnection, remoteAccessibilityInputConnection, unverifiedTargetSdkVersion, userId, imeDispatcher, imeRequestedVisible, advanceAngGetStartInputSequenceNumber(), useAsyncShowHideMethod); imeDispatcher, imeRequestedVisible, advanceAngGetStartInputSequenceNumber()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
core/java/android/view/inputmethod/InputMethodManager.java +1 −33 Original line number Diff line number Diff line Loading @@ -442,29 +442,6 @@ public final class InputMethodManager { @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU) public static final long CLEAR_SHOW_FORCED_FLAG_WHEN_LEAVING = 214016041L; // This is a bug id. /** * Use async method for {@link InputMethodManager#showSoftInput(View, int, ResultReceiver)}, * {@link InputMethodManager#showSoftInput(View, int)} and * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int, ResultReceiver)}, * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)} for apps targeting V+. * <p> * Apps can incorrectly rely on {@link InputMethodManager#showSoftInput(View, int)} and * {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)} method return type * to interpret result of a request rather than relying on {@link ResultReceiver}. The return * type of the method was never documented to have accurate info of visibility but few apps * incorrectly rely on it. * <p> * Starting Android V, we use async calls into system_server which returns {@code true} if * method call was made but return type doesn't guarantee execution. * Apps targeting older versions will fallback to existing behavior of calling synchronous * methods which had undocumented result in return type. * * @hide */ @ChangeId @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM) private static final long USE_ASYNC_SHOW_HIDE_METHOD = 352594277L; // This is a bug id. /** * Always return {@code true} when {@link #hideSoftInputFromWindow(IBinder, int)} and * {@link #hideSoftInputFromWindow(IBinder, int, ResultReceiver, int, ImeTracker.Token)} is Loading Loading @@ -635,15 +612,6 @@ public final class InputMethodManager { @UnsupportedAppUsage Rect mCursorRect = new Rect(); /** * Version-gating is guarded by bug-fix flag. */ // Note: this is non-static so that it only gets initialized once CompatChanges has // access to the correct application context. private final boolean mAsyncShowHideMethodEnabled = !Flags.compatchangeForZerojankproxy() || CompatChanges.isChangeEnabled(USE_ASYNC_SHOW_HIDE_METHOD); /** Cached value for {@link #isStylusHandwritingAvailable} for userId. */ @GuardedBy("mH") private PropertyInvalidatedCache<Integer, Boolean> mStylusHandwritingAvailableCache; Loading Loading @@ -3505,7 +3473,7 @@ public final class InputMethodManager { servedInputConnection == null ? null : servedInputConnection.asIRemoteAccessibilityInputConnection(), view.getContext().getApplicationInfo().targetSdkVersion, targetUserId, mImeDispatcher, imeRequestedVisible, mAsyncShowHideMethodEnabled); mImeDispatcher, imeRequestedVisible); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); // Create a runnable for delayed notification to the app that the InputConnection is Loading
core/java/android/view/inputmethod/flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -112,17 +112,6 @@ flag { } } flag { name: "compatchange_for_zerojankproxy" namespace: "input_method" description: "Version-gate the sync/async nature of IMM#show/hideSoftInput() when using zeroJankProxy." bug: "352594277" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "writing_tools" namespace: "input_method" Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ interface IInputMethodManager { in @nullable IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, int userId, in ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod); int startInputSeq); void showInputMethodPickerFromClient(in IInputMethodClient client, int auxiliarySubtypeMode); Loading
services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java +3 −3 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub { IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod); int startInputSeq); InputBindResult startInputOrWindowGainedFocus( @StartInputReason int startInputReason, IInputMethodClient client, Loading Loading @@ -314,12 +314,12 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub { IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection, int unverifiedTargetSdkVersion, @UserIdInt int userId, @NonNull ImeOnBackInvokedDispatcher imeDispatcher, boolean imeRequestedVisible, int startInputSeq, boolean useAsyncShowHideMethod) { int startInputSeq) { mCallback.startInputOrWindowGainedFocusAsync( startInputReason, client, windowToken, startInputFlags, softInputMode, windowFlags, editorInfo, inputConnection, remoteAccessibilityInputConnection, unverifiedTargetSdkVersion, userId, imeDispatcher, imeRequestedVisible, startInputSeq, useAsyncShowHideMethod); startInputSeq); } @Override Loading