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

This commit is contained in:
TreeHugger Robot
2017-06-17 00:52:57 +00:00
committed by Android (Google) Code Review

View File

@@ -141,10 +141,7 @@ public final class AutofillValue implements Parcelable {
* @hide * @hide
*/ */
public boolean isEmpty() { public boolean isEmpty() {
if (!isText()) return false; return isText() && ((CharSequence) mValue).length() == 0;
final CharSequence text = (CharSequence) mValue;
return text == null || TextUtils.getTrimmedLength(text) == 0;
} }
///////////////////////////////////// /////////////////////////////////////