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

Commit efe1935e authored by Allen Su's avatar Allen Su Committed by Gerrit Code Review
Browse files

Merge "[RCS] Add isEabProvisioned() and setEabProvisioned()"

parents 018f3853 be331213
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -544,6 +544,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.
     *
@@ -2620,6 +2632,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();
    }
@@ -2629,6 +2648,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);