diff --git a/firebase-ml-modeldownloader/CHANGELOG.md b/firebase-ml-modeldownloader/CHANGELOG.md index 978b078c11a..2ce5f532b77 100644 --- a/firebase-ml-modeldownloader/CHANGELOG.md +++ b/firebase-ml-modeldownloader/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- [changed] Updated the Firebase ML deprecation message to link to the Firebase ML documentation for migration options. + # 26.1.0 - [deprecated] Firebase ML is deprecated and will be shut down on June 15, 2027. diff --git a/firebase-ml-modeldownloader/api.txt b/firebase-ml-modeldownloader/api.txt index f693f42c9f7..196dc000a79 100644 --- a/firebase-ml-modeldownloader/api.txt +++ b/firebase-ml-modeldownloader/api.txt @@ -1,79 +1,79 @@ // Signature format: 3.0 package com.google.firebase.ml.modeldownloader { - public class CustomModel { - method public long getDownloadId(); - method public java.io.File? getFile(); - method public String getModelHash(); - method public String getName(); - method public long getSize(); + @Deprecated public class CustomModel { + method @Deprecated public long getDownloadId(); + method @Deprecated public java.io.File? getFile(); + method @Deprecated public String getModelHash(); + method @Deprecated public String getName(); + method @Deprecated public long getSize(); } - public class CustomModelDownloadConditions { - method public boolean isChargingRequired(); - method public boolean isDeviceIdleRequired(); - method public boolean isWifiRequired(); + @Deprecated public class CustomModelDownloadConditions { + method @Deprecated public boolean isChargingRequired(); + method @Deprecated public boolean isDeviceIdleRequired(); + method @Deprecated public boolean isWifiRequired(); } - public static class CustomModelDownloadConditions.Builder { - ctor public CustomModelDownloadConditions.Builder(); - method public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions build(); - method @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireCharging(); - method @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireDeviceIdle(); - method public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireWifi(); + @Deprecated public static class CustomModelDownloadConditions.Builder { + ctor @Deprecated public CustomModelDownloadConditions.Builder(); + method @Deprecated public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions build(); + method @Deprecated @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireCharging(); + method @Deprecated @RequiresApi(android.os.Build.VERSION_CODES.N) public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireDeviceIdle(); + method @Deprecated public com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions.Builder requireWifi(); } - public enum DownloadType { - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LATEST_MODEL; - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL; - enum_constant public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL_UPDATE_IN_BACKGROUND; + @Deprecated public enum DownloadType { + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LATEST_MODEL; + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL; + enum_constant @Deprecated public static final com.google.firebase.ml.modeldownloader.DownloadType LOCAL_MODEL_UPDATE_IN_BACKGROUND; } - public class FirebaseMlException extends com.google.firebase.FirebaseException { - method @com.google.firebase.ml.modeldownloader.FirebaseMlException.Code public int getCode(); - field public static final int ABORTED = 10; // 0xa - field public static final int ALREADY_EXISTS = 6; // 0x6 - field public static final int CANCELLED = 1; // 0x1 - field public static final int DEADLINE_EXCEEDED = 4; // 0x4 - field public static final int DOWNLOAD_URL_EXPIRED = 121; // 0x79 - field public static final int FAILED_PRECONDITION = 9; // 0x9 - field public static final int INTERNAL = 13; // 0xd - field public static final int INVALID_ARGUMENT = 3; // 0x3 - field public static final int MODEL_HASH_MISMATCH = 102; // 0x66 - field public static final int NOT_ENOUGH_SPACE = 101; // 0x65 - field public static final int NOT_FOUND = 5; // 0x5 - field public static final int NO_NETWORK_CONNECTION = 17; // 0x11 - field public static final int OUT_OF_RANGE = 11; // 0xb - field public static final int PERMISSION_DENIED = 7; // 0x7 - field public static final int RESOURCE_EXHAUSTED = 8; // 0x8 - field public static final int UNAUTHENTICATED = 16; // 0x10 - field public static final int UNAVAILABLE = 14; // 0xe - field public static final int UNIMPLEMENTED = 12; // 0xc - field public static final int UNKNOWN = 2; // 0x2 + @Deprecated public class FirebaseMlException extends com.google.firebase.FirebaseException { + method @Deprecated @com.google.firebase.ml.modeldownloader.FirebaseMlException.Code public int getCode(); + field @Deprecated public static final int ABORTED = 10; // 0xa + field @Deprecated public static final int ALREADY_EXISTS = 6; // 0x6 + field @Deprecated public static final int CANCELLED = 1; // 0x1 + field @Deprecated public static final int DEADLINE_EXCEEDED = 4; // 0x4 + field @Deprecated public static final int DOWNLOAD_URL_EXPIRED = 121; // 0x79 + field @Deprecated public static final int FAILED_PRECONDITION = 9; // 0x9 + field @Deprecated public static final int INTERNAL = 13; // 0xd + field @Deprecated public static final int INVALID_ARGUMENT = 3; // 0x3 + field @Deprecated public static final int MODEL_HASH_MISMATCH = 102; // 0x66 + field @Deprecated public static final int NOT_ENOUGH_SPACE = 101; // 0x65 + field @Deprecated public static final int NOT_FOUND = 5; // 0x5 + field @Deprecated public static final int NO_NETWORK_CONNECTION = 17; // 0x11 + field @Deprecated public static final int OUT_OF_RANGE = 11; // 0xb + field @Deprecated public static final int PERMISSION_DENIED = 7; // 0x7 + field @Deprecated public static final int RESOURCE_EXHAUSTED = 8; // 0x8 + field @Deprecated public static final int UNAUTHENTICATED = 16; // 0x10 + field @Deprecated public static final int UNAVAILABLE = 14; // 0xe + field @Deprecated public static final int UNIMPLEMENTED = 12; // 0xc + field @Deprecated public static final int UNKNOWN = 2; // 0x2 } - @IntDef({com.google.firebase.ml.modeldownloader.FirebaseMlException.CANCELLED, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNKNOWN, com.google.firebase.ml.modeldownloader.FirebaseMlException.INVALID_ARGUMENT, com.google.firebase.ml.modeldownloader.FirebaseMlException.DEADLINE_EXCEEDED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_FOUND, com.google.firebase.ml.modeldownloader.FirebaseMlException.ALREADY_EXISTS, com.google.firebase.ml.modeldownloader.FirebaseMlException.PERMISSION_DENIED, com.google.firebase.ml.modeldownloader.FirebaseMlException.RESOURCE_EXHAUSTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.FAILED_PRECONDITION, com.google.firebase.ml.modeldownloader.FirebaseMlException.ABORTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.OUT_OF_RANGE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNIMPLEMENTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.INTERNAL, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAVAILABLE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAUTHENTICATED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NO_NETWORK_CONNECTION, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_ENOUGH_SPACE, com.google.firebase.ml.modeldownloader.FirebaseMlException.MODEL_HASH_MISMATCH, com.google.firebase.ml.modeldownloader.FirebaseMlException.DOWNLOAD_URL_EXPIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface FirebaseMlException.Code { + @Deprecated @IntDef({com.google.firebase.ml.modeldownloader.FirebaseMlException.CANCELLED, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNKNOWN, com.google.firebase.ml.modeldownloader.FirebaseMlException.INVALID_ARGUMENT, com.google.firebase.ml.modeldownloader.FirebaseMlException.DEADLINE_EXCEEDED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_FOUND, com.google.firebase.ml.modeldownloader.FirebaseMlException.ALREADY_EXISTS, com.google.firebase.ml.modeldownloader.FirebaseMlException.PERMISSION_DENIED, com.google.firebase.ml.modeldownloader.FirebaseMlException.RESOURCE_EXHAUSTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.FAILED_PRECONDITION, com.google.firebase.ml.modeldownloader.FirebaseMlException.ABORTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.OUT_OF_RANGE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNIMPLEMENTED, com.google.firebase.ml.modeldownloader.FirebaseMlException.INTERNAL, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAVAILABLE, com.google.firebase.ml.modeldownloader.FirebaseMlException.UNAUTHENTICATED, com.google.firebase.ml.modeldownloader.FirebaseMlException.NO_NETWORK_CONNECTION, com.google.firebase.ml.modeldownloader.FirebaseMlException.NOT_ENOUGH_SPACE, com.google.firebase.ml.modeldownloader.FirebaseMlException.MODEL_HASH_MISMATCH, com.google.firebase.ml.modeldownloader.FirebaseMlException.DOWNLOAD_URL_EXPIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface FirebaseMlException.Code { } - public class FirebaseModelDownloader { - method public com.google.android.gms.tasks.Task deleteDownloadedModel(String); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(com.google.firebase.FirebaseApp); - method public com.google.android.gms.tasks.Task getModel(String, com.google.firebase.ml.modeldownloader.DownloadType, com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions?); - method public com.google.android.gms.tasks.Task getModelDownloadId(String, com.google.android.gms.tasks.Task?); - method public com.google.android.gms.tasks.Task!> listDownloadedModels(); - method public void setModelDownloaderCollectionEnabled(Boolean?); + @Deprecated public class FirebaseModelDownloader { + method @Deprecated public com.google.android.gms.tasks.Task deleteDownloadedModel(String); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getInstance(com.google.firebase.FirebaseApp); + method @Deprecated public com.google.android.gms.tasks.Task getModel(String, com.google.firebase.ml.modeldownloader.DownloadType, com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions?); + method @Deprecated public com.google.android.gms.tasks.Task getModelDownloadId(String, com.google.android.gms.tasks.Task?); + method @Deprecated public com.google.android.gms.tasks.Task!> listDownloadedModels(); + method @Deprecated public void setModelDownloaderCollectionEnabled(Boolean?); } public final class ModelDownloaderKt { - method public static operator java.io.File? component1(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator long component2(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator long component3(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator String component4(com.google.firebase.ml.modeldownloader.CustomModel); - method public static operator String component5(com.google.firebase.ml.modeldownloader.CustomModel); - method public static com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions customModelDownloadConditions(kotlin.jvm.functions.Function1 init); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getModelDownloader(com.google.firebase.Firebase); - method public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader modelDownloader(com.google.firebase.Firebase, com.google.firebase.FirebaseApp app); + method @Deprecated public static operator java.io.File? component1(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator long component2(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator long component3(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator String component4(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static operator String component5(com.google.firebase.ml.modeldownloader.CustomModel); + method @Deprecated public static com.google.firebase.ml.modeldownloader.CustomModelDownloadConditions customModelDownloadConditions(kotlin.jvm.functions.Function1 init); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader getModelDownloader(com.google.firebase.Firebase); + method @Deprecated public static com.google.firebase.ml.modeldownloader.FirebaseModelDownloader modelDownloader(com.google.firebase.Firebase, com.google.firebase.FirebaseApp app); } } diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java index ddc442924fa..a933cac55b1 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModel.java @@ -32,8 +32,9 @@ * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class CustomModel { @@ -113,8 +114,9 @@ public CustomModel( * @return The name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -131,8 +133,9 @@ public String getName() { * fully downloaded model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Nullable @Deprecated @@ -184,8 +187,9 @@ boolean isModelFilePresent() { * @return The local model size. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public long getSize() { @@ -198,8 +202,9 @@ public long getSize() { * @return The model hash * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -215,8 +220,9 @@ public String getModelHash() { * @return The download ID (if download in progress), otherwise returns 0. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public long getDownloadId() { diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java index a50f8e75ac5..0d0ebbdc89c 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/CustomModelDownloadConditions.java @@ -25,8 +25,9 @@ * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class CustomModelDownloadConditions { @@ -45,8 +46,9 @@ private CustomModelDownloadConditions( * @return True if charging is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isChargingRequired() { @@ -57,8 +59,9 @@ public boolean isChargingRequired() { * @return True if wifi is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isWifiRequired() { @@ -69,8 +72,9 @@ public boolean isWifiRequired() { * @return True if device idle is required for download. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public boolean isDeviceIdleRequired() { @@ -82,8 +86,9 @@ public boolean isDeviceIdleRequired() { * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static class Builder { @@ -95,9 +100,10 @@ public static class Builder { * Sets charging as required. Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @RequiresApi(VERSION_CODES.N) @@ -112,9 +118,10 @@ public Builder requireCharging() { * Sets wifi as required. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -132,9 +139,10 @@ public Builder requireWifi() { *

