Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m156 release #6438

Open
wants to merge 6 commits into
base: releases/m156
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal constructor(
}
}

@Deprecated("Use {@link #useEmulator(String, int)} to connect to the emulator. ")
@Deprecated("Use useEmulator to connect to the emulator.")
public fun useFunctionsEmulator(origin: String) {
Preconditions.checkNotNull(origin, "origin cannot be null")
urlFormat = "$origin/%2\$s/%1\$s/%3\$s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public class FirebaseFunctionsException : FirebaseException {
*/
public enum class Code(private val value: Int) {
/**
* The operation completed successfully. FirebaseFunctionsException will never have a status of
* OK.
* The operation completed successfully. `FirebaseFunctionsException` will never have a status
* of `OK`.
*/
OK(0),

Expand All @@ -41,9 +41,9 @@ public class FirebaseFunctionsException : FirebaseException {
UNKNOWN(2),

/**
* Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION.
* INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the
* system (e.g., an invalid field name).
* Client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`.
* `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the
* system (For example, an invalid field name).
*/
INVALID_ARGUMENT(3),

Expand Down Expand Up @@ -126,12 +126,12 @@ public class FirebaseFunctionsException : FirebaseException {
}

/**
* Takes an HTTP status code and returns the corresponding FUNErrorCode error code. This is
* the standard HTTP status code -> error mapping defined in:
* Takes an HTTP status code and returns the corresponding [Code] error code. This is the
* standard HTTP status code -> error mapping defined in:
* https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
*
* @param status An HTTP status code.
* @return The corresponding Code, or Code.UNKNOWN if none.
* @return The corresponding `Code`, or `Code.UNKNOWN` if none.
*/
@JvmStatic
public fun fromHttpStatus(status: Int): Code {
Expand All @@ -157,7 +157,7 @@ public class FirebaseFunctionsException : FirebaseException {
/**
* Gets the error code for the operation that failed.
*
* @return the code for the FirebaseFunctionsException
* @return the code for the `FirebaseFunctionsException`
*/
public val code: Code

Expand All @@ -183,7 +183,7 @@ public class FirebaseFunctionsException : FirebaseException {
this.details = details
}

public companion object {
internal companion object {
/**
* Takes an HTTP response and returns the corresponding Exception if any.
*
Expand All @@ -193,7 +193,7 @@ public class FirebaseFunctionsException : FirebaseException {
* @return The corresponding Exception, or null if none.
*/
@JvmStatic
public fun fromResponse(
internal fun fromResponse(
code: Code,
body: String?,
serializer: Serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ import java.util.concurrent.TimeUnit
import okhttp3.OkHttpClient

/** An internal class for keeping track of options applied to an HttpsCallableReference. */
public class HttpsCallOptions {
internal class HttpsCallOptions {
// The timeout to use for calls from references created by this Functions.
private var timeout = DEFAULT_TIMEOUT
private var timeoutUnits = DEFAULT_TIMEOUT_UNITS
@JvmField public val limitedUseAppCheckTokens: Boolean

/** Creates an (internal) HttpsCallOptions from the (external) [HttpsCallableOptions]. */
public constructor(publicCallableOptions: HttpsCallableOptions) {
internal constructor(publicCallableOptions: HttpsCallableOptions) {
limitedUseAppCheckTokens = publicCallableOptions.limitedUseAppCheckTokens
}

public constructor() {
internal constructor() {
limitedUseAppCheckTokens = false
}

public fun getLimitedUseAppCheckTokens(): Boolean {
internal fun getLimitedUseAppCheckTokens(): Boolean {
return limitedUseAppCheckTokens
}

Expand All @@ -42,7 +42,7 @@ public class HttpsCallOptions {
* @param timeout The length of the timeout, in the given units.
* @param units The units for the specified timeout.
*/
public fun setTimeout(timeout: Long, units: TimeUnit) {
internal fun setTimeout(timeout: Long, units: TimeUnit) {
this.timeout = timeout
timeoutUnits = units
}
Expand All @@ -52,12 +52,12 @@ public class HttpsCallOptions {
*
* @return The timeout, in milliseconds.
*/
public fun getTimeout(): Long {
internal fun getTimeout(): Long {
return timeoutUnits.toMillis(timeout)
}

/** Creates a new OkHttpClient with these options applied to it. */
public fun apply(client: OkHttpClient): OkHttpClient {
internal fun apply(client: OkHttpClient): OkHttpClient {
return client
.newBuilder()
.callTimeout(timeout, timeoutUnits)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private constructor(
return limitedUseAppCheckTokens
}

/** Builder class for [com.google.firebase.functions.HttpsCallableOptions] */
/** A builder for creating [com.google.firebase.functions.HttpsCallableOptions]. */
public class Builder {
@JvmField public var limitedUseAppCheckTokens: Boolean = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class HttpsCallableReference {
private val url: URL?

// Options for how to do the HTTPS call.
@VisibleForTesting public val options: HttpsCallOptions
@VisibleForTesting internal val options: HttpsCallOptions

/** Creates a new reference with the given options. */
internal constructor(
Expand Down Expand Up @@ -81,7 +81,7 @@ public class HttpsCallableReference {
* Auth, an auth token for the user will also be automatically included.
*
* Firebase Instance ID sends data to the Firebase backend periodically to collect information
* regarding the app instance. To stop this, see [ ]
* regarding the app instance. To stop this, see
* [com.google.firebase.iid.FirebaseInstanceId.deleteInstanceId]. It will resume with a new
* Instance ID the next time you call this method.
*
Expand Down Expand Up @@ -111,7 +111,7 @@ public class HttpsCallableReference {
* Auth, an auth token for the user will also be automatically included.
*
* Firebase Instance ID sends data to the Firebase backend periodically to collect information
* regarding the app instance. To stop this, see [ ]
* regarding the app instance. To stop this, see
* [com.google.firebase.iid.FirebaseInstanceId.deleteInstanceId]. It will resume with a new
* Instance ID the next time you call this method.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
// limitations under the License.
package com.google.firebase.functions

/** The result of calling a HttpsCallableReference function. */
/** The result of calling a `HttpsCallableReference` function. */
public class HttpsCallableResult
internal constructor( // The actual result data, as generic types decoded from JSON.
private val data: Any?) {
/**
* Returns the data that was returned from the Callable HTTPS trigger.
*
* The data is in the form of native Java objects. For example, if your trigger returned an array,
* this object would be a List<Object>. If your trigger returned a JavaScript object with keys and
* values, this object would be a Map<String, Object>.
* this object would be a `List<Object>`. If your trigger returned a JavaScript object with keys
* and values, this object would be a `Map<String, Object>`.
*/
public fun getData(): Any? {
return data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.json.JSONException
import org.json.JSONObject

/** Converts raw Java types into JSON objects. */
public class Serializer {
internal class Serializer {
private val dateFormat: DateFormat

init {
Expand All @@ -32,7 +32,7 @@ public class Serializer {
dateFormat.timeZone = TimeZone.getTimeZone("UTC")
}

public fun encode(obj: Any?): Any {
internal fun encode(obj: Any?): Any {
if (obj == null || obj === JSONObject.NULL) {
return JSONObject.NULL
}
Expand Down Expand Up @@ -113,7 +113,7 @@ public class Serializer {
throw IllegalArgumentException("Object cannot be encoded in JSON: $obj")
}

public fun decode(obj: Any): Any? {
internal fun decode(obj: Any): Any? {
// TODO: Maybe this should throw a FirebaseFunctionsException instead?
if (obj is Number) {
return obj
Expand Down Expand Up @@ -170,11 +170,12 @@ public class Serializer {
throw IllegalArgumentException("Object cannot be decoded from JSON: $obj")
}

public companion object {
internal companion object {
@VisibleForTesting
public const val LONG_TYPE: String = "type.googleapis.com/google.protobuf.Int64Value"
internal const val LONG_TYPE: String = "type.googleapis.com/google.protobuf.Int64Value"

@VisibleForTesting
public const val UNSIGNED_LONG_TYPE: String = "type.googleapis.com/google.protobuf.UInt64Value"
internal const val UNSIGNED_LONG_TYPE: String =
"type.googleapis.com/google.protobuf.UInt64Value"
}
}
2 changes: 1 addition & 1 deletion firebase-messaging-directboot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

* [unchanged] Updated to keep messaging SDK versions aligned.

# 24.0.3
* [changed] Updated protobuf dependency to `3.25.5` to fix
Expand Down
2 changes: 1 addition & 1 deletion firebase-messaging-directboot/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=24.0.4
version=24.1.0
latestReleasedVersion=24.0.3
android.enableUnitTestBinaryResources=true
3 changes: 2 additions & 1 deletion firebase-messaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased
* [deprecated] Deprecated additional FCM upstream messaging methods. See the
* [deprecated] Deprecated additional FCM upstream messaging methods and updated
all upstream methods to indicate they are now decommissioned. See the
[FAQ](https://firebase.google.com/support/faq#fcm-23-deprecation) for more
details.
* [changed] Changed WithinAppServiceConnection's ScheduledThreadPoolExecutor's
Expand Down
2 changes: 1 addition & 1 deletion firebase-messaging/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=24.0.4
version=24.1.0
latestReleasedVersion=24.0.3
android.enableUnitTestBinaryResources=true
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ public Task<Void> unsubscribeFromTopic(@NonNull String topic) {
* <p>When there is an active connection the message will be sent immediately, otherwise the
* message will be queued up to the time to live (TTL) set in the message.
*
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
* @deprecated This function is actually <strong>decommissioned</strong> along with all of FCM
* upstream messaging. Learn more in the
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
* deprecated in June 2023</a>.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public void onDeletedMessages() {}
*
* @param msgId of the upstream message sent using {@link FirebaseMessaging#send}.
*
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
* @deprecated This function is actually <strong>decommissioned</strong> along with all of FCM
* upstream messaging. Learn more in the
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
* deprecated in June 2023</a>.
*/
Expand All @@ -141,7 +142,8 @@ public void onMessageSent(@NonNull String msgId) {}
* @param msgId of the upstream message sent using {@link FirebaseMessaging#send}.
* @param exception description of the error, typically a {@link SendException}.
*
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
* @deprecated This function is actually <strong>decommissioned</strong> along with all of FCM
* upstream messaging. Learn more in the
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
* deprecated in June 2023</a>.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public String getFrom() {
/**
* Gets the message destination.
*
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
* @deprecated This function is actually <strong>decommissioned</strong> along with all of FCM
* upstream messaging. Learn more in the
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
* deprecated in June 2023</a>.
*/
Expand Down
12 changes: 12 additions & 0 deletions release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "m156",
"libraries": [
":firebase-dataconnect",
":firebase-messaging",
":firebase-messaging-directboot",
":firebase-messaging:ktx",
":firebase-functions",
":firebase-functions:ktx",
":firebase-vertexai"
]
}
Loading
Loading