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

Commit be331213 authored by allenwtsu's avatar allenwtsu
Browse files

[RCS] Add isEabProvisioned() and setEabProvisioned()

Bug: 147122370
Test: build pass
Change-Id: Idfb021e47bd9ca331094b703a5d60c4b55f4b15c
parent 7e17cda0
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -543,6 +543,18 @@ public class ImsManager implements IFeatureConnector {
        return true;
    }

    /**
     * Indicates whether EAB is provisioned on this slot.
     */
    public boolean isEabProvisionedOnDevice() {
        if (getBooleanCarrierConfig(
                CarrierConfigManager.KEY_CARRIER_RCS_PROVISIONING_REQUIRED_BOOL)) {
            return isEabProvisioned();
        }

        return true;
    }

    /**
     * Indicates whether VoWifi is provisioned on device.
     *
@@ -2619,6 +2631,13 @@ public class ImsManager implements IFeatureConnector {
                provisionStatus);
    }

    public void setEabProvisioned(boolean isProvisioned) {
        int provisionStatus = isProvisioned ? ProvisioningManager.PROVISIONING_VALUE_ENABLED :
                ProvisioningManager.PROVISIONING_VALUE_DISABLED;
        setProvisionedBoolNoException(ImsConfig.ConfigConstants.EAB_SETTING_ENABLED,
                provisionStatus);
    }

    private boolean isDataEnabled() {
        return new TelephonyManager(mContext, getSubId()).isDataCapable();
    }
@@ -2628,6 +2647,11 @@ public class ImsManager implements IFeatureConnector {
                ImsConfig.ConfigConstants.VLT_SETTING_ENABLED);
    }

    private boolean isEabProvisioned() {
        return getProvisionedBoolNoException(
                ImsConfig.ConfigConstants.EAB_SETTING_ENABLED);
    }

    private boolean isWfcProvisioned() {
        return getProvisionedBoolNoException(
                ImsConfig.ConfigConstants.VOICE_OVER_WIFI_SETTING_ENABLED);