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

Commit 461b3458 authored by Jim Miller's avatar Jim Miller
Browse files

Disable keyguard widgets on low memory devices

Fixes bug 10784493

Change-Id: I6271ea94f6832bb061ba9f64efea460d28ee5695
parent 0ed01ab5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -428,10 +428,11 @@ public class KeyguardHostView extends KeyguardViewBase {
    }

    private boolean widgetsDisabled() {
        boolean disabledByLowRamDevice = ActivityManager.isLowRamDeviceStatic();
        boolean disabledByDpm =
                (mDisabledFeatures & DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL) != 0;
        boolean disabledByUser = !mLockPatternUtils.getWidgetsEnabled();
        return disabledByDpm || disabledByUser;
        return disabledByLowRamDevice || disabledByDpm || disabledByUser;
    }

    private boolean cameraDisabledByDpm() {