diff --git a/core/java/android/service/autofill/SaveInfo.java b/core/java/android/service/autofill/SaveInfo.java index a8e3ff8e7a81b..1bd88c7ce414e 100644 --- a/core/java/android/service/autofill/SaveInfo.java +++ b/core/java/android/service/autofill/SaveInfo.java @@ -198,6 +198,26 @@ public final class SaveInfo implements Parcelable { return this; } + + /** + * @hide + */ + // TODO(b/33197203): temporary fix to runtime crash + public @NonNull Builder addSavableIds(@Nullable AutoFillId... ids) { + throwIfDestroyed(); + + if (ids == null) { + return this; + } + for (AutoFillId id : ids) { + if (mSavableIds == null) { + mSavableIds = new ArraySet<>(); + } + mSavableIds.add(id.getDaRealId()); + } + return this; + } + /** * Sets an optional description to be shown in the UI when the user is asked to save. *