Merge "Removed inlinePresentation from Dataset ctor and added setInlinePresentation." into rvc-dev
This commit is contained in:
@@ -43016,12 +43016,12 @@ package android.service.autofill {
|
||||
}
|
||||
|
||||
public static final class Dataset.Builder {
|
||||
ctor public Dataset.Builder(@NonNull android.widget.RemoteViews, @NonNull android.service.autofill.InlinePresentation);
|
||||
ctor public Dataset.Builder(@NonNull android.widget.RemoteViews);
|
||||
ctor public Dataset.Builder();
|
||||
method @NonNull public android.service.autofill.Dataset build();
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setAuthentication(@Nullable android.content.IntentSender);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setId(@Nullable String);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setInlinePresentation(@NonNull android.service.autofill.InlinePresentation);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setValue(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setValue(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @NonNull android.widget.RemoteViews);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setValue(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern);
|
||||
|
||||
@@ -9798,7 +9798,7 @@ package android.service.autofill {
|
||||
|
||||
public static final class Dataset.Builder {
|
||||
ctor public Dataset.Builder(@NonNull android.service.autofill.InlinePresentation);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setFieldInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
|
||||
}
|
||||
|
||||
public abstract class InlineSuggestionRenderService extends android.app.Service {
|
||||
|
||||
@@ -3134,7 +3134,7 @@ package android.service.autofill {
|
||||
|
||||
public static final class Dataset.Builder {
|
||||
ctor public Dataset.Builder(@NonNull android.service.autofill.InlinePresentation);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
|
||||
method @NonNull public android.service.autofill.Dataset.Builder setFieldInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
|
||||
}
|
||||
|
||||
public final class DateTransformation extends android.service.autofill.InternalTransformation implements android.os.Parcelable android.service.autofill.Transformation {
|
||||
|
||||
@@ -228,22 +228,6 @@ public final class Dataset implements Parcelable {
|
||||
private boolean mDestroyed;
|
||||
@Nullable private String mId;
|
||||
|
||||
/**
|
||||
* Creates a new builder.
|
||||
*
|
||||
* @param presentation The presentation used to visualize this dataset.
|
||||
* @param inlinePresentation The {@link InlinePresentation} used to visualize this dataset
|
||||
* as inline suggestions. If the dataset supports inline suggestions,
|
||||
* this should not be null.
|
||||
*/
|
||||
public Builder(@NonNull RemoteViews presentation,
|
||||
@NonNull InlinePresentation inlinePresentation) {
|
||||
Preconditions.checkNotNull(presentation, "presentation must be non-null");
|
||||
Preconditions.checkNotNull(inlinePresentation, "inlinePresentation must be non-null");
|
||||
mPresentation = presentation;
|
||||
mInlinePresentation = inlinePresentation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new builder.
|
||||
*
|
||||
@@ -281,6 +265,22 @@ public final class Dataset implements Parcelable {
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link InlinePresentation} used to visualize this dataset as inline suggestions.
|
||||
* If the dataset supports inline suggestions this should not be null.
|
||||
*
|
||||
* @throws IllegalStateException if {@link #build()} was already called.
|
||||
*
|
||||
* @return this builder.
|
||||
*/
|
||||
public @NonNull Builder setInlinePresentation(
|
||||
@NonNull InlinePresentation inlinePresentation) {
|
||||
throwIfDestroyed();
|
||||
Preconditions.checkNotNull(inlinePresentation, "inlinePresentation must be non-null");
|
||||
mInlinePresentation = inlinePresentation;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a custom UI before before autofilling the screen with the contents of this
|
||||
* dataset.
|
||||
@@ -600,7 +600,7 @@ public final class Dataset implements Parcelable {
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public @NonNull Builder setInlinePresentation(@NonNull AutofillId id,
|
||||
public @NonNull Builder setFieldInlinePresentation(@NonNull AutofillId id,
|
||||
@Nullable AutofillValue value, @Nullable Pattern filter,
|
||||
@NonNull InlinePresentation inlinePresentation) {
|
||||
throwIfDestroyed();
|
||||
@@ -700,7 +700,7 @@ public final class Dataset implements Parcelable {
|
||||
final Builder builder = presentation != null
|
||||
? inlinePresentation == null
|
||||
? new Builder(presentation)
|
||||
: new Builder(presentation, inlinePresentation)
|
||||
: new Builder(presentation).setInlinePresentation(inlinePresentation)
|
||||
: inlinePresentation == null
|
||||
? new Builder()
|
||||
: new Builder(inlinePresentation);
|
||||
|
||||
Reference in New Issue
Block a user