Skip to content

Commit 0e86bc0

Browse files
Brian ColonnaAndroid (Google) Code Review
authored andcommitted
Merge "FaceLock is now closed if emergency dial button is pressed"
2 parents b75fd7a + eef1ae1 commit 0e86bc0

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)