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

Commit 4b142f20 authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: set fingerprint auth properly after occluded change



After an incoming call the screen may get set to occluded. The flags
in the current logic were revsered (turning fingerprint auth ON when
occluded, which is wrong). Also it never sent the message to the
handler.

Ref: CYNGNOS-1103

Change-Id: Id90c958a0387a8ff458796bc97075727d89bb85e
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 218c6227
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -411,9 +411,8 @@ public class KeyguardViewMediator extends SystemUI {
        public void onPhoneStateChanged(int phoneState) {
            synchronized (KeyguardViewMediator.this) {
                if (TelephonyManager.CALL_STATE_IDLE == phoneState  // call ending
                        && !mScreenOn                           // screen off
                        && mExternallyEnabled) {                // not disabled by any app

                    if (!mScreenOn) {
                        // note: this is a way to gracefully reenable the keyguard when the call
                        // ends and the screen is off without always reenabling the keyguard
                        // each time the screen turns off while in call (and having an occasional ugly
@@ -424,6 +423,7 @@ public class KeyguardViewMediator extends SystemUI {
                    }
                }
            }
        }

        @Override
        public void onClockVisibilityChanged() {
@@ -1235,7 +1235,8 @@ public class KeyguardViewMediator extends SystemUI {
                updateActivityLockScreenState();
                adjustStatusBarLocked();

                mHandler.obtainMessage(KEYGUARD_FINGERPRINT_AUTH, isOccluded ? 1 : 0, 0);
                mHandler.obtainMessage(KEYGUARD_FINGERPRINT_AUTH,
                        isOccluded ? 0 : 1, 0).sendToTarget();
            }
        }
    }