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

Commit ad1b27e7 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Avoid isKeyguardShowing() before startKeyguard()

KeyguardBottomAreaView requests camera policies during its setup,
this was logging an error message because the keyguard might not
have been initialized.

Change-Id: Ia0969b4d7229e1f56d1ed0df1f33ed92995530c2
Fixes: 67649752
Test: reboot, look at logs
parent 39abe998
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5265,7 +5265,8 @@ public class StatusBar extends SystemUI implements DemoMode,
    boolean isCameraAllowedByAdmin() {
        if (mDevicePolicyManager.getCameraDisabled(null, mCurrentUserId)) {
            return false;
        } else if (isKeyguardShowing() && isKeyguardSecure()) {
        } else if (mStatusBarKeyguardViewManager == null ||
                (isKeyguardShowing() && isKeyguardSecure())) {
            // Check if the admin has disabled the camera specifically for the keyguard
            return (mDevicePolicyManager.getKeyguardDisabledFeatures(null, mCurrentUserId)
                    & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) == 0;