Skip to content

Commit

Permalink
fix-InstallReferrer class
Browse files Browse the repository at this point in the history
  • Loading branch information
IloveJavaa committed Feb 16, 2024
1 parent 267f563 commit aec462c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@ class InstallReferrer(private val context: Context) {
try {
val rd = xiaomiReferrer(state, referrerClient)
referrerClient.endConnection()
continuation.resume(rd)
if (continuation.isActive) {
continuation.resume(rd)
}
} catch (ex: Exception) {
continuation.resumeWithException(ex)
}
}
override fun onGetAppsServiceDisconnected() {
// Handle service disconnection if needed
// For now, let's not do anything
referrerClient.endConnection()
if (continuation.isActive) {
continuation.resumeWithException(InstallReferrerException("SERVICE_DISCONNECTED"))
}
}
})
}
Expand Down

0 comments on commit aec462c

Please sign in to comment.