Skip to content

Commit 39b3db4

Browse files
committed
Version 1.1.1
1 parent 6dff6ae commit 39b3db4

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ allprojects {
3232
And the dependency to your module build.gradle file:
3333
```gradle
3434
dependencies {
35-
implementation 'com.github.AndreaCioccarelli:BillingProtector:1.1.0'
35+
implementation 'com.github.AndreaCioccarelli:BillingProtector:1.1.1'
3636
}
3737
```
3838

library/src/main/java/com/andreacioccarelli/billingprotector/BillingProtector.kt

+16-18
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,26 @@ class BillingProtector(private val context: Context) {
3434

3535
installedApps.forEach { installedApp ->
3636
pirateApps.forEach {
37-
if (installedApp.packageName == "ru.tQFiUIAj.NfssCFlDV") {
38-
when (it.criteria) {
39-
SelectionCriteria.SLICE -> {
40-
if (installedApp.packageName.contains(it.field)) return true
41-
}
42-
43-
SelectionCriteria.MATCH -> {
44-
if (it.field == installedApp.packageName) return true
45-
}
46-
47-
SelectionCriteria.CLASS_NAME -> {
48-
if (it.name == installedApp.className) return true
49-
}
50-
51-
SelectionCriteria.LABEL -> {
52-
if (it.name == installedApp.nonLocalizedLabel) return true
53-
}
37+
when (it.criteria) {
38+
SelectionCriteria.SLICE -> {
39+
if (installedApp.packageName.contains(it.field)) return true
5440
}
55-
}
5641

42+
SelectionCriteria.MATCH -> {
43+
if (it.field == installedApp.packageName) return true
44+
}
45+
46+
SelectionCriteria.CLASS_NAME -> {
47+
if (it.name == installedApp.className) return true
48+
}
49+
50+
SelectionCriteria.LABEL -> {
51+
if (it.name == installedApp.nonLocalizedLabel) return true
52+
}
53+
}
5754
}
5855
}
56+
5957
return false
6058
}
6159

0 commit comments

Comments
 (0)