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

Commit 1bdf3f07 authored by Felipe Leme's avatar Felipe Leme
Browse files

Set autofill id on virtual structures.

ViewStructure.newChild(virtualId) uses the AutoFillId of the parent,
which was not set anymore due do a previous refactoring, and was
causing this method to crash a custom view when
onProvideAutoFillVirtualStructure() was called on it.

Test: manual verification
Bug: 31001899

Change-Id: I602b421b0ec3a926ffdd52253d5b2498c4217d02
parent fb0f3602
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7171,6 +7171,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        boolean blocked = forAutoFill ? isAutoFillBlocked() : isAssistBlocked();
        if (!blocked) {
            if (forAutoFill) {
                // The auto-fill id needs to be unique, but its value doesn't matter,
                // so it's better to reuse the accessibility id to save space.
                structure.setAutoFillId(getAccessibilityViewId());
                // NOTE: flags are not currently supported, hence 0
                onProvideAutoFillStructure(structure, 0);
                onProvideAutoFillVirtualStructure(structure, 0);