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

Unverified Commit 44c4732a authored by Michael Bestas's avatar Michael Bestas
Browse files

Revert "RIL: Fix manual network selection with old modem"

Reason for revert: Not used by any device, causes CTS failures.

This reverts commit b5e890aa.

Change-Id: Ic22aa75423b7d2373520791880e6142114c6383b
parent c3571e72
Loading
Loading
Loading
Loading
+1 −12
Original line number Original line Diff line number Diff line
@@ -222,8 +222,6 @@ public class RIL extends BaseCommands implements CommandsInterface {


    final Integer mPhoneId;
    final Integer mPhoneId;


    private boolean mUseOldMncMccFormat;

    private static final String PROPERTY_IS_VONR_ENABLED = "persist.radio.is_vonr_enabled_";
    private static final String PROPERTY_IS_VONR_ENABLED = "persist.radio.is_vonr_enabled_";


    public static final int MIN_SERVICE_IDX = HAL_SERVICE_RADIO;
    public static final int MIN_SERVICE_IDX = HAL_SERVICE_RADIO;
@@ -1156,9 +1154,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
            if (proxies == null) throw ex;
            if (proxies == null) throw ex;
        }
        }


        mUseOldMncMccFormat = SystemProperties.getBoolean(
                "ro.telephony.use_old_mnc_mcc_format", false);

        TelephonyManager tm = (TelephonyManager) context.getSystemService(
        TelephonyManager tm = (TelephonyManager) context.getSystemService(
                Context.TELEPHONY_SERVICE);
                Context.TELEPHONY_SERVICE);
        mIsCellularSupported = tm.isVoiceCapable() || tm.isSmsCapable() || tm.isDataCapable();
        mIsCellularSupported = tm.isVoiceCapable() || tm.isSmsCapable() || tm.isDataCapable();
@@ -2577,20 +2572,14 @@ public class RIL extends BaseCommands implements CommandsInterface {
        RILRequest rr = obtainRequest(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, result,
        RILRequest rr = obtainRequest(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, result,
                mRILDefaultWorkSource);
                mRILDefaultWorkSource);


        if (mUseOldMncMccFormat && !TextUtils.isEmpty(operatorNumeric)) {
            operatorNumeric += "+";
        }

        if (RILJ_LOGD) {
        if (RILJ_LOGD) {
            riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)
            riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)
                    + " operatorNumeric = " + operatorNumeric + ", ran = " + ran);
                    + " operatorNumeric = " + operatorNumeric + ", ran = " + ran);
        }
        }


        final String operatorNumericCopy = operatorNumeric;

        radioServiceInvokeHelper(HAL_SERVICE_NETWORK, rr, "setNetworkSelectionModeManual", () -> {
        radioServiceInvokeHelper(HAL_SERVICE_NETWORK, rr, "setNetworkSelectionModeManual", () -> {
            networkProxy.setNetworkSelectionModeManual(rr.mSerial,
            networkProxy.setNetworkSelectionModeManual(rr.mSerial,
                    RILUtils.convertNullToEmptyString(operatorNumericCopy), ran);
                    RILUtils.convertNullToEmptyString(operatorNumeric), ran);
        });
        });
    }
    }


+1 −5
Original line number Original line Diff line number Diff line
@@ -2330,12 +2330,8 @@ public class RadioResponse extends IRadioResponse.Stub {
        if (rr != null) {
        if (rr != null) {
            ArrayList<OperatorInfo> ret = new ArrayList<OperatorInfo>();
            ArrayList<OperatorInfo> ret = new ArrayList<OperatorInfo>();
            for (int i = 0; i < networkInfos.size(); i++) {
            for (int i = 0; i < networkInfos.size(); i++) {
                String operatorNumeric = networkInfos.get(i).operatorNumeric;
                if (operatorNumeric != null) {
                    operatorNumeric = operatorNumeric.split("\\+")[0];
                }
                ret.add(new OperatorInfo(networkInfos.get(i).alphaLong,
                ret.add(new OperatorInfo(networkInfos.get(i).alphaLong,
                        networkInfos.get(i).alphaShort, operatorNumeric,
                        networkInfos.get(i).alphaShort, networkInfos.get(i).operatorNumeric,
                        RILUtils.convertHalOperatorStatus(networkInfos.get(i).status)));
                        RILUtils.convertHalOperatorStatus(networkInfos.get(i).status)));
            }
            }
            if (responseInfo.error == RadioError.NONE) {
            if (responseInfo.error == RadioError.NONE) {