forked from github/wulkanowy-mirror
Add try catch to initialize MobileAds SDK (#2497)
This commit is contained in:
parent
e17129efea
commit
c9a42a6cf6
@ -93,8 +93,12 @@ class AdsHelper @Inject constructor(
|
||||
private fun initializeMobileAds() {
|
||||
if (isMobileAdsInitializeCalled.getAndSet(true)) return
|
||||
|
||||
MobileAds.initialize(context) {
|
||||
isMobileAdsSdkInitialized.value = true
|
||||
try {
|
||||
MobileAds.initialize(context) {
|
||||
isMobileAdsSdkInitialized.value = true
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user