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

Commit 6219f269 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed Autofill NPE that crashed some apps.

It happened when views provided an Accessibility node that had children.

Bug: 37078783
Fixes: 37009008
Test: LoginActivityTest#testAutoFillWhenViewHasChildAccessibilityNodes

Change-Id: Ie694094afe9129b933096a385eb867baf4550e7f
parent a441da15
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -7431,6 +7431,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            AccessibilityNodeInfo info = createAccessibilityNodeInfo();
            AccessibilityNodeInfo info = createAccessibilityNodeInfo();
            structure.setChildCount(1);
            structure.setChildCount(1);
            ViewStructure root = structure.newChild(0);
            ViewStructure root = structure.newChild(0);
            if (forAutofill) {
                setAutofillId(root);
            }
            populateVirtualStructure(root, provider, info, forAutofill);
            populateVirtualStructure(root, provider, info, forAutofill);
            info.recycle();
            info.recycle();
        }
        }