summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SecuritySettings.java
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-10-12 13:20:15 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-12 13:20:16 -0700
commitafc0036e27d4240a354595b1aa08e8f497995e0c (patch)
treec141a65f2dc5c8c96ea5c8497640d87cdaea8022 /src/com/android/settings/SecuritySettings.java
parentacc0e56ea768f13ffa0e6303c658a9a2fb142d14 (diff)
parent1a6e3e175d8ccb5884d147bcda1c77af1f6c35ff (diff)
downloadpackages_apps_settings-afc0036e27d4240a354595b1aa08e8f497995e0c.zip
packages_apps_settings-afc0036e27d4240a354595b1aa08e8f497995e0c.tar.gz
packages_apps_settings-afc0036e27d4240a354595b1aa08e8f497995e0c.tar.bz2
Merge "Disable security widgets for now" into jb-mr1-dev
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r--src/com/android/settings/SecuritySettings.java31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index aed6cf3..13b1d0d 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;
@@ -98,7 +99,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
DevicePolicyManager mDPM;
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
- private Preference mUserSelectedWidget;
private LockPatternUtils mLockPatternUtils;
private ListPreference mLockAfter;
@@ -220,32 +220,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