Loading core/java/android/inputmethodservice/InputMethodService.java +14 −5 Original line number Diff line number Diff line Loading @@ -806,11 +806,6 @@ public class InputMethodService extends AbstractInputMethodService { @NonNull EditorInfo editorInfo, boolean restarting, @NonNull IBinder startInputToken, @InputMethodNavButtonFlags int navButtonFlags, @NonNull ImeOnBackInvokedDispatcher imeDispatcher) { mImeDispatcher = imeDispatcher; if (mWindow != null) { mWindow.getOnBackInvokedDispatcher().setImeOnBackInvokedDispatcher( imeDispatcher); } mPrivOps.reportStartInputAsync(startInputToken); mNavigationBarController.onNavButtonFlagsChanged(navButtonFlags); if (restarting) { Loading @@ -818,6 +813,15 @@ public class InputMethodService extends AbstractInputMethodService { } else { startInput(inputConnection, editorInfo); } // Update the IME dispatcher last, so that the previously registered back callback // (if any) can be unregistered using the old dispatcher if {@link #doFinishInput()} // is called from {@link #startInput(InputConnection, EditorInfo)} or // {@link #restartInput(InputConnection, EditorInfo)}. mImeDispatcher = imeDispatcher; if (mWindow != null) { mWindow.getOnBackInvokedDispatcher().setImeOnBackInvokedDispatcher( imeDispatcher); } } /** Loading Loading @@ -3860,6 +3864,11 @@ public class InputMethodService extends AbstractInputMethodService { }; private void compatHandleBack() { if (!mDecorViewVisible) { Log.e(TAG, "Back callback invoked on a hidden IME. Removing the callback..."); unregisterCompatOnBackInvokedCallback(); return; } final KeyEvent downEvent = createBackKeyEvent( KeyEvent.ACTION_DOWN, false /* isTracking */); onKeyDown(KeyEvent.KEYCODE_BACK, downEvent); Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +14 −5 Original line number Diff line number Diff line Loading @@ -806,11 +806,6 @@ public class InputMethodService extends AbstractInputMethodService { @NonNull EditorInfo editorInfo, boolean restarting, @NonNull IBinder startInputToken, @InputMethodNavButtonFlags int navButtonFlags, @NonNull ImeOnBackInvokedDispatcher imeDispatcher) { mImeDispatcher = imeDispatcher; if (mWindow != null) { mWindow.getOnBackInvokedDispatcher().setImeOnBackInvokedDispatcher( imeDispatcher); } mPrivOps.reportStartInputAsync(startInputToken); mNavigationBarController.onNavButtonFlagsChanged(navButtonFlags); if (restarting) { Loading @@ -818,6 +813,15 @@ public class InputMethodService extends AbstractInputMethodService { } else { startInput(inputConnection, editorInfo); } // Update the IME dispatcher last, so that the previously registered back callback // (if any) can be unregistered using the old dispatcher if {@link #doFinishInput()} // is called from {@link #startInput(InputConnection, EditorInfo)} or // {@link #restartInput(InputConnection, EditorInfo)}. mImeDispatcher = imeDispatcher; if (mWindow != null) { mWindow.getOnBackInvokedDispatcher().setImeOnBackInvokedDispatcher( imeDispatcher); } } /** Loading Loading @@ -3860,6 +3864,11 @@ public class InputMethodService extends AbstractInputMethodService { }; private void compatHandleBack() { if (!mDecorViewVisible) { Log.e(TAG, "Back callback invoked on a hidden IME. Removing the callback..."); unregisterCompatOnBackInvokedCallback(); return; } final KeyEvent downEvent = createBackKeyEvent( KeyEvent.ACTION_DOWN, false /* isTracking */); onKeyDown(KeyEvent.KEYCODE_BACK, downEvent); Loading