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

Commit c6904cf5 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of atel.lnx.2.0-00018.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1068293   I9948827e255a4191815fb79d8e7f184acfb2928a   Set Cdma roaming preference only for first time.
532471 711942   Ic46ac0c7e3af51a380bb2db5d71a71bf9595c2ec   Telephony: Use data and voice states for SPN
1069231   Ifd749a99284e31837f7059fdd1216d40cb87b855   IMS: Fix call forward indicator issue for video calls

Change-Id: I12871dbe75f8c2abaab8c15ab36b779bc812c76c
CRs-Fixed: 532471, 711942, 1068293, 1069231
parents 0145c06b 8055aee6
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ public class GsmCdmaPhone extends Phone {
    private int mRilVersion;
    private boolean mBroadcastEmergencyCallStateChanges = false;

    private int mCdmaRoamingType = CarrierConfigManager.CDMA_ROAMING_MODE_RADIO_DEFAULT;
    // Constructors

    public GsmCdmaPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, int phoneId,
@@ -220,9 +221,12 @@ public class GsmCdmaPhone extends Phone {
        public void onReceive(Context context, Intent intent) {
            Rlog.d(LOG_TAG, "mBroadcastReceiver: action " + intent.getAction());
            if (intent.getAction().equals(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)) {
                int phoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY, mPhoneId);
                if (phoneId == mPhoneId) {
                    sendMessage(obtainMessage(EVENT_CARRIER_CONFIG_CHANGED));
                }
            }
        }
    };

    private void initOnce(CommandsInterface ci) {
@@ -2130,7 +2134,8 @@ public class GsmCdmaPhone extends Phone {
                // Changing the cdma roaming settings based carrier config.
                if (b != null) {
                    int config_cdma_roaming_mode = b.getInt(
                            CarrierConfigManager.KEY_CDMA_ROAMING_MODE_INT);
                            CarrierConfigManager.KEY_CDMA_ROAMING_MODE_INT,
                            CarrierConfigManager.CDMA_ROAMING_MODE_RADIO_DEFAULT);
                    int current_cdma_roaming_mode =
                            Settings.Global.getInt(getContext().getContentResolver(),
                            Settings.Global.CDMA_ROAMING_MODE,
@@ -2144,16 +2149,23 @@ public class GsmCdmaPhone extends Phone {
                        case CarrierConfigManager.CDMA_ROAMING_MODE_ANY:
                            logd("cdma_roaming_mode is going to changed to "
                                    + config_cdma_roaming_mode);
                            logd("mCdmaRoamingType is "+mCdmaRoamingType);
                            if (isPhoneTypeCdma() && mCdmaRoamingType != config_cdma_roaming_mode) {
                                mCdmaRoamingType = config_cdma_roaming_mode;
                                setCdmaRoamingPreference(config_cdma_roaming_mode,
                                        obtainMessage(EVENT_SET_ROAMING_PREFERENCE_DONE));
                            }
                            break;

                        // When carrier's setting is turn off, change the cdma_roaming_mode to the
                        // previous user's setting
                        case CarrierConfigManager.CDMA_ROAMING_MODE_RADIO_DEFAULT:
                            if (current_cdma_roaming_mode != config_cdma_roaming_mode) {
                            if (isPhoneTypeCdma() &&
                                    current_cdma_roaming_mode != config_cdma_roaming_mode &&
                                    mCdmaRoamingType != current_cdma_roaming_mode) {
                                logd("cdma_roaming_mode is going to changed to "
                                        + current_cdma_roaming_mode);
                                mCdmaRoamingType = current_cdma_roaming_mode;
                                setCdmaRoamingPreference(current_cdma_roaming_mode,
                                        obtainMessage(EVENT_SET_ROAMING_PREFERENCE_DONE));
                            }
+28 −4
Original line number Diff line number Diff line
@@ -2110,8 +2110,9 @@ public class ServiceStateTracker extends Handler {
            String plmn = null;
            boolean showPlmn = false;
            int rule = (iccRecords != null) ? iccRecords.getDisplayRule(mSS.getOperatorNumeric()) : 0;
            if (mSS.getVoiceRegState() == ServiceState.STATE_OUT_OF_SERVICE
                    || mSS.getVoiceRegState() == ServiceState.STATE_EMERGENCY_ONLY) {
            int combinedRegState = getCombinedRegState();
            if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE
                    || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) {
                showPlmn = true;
                if (mEmergencyOnly) {
                    // No service but emergency call allowed
@@ -2124,7 +2125,7 @@ public class ServiceStateTracker extends Handler {
                }
                if (DBG) log("updateSpnDisplay: radio is on but out " +
                        "of service, set plmn='" + plmn + "'");
            } else if (mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE) {
            } else if (combinedRegState == ServiceState.STATE_IN_SERVICE) {
                // In either home or roaming service
                plmn = mSS.getOperatorAlphaLong();
                showPlmn = !TextUtils.isEmpty(plmn) &&
@@ -2242,6 +2243,15 @@ public class ServiceStateTracker extends Handler {
                subId = subIds[0];
            }

            int combinedRegState = getCombinedRegState();
            if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE) {
                plmn = Resources.getSystem().getText(com.android.internal.
                    R.string.lockscreen_carrier_default).toString();
                if (DBG) log("updateSpnDisplay: radio is on but out " +
                    "of service, set plmn='" + plmn + "'");
            }


            if (mSubId != subId || !TextUtils.equals(plmn, mCurPlmn)) {
                // Allow A blank plmn, "" to set showPlmn to true. Previously, we
                // would set showPlmn to true only if plmn was not empty, i.e. was not
@@ -4869,6 +4879,20 @@ public class ServiceStateTracker extends Handler {
        return isInNetwork(b, network, CarrierConfigManager.KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY);
    }

   /**
     * Consider dataRegState if voiceRegState is OOS to determine SPN to be displayed
     */
    protected int getCombinedRegState() {
        int regState = mSS.getVoiceRegState();
        int dataRegState = mSS.getDataRegState();
        if ((regState == ServiceState.STATE_OUT_OF_SERVICE)
                && (dataRegState == ServiceState.STATE_IN_SERVICE)) {
                    log("getCombinedRegState: return STATE_IN_SERVICE as Data is in service");
                     regState = dataRegState;
        }
        return regState;
    }

  /** Check if the device is shutting down. */
    public boolean isDeviceShuttingDown() {
        return mDeviceShuttingDown;
+6 −0
Original line number Diff line number Diff line
@@ -1159,6 +1159,7 @@ public class ImsPhone extends ImsPhoneBase {
                    if (infos[i].mServiceClass == (SERVICE_CLASS_DATA_SYNC +
                                SERVICE_CLASS_PACKET)) {
                        setVideoCallForwardingPreference(infos[i].mStatus == 1);
                        notifyCallForwardingIndicator();
                    } else if (r != null) {
                        setVoiceCallForwardingFlag(r, 1, (infos[i].mStatus == 1),
                            infos[i].mNumber);
@@ -1622,6 +1623,11 @@ public class ImsPhone extends ImsPhoneBase {
        mDefaultPhone.setBroadcastEmergencyCallStateChanges(broadcast);
    }

    @Override
    public void notifyCallForwardingIndicator() {
        mDefaultPhone.notifyCallForwardingIndicator();
    }

    @VisibleForTesting
    public PowerManager.WakeLock getWakeLock() {
        return mWakeLock;
+1 −0
Original line number Diff line number Diff line
@@ -1056,6 +1056,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {
                        if(siToServiceClass(mSib) == (SERVICE_CLASS_PACKET
                                    + SERVICE_CLASS_DATA_SYNC)) {
                            mPhone.setVideoCallForwardingPreference(cffEnabled);
                            mPhone.notifyCallForwardingIndicator();
                        } else {
                            mPhone.setVoiceCallForwardingFlag(1, cffEnabled, mDialingNumber);
                        }