Skip to content

Commit

Permalink
Version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cioccarellia committed Jan 6, 2019
1 parent 6dff6ae commit 39b3db4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 39b3db4

Please sign in to comment.