Commit Graph

567013 Commits

Author SHA1 Message Date
Lorenzo Colitti
de0eb903cb Merge changes Ia5bc896c,I0c9406f4,I3108ee94
* changes:
  Make VcnTransportInfoTest pass on AOSP.
  Immediately redact VcnTransportInfo.
  Do not automatically redact TransportInfo objects.
2021-05-13 15:11:01 +00:00
Treehugger Robot
ea4a93a946 Merge changes If663677b,I387d90ea
* changes:
  Fixed KeyGenParameterSpecTest
  Keystore 2.0 SPI: Fix NPE in getUniqueAliases.
2021-05-13 14:20:44 +00:00
Paul Hu
5a986ca45d Merge "Update mobile data preference getter/setter" 2021-05-13 13:42:05 +00:00
Lorenzo Colitti
34748be150 Make VcnTransportInfoTest pass on AOSP.
AOSP contains the core networking redaction changes, but not the
wifi redaction changes, so the tests that depend on wifi S
behaviour will not pass on AOSP.

Fix testApplicableRedactions by checking that the applicable
redactions are the same ones as returned by the underlying
WifiInfo object.

Fix testMakeCopyRedactForAccessFineLocation by testing the wifi
redaction code iff Build.VERSION.SDK_INT is S or later. This is
different from SdkLevel.isAtLeastS, because the latter returns
true in AOSP.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: Ia5bc896c92be19f570638f8051492e0f2d7342f9
2021-05-13 20:24:20 +09:00
Lorenzo Colitti
1ad18702f1 Immediately redact VcnTransportInfo.
Redaction of NetworkCapabilities is changing from redacting at
parcel time to redacting immediately when makeCopy() is called.
Update VcnTransportInfo redaction accordingly.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: I0c9406f426b66fd36b47d11799955def531c16ba
2021-05-13 20:24:20 +09:00
Lorenzo Colitti
3533c16720 Do not automatically redact TransportInfo objects.
Currently, NetworkCapabilities always redacts the TransportInfo
objects it contains whenever a defensive copy is made. This makes
it impossible to make a defensive copy on a TransportInfo
parcelled from another process without redacting it.

Stop redacting by default; instead rely on ConnectivityService
explicitly calling NetworkCapabilities' redacting constructor
when it returns a NetworkCapabilities object to an app via a
callback or synchronous call. This is currently done by
- createWithLocationInfoSanitizedIfNecessaryWhenParceled, which
  is called from callCallbackForRequest, getNetworkCapabilities,
  and getDefaultNetworkCapabilitiesForUser.
- getNetworkCapabilitiesWithoutUids, which is used when sending
  ConnectivityDiagnosticsManager callbacks. In this method,
  unconditionally redact all information, which is what the code
  did previously due to the default redaction setting for empty
  NetworkCapabilities objects being REDACT_ALL.

Bug: 183938194
Test: atest NetworkCapabilitiesTest
Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests
Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82
2021-05-13 20:24:19 +09:00
Remi NGUYEN VAN
5b48156498 Merge "Move net unit tests to packages/Connectivity" 2021-05-13 11:10:49 +00:00
Anton Hansson
9e1ca7acf7 Merge "Suppress reflection errors and dedupe flags" 2021-05-13 11:01:03 +00:00
paulhu
61c1b37d72 Update mobile data preference getter/setter
To satisfy OEM's requests, setting mobile data preference
should be by uid. Thus, update the getter/setter to
return/accept set of uids that need to apply mobile data
preference.

Bug: 171872461
Test: atest FrameworksNetTests
Change-Id: Id44efd2a6d820867f4405426c91e65b9ef155898
2021-05-13 10:35:29 +00:00
Paul Duffin
a6e369bb32 Merge "Add media-module-sdk build target." 2021-05-13 09:48:42 +00:00
Anton Hansson
aa26cc10db Suppress reflection errors and dedupe flags
Bug: 168689341
Test: m frameworks-base-api-current-compat
Change-Id: Ied6452849ef994424500b56a042983b92ecc41f2
2021-05-13 10:27:20 +01:00
Remi NGUYEN VAN
1665a3d634 Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 08:30:33 +00:00
Paul Hu
e6d2b4663e Merge "Add RESTRICTED_ALLOWED_APPS setting" 2021-05-13 05:32:19 +00:00
Linzhao Ye
03a24f50cc Merge changes Id9a9451a,Idf113709
* changes:
  Change the brackets in Persian keyboard layout.
  Change the brackets in Hebrew keyboard layout.
