Update Settings app to manipulate now-global settings properly
Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user