Skip to content

Commit

Permalink
fixed crash2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marrisaichandan committed Jan 23, 2023
1 parent 28d2c63 commit 3cd2173
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion adutils/src/main/java/com/appyhigh/adutils/AdSdk.kt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ object AdSdk {
val inflater = LayoutInflater.from(app)
AppPref.getInstance(app.applicationContext)
AdMobUtil.context = app.applicationContext
DynamicsAds.context = app.applicationContext
if (consentInformation == null) {
consentInformation = ConsentInformation.getInstance(app)
}
Expand Down
3 changes: 1 addition & 2 deletions adutils/src/main/java/com/appyhigh/adutils/DynamicsAds.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class DynamicsAds {
companion object {
val updateJSON = JSONObject()
var adMobNew: List<AdMod> = ArrayList()
var context: Context? = null

fun getDynamicAdsId(fallBackAdId: String, adName: String): String {
fun getDynamicAdsId(context: Context, fallBackAdId: String, adName: String): String {
return if (context != null){
try {
if (!context!!.fetchPrimaryById(adName).isEmpty()) {
Expand Down

0 comments on commit 3cd2173

Please sign in to comment.