2021-05-13 04:33:11 +00:00
paulhu
5ee5670cc1 Add RESTRICTED_ALLOWED_APPS setting
This setting is OEM upstream requirement for third party apps
using restricted networks.

Bug: 185149952
Test: atests FrameworksNetTests
Change-Id: I5e16b46cf2935f38ee1e516bb8b85fa487cf9f61
2021-05-13 10:09:31 +08:00
Treehugger Robot
fa8d51d5a6 Merge "Keystore 2.0 SPI: Silence warning about blocking calls to Keystore." 2021-05-13 01:57:26 +00:00
Ken Chen
785dc4871c Merge "Add testVpnTypesEqual to verify consistency" 2021-05-13 01:22:08 +00:00
Ken Chen
bd0ba5d94b Merge "Better log in createNativeNetwork" 2021-05-13 01:21:47 +00:00
Ken Chen
c9d5cd9fbc Merge "Switch from networkCreate[Physical/Vpn] to networkCreate" 2021-05-13 01:20:39 +00:00
Janis Danisevskis
bebe5b7c52 Fixed KeyGenParameterSpecTest
Test: atest KeystoreTests
Change-Id: If663677b01738025dca01bf209b634c1d04c6be4
2021-05-12 17:29:26 -07:00
Janis Danisevskis
738e422b00 Keystore 2.0 SPI: Fix NPE in getUniqueAliases.
getUniqueAliases may return a null if an error occurred. This would lead
to a NPE in engineAliases.

This patch makes getUniqueAliases return an empty HashSet instead.

Test: atest KeystoreTests

Change-Id: I387d90ea851a8b9c18bb2b20d1a0bfc1ab76c99f
2021-05-12 17:29:26 -07:00
Janis Danisevskis
04d5622233 Keystore 2.0 SPI: Silence warning about blocking calls to Keystore.
Test: N/A
Bug: 184108046
Change-Id: I7401b88e5055cb781113656021f3ec274d1951a4
2021-05-12 16:53:14 -07:00
Cody Kesting
576dad4673 Merge changes I4b135749,If4fcaa52
* changes:
  Restructure Test Network requests for VCN connections.
  Correct variable name in VcnManagementService.
2021-05-12 22:55:17 +00:00
Linzhao Ye
5c1879cb60 Merge "Change the '[]' and '<>' brackets in Arabic keyboard layout." 2021-05-12 22:44:31 +00:00
Aurimas Liutikas
f1e2bb9a81 Merge "Revert "Fix incompatibilities with Kotlin 1.5.0"" 2021-05-12 22:03:25 +00:00
Aurimas Liutikas
c5b4071877 Revert "Fix incompatibilities with Kotlin 1.5.0"
This reverts commit b8ca1157ab.

Reason for revert: b/187908823

Change-Id: I9606c5730f4e8697a9319939acda0a9b7a74634d
2021-05-12 21:56:31 +00:00
Lucas Lin
1742bf024c Merge "Update PrivateDnsMode from StringDef to IntDef" 2021-05-12 17:09:50 +00:00
Treehugger Robot
b79dcb24d0 Merge changes Icb59b15d,I6fc6a266,I5cc340e5,I94db52a8
* changes:
  Request Test Networks for VCNs when in Test Mode.
  Specify if a VCN is in 'test-mode' in VcnContext.
  Create test-mode for VcnConfig.
  Require MOBIKE for IkeSessionParams in VCN configs.
