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

Commit 35887743 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Always use Context.getSystemService() to get IMM in SysUI

This is a mechanical refactoring, which should have no observable
behavior difference at this moment.

We need this refactoring because InputMethodManager#getInstance() does
not work well on multi-display scenarios.

Bug: 115891476
Test: Manually made sure that IME still works on inline-reply
Change-Id: I266c17187c7faab4d436e19a4db7595cab4244ac
parent b6ffc07e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -586,7 +586,8 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
            final InputConnection inputConnection = super.onCreateInputConnection(outAttrs);

            if (mShowImeOnInputConnection && inputConnection != null) {
                final InputMethodManager imm = InputMethodManager.getInstance();
                final InputMethodManager imm =
                        getContext().getSystemService(InputMethodManager.class);
                if (imm != null) {
                    // onCreateInputConnection is called by InputMethodManager in the middle of
                    // setting up the connection to the IME; wait with requesting the IME until that