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

Commit 2fade04f authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove a dependency on IMM#isActive() from Editor.java

Despite its name, InputMethodManager#isActive(View) internally aquires
IMM lock three times and may even trigger IME focus switching.

To make things simpler and more predictable,

  InputMethodManager#hasActiveInputConnectionInternal()

should be used instead.

Bug: 291826769
Bug: 287109569
Test: presubmit
Change-Id: Iad75edd76de5957819f0dca14bdb4068c14a09a1
parent 33d74806
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4830,7 +4830,7 @@ public class Editor {
            if (null == imm) {
                return;
            }
            if (!imm.isActive(mTextView)) {
            if (!imm.hasActiveInputConnection(mTextView)) {
                return;
            }
            // Skip if the IME has not requested the cursor/anchor position.