Skip to content

Commit

Permalink
Merge pull request #1982 from OneSignal/upgrade/play-services-basement
Browse files Browse the repository at this point in the history
Upgrade play-services-basement to 18.1.0
  • Loading branch information
jkasten2 authored Feb 8, 2024
2 parents e6da1e5 + 31cc669 commit 6c6b12c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
12 changes: 1 addition & 11 deletions OneSignalSDK/onesignal/notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,13 @@ dependencies {

compileOnly('com.amazon.device:amazon-appstore-sdk:[3.0.1, 3.0.99]')

// play-services-base:16.1.0 is the last version before going to AndroidX
// play-services-base:17.0.0 is the first version using AndroidX
// Required for GoogleApiAvailability
implementation('com.google.android.gms:play-services-base') {
version {
require '[17.0.0, 17.6.99]'
prefer '17.6.0'
}
}

// firebase-messaging:18.0.0 is the last version before going to AndroidX
// firebase-messaging:19.0.0 is the first version using AndroidX
// firebase-messaging:23.0.0 incoporates fix for SecurityException: Not allowed to bind to service
api('com.google.firebase:firebase-messaging') {
version {
require '[19.0.0, 23.0.99]'
prefer '23.0.0'
prefer '23.0.8'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import com.onesignal.notifications.internal.registration.IPushRegistrator
import com.onesignal.user.internal.subscriptions.SubscriptionStatus
import kotlinx.coroutines.delay
import java.io.IOException
import java.util.concurrent.ExecutionException

/**
* The abstract google push registration service. It is expected [PushRegistratorFCM] will extend
Expand All @@ -47,7 +48,7 @@ internal abstract class PushRegistratorAbstractGoogle(
IPushRegistrator, IPushRegistratorCallback {
abstract val providerName: String

@Throws(Throwable::class)
@Throws(ExecutionException::class, InterruptedException::class, IOException::class)
abstract suspend fun getToken(senderId: String): String

override suspend fun registerForPush(): IPushRegistrator.RegisterResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ internal class PushRegistratorFCM(
try {
token = Tasks.await(tokenTask)
} catch (e: ExecutionException) {
throw tokenTask.exception
throw tokenTask.exception ?: e
}
}

Expand Down

0 comments on commit 6c6b12c

Please sign in to comment.