Fix TextView.shouldAdvanceFocusOnTab().
EditorInfo.TYPE_TEXT_FLAG_{IME_,}MULTI_LINE are outside of
EditorInfo.TYPE_MASK_VARIATION.
It causes shouldAdvanceFocusOnTab return true always.
Bug: 37066224
Test: manual - Tab key on multiline text input inserts a tab character.
Test: atest TextViewTest#testKeyNavigation
Change-Id: I913cda40206d1c39e6844ff1be38e069488df4f4
This commit is contained in:
@@ -8282,9 +8282,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
if (getKeyListener() != null && !mSingleLine && mEditor != null
|
||||
&& (mEditor.mInputType & EditorInfo.TYPE_MASK_CLASS)
|
||||
== EditorInfo.TYPE_CLASS_TEXT) {
|
||||
int variation = mEditor.mInputType & EditorInfo.TYPE_MASK_VARIATION;
|
||||
if (variation == EditorInfo.TYPE_TEXT_FLAG_IME_MULTI_LINE
|
||||
|| variation == EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) {
|
||||
int multilineFlags = EditorInfo.TYPE_TEXT_FLAG_IME_MULTI_LINE
|
||||
| EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||
if ((mEditor.mInputType & multilineFlags) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user