Show the H+ icon in HSPA+ network
Adds the H+ icon. If status bar should distinguish HSPA data icon from UMTS data icon, this icon is shown as default while connected to HSPA+ network. Fixes: 69505790 Test: runtest systemui and visually check in demo mode Change-Id: Ia911fcdb98d2c118e2ef71d7a062efbf72a0809c
This commit is contained in:
@@ -377,6 +377,9 @@
|
||||
<!-- Content description of the data connection type 3.5G. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_3_5g">3.5G</string>
|
||||
|
||||
<!-- Content description of the data connection type 3.5G+. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_3_5g_plus">3.5G+</string>
|
||||
|
||||
<!-- Content description of the data connection type 4G . [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_4g">4G</string>
|
||||
|
||||
|
||||
@@ -205,13 +205,15 @@ public class MobileSignalController extends SignalController<
|
||||
}
|
||||
|
||||
MobileIconGroup hGroup = TelephonyIcons.THREE_G;
|
||||
MobileIconGroup hPlusGroup = TelephonyIcons.THREE_G;
|
||||
if (mConfig.hspaDataDistinguishable) {
|
||||
hGroup = TelephonyIcons.H;
|
||||
hPlusGroup = TelephonyIcons.H_PLUS;
|
||||
}
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSDPA, hGroup);
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSUPA, hGroup);
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPA, hGroup);
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, hGroup);
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, hPlusGroup);
|
||||
|
||||
if (mConfig.show4gForLte) {
|
||||
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
|
||||
|
||||
@@ -884,6 +884,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
datatype.equals("e") ? TelephonyIcons.E :
|
||||
datatype.equals("g") ? TelephonyIcons.G :
|
||||
datatype.equals("h") ? TelephonyIcons.H :
|
||||
datatype.equals("h+") ? TelephonyIcons.H_PLUS :
|
||||
datatype.equals("lte") ? TelephonyIcons.LTE :
|
||||
datatype.equals("lte+") ? TelephonyIcons.LTE_PLUS :
|
||||
datatype.equals("dis") ? TelephonyIcons.DATA_DISABLED :
|
||||
|
||||
@@ -28,7 +28,6 @@ class TelephonyIcons {
|
||||
static final int ICON_G = R.drawable.ic_g_mobiledata;
|
||||
static final int ICON_E = R.drawable.ic_e_mobiledata;
|
||||
static final int ICON_H = R.drawable.ic_h_mobiledata;
|
||||
// TODO: add logic to insert H+ icon
|
||||
static final int ICON_H_PLUS = R.drawable.ic_h_plus_mobiledata;
|
||||
static final int ICON_3G = R.drawable.ic_3g_mobiledata;
|
||||
static final int ICON_4G = R.drawable.ic_4g_mobiledata;
|
||||
@@ -135,6 +134,19 @@ class TelephonyIcons {
|
||||
TelephonyIcons.ICON_H,
|
||||
false);
|
||||
|
||||
static final MobileIconGroup H_PLUS = new MobileIconGroup(
|
||||
"H+",
|
||||
null,
|
||||
null,
|
||||
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
|
||||
0, 0,
|
||||
0,
|
||||
0,
|
||||
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
|
||||
R.string.data_connection_3_5g_plus,
|
||||
TelephonyIcons.ICON_H_PLUS,
|
||||
false);
|
||||
|
||||
static final MobileIconGroup FOUR_G = new MobileIconGroup(
|
||||
"4G",
|
||||
null,
|
||||
|
||||
@@ -74,6 +74,17 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
verifyDataIndicators(TelephonyIcons.ICON_H);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testHspaPlusDataIcon() {
|
||||
setupDefaultSignal();
|
||||
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
|
||||
TelephonyManager.NETWORK_TYPE_HSPAP);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_H_PLUS);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testWfcNoDataIcon() {
|
||||
setupDefaultSignal();
|
||||
|
||||
Reference in New Issue
Block a user