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

Commit 2cc09f58 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-d642586e-3e25-49f4-8b4c-acad0e3f63d8-for-git_oc-mr1-release-42...

release-request-d642586e-3e25-49f4-8b4c-acad0e3f63d8-for-git_oc-mr1-release-4249777 snap-temp-L81500000089724408

Change-Id: If8aee2581967dde002357971bac315fb444b25cd
parents 1712aa5b 40a02fda
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -387,6 +387,15 @@ public abstract class Connection {
        return mIsIncoming;
        return mIsIncoming;
    }
    }


    /**
     * Sets whether this call is an incoming call or not.
     * @param isIncoming {@code true} if the call is an incoming call, {@code false} if it is an
     *                               outgoing call.
     */
    public void setIsIncoming(boolean isIncoming) {
        mIsIncoming = isIncoming;
    }

    /**
    /**
     * If this Connection is connected, then it is associated with
     * If this Connection is connected, then it is associated with
     * a Call.
     * a Call.
+1 −2
Original line number Original line Diff line number Diff line
@@ -614,8 +614,7 @@ public class GsmCdmaConnection extends Connection {
        //Ignore dc.number and dc.name in case of a handover connection
        //Ignore dc.number and dc.name in case of a handover connection
        if (isPhoneTypeGsm() && mOrigConnection != null) {
        if (isPhoneTypeGsm() && mOrigConnection != null) {
            if (Phone.DEBUG_PHONE) log("update: mOrigConnection is not null");
            if (Phone.DEBUG_PHONE) log("update: mOrigConnection is not null");
        } else {
        } else if (isIncoming()) {
            log(" mNumberConverted " + mNumberConverted);
            if (!equalsBaseDialString(mAddress, dc.number) && (!mNumberConverted
            if (!equalsBaseDialString(mAddress, dc.number) && (!mNumberConverted
                    || !equalsBaseDialString(mConvertedNumber, dc.number))) {
                    || !equalsBaseDialString(mConvertedNumber, dc.number))) {
                if (Phone.DEBUG_PHONE) log("update: phone # changed!");
                if (Phone.DEBUG_PHONE) log("update: phone # changed!");
+37 −18
Original line number Original line Diff line number Diff line
@@ -1650,7 +1650,13 @@ public class ServiceStateTracker extends Handler {


                // Setting SS Roaming (general)
                // Setting SS Roaming (general)
                if (mIsSubscriptionFromRuim) {
                if (mIsSubscriptionFromRuim) {
                    mNewSS.setVoiceRoaming(isRoamingBetweenOperators(mNewSS.getVoiceRoaming(), mNewSS));
                    boolean isRoamingBetweenOperators = isRoamingBetweenOperators(
                            mNewSS.getVoiceRoaming(), mNewSS);
                    if (isRoamingBetweenOperators != mNewSS.getVoiceRoaming()) {
                        log("isRoamingBetweenOperators=" + isRoamingBetweenOperators
                                + ". Override CDMA voice roaming to " + isRoamingBetweenOperators);
                        mNewSS.setVoiceRoaming(isRoamingBetweenOperators);
                    }
                }
                }
                /**
                /**
                 * For CDMA, voice and data should have the same roaming status.
                 * For CDMA, voice and data should have the same roaming status.
@@ -1663,15 +1669,25 @@ public class ServiceStateTracker extends Handler {
                    final boolean isVoiceInService =
                    final boolean isVoiceInService =
                            (mNewSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE);
                            (mNewSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE);
                    if (isVoiceInService) {
                    if (isVoiceInService) {
                        mNewSS.setDataRoaming(mNewSS.getVoiceRoaming());
                        boolean isVoiceRoaming = mNewSS.getVoiceRoaming();
                        if (mNewSS.getDataRoaming() != isVoiceRoaming) {
                            log("Data roaming != Voice roaming. Override data roaming to "
                                    + isVoiceRoaming);
                            mNewSS.setDataRoaming(isVoiceRoaming);
                        }
                    } else {
                    } else {
                        /**
                        /**
                         * As per VoiceRegStateResult from radio types.hal the TSB58
                         * As per VoiceRegStateResult from radio types.hal the TSB58
                         * Roaming Indicator shall be sent if device is registered
                         * Roaming Indicator shall be sent if device is registered
                         * on a CDMA or EVDO system.
                         * on a CDMA or EVDO system.
                         */
                         */
                        mNewSS.setDataRoaming(
                        boolean isRoamIndForHomeSystem = isRoamIndForHomeSystem(
                                !isRoamIndForHomeSystem(Integer.toString(mRoamingIndicator)));
                                Integer.toString(mRoamingIndicator));
                        if (mNewSS.getDataRoaming() == isRoamIndForHomeSystem) {
                            log("isRoamIndForHomeSystem=" + isRoamIndForHomeSystem
                                    + ", override data roaming to " + !isRoamIndForHomeSystem);
                            mNewSS.setDataRoaming(!isRoamIndForHomeSystem);
                        }
                    }
                    }
                }
                }


