am ed4c3aac: am 455bf4d3: am 1630ef4f: remove lockscreen widget checkbox when there\'s no lockscreen.

* commit 'ed4c3aacfb020886d420299523059b37abd3f415':
  remove lockscreen widget checkbox when there's no lockscreen.
This commit is contained in:
Chris Wren
2013-10-29 12:05:13 -07:00
committed by Android Git Automerger

View File

@@ -245,7 +245,8 @@ public class SecuritySettings extends RestrictedSettingsFragment
// Enable or disable keyguard widget checkbox based on DPM state // Enable or disable keyguard widget checkbox based on DPM state
mEnableKeyguardWidgets = (CheckBoxPreference) root.findPreference(KEY_ENABLE_WIDGETS); mEnableKeyguardWidgets = (CheckBoxPreference) root.findPreference(KEY_ENABLE_WIDGETS);
if (mEnableKeyguardWidgets != null) { if (mEnableKeyguardWidgets != null) {
if (ActivityManager.isLowRamDeviceStatic()) { if (ActivityManager.isLowRamDeviceStatic()
|| mLockPatternUtils.isLockScreenDisabled()) {
// Widgets take a lot of RAM, so disable them on low-memory devices // Widgets take a lot of RAM, so disable them on low-memory devices
PreferenceGroup securityCategory PreferenceGroup securityCategory
= (PreferenceGroup) root.findPreference(KEY_SECURITY_CATEGORY); = (PreferenceGroup) root.findPreference(KEY_SECURITY_CATEGORY);