diff options
author | Junda Liu <junda@google.com> | 2015-06-01 01:56:31 -0700 |
---|---|---|
committer | Junda Liu <junda@google.com> | 2015-06-08 15:20:56 -0700 |
commit | 6088576aa518e2d0e158bc035723cd84ed0f4717 (patch) | |
tree | 0312ad59ae6433a13aa727c503dfb0e22c8c2d36 /src | |
parent | 02db755505920f55d4f25a3a4d226795823e9b6a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/settings/SoundSettingsFragment.java | 8 |
1 files changed, 5 insertions, 3 deletions
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); } } |