diff options
| author | 2011-10-07 13:35:21 -0400 | |
|---|---|---|
| committer | 2011-10-07 16:11:08 -0400 | |
| commit | 9c2df261797259728845a04d5e47ddf36251f93d (patch) | |
| tree | 6429ec668a2a6324cf86777e0b75de2f07f447fc | |
| parent | 17f254105b399c7a4216da2d477e7f9cbdbd7319 (diff) | |
Fixing alarm clock bug
The alarm clock doesn't actually hide the view until AFTER Facelock starts
hence the need to kill Facelock after it has started when the even is caught
Also fixing phone black box background in case the user cancels the call quickly
Also eliminating blackscreen after 4s for multiple reasons
so people can login if lockscreen locks up
also so cancel fade is to the backup lock
Change-Id: I8162ff67453038559f289408f4f0d452d4f79ab3
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 4049c7332160..071044ed2b9c 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -526,11 +526,23 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE && transportInvisible) { bindToFaceLock(); + //Eliminate the black background so that the lockpattern will be visible + //If FaceUnlock is cancelled + mHandler.sendEmptyMessageDelayed(MSG_HIDE_FACELOCK_AREA_VIEW, 4000); } else { mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW); } } + /** Unbind from facelock if something covers this window (such as an alarm) */ + @Override + public void onWindowFocusChanged (boolean hasWindowFocus) { + if(!hasWindowFocus) { + stopAndUnbindFromFaceLock(); + mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW); + } + } + @Override public void show() { if (mMode == Mode.LockScreen) { @@ -607,7 +619,10 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler //We need to stop faceunlock when a phonecall comes in @Override public void onPhoneStateChanged(int phoneState) { - if(phoneState == TelephonyManager.CALL_STATE_RINGING) stopAndUnbindFromFaceLock(); + if(phoneState == TelephonyManager.CALL_STATE_RINGING) { + stopAndUnbindFromFaceLock(); + mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW); + } } @Override |