This commit is contained in:
lucky 2022-01-09 04:31:06 +03:00
parent 0f45d789e7
commit 71befde9fe
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class DeviceAdminReceiver : DeviceAdminReceiver() {
private fun onPasswordFailedInternal(ctx: Context) {
val prefs = Preferences(ctx)
if (!prefs.isServiceEnabled || prefs.maxFailedPasswordAttempts == 0) return
if (!prefs.isServiceEnabled || prefs.maxFailedPasswordAttempts <= 0) return
val admin = DeviceAdminManager(ctx)
if (admin.getCurrentFailedPasswordAttempts() >= prefs.maxFailedPasswordAttempts)
admin.wipeData()

View File

@ -31,7 +31,7 @@ class PanicConnectionActivity : MainActivity() {
}
MaterialAlertDialogBuilder(this)
.setTitle(getString(R.string.panic_app_dialog_title))
.setTitle(R.string.panic_app_dialog_title)
.setMessage(String.format(getString(R.string.panic_app_dialog_message), app))
.setNegativeButton(R.string.allow) { _, _ ->
PanicResponder.setTriggerPackageName(this@PanicConnectionActivity)