From 64a7dad2dfa1d43aae9b34fec2a2152686877ca5 Mon Sep 17 00:00:00 2001 From: TYM Tsai Date: Fri, 17 Jan 2020 20:47:31 +0800 Subject: [PATCH] Updates API on the FillResponse Renames setCancelTargetIds() to setPresentationCancelIds() on the FillResponse. Fixes: 147835554 Test: atest CtsAutoFillServiceTestCases Change-Id: I3e6d8965fcb5536a75d202506a9d5413847d74cc --- api/current.txt | 2 +- core/java/android/service/autofill/FillResponse.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/current.txt b/api/current.txt index e27c318c09b9b..b5bc1e975250d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -42142,13 +42142,13 @@ package android.service.autofill { method @NonNull public android.service.autofill.FillResponse build(); method @NonNull public android.service.autofill.FillResponse.Builder disableAutofill(long); method @NonNull public android.service.autofill.FillResponse.Builder setAuthentication(@NonNull android.view.autofill.AutofillId[], @Nullable android.content.IntentSender, @Nullable android.widget.RemoteViews); - method @NonNull public android.service.autofill.FillResponse.Builder setCancelTargetIds(@Nullable int[]); method @NonNull public android.service.autofill.FillResponse.Builder setClientState(@Nullable android.os.Bundle); method @NonNull public android.service.autofill.FillResponse.Builder setFieldClassificationIds(@NonNull android.view.autofill.AutofillId...); method @NonNull public android.service.autofill.FillResponse.Builder setFlags(int); method @NonNull public android.service.autofill.FillResponse.Builder setFooter(@NonNull android.widget.RemoteViews); method @NonNull public android.service.autofill.FillResponse.Builder setHeader(@NonNull android.widget.RemoteViews); method @NonNull public android.service.autofill.FillResponse.Builder setIgnoredIds(android.view.autofill.AutofillId...); + method @NonNull public android.service.autofill.FillResponse.Builder setPresentationCancelIds(@Nullable int[]); method @NonNull public android.service.autofill.FillResponse.Builder setSaveInfo(@NonNull android.service.autofill.SaveInfo); method @NonNull public android.service.autofill.FillResponse.Builder setUserData(@NonNull android.service.autofill.UserData); } diff --git a/core/java/android/service/autofill/FillResponse.java b/core/java/android/service/autofill/FillResponse.java index 939ae878816a9..dc0f5623e5e35 100644 --- a/core/java/android/service/autofill/FillResponse.java +++ b/core/java/android/service/autofill/FillResponse.java @@ -559,8 +559,8 @@ public final class FillResponse implements Parcelable { } /** - * Sets targets with the resources IDs of the child view of - * {@link RemoteViews Presentation Template} which will cancel the session when clicked. + * Sets target resource IDs of the child view in {@link RemoteViews Presentation Template} + * which will cancel the session when clicked. * Those targets will be respectively applied to a child of the header, footer and * each {@link Dataset}. * @@ -571,7 +571,7 @@ public final class FillResponse implements Parcelable { * @throws IllegalStateException if {@link #build()} was already called. */ @NonNull - public Builder setCancelTargetIds(@Nullable int[] ids) { + public Builder setPresentationCancelIds(@Nullable int[] ids) { throwIfDestroyed(); mCancelIds = ids; return this; @@ -769,7 +769,7 @@ public final class FillResponse implements Parcelable { } builder.setFlags(parcel.readInt()); final int[] cancelIds = parcel.createIntArray(); - builder.setCancelTargetIds(cancelIds); + builder.setPresentationCancelIds(cancelIds); final FillResponse response = builder.build(); response.setRequestId(parcel.readInt());