summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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