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

Commit dee62e55 authored by Nathan Harold's avatar Nathan Harold
Browse files

Adding hidden isVolteEnabled and isWifiCallingEnabled APIs

for TelephonyManager

Change-Id: I76b4f0e34af1b1e739a803738723300b6acdae72
parent b1897e09
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1993,4 +1993,16 @@ public interface Phone {
     * emergency operator.
     */
    public boolean isInEcm();

    /**
     * Returns the Status of Wi-Fi Calling
     *@hide
     */
    public boolean isWifiCallingEnabled();

     /**
     * Returns the Status of Volte
     *@hide
     */
    public boolean isVolteEnabled();
}
+28 −0
Original line number Diff line number Diff line
@@ -2086,6 +2086,34 @@ public abstract class PhoneBase extends Handler implements Phone {
        return isImsRegistered;
    }

    /**
     * Get Wifi Calling Feature Availability
     */
    @Override
    public boolean isWifiCallingEnabled() {
        ImsPhone imsPhone = mImsPhone;
        boolean isWifiCallingEnabled = false;
        if (imsPhone != null) {
            isWifiCallingEnabled = imsPhone.isVowifiEnabled();
        }
        Rlog.d(LOG_TAG, "isWifiCallingEnabled =" + isWifiCallingEnabled);
        return isWifiCallingEnabled;
    }

    /**
     * Get Volte Feature Availability
     */
    @Override
    public boolean isVolteEnabled() {
        ImsPhone imsPhone = mImsPhone;
        boolean isVolteEnabled = false;
        if (imsPhone != null) {
            isVolteEnabled = imsPhone.isVolteEnabled();
        }
        Rlog.d(LOG_TAG, "isImsRegistered =" + isVolteEnabled);
        return isVolteEnabled;
    }

    private boolean getRoamingOverrideHelper(String prefix, String key) {
        String iccId = getIccSerialNumber();
        if (TextUtils.isEmpty(iccId) || TextUtils.isEmpty(key)) {
+8 −0
Original line number Diff line number Diff line
@@ -1532,6 +1532,14 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.isInEcm();
    }

    public boolean isVolteEnabled() {
        return mActivePhone.isVolteEnabled();
    }

    public boolean isWifiCallingEnabled() {
        return mActivePhone.isWifiCallingEnabled();
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        try {
            ((PhoneBase)mActivePhone).dump(fd, pw, args);