Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 296c85aa authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "IMMS: defer showSoftInput until session is established" into main

parents afbc5c7b e0e8eecc
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -106,3 +106,13 @@ flag {
    }
}

flag {
  name: "defer_show_soft_input_until_session_creation"
  namespace: "input_method"
  description: "Defers showSoftInput until the IME session has been created."
  bug: "337766845"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+8 −1
Original line number Diff line number Diff line
@@ -3400,7 +3400,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        mBindingController.setCurrentMethodVisible();
        final IInputMethodInvoker curMethod = getCurMethodLocked();
        ImeTracker.forLogging().onCancelled(mCurStatsToken, ImeTracker.PHASE_SERVER_WAIT_IME);
        if (curMethod != null) {
        final boolean readyToDispatchToIme;
        if (Flags.deferShowSoftInputUntilSessionCreation()) {
            readyToDispatchToIme =
                    curMethod != null && mCurClient != null && mCurClient.mCurSession != null;
        } else {
            readyToDispatchToIme = curMethod != null;
        }
        if (readyToDispatchToIme) {
            ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_SERVER_HAS_IME);
            mCurStatsToken = null;