From aaefadfdab0549d04ff9fbe7fc050e628f1b3f62 Mon Sep 17 00:00:00 2001 From: DvTonder Date: Wed, 28 Nov 2012 21:26:34 -0500 Subject: Settings: Default the old CM Power widget to OFF THe Power widget functionality will be replaced by the new QuickSettings functionality of Android 4.2. Turn the old CM widget off by default. Change-Id: I9144130898aff1fb9f882aaf68a3b0873742f3d6 --- src/com/android/settings/cyanogenmod/PowerWidget.java | 2 +- src/com/android/settings/cyanogenmod/PowerWidgetEnabler.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/settings/cyanogenmod/PowerWidget.java b/src/com/android/settings/cyanogenmod/PowerWidget.java index b4f0e77..134755e 100644 --- a/src/com/android/settings/cyanogenmod/PowerWidget.java +++ b/src/com/android/settings/cyanogenmod/PowerWidget.java @@ -89,7 +89,7 @@ public class PowerWidget extends SettingsPreferenceFragment implements mPowerWidget.setChecked((Settings.System.getInt(getActivity().getApplicationContext() .getContentResolver(), - Settings.System.EXPANDED_VIEW_WIDGET, 1) == 1)); + Settings.System.EXPANDED_VIEW_WIDGET, 0) == 1)); mPowerWidgetHideOnChange.setChecked((Settings.System.getInt(getActivity() .getApplicationContext().getContentResolver(), Settings.System.EXPANDED_HIDE_ONCHANGE, 0) == 1)); diff --git a/src/com/android/settings/cyanogenmod/PowerWidgetEnabler.java b/src/com/android/settings/cyanogenmod/PowerWidgetEnabler.java index 22a9aad..c2b7ed4 100644 --- a/src/com/android/settings/cyanogenmod/PowerWidgetEnabler.java +++ b/src/com/android/settings/cyanogenmod/PowerWidgetEnabler.java @@ -38,9 +38,9 @@ public class PowerWidgetEnabler extends SwitchWidget { } public void setState(Switch switch_) { - int isEnabled = Settings.System.getInt(mContext.getContentResolver(), - Settings.System.EXPANDED_VIEW_WIDGET, 1); - mSwitch.setChecked(isEnabled == 1 ? true : false); + boolean isEnabled = Settings.System.getInt(mContext.getContentResolver(), + Settings.System.EXPANDED_VIEW_WIDGET, 0) == 1; + mSwitch.setChecked(isEnabled); return; } -- cgit v1.1