Merge "Use TelephonyManager#getSimOperatorName for Carrier WiFi" into sc-dev
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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