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

Commit 3220d26f authored by Jordan Liu's avatar Jordan Liu
Browse files

Update reference to config_onlySingleDcAllowed

Update the reference to the old config to use the new methods in
CarrierConfigManager.

Bug: 29873049
Change-Id: I8b5cfb9791999524cffffe159cc6b872ce86fe62
Merged-In: I8b5cfb9791999524cffffe159cc6b872ce86fe62
parent 039a96b1
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -2289,8 +2289,20 @@ public class DcTracker extends Handler {
     * @return true if only single DataConnection is allowed
     */
    private boolean isOnlySingleDcAllowed(int rilRadioTech) {
        int[] singleDcRats = mPhone.getContext().getResources().getIntArray(
                com.android.internal.R.array.config_onlySingleDcAllowed);
        // Default single dc rats with no knowledge of carrier
        int[] singleDcRats = null;
        // get the carrier specific value, if it exists, from CarrierConfigManager
        // generally configManager and bundle should not be null, but if they are it should be okay
        // to leave singleDcRats null as well
        CarrierConfigManager configManager = (CarrierConfigManager)
                mPhone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
        if (configManager != null) {
            PersistableBundle bundle = configManager.getConfig();
            if (bundle != null) {
                singleDcRats = bundle.getIntArray(
                        CarrierConfigManager.KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY);
            }
        }
        boolean onlySingleDcAllowed = false;
        if (Build.IS_DEBUGGABLE &&
                SystemProperties.getBoolean("persist.telephony.test.singleDc", false)) {