This commit is contained in:
lucky 2022-02-16 12:31:45 +03:00
parent 103d398a2b
commit c3704d422b
2 changed files with 3 additions and 8 deletions

View File

@ -14,13 +14,8 @@ class DeviceAdminReceiver : DeviceAdminReceiver() {
override fun onDisabled(context: Context, intent: Intent) { override fun onDisabled(context: Context, intent: Intent) {
super.onDisabled(context, intent) super.onDisabled(context, intent)
if (Preferences(context).isServiceEnabled) { if (Preferences(context).isServiceEnabled)
Toast.makeText( Toast.makeText(context, R.string.service_unavailable_popup, Toast.LENGTH_SHORT).show()
context,
context.getString(R.string.service_unavailable_popup),
Toast.LENGTH_SHORT,
).show()
}
} }
private fun onPasswordFailedInternal(ctx: Context) { private fun onPasswordFailedInternal(ctx: Context) {

View File

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