Skip to content

Commit f9afd4b

Browse files
authored
Merge pull request #69 from Iterable/bugfix/MOB-65-fix-advertisingIdInfo-crash
[MOB-65] Catch all runtime exceptions that may happen in getAdvertisingIdInfo
2 parents e90c62d + 11d0d22 commit f9afd4b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableApi.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,15 +1281,11 @@ private String getAdvertisingId() {
12811281
advertisingId = advertisingIdInfo.getId();
12821282
}
12831283
}
1284-
} catch (IOException e) {
1285-
IterableLogger.w(TAG, e.getMessage());
1286-
} catch (GooglePlayServicesNotAvailableException e) {
1287-
IterableLogger.w(TAG, e.getMessage());
1288-
} catch (GooglePlayServicesRepairableException e) {
1289-
IterableLogger.w(TAG, e.getMessage());
12901284
} catch (ClassNotFoundException e) {
12911285
IterableLogger.d(TAG, "ClassNotFoundException: Can't track ADID. " +
12921286
"Check that play-services-ads is added to the dependencies.", e);
1287+
} catch (Exception e) {
1288+
IterableLogger.w(TAG, e.getMessage());
12931289
}
12941290
return advertisingId;
12951291
}

0 commit comments

Comments
 (0)