2021-05-12 16:21:25 +00:00
Chalard Jean
7e9223a751 Merge "Allow any transport with TEST if the network is restricted" 2021-05-12 13:57:31 +00:00
Treehugger Robot
d7158e25d6 Merge "Add lcnathalie to OWNERS" 2021-05-12 13:47:04 +00:00
satayev
3f955dda5c Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." 2021-05-12 13:21:24 +00:00
Hai Zhang
977345eba5 Add media-module-sdk build target.
Bug: 177884752
Test: m media-module-sdk
Merged-In: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
Change-Id: Ib37f2861a3c12526686b6ec78d9345aead6d51c9
(cherry picked from commit a2fd7fd012)
2021-05-12 14:15:35 +01:00
Remi NGUYEN VAN
eff6bb9c48 Merge "Use jniThrowErrnoException from JNIHelp" 2021-05-12 13:12:32 +00:00
Remi NGUYEN VAN
44862ff783 Merge "Move NetworkUtils JNI out of core/jni" 2021-05-12 13:12:09 +00:00
Remi NGUYEN VAN
ea96653e66 Merge "Build framework-connectivity using module_current" 2021-05-12 13:11:22 +00:00
Eric Laurent
74e618ff8b Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" 2021-05-12 12:25:23 +00:00
Nathalie Le Clair
1d5d3ca3cf Add lcnathalie to OWNERS
Bug: N/A
Test: N/A
Change-Id: I369963eb006affb24cba0ab9ef97ec797396fc53
2021-05-12 13:47:10 +02:00
Treehugger Robot
4463102095 Merge "DSUService: Log verbose installation progress" 2021-05-12 09:52:05 +00:00
Siim Sammul
e3873010be Merge "Store the collected binder latency samples in buckets to form a histogram. Add the ability to generate histograms with varying bucket counts and sizes." 2021-05-12 09:40:18 +00:00
Yo Chiang
c2c3a3c7d4 Merge "DSUService: Deduplicate InstallUserdata() and InstallScratch()" 2021-05-12 09:39:04 +00:00
Ken Chen
bf8bf735d6 Add testVpnTypesEqual to verify consistency
VPN types are defined in both VpnManager.java and NativeVpnType.aidl.
The definitions on both sides should match (except TYPE_VPN_NONE).

VpnManager.java:
TYPE_VPN_NONE = -1
TYPE_VPN_SERVICE = 1
TYPE_VPN_PLATFORM = 2
TYPE_VPN_LEGACY = 3
TYPE_VPN_OEM = 4

NativeVpnType.aidl:
SERVICE = 1
PLATFORM = 2
LEGACY = 3
OEM = 4

Bug: N/A
Test: atest android.net.VpnManagerTest#testVpnTypesEqual
Change-Id: Ie618e227d861100c5318da696140e486af1093a0
2021-05-12 17:34:34 +08:00
Chiachang Wang
6a6fa67d58 Merge "Remove sendNetworkConditionsBroadcast" 2021-05-12 09:24:02 +00:00
Lorenzo Colitti
5a31cd4f84 Merge "Rename unwanted capabilities to forbidden capabilities." 2021-05-12 09:00:17 +00:00
Paul Hu
68301eb7cb Merge "Add MATCH_ANY_USER flag to PackageInfo queries" 2021-05-12 07:13:17 +00:00
Yi-Yo Chiang
677dfeae2d DSUService: Deduplicate InstallUserdata() and InstallScratch()
Factor out common code and some minor polishing.

Bug: 165471299
Test: Fire a DSU installation and observe logcat
Change-Id: Ia13db74c038e49d888e69e43b59ab0ad5b078464
2021-05-12 06:58:06 +00:00
Yi-Yo Chiang
a3f91296ce DSUService: Log verbose installation progress
Log the installation progress in logcat if feasible.

Bug: 181043054
Bug: 165471299
Test: Fire a DSU installation and observe logcat
Change-Id: Ib82783f2dfe310335725f39053eaa940d96e7198
2021-05-12 14:32:18 +08:00
Ken Chen
f9183a7164 Better log in createNativeNetwork
Dump more information from NetworkAgentInfo in error log.

Bug: N/A
Test: m
Change-Id: I92981c03ad80e8b1d7ffaf45d50cc0bfd0b283b0
2021-05-12 13:44:40 +08:00
Cody Kesting
da188b3719 Restructure Test Network requests for VCN connections.
This CL restructures the NetworkRequests used for TestNetworks
in UnderlyingNetworkTracker to clearly show that they only require
TRANSPORT_TEST and the relevant subIds.

Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: I4b135749fdde9f91c66b87b1ded921700e6440fd
2021-05-11 19:27:36 -07:00
Cody Kesting
48f54d8fae Correct variable name in VcnManagementService.
Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: If4fcaa523e5cac85c916f7c41cef996129652a5d
2021-05-11 19:27:36 -07:00
David Su
0885cc3db9 Merge "services.net-module-wifi: Add TEST_MAPPING" 2021-05-12 01:48:32 +00:00