Merge "More migration to Global settings." into jb-mr1-dev
This commit is contained in:
@@ -489,10 +489,10 @@ public class DevelopmentSettings extends PreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateDebuggerOptions() {
|
private void updateDebuggerOptions() {
|
||||||
mDebugApp = Settings.System.getString(
|
mDebugApp = Settings.Global.getString(
|
||||||
getActivity().getContentResolver(), Settings.System.DEBUG_APP);
|
getActivity().getContentResolver(), Settings.Global.DEBUG_APP);
|
||||||
updateCheckBox(mWaitForDebugger, Settings.System.getInt(
|
updateCheckBox(mWaitForDebugger, Settings.Global.getInt(
|
||||||
getActivity().getContentResolver(), Settings.System.WAIT_FOR_DEBUGGER, 0) != 0);
|
getActivity().getContentResolver(), Settings.Global.WAIT_FOR_DEBUGGER, 0) != 0);
|
||||||
if (mDebugApp != null && mDebugApp.length() > 0) {
|
if (mDebugApp != null && mDebugApp.length() > 0) {
|
||||||
String label;
|
String label;
|
||||||
try {
|
try {
|
||||||
@@ -727,14 +727,14 @@ public class DevelopmentSettings extends PreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateCpuUsageOptions() {
|
private void updateCpuUsageOptions() {
|
||||||
updateCheckBox(mShowCpuUsage, Settings.System.getInt(getActivity().getContentResolver(),
|
updateCheckBox(mShowCpuUsage, Settings.Global.getInt(getActivity().getContentResolver(),
|
||||||
Settings.System.SHOW_PROCESSES, 0) != 0);
|
Settings.Global.SHOW_PROCESSES, 0) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeCpuUsageOptions() {
|
private void writeCpuUsageOptions() {
|
||||||
boolean value = mShowCpuUsage.isChecked();
|
boolean value = mShowCpuUsage.isChecked();
|
||||||
Settings.System.putInt(getActivity().getContentResolver(),
|
Settings.Global.putInt(getActivity().getContentResolver(),
|
||||||
Settings.System.SHOW_PROCESSES, value ? 1 : 0);
|
Settings.Global.SHOW_PROCESSES, value ? 1 : 0);
|
||||||
Intent service = (new Intent())
|
Intent service = (new Intent())
|
||||||
.setClassName("com.android.systemui", "com.android.systemui.LoadAverageService");
|
.setClassName("com.android.systemui", "com.android.systemui.LoadAverageService");
|
||||||
if (value) {
|
if (value) {
|
||||||
@@ -753,8 +753,8 @@ public class DevelopmentSettings extends PreferenceFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateImmediatelyDestroyActivitiesOptions() {
|
private void updateImmediatelyDestroyActivitiesOptions() {
|
||||||
updateCheckBox(mImmediatelyDestroyActivities, Settings.System.getInt(
|
updateCheckBox(mImmediatelyDestroyActivities, Settings.Global.getInt(
|
||||||
getActivity().getContentResolver(), Settings.System.ALWAYS_FINISH_ACTIVITIES, 0) != 0);
|
getActivity().getContentResolver(), Settings.Global.ALWAYS_FINISH_ACTIVITIES, 0) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAnimationScaleValue(int which, ListPreference pref) {
|
private void updateAnimationScaleValue(int which, ListPreference pref) {
|
||||||
|
@@ -315,7 +315,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
|||||||
getActivity().sendBroadcast(i);
|
getActivity().sendBroadcast(i);
|
||||||
}
|
}
|
||||||
} else if (preference == mDockSounds) {
|
} else if (preference == mDockSounds) {
|
||||||
Settings.System.putInt(getContentResolver(), Settings.System.DOCK_SOUNDS_ENABLED,
|
Settings.Global.putInt(getContentResolver(), Settings.Global.DOCK_SOUNDS_ENABLED,
|
||||||
mDockSounds.isChecked() ? 1 : 0);
|
mDockSounds.isChecked() ? 1 : 0);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -354,8 +354,8 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
|||||||
|
|
||||||
mDockSounds = (CheckBoxPreference) findPreference(KEY_DOCK_SOUNDS);
|
mDockSounds = (CheckBoxPreference) findPreference(KEY_DOCK_SOUNDS);
|
||||||
mDockSounds.setPersistent(false);
|
mDockSounds.setPersistent(false);
|
||||||
mDockSounds.setChecked(Settings.System.getInt(resolver,
|
mDockSounds.setChecked(Settings.Global.getInt(resolver,
|
||||||
Settings.System.DOCK_SOUNDS_ENABLED, 0) != 0);
|
Settings.Global.DOCK_SOUNDS_ENABLED, 0) != 0);
|
||||||
} else {
|
} else {
|
||||||
getPreferenceScreen().removePreference(findPreference(KEY_DOCK_CATEGORY));
|
getPreferenceScreen().removePreference(findPreference(KEY_DOCK_CATEGORY));
|
||||||
getPreferenceScreen().removePreference(findPreference(KEY_AUDIO_SETTINGS));
|
getPreferenceScreen().removePreference(findPreference(KEY_AUDIO_SETTINGS));
|
||||||
|
@@ -108,7 +108,7 @@ public final class BluetoothEnabler implements CompoundButton.OnCheckedChangeLis
|
|||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
// Show toast message if Bluetooth is not allowed in airplane mode
|
// Show toast message if Bluetooth is not allowed in airplane mode
|
||||||
if (isChecked &&
|
if (isChecked &&
|
||||||
!WirelessSettings.isRadioAllowed(mContext, Settings.System.RADIO_BLUETOOTH)) {
|
!WirelessSettings.isRadioAllowed(mContext, Settings.Global.RADIO_BLUETOOTH)) {
|
||||||
Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
|
||||||
// Reset switch to off
|
// Reset switch to off
|
||||||
buttonView.setChecked(false);
|
buttonView.setChecked(false);
|
||||||
|
@@ -104,7 +104,7 @@ public class WifiEnabler implements CompoundButton.OnCheckedChangeListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Show toast message if Wi-Fi is not allowed in airplane mode
|
// Show toast message if Wi-Fi is not allowed in airplane mode
|
||||||
if (isChecked && !WirelessSettings.isRadioAllowed(mContext, Settings.System.RADIO_WIFI)) {
|
if (isChecked && !WirelessSettings.isRadioAllowed(mContext, Settings.Global.RADIO_WIFI)) {
|
||||||
Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
|
||||||
// Reset switch to off. No infinite check/listenenr loop.
|
// Reset switch to off. No infinite check/listenenr loop.
|
||||||
buttonView.setChecked(false);
|
buttonView.setChecked(false);
|
||||||
|
Reference in New Issue
Block a user