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

Commit 7363f985 authored by Daniel Bright's avatar Daniel Bright Committed by Android (Google) Code Review
Browse files

Merge "Create method to query capability status directly on ImsServices" into rvc-dev

parents 504aee4e d27e4435
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -2128,6 +2128,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) {