Trim text from autofillvalue when checking for empty.
Test: VirtualContainerActivityTest#testSaveDialogNotShownWhenBackIsPressed Fixes: 62667931 Change-Id: I7e673eedd39fff7af89c694d0bfc5a495f14ea26
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user