Add new network capabilities to support automotive head unit via USB

- Add a new transport type for USB and a new network capability
to support automotive head unit.
- In order to pass DnsManagerTest#testTransportTypesEqual, Android.bp
needs to link to dnsresolver_aidl_interface-V8-java. That test checks
whether the TRANSPORT types defined in NetworkCapabilities are the
same as IDnsResolver.aidl.

(clean cherry-pick of change in downstream branch history, original
change ID before project move:
Iec2df09a776d779108f95098e01b7ffdf6f8867a)

Bug: 181742019
Test: atest FrameworksNetTests

Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ie438ec68577ebdaaf990795fa27f1169b0105411
This commit is contained in:
lucaslin
2021-03-29 18:56:47 +08:00
committed by Remi NGUYEN VAN
parent 1d2ad89424
commit 6f77442d76
4 changed files with 25 additions and 6 deletions

View File

@@ -104,7 +104,7 @@ class KeepaliveUtilsTest {
// Check valid customization generates expected array.
val validRes = arrayOf("0,3", "1,0", "4,4")
val expectedValidRes = intArrayOf(3, 0, 0, 0, 4, 0, 0, 0)
val expectedValidRes = intArrayOf(3, 0, 0, 0, 4, 0, 0, 0, 0)
val mockContext = getMockedContextWithStringArrayRes(
R.array.config_networkSupportedKeepaliveCount,