Loading core/java/android/widget/TextView.java +12 −3 Original line number Diff line number Diff line Loading @@ -12883,6 +12883,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return mText instanceof Editable && onCheckIsTextEditor() && isEnabled(); } /** * @return true if this TextView could be filled by an Autofill service. Note that disabled * fields can still be filled. */ @UnsupportedAppUsage boolean isTextAutofillable() { return mText instanceof Editable && onCheckIsTextEditor(); } /** * Returns true, only while processing a touch gesture, if the initial * touch down event caused focus to move to the text view and as a result Loading Loading @@ -13605,7 +13614,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override public void autofill(AutofillValue value) { if (!isTextEditable()) { if (!isTextAutofillable()) { Log.w(LOG_TAG, "cannot autofill non-editable TextView: " + this); return; } Loading @@ -13621,7 +13630,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override public @AutofillType int getAutofillType() { return isTextEditable() ? AUTOFILL_TYPE_TEXT : AUTOFILL_TYPE_NONE; return isTextAutofillable() ? AUTOFILL_TYPE_TEXT : AUTOFILL_TYPE_NONE; } /** Loading @@ -13635,7 +13644,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override @Nullable public AutofillValue getAutofillValue() { if (isTextEditable()) { if (isTextAutofillable()) { final CharSequence text = TextUtils.trimToParcelableSize(getText()); return AutofillValue.forText(text); } Loading
core/java/android/widget/TextView.java +12 −3 Original line number Diff line number Diff line Loading @@ -12883,6 +12883,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return mText instanceof Editable && onCheckIsTextEditor() && isEnabled(); } /** * @return true if this TextView could be filled by an Autofill service. Note that disabled * fields can still be filled. */ @UnsupportedAppUsage boolean isTextAutofillable() { return mText instanceof Editable && onCheckIsTextEditor(); } /** * Returns true, only while processing a touch gesture, if the initial * touch down event caused focus to move to the text view and as a result Loading Loading @@ -13605,7 +13614,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override public void autofill(AutofillValue value) { if (!isTextEditable()) { if (!isTextAutofillable()) { Log.w(LOG_TAG, "cannot autofill non-editable TextView: " + this); return; } Loading @@ -13621,7 +13630,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override public @AutofillType int getAutofillType() { return isTextEditable() ? AUTOFILL_TYPE_TEXT : AUTOFILL_TYPE_NONE; return isTextAutofillable() ? AUTOFILL_TYPE_TEXT : AUTOFILL_TYPE_NONE; } /** Loading @@ -13635,7 +13644,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override @Nullable public AutofillValue getAutofillValue() { if (isTextEditable()) { if (isTextAutofillable()) { final CharSequence text = TextUtils.trimToParcelableSize(getText()); return AutofillValue.forText(text); }