[Provider Model] Internet Panel UI update
- Add gear icon to connected non-carrier network - Update "View airplane mode networks" wording - Update "Turn off airplane mode" wording - Check WiFi disable to show airplane mode message - Screenshot https://screenshot.googleplex.com/BRjcKyMaMS4ujYN Bug: 173413889 Test: - Manual Test - adb shell am start -a android.settings.panel.action.INTERNET_CONNECTIVITY Change-Id: Icf7b77e514cffa68cf103dbc9e7df93d58f9f762
This commit is contained in:
@@ -12523,9 +12523,9 @@
|
|||||||
<!-- Search keywords for "Internet" settings [CHAR_LIMIT=NONE] -->
|
<!-- Search keywords for "Internet" settings [CHAR_LIMIT=NONE] -->
|
||||||
<string name="keywords_internet">network connection, internet, wireless, data, wifi, wi-fi, wi fi, cellular, mobile, cell carrier, 4g, 3g, 2g, lte</string>
|
<string name="keywords_internet">network connection, internet, wireless, data, wifi, wi-fi, wi fi, cellular, mobile, cell carrier, 4g, 3g, 2g, lte</string>
|
||||||
<!-- Label text to view airplane-safe networks. [CHAR LIMIT=40] -->
|
<!-- Label text to view airplane-safe networks. [CHAR LIMIT=40] -->
|
||||||
<string name="view_airplane_safe_networks">View airplane-safe networks</string>
|
<string name="view_airplane_safe_networks">View airplane mode networks</string>
|
||||||
<!-- Label text to turn off airplane mode. [CHAR LIMIT=40] -->
|
<!-- Label text to turn off airplane mode. [CHAR LIMIT=40] -->
|
||||||
<string name="turn_off_airplane_mode">Turn off Airplane Mode</string>
|
<string name="turn_off_airplane_mode">Turn off airplane mode</string>
|
||||||
|
|
||||||
<!-- Provider Model: Summary indicating that a SIM has an active mobile data connection [CHAR LIMIT=50] -->
|
<!-- Provider Model: Summary indicating that a SIM has an active mobile data connection [CHAR LIMIT=50] -->
|
||||||
<string name="mobile_data_connection_active">Active, <xliff:g id="network_data_rat" example="LTE">%1$s</xliff:g></string>
|
<string name="mobile_data_connection_active">Active, <xliff:g id="network_data_rat" example="LTE">%1$s</xliff:g></string>
|
||||||
|
@@ -82,7 +82,7 @@ public class ProviderModelSlice extends WifiSlice {
|
|||||||
// Third section: Add the Wi-Fi items which are not connected.
|
// Third section: Add the Wi-Fi items which are not connected.
|
||||||
// Fourth section: If device has connection problem, this row show the message for user.
|
// Fourth section: If device has connection problem, this row show the message for user.
|
||||||
|
|
||||||
if (mHelper.isAirplaneModeEnabled()) {
|
if (mHelper.isAirplaneModeEnabled() && !mWifiManager.isWifiEnabled()) {
|
||||||
log("Airplane mode is enabled.");
|
log("Airplane mode is enabled.");
|
||||||
// ToDo Next CL will add the Airplane mode Message.
|
// ToDo Next CL will add the Airplane mode Message.
|
||||||
return mHelper.createListBuilder(getUri()).build();
|
return mHelper.createListBuilder(getUri()).build();
|
||||||
|
@@ -183,7 +183,7 @@ public class WifiSlice implements CustomSliceable {
|
|||||||
|
|
||||||
private IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
|
private IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
|
||||||
if (wifiSliceItem.getConnectedState() != WifiEntry.CONNECTED_STATE_DISCONNECTED) {
|
if (wifiSliceItem.getConnectedState() != WifiEntry.CONNECTED_STATE_DISCONNECTED) {
|
||||||
return null;
|
return IconCompat.createWithResource(mContext, R.drawable.ic_settings_24dp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wifiSliceItem.getSecurity() != WifiEntry.SECURITY_NONE) {
|
if (wifiSliceItem.getSecurity() != WifiEntry.SECURITY_NONE) {
|
||||||
|
@@ -35,6 +35,7 @@ import androidx.test.core.app.ApplicationProvider;
|
|||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import com.android.settings.testutils.AirplaneModeRule;
|
import com.android.settings.testutils.AirplaneModeRule;
|
||||||
|
import com.android.settings.testutils.ResourcesUtils;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
@@ -47,9 +48,6 @@ import org.mockito.junit.MockitoRule;
|
|||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class AirplaneSafeNetworksSliceTest {
|
public class AirplaneSafeNetworksSliceTest {
|
||||||
|
|
||||||
private static final String VIEW_AIRPLANE_SAFE_NETWORKS = "View airplane-safe networks";
|
|
||||||
private static final String TURN_OFF_AIRPLANE_MODE = "Turn off Airplane Mode";
|
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
public MockitoRule mMocks = MockitoJUnit.rule();
|
public MockitoRule mMocks = MockitoJUnit.rule();
|
||||||
@Rule
|
@Rule
|
||||||
@@ -88,7 +86,8 @@ public class AirplaneSafeNetworksSliceTest {
|
|||||||
assertThat(slice).isNotNull();
|
assertThat(slice).isNotNull();
|
||||||
final SliceItem sliceTitle =
|
final SliceItem sliceTitle =
|
||||||
SliceMetadata.from(mContext, slice).getListContent().getHeader().getTitleItem();
|
SliceMetadata.from(mContext, slice).getListContent().getHeader().getTitleItem();
|
||||||
assertThat(sliceTitle.getText()).isEqualTo(VIEW_AIRPLANE_SAFE_NETWORKS);
|
assertThat(sliceTitle.getText()).isEqualTo(
|
||||||
|
ResourcesUtils.getResourcesString(mContext, "view_airplane_safe_networks"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -101,7 +100,8 @@ public class AirplaneSafeNetworksSliceTest {
|
|||||||
assertThat(slice).isNotNull();
|
assertThat(slice).isNotNull();
|
||||||
final SliceItem sliceTitle =
|
final SliceItem sliceTitle =
|
||||||
SliceMetadata.from(mContext, slice).getListContent().getHeader().getTitleItem();
|
SliceMetadata.from(mContext, slice).getListContent().getHeader().getTitleItem();
|
||||||
assertThat(sliceTitle.getText()).isEqualTo(TURN_OFF_AIRPLANE_MODE);
|
assertThat(sliceTitle.getText()).isEqualTo(
|
||||||
|
ResourcesUtils.getResourcesString(mContext, "turn_off_airplane_mode"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user