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

Commit 81dd2f76 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Propogate NR technology through telephony layer

1) Consolodate IMS over LTE logic to IMS over WWAN.
2) Introduce logic for determining if calling is
available when NR technology is set.

Bug: 179724463
Test: atest TeleServiceTests
Change-Id: I8be1d52c7f26911a32db38e3556b07db997712ab
parent 26bf812f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1282,8 +1282,8 @@ public class GsmCdmaPhone extends Phone {
    private boolean useImsForCall(DialArgs dialArgs) {
        return isImsUseEnabled()
                && mImsPhone != null
                && (mImsPhone.isVolteEnabled() || mImsPhone.isWifiCallingEnabled() ||
                (mImsPhone.isVideoEnabled() && VideoProfile.isVideo(dialArgs.videoState)))
                && (mImsPhone.isVoiceOverCellularImsEnabled() || mImsPhone.isWifiCallingEnabled()
                || (mImsPhone.isVideoEnabled() && VideoProfile.isVideo(dialArgs.videoState)))
                && (mImsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE);
    }

@@ -1380,8 +1380,8 @@ public class GsmCdmaPhone extends Phone {
                    + ", isWpsCall=" + isWpsCall
                    + ", allowWpsOverIms=" + allowWpsOverIms
                    + ", imsPhone=" + imsPhone
                    + ", imsPhone.isVolteEnabled()="
                    + ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A")
                    + ", imsPhone.isVoiceOverCellularImsEnabled()="
                    + ((imsPhone != null) ? imsPhone.isVoiceOverCellularImsEnabled() : "N/A")
                    + ", imsPhone.isVowifiEnabled()="
                    + ((imsPhone != null) ? imsPhone.isWifiCallingEnabled() : "N/A")
                    + ", imsPhone.isVideoEnabled()="
@@ -1490,7 +1490,7 @@ public class GsmCdmaPhone extends Phone {
                        isImsUseEnabled()
                        && imsPhone != null
                        // VoLTE not available
                        && !imsPhone.isVolteEnabled()
                        && !imsPhone.isVoiceOverCellularImsEnabled()
                        // WFC is available
                        && imsPhone.isWifiCallingEnabled()
                        && !isEmergency
+11 −2
Original line number Diff line number Diff line
@@ -4176,15 +4176,24 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {

    /**
     * Get Volte Feature Availability
     * @deprecated Use {@link #isVoiceOverCellularImsEnabled} instead.
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @Deprecated
    public boolean isVolteEnabled() {
        return isVoiceOverCellularImsEnabled();
    }

    /**
     * @return {@code true} if voice over IMS on cellular is enabled, {@code false} otherwise.
     */
    public boolean isVoiceOverCellularImsEnabled() {
        Phone imsPhone = mImsPhone;
        boolean isVolteEnabled = false;
        if (imsPhone != null) {
            isVolteEnabled = imsPhone.isVolteEnabled();
            isVolteEnabled = imsPhone.isVoiceOverCellularImsEnabled();
        }
        Rlog.d(LOG_TAG, "isVolteEnabled=" + isVolteEnabled);
        Rlog.d(LOG_TAG, "isVoiceOverCellularImsEnabled=" + isVolteEnabled);
        return isVolteEnabled;
    }

+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.telephony.ims;

import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_LTE;
import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_NR;

import android.net.Uri;
import android.os.RemoteException;
@@ -34,6 +35,7 @@ public class ImsRegistrationCompatAdapter extends ImsRegistrationImplBase {
    // Maps "RAT" based radio technologies to ImsRegistrationImplBase definitions.
    private static final Map<Integer, Integer> RADIO_TECH_MAPPER = new ArrayMap<>(2);
    static {
        RADIO_TECH_MAPPER.put(RIL_RADIO_TECHNOLOGY_NR, REGISTRATION_TECH_NR);
        RADIO_TECH_MAPPER.put(RIL_RADIO_TECHNOLOGY_LTE, REGISTRATION_TECH_LTE);
        RADIO_TECH_MAPPER.put(RIL_RADIO_TECHNOLOGY_IWLAN, REGISTRATION_TECH_IWLAN);
    }
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ public class MmTelFeatureCompatAdapter extends MmTelFeature {
    private static final Map<Integer, Integer> REG_TECH_TO_NET_TYPE = new HashMap<>(2);

    static {
        REG_TECH_TO_NET_TYPE.put(ImsRegistrationImplBase.REGISTRATION_TECH_NR,
                TelephonyManager.NETWORK_TYPE_NR);
        REG_TECH_TO_NET_TYPE.put(ImsRegistrationImplBase.REGISTRATION_TECH_LTE,
                TelephonyManager.NETWORK_TYPE_LTE);
        REG_TECH_TO_NET_TYPE.put(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN,
+6 −1
Original line number Diff line number Diff line
@@ -2065,7 +2065,12 @@ public class ImsPhone extends ImsPhoneBase {
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @Override
    public boolean isVolteEnabled() {
        return mCT.isVolteEnabled();
        return isVoiceOverCellularImsEnabled();
    }

    @Override
    public boolean isVoiceOverCellularImsEnabled() {
        return mCT.isVoiceOverCellularImsEnabled();
    }

    @Override
Loading