Use TelephonyManager#getSimOperatorName for Carrier WiFi
Bug: 179092121 Test: Manual Test Change-Id: I3f58bd446afefd860bc8b28bcccb9a5c28958ba0
This commit is contained in:
@@ -343,16 +343,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() {
|
||||
|
||||
@@ -528,9 +528,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() {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user