Merge "[Provider Model] Should show LTE instead of LTE+" into sc-qpr1-dev am: a546852117 am: 7cc7ded03a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15903066 Change-Id: I289b00083788836a719d040ff014a74a48597268
This commit is contained in:
@@ -215,10 +215,10 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
|||||||
mKeyguardStateController = keyguardStateController;
|
mKeyguardStateController = keyguardStateController;
|
||||||
mConnectionStateFilter = new IntentFilter();
|
mConnectionStateFilter = new IntentFilter();
|
||||||
mConnectionStateFilter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
|
mConnectionStateFilter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
|
||||||
|
mConnectionStateFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
|
||||||
mUiEventLogger = uiEventLogger;
|
mUiEventLogger = uiEventLogger;
|
||||||
mActivityStarter = starter;
|
mActivityStarter = starter;
|
||||||
mAccessPointController = accessPointController;
|
mAccessPointController = accessPointController;
|
||||||
mConfig = MobileMappings.Config.readConfig(mContext);
|
|
||||||
mWifiIconInjector = new WifiUtils.InternetIconInjector(mContext);
|
mWifiIconInjector = new WifiUtils.InternetIconInjector(mContext);
|
||||||
mConnectivityManagerNetworkCallback = new DataConnectivityListener();
|
mConnectivityManagerNetworkCallback = new DataConnectivityListener();
|
||||||
mWindowManager = windowManager;
|
mWindowManager = windowManager;
|
||||||
@@ -242,6 +242,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
|||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "Init, SubId: " + mDefaultDataSubId);
|
Log.d(TAG, "Init, SubId: " + mDefaultDataSubId);
|
||||||
}
|
}
|
||||||
|
mConfig = MobileMappings.Config.readConfig(mContext);
|
||||||
mTelephonyManager = mTelephonyManager.createForSubscriptionId(mDefaultDataSubId);
|
mTelephonyManager = mTelephonyManager.createForSubscriptionId(mDefaultDataSubId);
|
||||||
mInternetTelephonyCallback = new InternetTelephonyCallback();
|
mInternetTelephonyCallback = new InternetTelephonyCallback();
|
||||||
mTelephonyManager.registerTelephonyCallback(mExecutor, mInternetTelephonyCallback);
|
mTelephonyManager.registerTelephonyCallback(mExecutor, mInternetTelephonyCallback);
|
||||||
@@ -545,7 +546,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
|||||||
String getMobileNetworkSummary() {
|
String getMobileNetworkSummary() {
|
||||||
String description = getNetworkTypeDescription(mContext, mConfig,
|
String description = getNetworkTypeDescription(mContext, mConfig,
|
||||||
mTelephonyDisplayInfo, mDefaultDataSubId);
|
mTelephonyDisplayInfo, mDefaultDataSubId);
|
||||||
return getMobileSummary(mContext, mTelephonyManager, description);
|
return getMobileSummary(mContext, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -573,8 +574,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
|||||||
? SubscriptionManager.getResourcesForSubId(context, subId).getString(resId) : "";
|
? SubscriptionManager.getResourcesForSubId(context, subId).getString(resId) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMobileSummary(Context context, TelephonyManager telephonyManager,
|
private String getMobileSummary(Context context, String networkTypeDescription) {
|
||||||
String networkTypeDescription) {
|
|
||||||
if (!isMobileDataEnabled()) {
|
if (!isMobileDataEnabled()) {
|
||||||
return context.getString(R.string.mobile_data_off_summary);
|
return context.getString(R.string.mobile_data_off_summary);
|
||||||
}
|
}
|
||||||
@@ -953,10 +953,13 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
|||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
if (action.equals(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
|
if (TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED.equals(action)) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED");
|
Log.d(TAG, "ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED");
|
||||||
}
|
}
|
||||||
|
mConfig = MobileMappings.Config.readConfig(context);
|
||||||
|
updateListener();
|
||||||
|
} else if (WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION.equals(action)) {
|
||||||
updateListener();
|
updateListener();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user