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

Commit 611f0c8a authored by Joanne Chung's avatar Joanne Chung
Browse files

Fix AutofillValueTest#autofillEmptyTextValue.

The new added API for rich content(ag/9884022) denies to autofill
empty text. However, Autofill allows us to fill an empty text. We
should not cause a compatibility issue.

Bug: 159035197
Test: atest android.autofillservice.cts.AutofillValueTest#\
autofillEmptyTextValue
Test: atest FrameworksCoreTests:AutofillValueTest

Change-Id: Ieb5b82bfe4bf77abd151c61ea4cf9125b8fe61f5
parent 720b6dc5
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -116,9 +116,6 @@ final class TextViewRichContentReceiver implements RichContentReceiver<TextView>
    private static boolean onReceiveForAutofill(@NonNull TextView textView, @NonNull ClipData clip,
            @Flags int flags) {
        final CharSequence text = coerceToText(clip, textView.getContext(), flags);
        if (text.length() == 0) {
            return false;
        }
        // First autofill it...
        textView.setText(text);
        // ...then move cursor to the end.