summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/settings/ButtonSettings.java20
-rw-r--r--src/com/android/settings/DevelopmentSettings.java36
-rw-r--r--src/com/android/settings/HostnamePreference.java6
-rw-r--r--src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java17
-rw-r--r--src/com/android/settings/cyanogenmod/PowerMenuActions.java8
5 files changed, 45 insertions, 42 deletions
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java
index d368cab..aa4e1e7 100644
--- a/src/com/android/settings/ButtonSettings.java
+++ b/src/com/android/settings/ButtonSettings.java
@@ -385,8 +385,8 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
try {
// Only show the navigation bar category on devices that have a navigation bar
// unless we are forcing it via development settings
- boolean forceNavbar = android.provider.Settings.System.getInt(getContentResolver(),
- android.provider.Settings.System.DEV_FORCE_SHOW_NAVBAR, 0) == 1;
+ boolean forceNavbar = CMSettings.Secure.getInt(getContentResolver(),
+ CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) == 1;
boolean hasNavBar = WindowManagerGlobal.getWindowManagerService().hasNavigationBar()
|| forceNavbar;
@@ -616,26 +616,26 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
final int defaultBrightness = context.getResources().getInteger(
com.android.internal.R.integer.config_buttonBrightnessSettingDefault);
- Settings.Secure.putInt(context.getContentResolver(),
- Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
+ CMSettings.Secure.putInt(context.getContentResolver(),
+ CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
CMHardwareManager hardware = CMHardwareManager.getInstance(context);
hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled);
/* Save/restore button timeouts to disable them in softkey mode */
if (enabled) {
- Settings.Secure.putInt(context.getContentResolver(),
- Settings.Secure.BUTTON_BRIGHTNESS, 0);
+ CMSettings.Secure.putInt(context.getContentResolver(),
+ CMSettings.Secure.BUTTON_BRIGHTNESS, 0);
} else {
int oldBright = prefs.getInt(ButtonBacklightBrightness.KEY_BUTTON_BACKLIGHT,
defaultBrightness);
- Settings.Secure.putInt(context.getContentResolver(),
- Settings.Secure.BUTTON_BRIGHTNESS, oldBright);
+ CMSettings.Secure.putInt(context.getContentResolver(),
+ CMSettings.Secure.BUTTON_BRIGHTNESS, oldBright);
}
}
private void updateDisableNavkeysOption() {
- boolean enabled = Settings.System.getInt(getActivity().getContentResolver(),
- Settings.System.DEV_FORCE_SHOW_NAVBAR, 0) != 0;
+ boolean enabled = CMSettings.Secure.getInt(getActivity().getContentResolver(),
+ CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) != 0;
mDisableNavigationKeys.setChecked(enabled);
}
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 6ab0b3c..aa3b99d 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -636,8 +636,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
updateSwitchPreference(mEnableAdb, Settings.Global.getInt(cr,
Settings.Global.ADB_ENABLED, 0) != 0);
- mAdbNotify.setChecked(Settings.Secure.getInt(cr,
- Settings.Secure.ADB_NOTIFY, 1) != 0);
+ mAdbNotify.setChecked(CMSettings.Secure.getInt(cr,
+ CMSettings.Secure.ADB_NOTIFY, 1) != 0);
updateAdbOverNetwork();
if (mEnableTerminal != null) {
@@ -700,14 +700,14 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
}
private void writeAdvancedRebootOptions() {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADVANCED_REBOOT,
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADVANCED_REBOOT,
mAdvancedReboot.isChecked() ? 1 : 0);
}
private void updateAdvancedRebootOptions() {
- mAdvancedReboot.setChecked(Settings.Secure.getInt(getActivity().getContentResolver(),
- Settings.Secure.ADVANCED_REBOOT, 0) != 0);
+ mAdvancedReboot.setChecked(CMSettings.Secure.getInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADVANCED_REBOOT, 0) != 0);
}
private void resetDevelopmentShortcutOptions() {
@@ -727,8 +727,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
}
private void updateAdbOverNetwork() {
- int port = Settings.Secure.getInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_PORT, 0);
+ int port = CMSettings.Secure.getInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADB_PORT, 0);
boolean enabled = port > 0;
updateSwitchPreference(mAdbOverNetwork, enabled);
@@ -860,14 +860,14 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
}
private void writeKillAppLongpressBackOptions() {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.KILL_APP_LONGPRESS_BACK,
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.KILL_APP_LONGPRESS_BACK,
mKillAppLongpressBack.isChecked() ? 1 : 0);
}
private void updateKillAppLongpressBackOptions() {
- mKillAppLongpressBack.setChecked(Settings.Secure.getInt(
- getActivity().getContentResolver(), Settings.Secure.KILL_APP_LONGPRESS_BACK, 0) != 0);
+ mKillAppLongpressBack.setChecked(CMSettings.Secure.getInt(
+ getActivity().getContentResolver(), CMSettings.Secure.KILL_APP_LONGPRESS_BACK, 0) != 0);
}
private void updatePasswordSummary() {
@@ -1823,8 +1823,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
updateBugreportOptions();
}
} else if (preference == mAdbNotify) {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_NOTIFY,
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADB_NOTIFY,
mAdbNotify.isChecked() ? 1 : 0);
} else if (preference == mAdbOverNetwork) {
if (mAdbOverNetwork.isChecked()) {
@@ -1839,8 +1839,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
.show();
mAdbTcpDialog.setOnDismissListener(this);
} else {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_PORT, -1);
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADB_PORT, -1);
updateAdbOverNetwork();
}
} else if (preference == mClearAdbKeys) {
@@ -2063,8 +2063,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
}
} else if (dialog == mAdbTcpDialog) {
if (which == DialogInterface.BUTTON_POSITIVE) {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_PORT, 5555);
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADB_PORT, 5555);
}
} else if (dialog == mAdbKeysDialog) {
if (which == DialogInterface.BUTTON_POSITIVE) {
diff --git a/src/com/android/settings/HostnamePreference.java b/src/com/android/settings/HostnamePreference.java
index 3f2bb2e..d9ebf21 100644
--- a/src/com/android/settings/HostnamePreference.java
+++ b/src/com/android/settings/HostnamePreference.java
@@ -25,6 +25,8 @@ import android.text.Spanned;
import android.util.AttributeSet;
import android.util.Log;
+import cyanogenmod.providers.CMSettings;
+
public class HostnamePreference extends EditTextPreference {
private static final String TAG = "HostnamePreference";
@@ -121,7 +123,7 @@ public class HostnamePreference extends EditTextPreference {
}
public void persistHostname(String hostname) {
- Settings.Secure.putString(getContext().getContentResolver(),
- Settings.Secure.DEVICE_HOSTNAME, hostname);
+ CMSettings.Secure.putString(getContext().getContentResolver(),
+ CMSettings.Secure.DEVICE_HOSTNAME, hostname);
}
}
diff --git a/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java b/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java
index 1a941d7..9a9b7b4 100644
--- a/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java
+++ b/src/com/android/settings/cyanogenmod/ButtonBacklightBrightness.java
@@ -40,6 +40,7 @@ import android.widget.SeekBar;
import android.widget.TextView;
import com.android.settings.R;
+import cyanogenmod.providers.CMSettings;
public class ButtonBacklightBrightness extends DialogPreference implements
SeekBar.OnSeekBarChangeListener {
@@ -68,7 +69,7 @@ public class ButtonBacklightBrightness extends DialogPreference implements
if (isKeyboardSupported()) {
mKeyboardBrightness = new BrightnessControl(
- Settings.System.KEYBOARD_BRIGHTNESS, false);
+ CMSettings.Secure.KEYBOARD_BRIGHTNESS, false);
mActiveControl = mKeyboardBrightness;
}
if (isButtonSupported()) {
@@ -79,7 +80,7 @@ public class ButtonBacklightBrightness extends DialogPreference implements
com.android.internal.R.integer.config_buttonBrightnessSettingDefault);
mButtonBrightness = new BrightnessControl(
- Settings.System.BUTTON_BRIGHTNESS, isSingleValue, defaultBrightness);
+ CMSettings.Secure.BUTTON_BRIGHTNESS, isSingleValue, defaultBrightness);
mActiveControl = mButtonBrightness;
}
@@ -262,13 +263,13 @@ public class ButtonBacklightBrightness extends DialogPreference implements
}
private int getTimeout() {
- return Settings.System.getInt(mResolver,
- Settings.System.BUTTON_BACKLIGHT_TIMEOUT, DEFAULT_BUTTON_TIMEOUT * 1000) / 1000;
+ return CMSettings.Secure.getInt(mResolver,
+ CMSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT, DEFAULT_BUTTON_TIMEOUT * 1000) / 1000;
}
private void applyTimeout(int timeout) {
- Settings.System.putInt(mResolver,
- Settings.System.BUTTON_BACKLIGHT_TIMEOUT, timeout * 1000);
+ CMSettings.System.putInt(mResolver,
+ CMSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT, timeout * 1000);
}
private void updateBrightnessPreview() {
@@ -398,11 +399,11 @@ public class ButtonBacklightBrightness extends DialogPreference implements
} else if (mSeekBar != null && !persisted) {
return mSeekBar.getProgress();
}
- return Settings.System.getInt(mResolver, mSetting, mDefaultBrightness);
+ return CMSettings.Secure.getInt(mResolver, mSetting, mDefaultBrightness);
}
public void applyBrightness() {
- Settings.System.putInt(mResolver, mSetting, getBrightness(false));
+ CMSettings.Secure.putInt(mResolver, mSetting, getBrightness(false));
}
/* Behaviors when it's a seekbar */
diff --git a/src/com/android/settings/cyanogenmod/PowerMenuActions.java b/src/com/android/settings/cyanogenmod/PowerMenuActions.java
index 844d1e8..5a3eb7d 100644
--- a/src/com/android/settings/cyanogenmod/PowerMenuActions.java
+++ b/src/com/android/settings/cyanogenmod/PowerMenuActions.java
@@ -286,8 +286,8 @@ public class PowerMenuActions extends SettingsPreferenceFragment {
private void getUserConfig() {
mLocalUserConfig.clear();
String[] defaultActions;
- String savedActions = Settings.Global.getStringForUser(mContext.getContentResolver(),
- Settings.Global.POWER_MENU_ACTIONS, UserHandle.USER_CURRENT);
+ String savedActions = CMSettings.Secure.getStringForUser(mContext.getContentResolver(),
+ CMSettings.Secure.POWER_MENU_ACTIONS, UserHandle.USER_CURRENT);
if (savedActions == null) {
defaultActions = mContext.getResources().getStringArray(
@@ -322,8 +322,8 @@ public class PowerMenuActions extends SettingsPreferenceFragment {
}
}
- Settings.Global.putStringForUser(getContentResolver(),
- Settings.Global.POWER_MENU_ACTIONS, s.toString(), UserHandle.USER_CURRENT);
+ CMSettings.Secure.putStringForUser(getContentResolver(),
+ CMSettings.Secure.POWER_MENU_ACTIONS, s.toString(), UserHandle.USER_CURRENT);
updatePowerMenuDialog();
}