Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6088576a authored by Junda Liu's avatar Junda Liu
Browse files

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
parent 02db7555
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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);
    }
}