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

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

Adding hidden isVolteEnabled and isWifiCallingEnabled APIs

for TelephonyManager

Change-Id: I76b4f0e34af1b1e739a803738723300b6acdae72
parent c6ce3e54
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1979,4 +1979,16 @@ public interface Phone {
     * @return true if IMS is Registered
     */
    public boolean isImsRegistered();

    /**
     * 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
@@ -1512,6 +1512,14 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.isImsRegistered();
    }

    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);