[Provider Model] Adjust slice title and subtitle

- Show "Airplane mode" title when airplane mode is enabled

- Remove "Airplane mode is on" subtitle

- Show "Wi-Fi is turned on" subtitle when both airplane mode and Wi-Fi
is enabled

- Remove the function related to isApmNetworksAvailable()

- Screenshot:
  https://screenshot.googleplex.com/6X9nzmXRCUfw4Lp
  https://screenshot.googleplex.com/6jQryMjU2yDDpmM

Bug: 181858434
Test: manual test
atest -c InternetConnectivityPanelTest \
         InternetPreferenceControllerTest \
         InternetUpdaterTest

Change-Id: I84e5d4c60ed91d58443b27c35286a84bf72ac173
This commit is contained in:
Weng Su
2021-03-10 22:28:26 +08:00
parent 38e19abdf7
commit 6a0ef56917
5 changed files with 118 additions and 102 deletions

View File

@@ -124,12 +124,6 @@ public class InternetPreferenceController extends AbstractPreferenceController i
return;
}
if (mInternetType == INTERNET_NETWORKS_AVAILABLE
&& mInternetUpdater.isApmNetworksAvailable()) {
mPreference.setSummary(R.string.airplane_mode_network_available);
return;
}
final @IdRes int summary = sSummaryMap.get(mInternetType);
if (summary != 0) {
mPreference.setSummary(summary);