diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 5c0e15639491d..9b10d87bc94f6 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8739,14 +8739,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Populates a {@link ViewStructure} for content capture. * - *

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. - * - *

The populated structure is then passed to the service through + *

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)}. * + *

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()}. + * *

Note: 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.