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

Commit a8dcdd63 authored by Libin.Tang@motorola.com's avatar Libin.Tang@motorola.com Committed by Ravi Paluri
Browse files

IMS:make volte call based on volte run time capability.

Bug: 17182366
Change-Id: I763d2061c8e7eee188dfd40a5582ecd3ab1dd967
parent 64867a78
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ public class CDMAPhone extends PhoneBase {
            Rlog.w(LOG_TAG, "IMS is disabled: forced to CS");
        }

        if (imsUseEnabled && imsPhone != null
        if (imsUseEnabled && imsPhone != null && imsPhone.isVolteEnabled()
                && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE
                && !PhoneNumberUtils.isEmergencyNumber(dialString))
                || (PhoneNumberUtils.isEmergencyNumber(dialString)
@@ -439,7 +439,8 @@ public class CDMAPhone extends PhoneBase {
                if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                return imsPhone.dial(dialString, videoState, extras);
            } catch (CallStateException e) {
                if (DBG) Rlog.d(LOG_TAG, "IMS PS call exception " + e);
                if (DBG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
                        "imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
                if (!ImsPhone.CS_FALLBACK.equals(e.getMessage())) {
                    CallStateException ce = new CallStateException(e.getMessage());
                    ce.setStackTrace(e.getStackTrace());
+3 −2
Original line number Diff line number Diff line
@@ -890,7 +890,7 @@ public class GSMPhone extends PhoneBase {
            Rlog.w(LOG_TAG, "IMS is disabled: forced to CS");
        }

        if (imsUseEnabled && imsPhone != null
        if (imsUseEnabled && imsPhone != null && imsPhone.isVolteEnabled()
                && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE
                && !PhoneNumberUtils.isEmergencyNumber(dialString))
                || (PhoneNumberUtils.isEmergencyNumber(dialString)
@@ -900,7 +900,8 @@ public class GSMPhone extends PhoneBase {
                if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                return imsPhone.dial(dialString, videoState, extras);
            } catch (CallStateException e) {
                if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "IMS PS call exception " + e);
                if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
                        "imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
                if (!ImsPhone.CS_FALLBACK.equals(e.getMessage())) {
                    CallStateException ce = new CallStateException(e.getMessage());
                    ce.setStackTrace(e.getStackTrace());