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

Commit a30934c5 authored by Wileen Chiu's avatar Wileen Chiu Committed by Gerrit - the friendly Code Review server
Browse files

Check subid when querying network selection

- Manual network selection is not supported for all
global modes, and will automatically switch to automatic
for unsupported modes
- when checking if manual network selection is supported,
we do not check if the subid is active, and the default
network mode is used for DUMMY SUBIDs instead
- If the subid is not active, use the network mode
associated with the phone id instead

Change-Id: I955de159990fab59f7d48f4900c615580763417b
CRs-Fixed: 936605
parent edb37773
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.telephony.TelephonyManager;

import com.android.internal.telephony.CallTracker;
import com.android.internal.telephony.ConfigResourceUtil;
import com.android.internal.telephony.PhoneFactory;

import android.text.TextUtils;
import android.telephony.Rlog;
@@ -1901,9 +1902,7 @@ public class GSMPhone extends PhoneBase {
        int nwMode = Phone.PREFERRED_NT_MODE;
        int subId = getSubId();

        nwMode = android.provider.Settings.Global.getInt(mContext.getContentResolver(),
                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + subId, nwMode);

        nwMode = PhoneFactory.calculatePreferredNetworkType(mContext, subId);
        Rlog.d(LOG_TAG, "isManualNetSelAllowed in mode = " + nwMode);
        /*
         *  For multimode targets in global mode manual network