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

Skip to content
Commit 4bd98255 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Require onCheckIsTextEditor() for IME_FLAG_NAVIGATE_{NEXT,PREVIOUS}

TextView#onCreateInputConnection() has automatically set the following
EditorInfo flags depending on the presence of focusable elements next
to it.

 * EditorInfo#IME_FLAG_NAVIGATE_NEXT
 * EditorInfo#IME_FLAG_NAVIGATE_PREVIOUS

With those flags, IMEs may offer some additional UI for users to
trigger InputConnection#performEditorAction() with the following
command to achieve tabbing navigation to switch to other focusable
elements.

 * EditorInfo#IME_ACTION_NEXT
 * EditorInfo#IME_ACTION_PREVIOUS

The problem of the current TextView implementation is that it does not
check whether the next element is also a text input field or not.  As
a result, users might be navigated to a UI element that does not
natively support InputConnection APIs, which results in connecting the
IME to a fallback InputConnection.  We have actually received multiple
bug reports that the IME was still shown but not tapping its keys did
nothing.

Based on such feedback, this CL aims to narrow down the condition to
automatically set those navigation flags in TextView.  With this CL,
those flags will no longer be set if the next View in question returns
true from  View#onCheckIsTextEditor().

See also the corresponding CTS CL [1] to find examples of how it
behaves now.

 [1]: I1b75b85f6c1fa4ff90ffa7d584f033b9510d2a36

Fix: 31099943
Test: atest CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: Id004a77453952f36a2c572697db31c87518f842f
parent df08d493
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment