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

Commit fd676784 authored by Nikita Dubrovsky's avatar Nikita Dubrovsky
Browse files

Mention calling super in View.onProvideContentCaptureStructure javadoc

Bug: 178978073
Test: Presubmit
Change-Id: Iecf0d9f575f5794e37d42e46700ff098a2c6b30f
parent 918e1e01
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -8739,14 +8739,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    /**
     * Populates a {@link ViewStructure} for content capture.
     *
     * <p>This method is called after a view is that is eligible for content capture
     * (for example, if it {@link #isImportantForAutofill()}, an intelligence service is enabled for
     * the user, and the activity rendering the view is enabled for content capture) is laid out and
     * is visible.
     *
     * <p>The populated structure is then passed to the service through
     * <p>This method is called after a view that is eligible for content capture
     * (for example, if it {@link #isImportantForContentCapture()}, an intelligence service is
     * enabled for the user, and the activity rendering the view is enabled for content capture)
     * is laid out and is visible. The populated structure is then passed to the service through
     * {@link ContentCaptureSession#notifyViewAppeared(ViewStructure)}.
     *
     * <p>The default implementation of this method sets the most relevant properties based on
     * related {@link View} methods, and views in the standard Android widgets library also
     * override it to set their relevant properties. Therefore, if overriding this method, it
     * is recommended to call {@code super.onProvideContentCaptureStructure()}.
     *
     * <p><b>Note: </b>views that manage a virtual structure under this view must populate just
     * the node representing this view and return right away, then asynchronously report (not
     * necessarily in the UI thread) when the children nodes appear, disappear or have their text
@@ -8754,7 +8757,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * {@link ContentCaptureSession#notifyViewAppeared(ViewStructure)},
     * {@link ContentCaptureSession#notifyViewDisappeared(AutofillId)}, and
     * {@link ContentCaptureSession#notifyViewTextChanged(AutofillId, CharSequence)}
     * respectively. The structure for the a child must be created using
     * respectively. The structure for a child must be created using
     * {@link ContentCaptureSession#newVirtualViewStructure(AutofillId, long)}, and the
     * {@code autofillId} for a child can be obtained either through
     * {@code childStructure.getAutofillId()} or
@@ -8899,7 +8902,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    /**
     * Called when assist structure is being retrieved from a view as part of
     * {@link android.app.Activity#onProvideAssistData Activity.onProvideAssistData} to
     * generate additional virtual structure under this view.  The defaullt implementation
     * generate additional virtual structure under this view.  The default implementation
     * uses {@link #getAccessibilityNodeProvider()} to try to generate this from the
     * view's virtual accessibility nodes, if any.  You can override this for a more
     * optimal implementation providing this data.