diff options
| author | 2011-09-26 06:03:02 -0700 | |
|---|---|---|
| committer | 2011-09-26 06:03:02 -0700 | |
| commit | 0e86bc07886bbd7e2b9166d1e6c7b5dc94d14217 (patch) | |
| tree | 0816ed0fdebcf8542cbf8c440792c2f0743d8bbf | |
| parent | b75fd7ad4e575cf9bd6ca02cb14bce087869e82c (diff) | |
| parent | eef1ae1d91d55341c25d01547ac9b952be5aa658 (diff) | |
Merge "FaceLock is now closed if emergency dial button is pressed"
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 11 |
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) { |