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

Commit ed78e451 authored by Wilson Wu's avatar Wilson Wu Committed by Android (Google) Code Review
Browse files

Merge "Refine InputMethodManager#isAcceptingText API"

parents 688cc374 967338c2
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1414,13 +1414,15 @@ public final class InputMethodManager {
    }

    /**
     * Return true if the currently served view is accepting full text edits.
     * If false, it has no input connection, so can only handle raw key events.
     * Return {@code true} if the currently served view is accepting full text edits.
     * If {@code false}, it has no input connection, so it can only handle raw key events.
     */
    public boolean isAcceptingText() {
        checkFocus();
        return mServedInputConnectionWrapper != null &&
                mServedInputConnectionWrapper.getInputConnection() != null;
        synchronized (mH) {
            return mServedInputConnectionWrapper != null
                    && mServedInputConnectionWrapper.getInputConnection() != null;
        }
    }

    /**