Display mobile data type icons in status bar.
Instead of showing the type in the top left corner of the signal.
- Add new status bar mobile data indicator assets
- Remove unused qs/status bar mobile data indicator assets
Bug: 72540392
Test: visual using demo mode
Change-Id: Ic63ad3307daabf2e0f023308b7e0682dbd29f1ca
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
index cf3620d..8629799 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
@@ -6,7 +6,6 @@
import android.net.NetworkCapabilities;
import android.os.Looper;
-import android.support.test.runner.AndroidJUnit4;
import android.telephony.TelephonyManager;
import android.test.suitebuilder.annotation.SmallTest;
import android.testing.AndroidTestingRunner;
@@ -15,7 +14,6 @@
import com.android.settingslib.net.DataUsageController;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +26,7 @@
public void test3gDataIcon() {
setupDefaultSignal();
- verifyDataIndicators(TelephonyIcons.ICON_3G,
- TelephonyIcons.QS_DATA_3G);
+ verifyDataIndicators(TelephonyIcons.ICON_3G);
}
@Test
@@ -38,8 +35,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_GSM);
- verifyDataIndicators(TelephonyIcons.ICON_G,
- TelephonyIcons.QS_DATA_G);
+ verifyDataIndicators(TelephonyIcons.ICON_G);
}
@Test
@@ -48,8 +44,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_CDMA);
- verifyDataIndicators(TelephonyIcons.ICON_1X,
- TelephonyIcons.QS_DATA_1X);
+ verifyDataIndicators(TelephonyIcons.ICON_1X);
}
@Test
@@ -58,8 +53,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_EDGE);
- verifyDataIndicators(TelephonyIcons.ICON_E,
- TelephonyIcons.QS_DATA_E);
+ verifyDataIndicators(TelephonyIcons.ICON_E);
}
@Test
@@ -68,8 +62,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_LTE);
- verifyDataIndicators(TelephonyIcons.ICON_LTE,
- TelephonyIcons.QS_DATA_LTE);
+ verifyDataIndicators(TelephonyIcons.ICON_LTE);
}
@Test
@@ -78,8 +71,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_HSPA);
- verifyDataIndicators(TelephonyIcons.ICON_H,
- TelephonyIcons.QS_DATA_H);
+ verifyDataIndicators(TelephonyIcons.ICON_H);
}
@Test
@@ -88,7 +80,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_IWLAN);
- verifyDataIndicators(0, 0);
+ verifyDataIndicators(0);
}
@Test
@@ -106,8 +98,7 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_LTE);
- verifyDataIndicators(TelephonyIcons.ICON_4G,
- TelephonyIcons.QS_DATA_4G);
+ verifyDataIndicators(TelephonyIcons.ICON_4G);
}
@Test
@@ -150,7 +141,7 @@
TestableLooper.get(this).processAllMessages();
// Don't show the X until the device is setup.
- verifyDataIndicators(0, 0);
+ verifyDataIndicators(0);
}
@Test
@@ -165,8 +156,7 @@
mConfig.alwaysShowDataRatIcon = true;
mNetworkController.handleConfigurationChanged();
- verifyDataIndicators(TelephonyIcons.ICON_G,
- TelephonyIcons.QS_DATA_G);
+ verifyDataIndicators(TelephonyIcons.ICON_G);
}
@Test
@@ -182,8 +172,7 @@
// the after work.
mNetworkController.handleConfigurationChanged();
- verifyDataIndicators(TelephonyIcons.ICON_4G,
- TelephonyIcons.QS_DATA_4G);
+ verifyDataIndicators(TelephonyIcons.ICON_4G);
}
@Test
@@ -192,14 +181,12 @@
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
TelephonyManager.NETWORK_TYPE_LTE);
- verifyDataIndicators(TelephonyIcons.ICON_LTE,
- TelephonyIcons.QS_DATA_LTE);
+ verifyDataIndicators(TelephonyIcons.ICON_LTE);
when(mServiceState.getDataNetworkType())
.thenReturn(TelephonyManager.NETWORK_TYPE_HSPA);
updateServiceState();
- verifyDataIndicators(TelephonyIcons.ICON_H,
- TelephonyIcons.QS_DATA_H);
+ verifyDataIndicators(TelephonyIcons.ICON_H);
}
@Test
@@ -219,9 +206,9 @@
DEFAULT_QS_SIGNAL_STRENGTH, DEFAULT_QS_ICON, in, out);
}
- private void verifyDataIndicators(int dataIcon, int qsDataIcon) {
+ private void verifyDataIndicators(int dataIcon) {
verifyLastMobileDataIndicators(true, DEFAULT_SIGNAL_STRENGTH, dataIcon,
- true, DEFAULT_QS_SIGNAL_STRENGTH, qsDataIcon, false,
+ true, DEFAULT_QS_SIGNAL_STRENGTH, dataIcon, false,
false);
}