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

Commit 0aa43e42 authored by Brad Ebinger's avatar Brad Ebinger Committed by Automerger Merge Worker
Browse files

Merge "Propogate NR technology through telephony layer" am: 3246b4f4 am: 9ad8aba4

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1700245

Change-Id: I7036d5312dabe59e0d0f7880120004509bbdaf19
parents 423bcb33 9ad8aba4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1279,8 +1279,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);
    }

@@ -1377,8 +1377,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()="
@@ -1487,7 +1487,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
@@ -4161,15 +4161,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