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

Commit 90ec3a47 authored by Kai Li's avatar Kai Li
Browse files

Fix a bug in Helper.addAutofillableIds() that was causing a crash when a view had null autofill id.

Change-Id: I0ce8f4823ad5418ac0a52397583d06f0a0328a2a
Bug: 376371207
Flag: EXEMPT trivial check for null
Test: presubmit
Test: atest CtsAutoFillServiceTestCases
parent 2466f2d2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -308,7 +308,10 @@ public final class Helper {
    private static void addAutofillableIds(@NonNull ViewNode node,
            @NonNull ArrayList<AutofillId> ids, boolean autofillableOnly) {
        if (!autofillableOnly || node.getAutofillType() != View.AUTOFILL_TYPE_NONE) {
            ids.add(node.getAutofillId());
            AutofillId id = node.getAutofillId();
            if (id != null) {
                ids.add(id);
            }
        }
        final int size = node.getChildCount();
        for (int i = 0; i < size; i++) {