@@ -1876,6 +1892,9 @@ public class ServiceStateTracker extends Handler {
                    mNewReasonDataDenied = dataRegStateResult.reasonDataDenied;
                    mNewReasonDataDenied = dataRegStateResult.reasonDataDenied;
                    mNewMaxDataCalls = dataRegStateResult.maxDataCalls;
                    mNewMaxDataCalls = dataRegStateResult.maxDataCalls;
                    mDataRoaming = regCodeIsRoaming(regState);
                    mDataRoaming = regCodeIsRoaming(regState);
                    // Save the data roaming state reported by modem registration before resource
                    // overlay or carrier config possibly overrides it.
                    mNewSS.setDataRoamingFromRegistration(mDataRoaming);


                    if (DBG) {
                    if (DBG) {
                        log("handlPollStateResultMessage: GsmSST setDataRegState=" + dataRegState
                        log("handlPollStateResultMessage: GsmSST setDataRegState=" + dataRegState
@@ -1884,7 +1903,11 @@ public class ServiceStateTracker extends Handler {
                    }
                    }
                } else if (mPhone.isPhoneTypeCdma()) {
                } else if (mPhone.isPhoneTypeCdma()) {


                    mNewSS.setDataRoaming(regCodeIsRoaming(regState));
                    boolean isDataRoaming = regCodeIsRoaming(regState);
                    mNewSS.setDataRoaming(isDataRoaming);
                    // Save the data roaming state reported by modem registration before resource
                    // overlay or carrier config possibly overrides it.
                    mNewSS.setDataRoamingFromRegistration(isDataRoaming);


                    if (DBG) {
                    if (DBG) {
                        log("handlPollStateResultMessage: cdma setDataRegState=" + dataRegState
                        log("handlPollStateResultMessage: cdma setDataRegState=" + dataRegState
@@ -1909,11 +1932,15 @@ public class ServiceStateTracker extends Handler {
                    }
                    }


                    // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA
                    // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA
                    mNewSS.setDataRoaming(regCodeIsRoaming(regState));
                    boolean isDataRoaming = regCodeIsRoaming(regState);
                    mNewSS.setDataRoaming(isDataRoaming);
                    // Save the data roaming state reported by modem registration before resource
                    // overlay or carrier config possibly overrides it.
                    mNewSS.setDataRoamingFromRegistration(isDataRoaming);
                    if (DBG) {
                    if (DBG) {
                        log("handlPollStateResultMessage: CdmaLteSST setDataRegState=" + dataRegState
                        log("handlPollStateResultMessage: CdmaLteSST setDataRegState="
                                + " regState=" + regState
                                + dataRegState + " regState=" + regState + " dataRadioTechnology="
                                + " dataRadioTechnology=" + newDataRat);
                                + newDataRat);
                    }
                    }
                }
                }


@@ -2003,10 +2030,9 @@ public class ServiceStateTracker extends Handler {
     */
     */
    private boolean isRoamIndForHomeSystem(String roamInd) {
    private boolean isRoamIndForHomeSystem(String roamInd) {
        // retrieve the carrier-specified list of ERIs for home system
        // retrieve the carrier-specified list of ERIs for home system
        log("isRoamIndForHomeSystem: " + Resources.getSystem()
                .getConfiguration().toString());
        String[] homeRoamIndicators = Resources.getSystem()
        String[] homeRoamIndicators = Resources.getSystem()
                .getStringArray(com.android.internal.R.array.config_cdma_home_system);
                .getStringArray(com.android.internal.R.array.config_cdma_home_system);
        log("isRoamIndForHomeSystem: homeRoamIndicators=" + Arrays.toString(homeRoamIndicators));


        if (homeRoamIndicators != null) {
        if (homeRoamIndicators != null) {
            // searches through the comma-separated list for a match,
            // searches through the comma-separated list for a match,
@@ -2047,10 +2073,6 @@ public class ServiceStateTracker extends Handler {
             */
             */
            boolean roaming = (mGsmRoaming || mDataRoaming);
            boolean roaming = (mGsmRoaming || mDataRoaming);


            // Save the data roaming state reported by modem registration before resource overlay or
            // carrier config possibly overrides it.
            mNewSS.setDataRoamingFromRegistration(roaming);

            if (mGsmRoaming && !isOperatorConsideredRoaming(mNewSS)
            if (mGsmRoaming && !isOperatorConsideredRoaming(mNewSS)
                    && (isSameNamedOperators(mNewSS) || isOperatorConsideredNonRoaming(mNewSS))) {
                    && (isSameNamedOperators(mNewSS) || isOperatorConsideredNonRoaming(mNewSS))) {
                log("updateRoamingState: resource override set non roaming.isSameNamedOperators="
                log("updateRoamingState: resource override set non roaming.isSameNamedOperators="
@@ -2088,9 +2110,6 @@ public class ServiceStateTracker extends Handler {
            mNewSS.setVoiceRoaming(roaming);
            mNewSS.setVoiceRoaming(roaming);
            mNewSS.setDataRoaming(roaming);
            mNewSS.setDataRoaming(roaming);
        } else {
        } else {
            // Save the roaming state before carrier config possibly overrides it.
            mNewSS.setDataRoamingFromRegistration(mNewSS.getDataRoaming());

            CarrierConfigManager configLoader = (CarrierConfigManager)
            CarrierConfigManager configLoader = (CarrierConfigManager)
                    mPhone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
                    mPhone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
            if (configLoader != null) {
            if (configLoader != null) {
+10 −8
Original line number Original line Diff line number Diff line
@@ -3721,6 +3721,14 @@ public class DcTracker extends Handler {
                break;
                break;


            case DctConstants.EVENT_DATA_RAT_CHANGED:
            case DctConstants.EVENT_DATA_RAT_CHANGED:
                if (mPhone.getServiceState().getRilDataRadioTechnology()
                        == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                    // unknown rat is an exception for data rat change. It's only received when out
                    // of service and is not applicable for apn bearer bitmask. We should bypass the
                    // check of waiting apn list and keep the data connection on, and no need to
                    // setup a new one.
                    break;
                }
                cleanUpConnectionsOnUpdatedApns(false, Phone.REASON_NW_TYPE_CHANGED);
                cleanUpConnectionsOnUpdatedApns(false, Phone.REASON_NW_TYPE_CHANGED);
                //May new Network allow setupData, so try it here
                //May new Network allow setupData, so try it here
                setupDataOnConnectableApns(Phone.REASON_NW_TYPE_CHANGED,
                setupDataOnConnectableApns(Phone.REASON_NW_TYPE_CHANGED,
@@ -4345,17 +4353,11 @@ public class DcTracker extends Handler {
        if (mAllApnSettings != null && mAllApnSettings.isEmpty()) {
        if (mAllApnSettings != null && mAllApnSettings.isEmpty()) {
            cleanUpAllConnections(tearDown, Phone.REASON_APN_CHANGED);
            cleanUpAllConnections(tearDown, Phone.REASON_APN_CHANGED);
        } else {
        } else {
            int radioTech = mPhone.getServiceState().getRilDataRadioTechnology();
            if (radioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                // unknown rat is an exception for data rat change. Its only received when out of
                // service and is not applicable for apn bearer bitmask. We should bypass the check
                // of waiting apn list and keep the data connection on.
                return;
            }
            for (ApnContext apnContext : mApnContexts.values()) {
            for (ApnContext apnContext : mApnContexts.values()) {
                ArrayList<ApnSetting> currentWaitingApns = apnContext.getWaitingApns();
                ArrayList<ApnSetting> currentWaitingApns = apnContext.getWaitingApns();
                ArrayList<ApnSetting> waitingApns = buildWaitingApns(
                ArrayList<ApnSetting> waitingApns = buildWaitingApns(
                        apnContext.getApnType(), radioTech);
                        apnContext.getApnType(),
                        mPhone.getServiceState().getRilDataRadioTechnology());
                if (VDBG) log("new waitingApns:" + waitingApns);
                if (VDBG) log("new waitingApns:" + waitingApns);
                if ((currentWaitingApns != null)
                if ((currentWaitingApns != null)
                        && ((waitingApns.size() != currentWaitingApns.size())
                        && ((waitingApns.size() != currentWaitingApns.size())
+14 −4
Original line number Original line Diff line number Diff line
@@ -253,14 +253,24 @@ public class ImsPhone extends ImsPhoneBase {
    }
    }


    @Override
    @Override
    public ServiceState
    public ServiceState getServiceState() {
    getServiceState() {
        return mSS;
        return mSS;
    }
    }


    /* package */ void setServiceState(int state) {
    @VisibleForTesting
    public void setServiceState(int state) {
        boolean isVoiceRegStateChanged = false;
        synchronized (this) {
            isVoiceRegStateChanged = mSS.getVoiceRegState() != state;
            mSS.setVoiceRegState(state);
            mSS.setVoiceRegState(state);
        }
        updateDataServiceState();
        updateDataServiceState();

        // Notifies the service state to the listeners. The service state combined from ImsPhone
        // and GsmCdmaPhone, it may be changed when the service state in ImsPhone is changed.
        if (isVoiceRegStateChanged) {
            mNotifier.notifyServiceState(mDefaultPhone);
        }
    }
    }


    @Override
    @Override
Loading