Disable in-app ads

This commit is contained in:
Lucas Lima 2020-12-18 17:43:51 -03:00
parent 2e43f957cd
commit 0bedf5e6de
No known key found for this signature in database
GPG key ID: 049CCC5A365B00D2
4 changed files with 14 additions and 7 deletions

View file

@ -930,6 +930,7 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
}
private fun refreshAds() {
if (featureFlagManager.isInAppAdsEnabled()) {
val isTutorialComplete = preferencesRepository.isTutorialCompleted()
if (isTutorialComplete && !preferencesRepository.isPremiumEnabled() && billingManager.isEnabled()) {
if (!instantAppManager.isEnabled(this)) {
@ -941,6 +942,9 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
navigationView.menu.setGroupVisible(R.id.remove_ads_group, false)
ad_placeholder.visibility = View.GONE
}
} else {
ad_placeholder.visibility = View.GONE
}
}
private fun silentGooglePlayLogin(): Boolean {

View file

@ -3,4 +3,5 @@ package dev.lucasnlm.external
interface IFeatureFlagManager {
fun isGameHistoryEnabled(): Boolean
fun isRateUsEnabled(): Boolean
fun isInAppAdsEnabled(): Boolean
}

View file

@ -3,4 +3,5 @@ package dev.lucasnlm.external
class FeatureFlagManager : IFeatureFlagManager {
override fun isGameHistoryEnabled(): Boolean = true
override fun isRateUsEnabled(): Boolean = false
override fun isInAppAdsEnabled(): Boolean = false
}

View file

@ -3,4 +3,5 @@ package dev.lucasnlm.external
class FeatureFlagManager : IFeatureFlagManager {
override fun isGameHistoryEnabled(): Boolean = false
override fun isRateUsEnabled(): Boolean = true
override fun isInAppAdsEnabled(): Boolean = false
}