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

Commit 5ae4e8dc authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Trim text from autofillvalue when checking for empty." into oc-dev am:...

Merge "Trim text from autofillvalue when checking for empty." into oc-dev am: b3b13ff6 am: 1c03d3fc
am: 9ccb3a86

Change-Id: I5a6101d80376a0fd60bd6c49fe6a12f8ec9df12e
parents 09c2b234 9ccb3a86
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;
    }

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