Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-08-02 00:08:15 +00:00
committed by Android (Google) Code Review
2 changed files with 21 additions and 4 deletions

View File

@@ -205,6 +205,13 @@ public final class FillResponse implements Parcelable {
/**
* Adds a new {@link Dataset} to this response.
*
* <p><b>Note: </b> the total number of datasets is limited by the Binder transaction size,
* so it's recommended to keep it small (in the range of 10-20 at most) and use pagination
* by adding a fake
* {@link Dataset.Builder#setAuthentication(IntentSender) authenticated dataset}
* at the end with a presentation string like "Next 10" that would return a new
* {@link FillResponse} with the next 10 datasets, and so on.
*
* @return This builder.
*/
public @NonNull Builder addDataset(@Nullable Dataset dataset) {

View File

@@ -671,8 +671,13 @@ public final class AutofillManager {
/**
* Called to indicate the current autofill context should be commited.
*
* <p>For example, when a virtual view is rendering an {@code HTML} page with a form, it should
* call this method after the form is submitted and another page is rendered.
* <p>This method is typically called by {@link View Views} that manage virtual views; for
* example, when the view is rendering an {@code HTML} page with a form and virtual views
* that represent the HTML elements, it should call this method after the form is submitted and
* another page is rendered.
*
* <p><b>Note:</b> This method does not need to be called on regular application lifecycle
* methods such as {@link android.app.Activity#finish()}.
*/
public void commit() {
if (!hasAutofillFeature()) {
@@ -690,8 +695,13 @@ public final class AutofillManager {
/**
* Called to indicate the current autofill context should be cancelled.
*
* <p>For example, when a virtual view is rendering an {@code HTML} page with a form, it should
* call this method if the user does not post the form but moves to another form in this page.
* <p>This method is typically called by {@link View Views} that manage virtual views; for
* example, when the view is rendering an {@code HTML} page with a form and virtual views
* that represent the HTML elements, it should call this method if the user does not post the
* form but moves to another form in this page.
*
* <p><b>Note:</b> This method does not need to be called on regular application lifecycle
* methods such as {@link android.app.Activity#finish()}.
*/
public void cancel() {
if (!hasAutofillFeature()) {