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

Commit 75733e1a authored by Daniel Bright's avatar Daniel Bright Committed by Gerrit Code Review
Browse files

Merge "Create method to query capability status directly on ImsServices"

parents a97f3c3f fd51fc07
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -2122,6 +2122,26 @@ public class ImsManager implements IFeatureConnector {
        return false;
    }

    public boolean queryMmTelCapabilityStatus(
            @MmTelFeature.MmTelCapabilities.MmTelCapability int capability,
            @ImsRegistrationImplBase.ImsRegistrationTech int radioTech) throws ImsException {
        checkAndThrowExceptionIfServiceUnavailable();

        if (getRegistrationTech() != radioTech)
            return false;

        try {

            MmTelFeature.MmTelCapabilities capabilities =
                    mMmTelFeatureConnection.queryCapabilityStatus();

            return capabilities.isCapable(capability);
        } catch (RemoteException e) {
            throw new ImsException("queryMmTelCapabilityStatus()", e,
                    ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN);
        }
    }

    public void setRttEnabled(boolean enabled) {
        try {
            if (enabled) {