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

Commit f60ab49b authored by Etan Cohen's avatar Etan Cohen Committed by Android (Google) Code Review
Browse files

Merge "Update GSM/CDMA getState API to consider state of the IMS phone as well." into lmp-mr1-dev

parents af622cae 4f5f5e2a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -294,6 +294,13 @@ public class CDMAPhone extends PhoneBase {

    @Override
    public PhoneConstants.State getState() {
        if (mImsPhone != null) {
            PhoneConstants.State imsState = mImsPhone.getState();
            if (imsState != PhoneConstants.State.IDLE) {
                return imsState;
            }
        }

        return mCT.mState;
    }

+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ public class CdmaSMSDispatcher extends SMSDispatcher {
                    && !mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()))
                    && mPhone.getServiceState().getVoiceNetworkType()
                    == TelephonyManager.NETWORK_TYPE_1xRTT
                    && mPhone.getState() != PhoneConstants.State.IDLE;
                    && ((CDMAPhone) mPhone).mCT.mState != PhoneConstants.State.IDLE;

        // sms over cdma is used:
        //   if sms over IMS is not supported AND
+7 −0
Original line number Diff line number Diff line
@@ -287,6 +287,13 @@ public class GSMPhone extends PhoneBase {

    @Override
    public PhoneConstants.State getState() {
        if (mImsPhone != null) {
            PhoneConstants.State imsState = mImsPhone.getState();
            if (imsState != PhoneConstants.State.IDLE) {
                return imsState;
            }
        }

        return mCT.mState;
    }