summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brian Colonna <bcolonna@google.com> 2011-09-23 15:52:18 -0400
committer Brian Colonna <bcolonna@google.com> 2011-09-23 15:52:18 -0400
commiteef1ae1d91d55341c25d01547ac9b952be5aa658 (patch)
tree3fd27cb2ad1bb408c46bac9675515f311e11ed25
parent5ce348615b6572451c81e9962aadeb061fca19cc (diff)
FaceLock is now closed if emergency dial button is pressed
Previously facelock would remain on top of the dial keypad until it timed out. Change-Id: Iaf1b3b0040fbfcb5c32e3db7b0466d2a6f89dc1d
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index d9bd5f2bd3de..ffb48381e9f6 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -114,6 +114,10 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
private final int MSG_SHOW_FACELOCK_AREA_VIEW = 0;
private final int MSG_HIDE_FACELOCK_AREA_VIEW = 1;
+ // Long enough to stay black while dialer comes up
+ // Short enough to not be black if the user goes back immediately
+ private final int FACELOCK_VIEW_AREA_EMERGENCY_HIDE_TIMEOUT = 1000;
+
/**
* The current {@link KeyguardScreen} will use this to communicate back to us.
*/
@@ -311,6 +315,13 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
}
public void takeEmergencyCallAction() {
+ // FaceLock must be stopped if it is running when emergency call is pressed
+ stopAndUnbindFromFaceLock();
+
+ // Delay hiding FaceLock area so unlock doesn't display while dialer is coming up
+ mHandler.sendEmptyMessageDelayed(MSG_HIDE_FACELOCK_AREA_VIEW,
+ FACELOCK_VIEW_AREA_EMERGENCY_HIDE_TIMEOUT);
+
pokeWakelock(EMERGENCY_CALL_TIMEOUT);
if (TelephonyManager.getDefault().getCallState()
== TelephonyManager.CALL_STATE_OFFHOOK) {