Split "Mobile Network Type" indication in Settings

Display data and voice network type for clarity

Change-Id: I26e52dcc564dfd96e36e45d94d6e69225ea4a80f
Fixes: 70938010
Test: manual, unit
This commit is contained in:
Hall Liu
2018-03-13 18:28:58 -07:00
parent 4786291624
commit 6f4b185331
5 changed files with 54 additions and 113 deletions

View File

@@ -16,7 +16,8 @@
package com.android.settings.deviceinfo.simstatus;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.CELLULAR_NETWORK_TYPE_VALUE_ID;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.CELL_DATA_NETWORK_TYPE_VALUE_ID;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.CELL_VOICE_NETWORK_TYPE_VALUE_ID;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.EID_INFO_VALUE_ID;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.ICCID_INFO_LABEL_ID;
import static com.android.settings.deviceinfo.simstatus.SimStatusDialogController.ICCID_INFO_VALUE_ID;
@@ -188,13 +189,24 @@ public class SimStatusDialogControllerTest {
}
@Test
public void initialize_updateNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
public void initialize_updateVoiceNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
when(mTelephonyManager.getVoiceNetworkType(anyInt())).thenReturn(
TelephonyManager.NETWORK_TYPE_EDGE);
mController.initialize();
verify(mDialog).setText(CELL_VOICE_NETWORK_TYPE_VALUE_ID,
TelephonyManager.getNetworkTypeName(TelephonyManager.NETWORK_TYPE_EDGE));
}
@Test
public void initialize_updateDataNetworkTypeWithEdge_shouldUpdateSettingToEdge() {
when(mTelephonyManager.getDataNetworkType(anyInt())).thenReturn(
TelephonyManager.NETWORK_TYPE_EDGE);
mController.initialize();
verify(mDialog).setText(CELLULAR_NETWORK_TYPE_VALUE_ID,
verify(mDialog).setText(CELL_DATA_NETWORK_TYPE_VALUE_ID,
TelephonyManager.getNetworkTypeName(TelephonyManager.NETWORK_TYPE_EDGE));
}