Merge changes I79b4c3d4,Icc8a7793

* changes:
  [Provider mode] Carrier item display network type on slice.
  The provider model slice carrier toggle is broke.
This commit is contained in:
SongFerng Wang
2021-01-19 05:55:17 +00:00
committed by Android (Google) Code Review
6 changed files with 135 additions and 62 deletions

View File

@@ -115,7 +115,10 @@ public class ProviderModelSlice extends WifiSlice {
// Second section: Add a carrier item.
if (hasCarrier) {
listBuilder.addRow(mHelper.createCarrierRow());
mHelper.updateTelephony();
listBuilder.addRow(
mHelper.createCarrierRow(
worker != null ? worker.getNetworkTypeDescription() : ""));
maxListSize--;
}
@@ -141,7 +144,7 @@ public class ProviderModelSlice extends WifiSlice {
if (worker == null || wifiList == null) {
log("wifiList is null");
int resId = R.string.non_carrier_network_unavailable;
if (!hasCarrier || mHelper.isNoCarrierData()) {
if (!hasCarrier || !mHelper.isDataSimActive()) {
log("No carrier item or no carrier data.");
resId = R.string.all_network_unavailable;
}