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

Commit 3dead61a authored by Prerepa Viswanadham's avatar Prerepa Viswanadham
Browse files

Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge2

parents 00647e7f dea7f560
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);
+2 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ public abstract class ServiceStateTracker extends Handler {
    protected static final int EVENT_CHANGE_IMS_STATE                  = 45;
    protected static final int EVENT_IMS_STATE_CHANGED                 = 46;
    protected static final int EVENT_IMS_STATE_DONE                    = 47;
    protected static final int EVENT_IMS_CAPABILITY_CHANGED            = 48;

    protected static final String TIMEZONE_PROPERTY = "persist.sys.timezone";

@@ -638,6 +639,7 @@ public abstract class ServiceStateTracker extends Handler {
    public abstract boolean isConcurrentVoiceAndDataAllowed();

    public abstract void setImsRegistrationState(boolean registered);
    public void onImsCapabilityChanged() {}
    public abstract void pollState();

    /**
+21 −2
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import android.telephony.SubscriptionManager;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.dataconnection.DcTrackerBase;
import com.android.internal.telephony.imsphone.ImsPhone;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.SIMRecords;
@@ -504,6 +505,11 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
                setPowerStateToDesired();
                break;

            case EVENT_IMS_CAPABILITY_CHANGED:
                if (DBG) log("EVENT_IMS_CAPABILITY_CHANGED");
                updateSpnDisplay();
                break;

            default:
                super.handleMessage(msg);
            break;
@@ -634,9 +640,18 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
                && ((rule & SIMRecords.SPN_RULE_SHOW_SPN)
                        == SIMRecords.SPN_RULE_SHOW_SPN);

        // airplane mode or spn equals plmn, do not show spn
        if (mSS.getVoiceRegState() == ServiceState.STATE_POWER_OFF
        if (!TextUtils.isEmpty(spn)
                && mPhone.getImsPhone() != null
                && ((ImsPhone) mPhone.getImsPhone()).isVowifiEnabled()) {
            // In Wi-Fi Calling mode show SPN+WiFi
            String format = mPhone.getContext().getText(
                    com.android.internal.R.string.wfcSpnFormat).toString();
            showPlmn = false;
            showSpn = true;
            spn = String.format(format, spn.trim());
        } else if (mSS.getVoiceRegState() == ServiceState.STATE_POWER_OFF
                || (showPlmn && TextUtils.equals(spn, plmn))) {
            // airplane mode or spn equals plmn, do not show spn
            spn = null;
            showSpn = false;
        }
@@ -2156,6 +2171,10 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        mImsRegistrationOnOff = registered;
    }

    public void onImsCapabilityChanged() {
        sendMessage(obtainMessage(EVENT_IMS_CAPABILITY_CHANGED));
    }

    public void onSetPhoneRCDone(ArrayList<RadioAccessFamily> phoneRcs) {
        int INVALID = -1;
        int size = 0;
Loading