Skip to content

Commit

Permalink
Catch more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mscwilson committed Mar 28, 2024
1 parent bc58421 commit bd85288
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package com.snowplowanalytics.core.tracker

import android.content.Context
import android.os.RemoteException
import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener
import com.android.installreferrer.api.InstallReferrerClient.InstallReferrerResponse
Expand Down Expand Up @@ -72,7 +71,7 @@ class InstallReferrerDetails(
googlePlayInstantParam = response.googlePlayInstantParam
)
callback(referrer)
} catch (_: RemoteException) {
} catch (_: Throwable) {
Logger.d(TAG, "Install referrer API remote exception.")
callback(null)
}
Expand All @@ -99,7 +98,7 @@ class InstallReferrerDetails(
})
}

fun isInstallReferrerPackageAvailable(): Boolean {
private fun isInstallReferrerPackageAvailable(): Boolean {
try {
Class.forName("com.android.installreferrer.api.InstallReferrerStateListener")
return true
Expand Down

0 comments on commit bd85288

Please sign in to comment.