mirror of https://github.com/x13a/Wasted.git
ref
This commit is contained in:
parent
103d398a2b
commit
c3704d422b
|
@ -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) {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue