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

Commit 6285d8c4 authored by Sooraj Sasindran's avatar Sooraj Sasindran
Browse files

Introduce IMS Cross SIM registration

Introduce IMS Cross SIM registration

Bug: 171391883
Test: Build

Change-Id: Ia3e6ba681e1a13673498e3ccec5176a38104783b
parent 5ff97366
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
import static android.telephony.TelephonyManager.SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION;
import static android.telephony.TelephonyManager.SET_OPPORTUNISTIC_SUB_SUCCESS;
import static android.telephony.TelephonyManager.SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED;
import static android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM;
import static android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN;

import static java.util.Arrays.copyOf;
@@ -356,7 +357,8 @@ public class PhoneSwitcher extends Handler {

        int imsRegTech = mImsRegTechProvider.get(mContext, phoneId);
        // If IMS is registered on IWLAN or cross SIM, return false.
        boolean isOnOriginalNetwork = imsRegTech != REGISTRATION_TECH_IWLAN;
        boolean isOnOriginalNetwork = imsRegTech != REGISTRATION_TECH_IWLAN
                || imsRegTech != REGISTRATION_TECH_CROSS_SIM;
        if (!isOnOriginalNetwork) {
            log("IMS call on IWLAN or cross SIM. Call will be ignored for DDS switch");
        }
+2 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ public class MmTelFeatureCompatAdapter extends MmTelFeature {
                TelephonyManager.NETWORK_TYPE_LTE);
        REG_TECH_TO_NET_TYPE.put(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN,
                TelephonyManager.NETWORK_TYPE_IWLAN);
        REG_TECH_TO_NET_TYPE.put(ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM,
                TelephonyManager.NETWORK_TYPE_IWLAN);
    }

    // Feature Type for compatibility with old "feature" updates
+4 −1
Original line number Diff line number Diff line
@@ -4412,7 +4412,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {

    public boolean isVowifiEnabled() {
        return isImsCapabilityInCacheAvailable(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE,
                ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN);
                ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN)
                || isImsCapabilityInCacheAvailable(
                        MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE,
                        ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM);
    }

    public boolean isVideoCallEnabled() {
+8 −0
Original line number Diff line number Diff line
@@ -1405,6 +1405,14 @@ public class ImsPhoneConnection extends Connection implements
        return mIsEmergency;
    }

    /**
     * Indicates whether current phone connection is cross sim calling or not
     * @return boolean: true if cross sim calling, false otherwise
     */
    public boolean isCrossSimCall() {
        return mImsCall != null && mImsCall.isCrossSimCall();
    }

    /**
     * Handles notifications from the {@link ImsVideoCallProviderWrapper} of session modification
     * responses received.
+2 −0
Original line number Diff line number Diff line
@@ -248,6 +248,8 @@ public class ImsFeatureTest {
        // add some capabilities
        request.addCapabilitiesToEnableForTech(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE,
                ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN);
        request.addCapabilitiesToEnableForTech(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE,
                ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM);
        request.addCapabilitiesToEnableForTech(
                MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VIDEO
                        | MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE,