Skip to content

Commit eef1ae1

Browse files
author
Brian Colonna
committed
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
1 parent 5ce3486 commit eef1ae1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
114114
private final int MSG_SHOW_FACELOCK_AREA_VIEW = 0;
115115
private final int MSG_HIDE_FACELOCK_AREA_VIEW = 1;
116116

117+
// Long enough to stay black while dialer comes up
118+
// Short enough to not be black if the user goes back immediately
119+
private final int FACELOCK_VIEW_AREA_EMERGENCY_HIDE_TIMEOUT = 1000;
120+
117121
/**
118122
* The current {@link KeyguardScreen} will use this to communicate back to us.
119123
*/
@@ -311,6 +315,13 @@ public void recreateMe(Configuration config) {
311315
}
312316

313317
public void takeEmergencyCallAction() {
318+
// FaceLock must be stopped if it is running when emergency call is pressed
319+
stopAndUnbindFromFaceLock();
320+
321+
// Delay hiding FaceLock area so unlock doesn't display while dialer is coming up
322+
mHandler.sendEmptyMessageDelayed(MSG_HIDE_FACELOCK_AREA_VIEW,
323+
FACELOCK_VIEW_AREA_EMERGENCY_HIDE_TIMEOUT);
324+
314325
pokeWakelock(EMERGENCY_CALL_TIMEOUT);
315326
if (TelephonyManager.getDefault().getCallState()
316327
== TelephonyManager.CALL_STATE_OFFHOOK) {

0 commit comments

Comments
 (0)