From 4c1c77ce3ad6ab663a25ad6af9c9255bcf589d11 Mon Sep 17 00:00:00 2001 From: dimamo5 Date: Fri, 11 Sep 2020 11:43:21 +0100 Subject: [PATCH] Don't throw exception when ad id is unavailable --- .../src/main/kotlin/com/velocidi/GetAdvertisingIdTask.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/velocidi-sdk/src/main/kotlin/com/velocidi/GetAdvertisingIdTask.kt b/velocidi-sdk/src/main/kotlin/com/velocidi/GetAdvertisingIdTask.kt index 6b6d4e3..b7dffc8 100644 --- a/velocidi-sdk/src/main/kotlin/com/velocidi/GetAdvertisingIdTask.kt +++ b/velocidi-sdk/src/main/kotlin/com/velocidi/GetAdvertisingIdTask.kt @@ -37,7 +37,8 @@ internal open class GetAdvertisingIdTask(val listener: (AdvertisingInfo) -> Unit return try { getAdvertisingId(context) } catch (e: Exception) { - throw Exception("Unable to collect advertising ID from Google Play Services.") + Log.w(Constants.LOG_TAG, "Unable to collect advertising ID from Google Play Services.") + AdvertisingInfo("", false) } }