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

Commit 88477aa9 authored by Ying Xu's avatar Ying Xu Committed by Automerger Merge Worker
Browse files

Merge "Use TelephonyManager#getSimOperatorName for Carrier WiFi" into sc-dev am: 78fed176

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13498284

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3bd952d00573ceffcd78d2e368e27be5a14096d9
parents d099af4e 78fed176
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -357,16 +357,8 @@ public class MobileSignalController extends SignalController<MobileState, Mobile
        return Utils.isInService(mServiceState);
    }

    String getNonDefaultCarrierName() {
        if (!mCurrentState.networkNameData.equals(mNetworkNameDefault)) {
            return mCurrentState.networkNameData;
        } else if (mSubscriptionInfo.getCarrierName() != null) {
            return mSubscriptionInfo.getCarrierName().toString();
        } else if (mSubscriptionInfo.getDisplayName() != null) {
            return mSubscriptionInfo.getDisplayName().toString();
        } else {
            return "";
        }
    String getNetworkNameForCarrierWiFi() {
        return mPhone.getSimOperatorName();
    }

    private boolean isRoaming() {
+2 −2
Original line number Diff line number Diff line
@@ -549,9 +549,9 @@ public class NetworkControllerImpl extends BroadcastReceiver
        return mConnectedTransports.get(NetworkCapabilities.TRANSPORT_ETHERNET);
    }

    String getNonDefaultMobileDataNetworkName(int subId) {
    String getNetworkNameForCarrierWiFi(int subId) {
        MobileSignalController controller = getControllerWithSubId(subId);
        return controller != null ? controller.getNonDefaultCarrierName() : "";
        return controller != null ? controller.getNetworkNameForCarrierWiFi() : "";
    }

    private void notifyControllersMobileDataChanged() {
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ public class WifiSignalController extends
        IconState qsIcon = new IconState(
                mCurrentState.connected, getQsCurrentIconIdForCarrierWifi(), contentDescription);
        CharSequence description =
                mNetworkController.getNonDefaultMobileDataNetworkName(mCurrentState.subId);
                mNetworkController.getNetworkNameForCarrierWiFi(mCurrentState.subId);
        callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
                mCurrentState.activityIn, mCurrentState.activityOut, dataContentDescription,
                dataContentDescriptionHtml, description, icons.isWide,