diff --git a/mobile/android/geckoview/api.txt b/mobile/android/geckoview/api.txt index 6894451df4f8..a57dd7ecd759 100644 --- a/mobile/android/geckoview/api.txt +++ b/mobile/android/geckoview/api.txt @@ -118,6 +118,57 @@ package org.mozilla.geckoview { ctor protected Autocomplete(); } + public static class Autocomplete.Address { + ctor @AnyThread protected Address(); + field @NonNull public final String additionalName; + field @NonNull public final String addressLevel1; + field @NonNull public final String addressLevel2; + field @NonNull public final String addressLevel3; + field @NonNull public final String country; + field @NonNull public final String email; + field @NonNull public final String familyName; + field @NonNull public final String givenName; + field @Nullable public final String guid; + field @NonNull public final String name; + field @NonNull public final String organization; + field @NonNull public final String postalCode; + field @NonNull public final String streetAddress; + field @NonNull public final String tel; + } + + public static class Autocomplete.Address.Builder { + ctor @AnyThread public Builder(); + method @AnyThread @NonNull public Autocomplete.Address.Builder additionalName(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder addressLevel1(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder addressLevel2(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder addressLevel3(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address build(); + method @AnyThread @NonNull public Autocomplete.Address.Builder country(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder email(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder familyName(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder givenName(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder guid(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder name(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder organization(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder postalCode(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder streetAddress(@Nullable String); + method @AnyThread @NonNull public Autocomplete.Address.Builder tel(@Nullable String); + } + + public static class Autocomplete.AddressSaveOption extends Autocomplete.SaveOption { + ctor public AddressSaveOption(@NonNull Autocomplete.Address); + } + + public static class Autocomplete.AddressSelectOption extends Autocomplete.SelectOption { + ctor public AddressSelectOption(@NonNull Autocomplete.Address); + } + + public static class Autocomplete.AddressSelectOption.Hint { + ctor public Hint(); + field public static final int INSECURE_FORM = 2; + field public static final int NONE = 0; + } + public static class Autocomplete.CreditCard { ctor @AnyThread protected CreditCard(); field @NonNull public final String expirationMonth; @@ -210,6 +261,8 @@ package org.mozilla.geckoview { } public static interface Autocomplete.StorageDelegate { + method @Nullable @UiThread default public GeckoResult onAddressFetch(); + method @UiThread default public void onAddressSave(@NonNull Autocomplete.Address); method @Nullable @UiThread default public GeckoResult onCreditCardFetch(); method @Nullable @UiThread default public GeckoResult onLoginFetch(@NonNull String); method @UiThread default public void onLoginSave(@NonNull Autocomplete.LoginEntry); @@ -1045,6 +1098,8 @@ package org.mozilla.geckoview { } public static interface GeckoSession.PromptDelegate { + method @Nullable @UiThread default public GeckoResult onAddressSave(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest); + method @Nullable @UiThread default public GeckoResult onAddressSelect(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest); method @Nullable @UiThread default public GeckoResult onAlertPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AlertPrompt); method @Nullable @UiThread default public GeckoResult onAuthPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AuthPrompt); method @Nullable @UiThread default public GeckoResult onBeforeUnloadPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.BeforeUnloadPrompt); diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md index 27efce1c160a..84e665b9e106 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md @@ -13,6 +13,10 @@ exclude: true ⚠️ breaking change and deprecation notices +## v91 +- Extended [`Autocomplete`][78.7] API to support addresses. + ([bug 1699794]({{bugzilla}}1699794)). + ## v90 - Added [`WebNotification.silent`][90.1] and [`WebNotification.vibrate`][90.2] support. See also [Web/API/Notification/silent][90.3] and @@ -1010,4 +1014,4 @@ to allow adding gecko profiler markers. [65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String- [65.25]: {{javadoc_uri}}/GeckoResult.html -[api-version]: f4c3eb58b10577fc72eb4306512c9bd205a899ba +[api-version]: 47d9ee299e7ba7be24963762712b0a1ecee29a68