diff --git a/README.md b/README.md index 8536ba6..89709c3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ allprojects { And the dependency to your module build.gradle file: ```gradle dependencies { - implementation 'com.github.AndreaCioccarelli:BillingProtector:1.1.0' + implementation 'com.github.AndreaCioccarelli:BillingProtector:1.1.1' } ``` diff --git a/library/src/main/java/com/andreacioccarelli/billingprotector/BillingProtector.kt b/library/src/main/java/com/andreacioccarelli/billingprotector/BillingProtector.kt index 7b6ea7f..d46c91b 100644 --- a/library/src/main/java/com/andreacioccarelli/billingprotector/BillingProtector.kt +++ b/library/src/main/java/com/andreacioccarelli/billingprotector/BillingProtector.kt @@ -34,28 +34,26 @@ class BillingProtector(private val context: Context) { installedApps.forEach { installedApp -> pirateApps.forEach { - if (installedApp.packageName == "ru.tQFiUIAj.NfssCFlDV") { - when (it.criteria) { - SelectionCriteria.SLICE -> { - if (installedApp.packageName.contains(it.field)) return true - } - - SelectionCriteria.MATCH -> { - if (it.field == installedApp.packageName) return true - } - - SelectionCriteria.CLASS_NAME -> { - if (it.name == installedApp.className) return true - } - - SelectionCriteria.LABEL -> { - if (it.name == installedApp.nonLocalizedLabel) return true - } + when (it.criteria) { + SelectionCriteria.SLICE -> { + if (installedApp.packageName.contains(it.field)) return true } - } + SelectionCriteria.MATCH -> { + if (it.field == installedApp.packageName) return true + } + + SelectionCriteria.CLASS_NAME -> { + if (it.name == installedApp.className) return true + } + + SelectionCriteria.LABEL -> { + if (it.name == installedApp.nonLocalizedLabel) return true + } + } } } + return false }