For #13959: always enable detectNonSdkApiUsage.

We don't use penalty death for the VM policy so we theoretically don't
need to disable this check if penalty death is enabled.
This commit is contained in:
Michael Comella 2020-09-22 14:50:25 -07:00 committed by Michael Comella
parent 3983c509dc
commit f05a542060

View File

@ -47,11 +47,7 @@ object StrictModeManager {
builder.detectContentUriWithoutPermission()
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
if (setPenaltyDeath || setPenaltyDialog) {
builder.permitNonSdkApiUsage()
} else {
builder.detectNonSdkApiUsage()
}
builder.detectNonSdkApiUsage()
}
StrictMode.setVmPolicy(builder.build())
}