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

Commit e28bf187 authored by Etan Cohen's avatar Etan Cohen Committed by Android Git Automerger
Browse files

am afe1d9ac: Merge "Allow normal voice calls on CS phone only when in service." into mnc-dev

* commit 'afe1d9ac':
  Allow normal voice calls on CS phone only when in service.
parents 0a16523f afe1d9ac
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -427,6 +427,7 @@ public class CDMAPhone extends PhoneBase {
            throw new CallStateException("Sending UUS information NOT supported in CDMA!");
        }

        boolean isEmergency = PhoneNumberUtils.isEmergencyNumber(dialString);
        ImsPhone imsPhone = mImsPhone;

        boolean imsUseEnabled = isImsUseEnabled()
@@ -435,7 +436,7 @@ public class CDMAPhone extends PhoneBase {
                 && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE);

        boolean useImsForEmergency = imsPhone != null
                && PhoneNumberUtils.isEmergencyNumber(dialString)
                && isEmergency
                &&  mContext.getResources().getBoolean(
                        com.android.internal.R.bool.useImsAlwaysForEmergencyCall)
                && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext)
@@ -470,6 +471,10 @@ public class CDMAPhone extends PhoneBase {
            }
        }

        if ((mSST != null) && (mSST.mSS.getState() == ServiceState.STATE_OUT_OF_SERVICE)
                && !isEmergency) {
            throw new CallStateException("cannot dial in current state");
        }
        if (DBG) Rlog.d(LOG_TAG, "Trying (non-IMS) CS call");
        return dialInternal(dialString, null, videoState, intentExtras);
    }
+6 −1
Original line number Diff line number Diff line
@@ -802,6 +802,7 @@ public class GSMPhone extends PhoneBase {
    public Connection
    dial (String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
        boolean isEmergency = PhoneNumberUtils.isEmergencyNumber(dialString);
        ImsPhone imsPhone = mImsPhone;

        boolean imsUseEnabled = isImsUseEnabled()
@@ -810,7 +811,7 @@ public class GSMPhone extends PhoneBase {
                 && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE);

        boolean useImsForEmergency = imsPhone != null
                && PhoneNumberUtils.isEmergencyNumber(dialString)
                && isEmergency
                &&  mContext.getResources().getBoolean(
                        com.android.internal.R.bool.useImsAlwaysForEmergencyCall)
                && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext)
@@ -845,6 +846,10 @@ public class GSMPhone extends PhoneBase {
            }
        }

        if ((mSST != null) && (mSST.mSS.getState() == ServiceState.STATE_OUT_OF_SERVICE)
                && !isEmergency) {
            throw new CallStateException("cannot dial in current state");
        }
        if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying (non-IMS) CS call");
        return dialInternal(dialString, null, VideoProfile.STATE_AUDIO_ONLY, intentExtras);
    }