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

am: 1c03d3fcef

Change-Id: I8f94db3b3b129caca53f3cb0ed0b16b2a4951648
This commit is contained in:
Felipe Leme
2017-06-16 23:06:47 +00:00
committed by android-build-merger

View File

@@ -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;
}
/////////////////////////////////////