Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 705a6642 authored by Steven Ross's avatar Steven Ross Committed by Android (Google) Code Review
Browse files

Merge "Fixing alarm clock bug"

parents e47b89ca 9c2df261
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -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