private void parseAutofillFields(AssistStructure.ViewNode viewNode,
DatasetWithFilledAutofillFields datasetWithFilledAutofillFields, int partition) {
String[] hints = viewNode.getAutofillHints();
if (hints == null || hints.length == 0) {
return;
}
AutofillValue autofillValue = viewNode.getAutofillValue();
String textValue = null;
Long dateValue = null;
Boolean toggleValue = null;
CharSequence[] autofillOptions = null;
Integer listIndex = null;
if (autofillValue != null) {
if (autofillValue.isText()) {
textValue = autofillValue.getTextValue().toString();
} else if (autofillValue.isDate()) {
dateValue = autofillValue.getDateValue();
} else if (autofillValue.isList()) {
autofillOptions = viewNode.getAutofillOptions();
listIndex = autofillValue.getListValue();
} else if (autofillValue.isToggle()) {
toggleValue = autofillValue.getToggleValue();
}
}
appendViewMetadata(datasetWithFilledAutofillFields,
hints, partition, textValue, dateValue, toggleValue,
autofillOptions, listIndex);
}