Update Settings app to manipulate now-global settings properly

Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
This commit is contained in:
Christopher Tate
2012-09-07 13:35:31 -07:00
parent 96c2f8c508
commit 5a64c739bf
5 changed files with 30 additions and 30 deletions

View File

@@ -869,14 +869,14 @@ public class DataUsageSummary extends Fragment {
private boolean getDataRoaming() {
final ContentResolver resolver = getActivity().getContentResolver();
return Settings.Secure.getInt(resolver, Settings.Secure.DATA_ROAMING, 0) != 0;
return Settings.Global.getInt(resolver, Settings.Global.DATA_ROAMING, 0) != 0;
}
private void setDataRoaming(boolean enabled) {
// TODO: teach telephony DataConnectionTracker to watch and apply
// updates when changed.
final ContentResolver resolver = getActivity().getContentResolver();
Settings.Secure.putInt(resolver, Settings.Secure.DATA_ROAMING, enabled ? 1 : 0);
Settings.Global.putInt(resolver, Settings.Global.DATA_ROAMING, enabled ? 1 : 0);
mMenuDataRoaming.setChecked(enabled);
}
@@ -1899,7 +1899,7 @@ public class DataUsageSummary extends Fragment {
/**
* Dialog to request user confirmation before setting
* {@link android.provider.Settings.Secure#DATA_ROAMING}.
* {@link android.provider.Settings.Global#DATA_ROAMING}.
*/
public static class ConfirmDataRoamingFragment extends DialogFragment {
public static void show(DataUsageSummary parent) {