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

Commit 0e9955c3 authored by Robin Lee's avatar Robin Lee
Browse files

Fix lockscreen.rot_override precedence

Since config_enableLockScreenRotation was introduced, the override
only allowed forcing keyguard rotation *on*. Not *off* which can also
be useful depending on the device-under-test.

Bug: 355144756
Change-Id: Ide938ee9baff0155f4f742cafda5a14f613e8e96
Flag: EXEMPT adjusting a legacy flag
parent 393224b6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -283,8 +283,9 @@ public class KeyguardStateControllerImpl implements KeyguardStateController {

    @Override
    public boolean isKeyguardScreenRotationAllowed() {
        return SystemProperties.getBoolean("lockscreen.rot_override", false)
                || mContext.getResources().getBoolean(R.bool.config_enableLockScreenRotation)
        final boolean configEnabled =
                mContext.getResources().getBoolean(R.bool.config_enableLockScreenRotation);
        return SystemProperties.getBoolean("lockscreen.rot_override", configEnabled)
                || mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE);
    }