From 6088576aa518e2d0e158bc035723cd84ed0f4717 Mon Sep 17 00:00:00 2001 From: Junda Liu Date: Mon, 1 Jun 2015 01:56:31 -0700 Subject: Use carrier config BOOL_HIDE_CARRIER_NETWORK_SETTINGS. Uses carrier config instead of settings to show/hide dialer settings. Bug: b/21355336 Change-Id: I2a19b82855cd5e48d1047edcf78d46718d68b3c9 --- src/com/android/dialer/settings/SoundSettingsFragment.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/com') diff --git a/src/com/android/dialer/settings/SoundSettingsFragment.java b/src/com/android/dialer/settings/SoundSettingsFragment.java index 43297b5e5..c7bb2d361 100644 --- a/src/com/android/dialer/settings/SoundSettingsFragment.java +++ b/src/com/android/dialer/settings/SoundSettingsFragment.java @@ -28,6 +28,7 @@ import android.preference.Preference; import android.preference.PreferenceFragment; import android.preference.PreferenceScreen; import android.provider.Settings; +import android.telephony.CarrierConfigManager; import android.telephony.TelephonyManager; import com.android.dialer.R; @@ -208,8 +209,9 @@ public class SoundSettingsFragment extends PreferenceFragment } private boolean shouldHideCarrierSettings() { - int hideCarrierNetworkSetting = Settings.Global.getInt(getActivity().getContentResolver(), - Settings.Global.HIDE_CARRIER_NETWORK_SETTINGS, SHOW_CARRIER_SETTINGS); - return hideCarrierNetworkSetting == HIDE_CARRIER_SETTINGS; + CarrierConfigManager configManager = (CarrierConfigManager) getActivity().getSystemService( + Context.CARRIER_CONFIG_SERVICE); + return configManager.getConfig().getBoolean( + CarrierConfigManager.KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL); } } -- cgit v1.2.3