diff options
author | Michael Jurka <mikejurka@google.com> | 2012-10-10 23:56:53 +0200 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2012-10-11 00:07:38 +0200 |
commit | 1a6e3e175d8ccb5884d147bcda1c77af1f6c35ff (patch) | |
tree | 8b075882056af0ca47368e92d26faee0e668a288 /src | |
parent | 2fc940351f907e3bea533363bd4a103be65c3855 (diff) | |
download | packages_apps_settings-1a6e3e175d8ccb5884d147bcda1c77af1f6c35ff.zip packages_apps_settings-1a6e3e175d8ccb5884d147bcda1c77af1f6c35ff.tar.gz packages_apps_settings-1a6e3e175d8ccb5884d147bcda1c77af1f6c35ff.tar.bz2 |
Disable security widgets for now
Change-Id: Ia4627d697514c4029fb0fb3250d674ed25495f97
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index f56fc25..2ddd41f 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -39,6 +39,7 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; +import android.preference.PreferenceCategory; import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; import android.provider.Settings; @@ -99,7 +100,6 @@ public class SecuritySettings extends SettingsPreferenceFragment DevicePolicyManager mDPM; private ChooseLockSettingsHelper mChooseLockSettingsHelper; - private Preference mUserSelectedWidget; private LockPatternUtils mLockPatternUtils; private ListPreference mLockAfter; @@ -232,32 +232,45 @@ public class SecuritySettings extends SettingsPreferenceFragment } } - mUserSelectedWidget = root.findPreference(KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET); - if (mUserSelectedWidget != null) { + Preference pickStatusWidget = root.findPreference(KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET); + if (pickStatusWidget != null) { AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity()); int appWidgetId = getStatusAppWidgetId(); if (appWidgetId == -1) { - mUserSelectedWidget.setSummary(getResources().getString(R.string.widget_default)); + pickStatusWidget.setSummary(getResources().getString(R.string.widget_default)); } else { AppWidgetProviderInfo appWidget = appWidgetManager.getAppWidgetInfo(appWidgetId); if (appWidget != null) { - mUserSelectedWidget.setSummary(appWidget.label); + pickStatusWidget.setSummary(appWidget.label); } } + // TEMP: disable this for now + PreferenceCategory security = + (PreferenceCategory) root.findPreference(KEY_SECURITY_CATEGORY); + if (security != null) { + security.removePreference(pickStatusWidget); + } } - mUserSelectedWidget = root.findPreference(KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET); - if (mUserSelectedWidget != null) { + Preference pickLockscreenWidget = + root.findPreference(KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET); + if (pickLockscreenWidget != null) { AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity()); int appWidgetId = getUserSelectedAppWidgetId(); if (appWidgetId == -1) { - mUserSelectedWidget.setSummary(getResources().getString(R.string.widget_none)); + pickLockscreenWidget.setSummary(getResources().getString(R.string.widget_none)); } else { AppWidgetProviderInfo appWidget = appWidgetManager.getAppWidgetInfo(appWidgetId); if (appWidget != null) { - mUserSelectedWidget.setSummary(appWidget.label); + pickLockscreenWidget.setSummary(appWidget.label); } } + // TEMP: disable this for now + PreferenceCategory security = + (PreferenceCategory) root.findPreference(KEY_SECURITY_CATEGORY); + if (security != null) { + security.removePreference(pickLockscreenWidget); + } } // Append the rest of the settings |