Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 0ac564e673 am: 0c55907a0a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497

Change-Id: Idef0dd6e0e0486b76c0067540e580d444e97d6a0
This commit is contained in:
Treehugger Robot
2020-07-16 12:09:04 +00:00
committed by Automerger Merge Worker
2 changed files with 59 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ import android.net.NetworkStats.METERED_ALL
import android.net.NetworkStats.ROAMING_ALL
import android.net.NetworkTemplate.MATCH_MOBILE
import android.net.NetworkTemplate.MATCH_WIFI
import android.net.NetworkTemplate.NETWORK_TYPE_5G_NSA
import android.net.NetworkTemplate.NETWORK_TYPE_ALL
import android.net.NetworkTemplate.buildTemplateMobileWithRatType
import android.telephony.TelephonyManager
@@ -145,11 +146,13 @@ class NetworkTemplateTest {
assertParcelSane(templateWifi, 8)
}
// Verify NETWORK_TYPE_ALL does not conflict with TelephonyManager#NETWORK_TYPE_* constants.
// Verify NETWORK_TYPE_* constants in NetworkTemplate do not conflict with
// TelephonyManager#NETWORK_TYPE_* constants.
@Test
fun testNetworkTypeAll() {
fun testNetworkTypeConstants() {
for (ratType in TelephonyManager.getAllNetworkTypes()) {
assertNotEquals(NETWORK_TYPE_ALL, ratType)
assertNotEquals(NETWORK_TYPE_5G_NSA, ratType)
}
}
}