Only works on Android N and above. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @RequiresApi(VERSION_CODES.N) @@ -149,9 +157,10 @@ public Builder requireDeviceIdle() { * Builds {@link CustomModelDownloadConditions}. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java index 87fcd10f57d..8701ab99572 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/DownloadType.java @@ -17,8 +17,9 @@ /** * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public enum DownloadType { @@ -27,8 +28,9 @@ public enum DownloadType { * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LOCAL_MODEL, @@ -38,8 +40,9 @@ public enum DownloadType { * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LOCAL_MODEL_UPDATE_IN_BACKGROUND, @@ -49,8 +52,9 @@ public enum DownloadType { * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated LATEST_MODEL diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java index 83043319fb2..db426710593 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java @@ -27,8 +27,9 @@ * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class FirebaseMlException extends FirebaseException { @@ -36,9 +37,10 @@ public class FirebaseMlException extends FirebaseException { * The operation was cancelled (typically by the caller). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int CANCELLED = 1; @@ -46,9 +48,10 @@ public class FirebaseMlException extends FirebaseException { * Unknown error or an error from a different error domain. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNKNOWN = 2; @@ -58,9 +61,10 @@ public class FirebaseMlException extends FirebaseException { * the state of the system (for example, an invalid field name). * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int INVALID_ARGUMENT = 3; @@ -71,9 +75,10 @@ public class FirebaseMlException extends FirebaseException { * deadline to expire. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int DEADLINE_EXCEEDED = 4; @@ -81,9 +86,10 @@ public class FirebaseMlException extends FirebaseException { * Some requested resource was not found. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NOT_FOUND = 5; @@ -91,9 +97,10 @@ public class FirebaseMlException extends FirebaseException { * Some resource that we attempted to create already exists. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int ALREADY_EXISTS = 6; @@ -101,9 +108,10 @@ public class FirebaseMlException extends FirebaseException { * The caller does not have permission to execute the specified operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int PERMISSION_DENIED = 7; @@ -112,9 +120,10 @@ public class FirebaseMlException extends FirebaseException { * is out of space. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int RESOURCE_EXHAUSTED = 8; @@ -123,9 +132,10 @@ public class FirebaseMlException extends FirebaseException { * execution. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int FAILED_PRECONDITION = 9; @@ -133,9 +143,10 @@ public class FirebaseMlException extends FirebaseException { * The operation was aborted, typically due to a concurrency issue like transaction aborts, etc. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int ABORTED = 10; @@ -143,9 +154,10 @@ public class FirebaseMlException extends FirebaseException { * Operation was attempted past the valid range. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int OUT_OF_RANGE = 11; @@ -153,9 +165,10 @@ public class FirebaseMlException extends FirebaseException { * Operation is not implemented or not supported/enabled. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNIMPLEMENTED = 12; @@ -164,9 +177,10 @@ public class FirebaseMlException extends FirebaseException { * one of these errors, something is very broken. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int INTERNAL = 13; @@ -177,9 +191,10 @@ public class FirebaseMlException extends FirebaseException { *

In ML Model Downloader, this error is mostly about the models being not available yet. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNAVAILABLE = 14; @@ -187,9 +202,10 @@ public class FirebaseMlException extends FirebaseException { * The request does not have valid authentication credentials for the operation. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int UNAUTHENTICATED = 16; @@ -197,9 +213,10 @@ public class FirebaseMlException extends FirebaseException { * There is no network connection. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NO_NETWORK_CONNECTION = 17; @@ -209,9 +226,10 @@ public class FirebaseMlException extends FirebaseException { * There is not enough space left on the device. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int NOT_ENOUGH_SPACE = 101; @@ -219,9 +237,10 @@ public class FirebaseMlException extends FirebaseException { * The downloaded model's hash doesn't match the expected value. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int MODEL_HASH_MISMATCH = 102; @@ -230,9 +249,10 @@ public class FirebaseMlException extends FirebaseException { * will be performed before this is returned. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public static final int DOWNLOAD_URL_EXPIRED = 121; @@ -242,9 +262,10 @@ public class FirebaseMlException extends FirebaseException { * error codes for Google APIs * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @IntDef({ CANCELLED, @@ -283,9 +304,10 @@ public FirebaseMlException(@NonNull String detailMessage, @Code int code) { * Gets the error code for the Firebase ML operation that failed. * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Code @Deprecated diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java index e28ddf91ea8..ae519941223 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseModelDownloader.java @@ -44,8 +44,9 @@ * * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an - * alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public class FirebaseModelDownloader { @@ -91,9 +92,10 @@ public class FirebaseModelDownloader { * * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -108,9 +110,10 @@ public static FirebaseModelDownloader getInstance() { * @param app A custom {@link FirebaseApp} * @return A {@link FirebaseModelDownloader} instance * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -152,9 +155,10 @@ public static FirebaseModelDownloader getInstance(@NonNull FirebaseApp app) { * @param conditions {@link CustomModelDownloadConditions} to be used during file download. * @return Custom model * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -458,9 +462,10 @@ private Task finishModelDownload(@NonNull String modelName) { * * @return The set of all models that are downloaded to this device. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -479,9 +484,10 @@ public Task> listDownloadedModels() { * * @param modelName Name of the model. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated @@ -519,9 +525,10 @@ private boolean deleteModelDetails(@NonNull String modelName) { * @param enabled Turns the logging state on or off. To revert to using the Firebase-wide data * collection switch, set this value to null. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @Deprecated public void setModelDownloaderCollectionEnabled(@Nullable Boolean enabled) { @@ -543,9 +550,10 @@ public void setModelDownloaderCollectionEnabled(@Nullable Boolean enabled) { * @param getModelTask The most recent getModel task associated with the model name. * @return Download ID associated with Android DownloadManager. * @deprecated Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom - * models, you must migrate to another solution. You can use Cloud Storage for Firebase as - * an alternative for hosting custom models. For more info, see - * https://firebase.google.com/docs/ml/migrate-to-cloud-storage + * models, you must migrate to another solution. You can use Cloud Storage for Firebase as an + * alternative for hosting custom models. For more information about migration options, see the + * notification banner in the + * [Firebase ML documentation](https://firebase.google.com/docs/ml). */ @NonNull @Deprecated