summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/CryptKeeper.java
diff options
context:
space:
mode:
authorVikram Aggarwal <viki@google.com>2012-05-01 16:46:06 -0700
committerVikram Aggarwal <viki@google.com>2012-05-02 09:42:32 -0700
commit86b93937fa417647d22ee15d3a0aff7a751be17a (patch)
tree497d505da5d2277453fbbd59a603b649a7356ebf /src/com/android/settings/CryptKeeper.java
parent9593b743cb625e88b97b2674c5f528bb07f96011 (diff)
downloadpackages_apps_settings-86b93937fa417647d22ee15d3a0aff7a751be17a.zip
packages_apps_settings-86b93937fa417647d22ee15d3a0aff7a751be17a.tar.gz
packages_apps_settings-86b93937fa417647d22ee15d3a0aff7a751be17a.tar.bz2
Notification alert every 5s and start after 30s.
Justification: Most users will not need prompting, so for them a notification will be an annoyance. So we only notify if the no password has been entered for 30 seconds. Once a notification sound is made, we need to make it frequently so the user can locate the device. Change-Id: Ibf531aec89b5e3b3c72eaa36016bcc4cac1d6493
Diffstat (limited to 'src/com/android/settings/CryptKeeper.java')
-rw-r--r--src/com/android/settings/CryptKeeper.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 75dd565..3e88e27 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -98,7 +98,6 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
private boolean mEncryptionGoneBad;
/** A flag to indicate when the back event should be ignored */
private boolean mIgnoreBack = false;
-
private int mCooldown;
PowerManager.WakeLock mWakeLock;
private EditText mPasswordEntry;
@@ -248,9 +247,9 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
Log.w(TAG, "notifyUser: Exception while playing sound: " + e);
}
}
- // Notify the user again in 30 seconds.
+ // Notify the user again in 5 seconds.
mHandler.removeMessages(MESSAGE_NOTIFY);
- mHandler.sendEmptyMessageDelayed(MESSAGE_NOTIFY, 30 * 1000);
+ mHandler.sendEmptyMessageDelayed(MESSAGE_NOTIFY, 5 * 1000);
}
/**
@@ -510,9 +509,9 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
}, 0);
updateEmergencyCallButtonState();
- // Notify the user that we are waiting for him to enter the password to get the device
- // out of this completely dead state.
- notifyUser();
+ // Notify the user in 30 seconds that we are waiting for him to enter the password.
+ mHandler.removeMessages(MESSAGE_NOTIFY);
+ mHandler.sendEmptyMessageDelayed(MESSAGE_NOTIFY, 30 * 1000);
}
/**