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

Commit 4c5c285d authored by Ling Ma's avatar Ling Ma Committed by Android (Google) Code Review
Browse files

Merge "Verify ims registered before showing WFC at title bar" into tm-qpr-dev

parents fc0790c6 513a2ab7
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2845,6 +2845,7 @@ public class ServiceStateTracker extends Handler {
        String wfcFlightSpnFormat = null;
        String wfcFlightSpnFormat = null;
        int combinedRegState = getCombinedRegState(mSS);
        int combinedRegState = getCombinedRegState(mSS);
        if (mPhone.getImsPhone() != null && mPhone.getImsPhone().isWifiCallingEnabled()
        if (mPhone.getImsPhone() != null && mPhone.getImsPhone().isWifiCallingEnabled()
                && mPhone.isImsRegistered()
                && (combinedRegState == ServiceState.STATE_IN_SERVICE
                && (combinedRegState == ServiceState.STATE_IN_SERVICE
                && mSS.getDataNetworkType() == TelephonyManager.NETWORK_TYPE_IWLAN)) {
                && mSS.getDataNetworkType() == TelephonyManager.NETWORK_TYPE_IWLAN)) {
            // In Wi-Fi Calling mode (connected to WiFi and WFC enabled),
            // In Wi-Fi Calling mode (connected to WiFi and WFC enabled),
+1 −1
Original line number Original line Diff line number Diff line
@@ -482,7 +482,7 @@ public class CarrierDisplayNameResolver {
            }
            }
        } else if (mPhone.getServiceStateTracker().getCombinedRegState(getServiceState())
        } else if (mPhone.getServiceStateTracker().getCombinedRegState(getServiceState())
                == ServiceState.STATE_IN_SERVICE) {
                == ServiceState.STATE_IN_SERVICE) {
            if (mPhone.isWifiCallingEnabled()) {
            if (mPhone.isWifiCallingEnabled() && mPhone.isImsRegistered()) {
                data = getCarrierDisplayNameFromWifiCallingOverride(data);
                data = getCarrierDisplayNameFromWifiCallingOverride(data);
                if (DBG) {
                if (DBG) {
                    Rlog.d(TAG, "CarrierName override by wifi-calling " + data);
                    Rlog.d(TAG, "CarrierName override by wifi-calling " + data);
+2 −0
Original line number Original line Diff line number Diff line
@@ -2758,6 +2758,7 @@ public class ServiceStateTrackerTest extends TelephonyTest {


        // wifi-calling is enabled
        // wifi-calling is enabled
        doReturn(true).when(mPhone).isWifiCallingEnabled();
        doReturn(true).when(mPhone).isWifiCallingEnabled();
        doReturn(true).when(mPhone).isImsRegistered();


        // update the spn
        // update the spn
        sst.updateSpnDisplay();
        sst.updateSpnDisplay();
@@ -2790,6 +2791,7 @@ public class ServiceStateTrackerTest extends TelephonyTest {


        // wifi-calling is enabled
        // wifi-calling is enabled
        doReturn(true).when(mPhone).isWifiCallingEnabled();
        doReturn(true).when(mPhone).isWifiCallingEnabled();
        doReturn(true).when(mPhone).isImsRegistered();


        // update the spn
        // update the spn
        sst.updateSpnDisplay();
        sst.updateSpnDisplay();