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

Commit 5bf6757a authored by Libin.Tang@motorola.com's avatar Libin.Tang@motorola.com Committed by Etan Cohen
Browse files

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

Bug: 17182366
Change-Id: I763d2061c8e7eee188dfd40a5582ecd3ab1dd967
parent 86e3a844
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -418,7 +418,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)
@@ -428,7 +428,8 @@ public class CDMAPhone extends PhoneBase {
                if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                return imsPhone.dial(dialString, videoState);
            } 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
@@ -792,7 +792,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)
@@ -802,7 +802,8 @@ public class GSMPhone extends PhoneBase {
                if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                return imsPhone.dial(dialString, videoState);
            } 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());