Merge "[Provider model] Revise the Internet Panel title sub-text" into sc-dev

This commit is contained in:
Weng Su
2021-05-21 08:14:07 +00:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 12 deletions

View File

@@ -13143,8 +13143,8 @@
<string name="to_switch_networks_disconnect_ethernet">To switch networks, disconnect ethernet</string>
<!-- Panel subtitle for Wi-Fi turned on. [CHAR LIMIT=60] -->
<string name="wifi_is_turned_on_subtitle">Wi\u2011Fi is turned on</string>
<!-- Panel subtitle for select the network you want to use for data. [CHAR LIMIT=60] -->
<string name="select_network_to_connect_internet">Select the network you want to use for data</string>
<!-- Panel subtitle for tapping a network to connect to internet. [CHAR LIMIT=60] -->
<string name="tap_a_network_to_connect">Tap a network to connect</string>
<!-- Title for merged carrier Wi-Fi offload toggle. [CHAR LIMIT=NONE] -->
<string name="carrier_wifi_offload_title">W+ connections</string>
<!-- Summary for merged carrier Wi-Fi offload toggle. [CHAR LIMIT=NONE] -->

View File

@@ -65,8 +65,8 @@ public class InternetConnectivityPanel implements PanelContent, LifecycleObserve
private static final String TAG = "InternetConnectivityPanel";
private static final int SUBTITLE_TEXT_NONE = -1;
private static final int SUBTITLE_TEXT_WIFI_IS_TURNED_ON = R.string.wifi_is_turned_on_subtitle;
private static final int SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET =
R.string.select_network_to_connect_internet;
private static final int SUBTITLE_TEXT_TAP_A_NETWORK_TO_CONNECT =
R.string.tap_a_network_to_connect;
private static final int SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS =
R.string.wifi_empty_list_wifi_on;
private static final int SUBTITLE_TEXT_NON_CARRIER_NETWORK_UNAVAILABLE =
@@ -326,7 +326,7 @@ public class InternetConnectivityPanel implements PanelContent, LifecycleObserve
if (wifiList != null && wifiList.size() != 0) {
// When the Wi-Fi scan result is not empty
// Sub-Title: Select the network you want to use for data
mSubtitle = SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET;
mSubtitle = SUBTITLE_TEXT_TAP_A_NETWORK_TO_CONNECT;
return;
}

View File

@@ -63,10 +63,9 @@ public class InternetConnectivityPanelTest {
ApplicationProvider.getApplicationContext(), "airplane_mode");
public static final String SUBTITLE_WIFI_IS_TURNED_ON = ResourcesUtils.getResourcesString(
ApplicationProvider.getApplicationContext(), "wifi_is_turned_on_subtitle");
public static final String SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET =
ResourcesUtils.getResourcesString(
ApplicationProvider.getApplicationContext(),
"select_network_to_connect_internet");
public static final String SUBTITLE_TEXT_TAP_A_NETWORK_TO_CONNECT =
ResourcesUtils.getResourcesString(ApplicationProvider.getApplicationContext(),
"tap_a_network_to_connect");
public static final String BUTTON_SETTINGS = ResourcesUtils.getResourcesString(
ApplicationProvider.getApplicationContext(), "settings_button");
public static final String SUBTITLE_NON_CARRIER_NETWORK_UNAVAILABLE =
@@ -179,7 +178,7 @@ public class InternetConnectivityPanelTest {
}
@Test
public void getSubTitle_apmOffWifiOnTwoWifiItemsNoCarrierData_selectNetworkToConnectInternet() {
public void getSubTitle_apmOffWifiOnTwoWifiItemsNoCarrierData_tapANetworkToConnect() {
List wifiList = new ArrayList<ScanResult>();
wifiList.add(new ScanResult());
wifiList.add(new ScanResult());
@@ -187,8 +186,7 @@ public class InternetConnectivityPanelTest {
mPanel.updatePanelTitle();
assertThat(mPanel.getSubTitle())
.isEqualTo(SUBTITLE_TEXT_SELECT_NETWORK_TO_CONNECT_INTERNET);
assertThat(mPanel.getSubTitle()).isEqualTo(SUBTITLE_TEXT_TAP_A_NETWORK_TO_CONNECT);
}
@Test