From b08a14661701621e242acb01a9f858d7c6e34579 Mon Sep 17 00:00:00 2001 From: Edward Savage-Jones Date: Wed, 5 Oct 2016 10:29:02 +0200 Subject: Make PIN/password failed attempts dialog non-cancelable This commit makes it harder for a users pocket to trigger an MDM remote wipe, by setting the warning dialog to noncancelable. With this change the pocket would first need to tap on OK before being able to attempt to enter a PIN. This mirrors the existing behaviour of both PIN and PUK warning dialogs. Test: manual - enable an MDM set to trigger a wipe of the device/user on unsucessful unlock attempts. Then incorrectly enter your PIN until the warning dialog appears. The dialog should only be dismissable by pressing the 'OK' button. Change-Id: I4d86af555a5d8b226ceffa4711bd5e277db93f1e --- .../Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java index a7e4e1272a60..61e2fc095edb 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -173,6 +173,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe final AlertDialog dialog = new AlertDialog.Builder(mContext) .setTitle(title) .setMessage(message) + .setCancelable(false) .setNeutralButton(R.string.ok, null) .create(); if (!(mContext instanceof Activity)) { -- cgit v1.2.3-59-g8ed1b