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

Commit c5d4e068 authored by Felipe Leme's avatar Felipe Leme
Browse files

Trim text from autofillvalue when checking for empty.

Test: VirtualContainerActivityTest#testSaveDialogNotShownWhenBackIsPressed
Fixes: 62667931

Change-Id: I7e673eedd39fff7af89c694d0bfc5a495f14ea26
parent 6f87503e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -141,7 +141,10 @@ public final class AutofillValue implements Parcelable {
     * @hide
     */
    public boolean isEmpty() {
        return isText() && ((CharSequence) mValue).length() == 0;
        if (!isText()) return false;

        final CharSequence text = (CharSequence) mValue;
        return text == null || TextUtils.getTrimmedLength(text) == 0;
    }

    /////////////////////////////////////