Commit Graph

921 Commits

Author SHA1 Message Date
Roshan Pius
189d009e37 ConnectivityManager: Address review comments from aosp/1595396
Bug: 156867433
Test: atest android.net
Test: atest com.android.server
Change-Id: I7f5d043732ae22edd14bf581b7dc676c9236b545
2021-04-06 16:42:51 +00:00
Roshan Pius
fb309ae283 Merge "NetworkCapabilities: Hide copy constructor" 2021-04-06 15:57:47 +00:00
lifr
db7d676f20 Remove unnecessary public API getActiveNetworkForUid
We have exposed the CS module API getActiveNetworkForUid
(Used in Jobscheduler) as a temporary solution for the mainline
Connectivity service module. This API usage has now been removed
in Jobscheduler(b/165835257), so we can permanently remove the
public getActiveNetworkForUid API.

Bug: 183465229
Test: atest FrameworksNetTests
Change-Id: I0f23272d2d8a5118f2e11ac325fdb9e8f9dbe0e3
2021-04-06 17:39:09 +08:00
Frank Li
00a45d40b0 [automerger skipped] Merge "Add session ID to VpnTransportInfo" am: 4ae4410678 am: b707122936 am: b683d6898c -s ours
am skip reason: skip tag Change-Id I8d09e25b83f7ee8be21ec9c9bd3c72a251f1370d with SHA-1 4d604c81db is already in history

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

Change-Id: Idcdd09ad0e7c11482dc048dd30f4a72a7e294b2f
2021-04-06 07:57:52 +00:00
Ken Chen
5fe1311241 Merge "Downgrade DNS fail message from Error to Warning" am: 374a06673e am: 060c1cdde6 am: 702e85008f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662360

Change-Id: Id5a17d24b9f7bd012df60b4cf1b1d088a34805bc
2021-04-06 07:56:55 +00:00
Chalard Jean
605bae6972 Merge "Cleanup setGlobalProxy" am: 376274c277 am: 676eccd672 am: 8cce6d3336
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640148

Change-Id: Ic9757060f398aaf871141dc5199bf49988637937
2021-04-06 07:55:54 +00:00
Frank Li
b683d6898c Merge "Add session ID to VpnTransportInfo" am: 4ae4410678 am: b707122936
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652218

Change-Id: I554a86b2445f0449e5556871f553158dff19e192
2021-04-06 07:35:06 +00:00
Ken Chen
702e85008f Merge "Downgrade DNS fail message from Error to Warning" am: 374a06673e am: 060c1cdde6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662360

Change-Id: Id681bbbafa73df18cc49d0dd03caeb37fcd99b7e
2021-04-06 07:33:32 +00:00
Chalard Jean
8cce6d3336 Merge "Cleanup setGlobalProxy" am: 376274c277 am: 676eccd672
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640148

Change-Id: I0a8d51af2280d47f3924f66d56e529f57057b3bb
2021-04-06 07:30:44 +00:00
Frank Li
b707122936 Merge "Add session ID to VpnTransportInfo" am: 4ae4410678
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652218

Change-Id: I736118ea676708ef6630d2153a3986459b31850c
2021-04-06 07:01:12 +00:00
Ken Chen
060c1cdde6 Merge "Downgrade DNS fail message from Error to Warning" am: 374a06673e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662360

Change-Id: Ife7da1c0494d24e140ea9fdc64f7018340cc3e40
2021-04-06 06:55:39 +00:00
Frank Li
4ae4410678 Merge "Add session ID to VpnTransportInfo" 2021-04-06 06:50:48 +00:00
Chalard Jean
676eccd672 Merge "Cleanup setGlobalProxy" am: 376274c277
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640148

Change-Id: I0052f30d52f00f40b933eb1573b1a0de37e9cba2
2021-04-06 06:50:15 +00:00
Ken Chen
374a06673e Merge "Downgrade DNS fail message from Error to Warning" 2021-04-06 06:35:04 +00:00
Chalard Jean
376274c277 Merge "Cleanup setGlobalProxy" 2021-04-06 06:19:01 +00:00
James Mattis
9189c89f52 Adding OEM Network Preferences for testing
Added two new per-app OEM network preferences to be used only with
testing.

Although there is a tradeoff adding these preferences to
non-test code, the benefit is that it will allow testing of the OEM
network preferences app via CTS as using the shell with elevated
permissions is not an option due to the OEM network preferences API
potentially being abused. On consideration, a small amount of test code
was deemed an acceptable tradeoff if it enabled CTS testing.

Bug: 176496580
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Ie896a7b40945a46a352f37d2c00671da8a8f4489
2021-04-05 21:51:09 -07:00
Ken Chen
acbbb253f4 Downgrade DNS fail message from Error to Warning
Most DNS fails are caused by network issues, like connection timed out.
Lower log severity from error to warning to conform to go/greenlog.

Test: 1. connect to a WiFi AP without WAN
      2. atest CtsNetTestCases:android.net.cts.DnsResolverTest
      3. adb logcat | grep resNetworkResult:android
Bug: 181269159
Change-Id: Ifeaf250c91a4b9123d200bd62f085c11009f2491
2021-04-06 02:30:56 +00:00
Chiachang Wang
2320733615 Merge "Add visibility of framework-connectivity.impl for wifi test" into sc-dev 2021-04-06 00:23:37 +00:00
Steven Moreland
74ca1a54d0 Merge "Remove unstable IpPrefix" am: 184a6ce54d am: fdfa2d00d9 am: a278abb926
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662674

Change-Id: Idfa92d12a45385412c2013637c657acfb9fec3a2
2021-04-06 00:05:48 +00:00
Steven Moreland
a278abb926 Merge "Remove unstable IpPrefix" am: 184a6ce54d am: fdfa2d00d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662674

Change-Id: I41d891c9a4e0c3c0c42fcc425ea5230d23dbb86e
2021-04-05 23:19:09 +00:00
Steven Moreland
fdfa2d00d9 Merge "Remove unstable IpPrefix" am: 184a6ce54d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662674

Change-Id: I7517ae6cefa96ee3ca38fbcca36970677cb6469b
2021-04-05 22:37:44 +00:00
Steven Moreland
184a6ce54d Merge "Remove unstable IpPrefix" 2021-04-05 21:59:47 +00:00
Roshan Pius
fc3adb5ae1 NetworkCapabilities: Hide copy constructor
Only used by connectivity service, no need to mark it public.

Bug: 184537591
Test: Compiles
Change-Id: Ie0d515d73e30a4e15141a3d92aa739192badeb13
2021-04-05 09:29:30 -07:00
Remi NGUYEN VAN
df6ce19fa9 Merge "Reduce framework-connectivity footprint" into sc-dev 2021-04-05 02:15:32 +00:00
Benedict Wong
9429e3b8f9 Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi" am: 42d706acfc am: 10b113c621 am: 46557b02fe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652974

Change-Id: I7a85feb9753ae91ff3d67dc82c8bc880a6626074
2021-04-03 02:01:25 +00:00
Benedict Wong
46557b02fe Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi" am: 42d706acfc am: 10b113c621
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652974

Change-Id: Ib714d9a03e5b5152a576330711a8894178db4a95
2021-04-03 01:15:50 +00:00
Benedict Wong
10b113c621 Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi" am: 42d706acfc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652974

Change-Id: I4dc51bf65af853a7510586169caa12b083c2f94b
2021-04-02 23:10:21 +00:00
Benedict Wong
42d706acfc Merge "Downgrade list of subIds in NetworkCapabilities to @SystemApi" 2021-04-02 22:33:20 +00:00
Sarah Chin
d9d1d62be7 [automerger skipped] Merge "API to get network visible network capability name" am: aac4d3242a am: 238cd3344e am: ea1a278478 -s ours
am skip reason: skip tag Change-Id Iae63ac4d62641cee2bd0f0c5f50dd729750d514c with SHA-1 34fbbbb6b9 is already in history

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

Change-Id: Ia36214cc8bf32e5b39d27f55d5e7eb4ac3c22c84
2021-04-02 18:41:49 +00:00
Sarah Chin
ea1a278478 Merge "API to get network visible network capability name" am: aac4d3242a am: 238cd3344e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653200

Change-Id: Ia6c65d6cd6d322d5599942ec65323a0d62e4dd1b
2021-04-02 17:56:48 +00:00
Sarah Chin
238cd3344e Merge "API to get network visible network capability name" am: aac4d3242a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653200

Change-Id: I7f8b909ec061d8bb875ff2688e2fb9a4cea54318
2021-04-02 17:45:29 +00:00
Sarah Chin
aac4d3242a Merge "API to get network visible network capability name" 2021-04-02 16:50:10 +00:00
Chalard Jean
e1ce6ae5d0 Cleanup setGlobalProxy
This is a small cleanup of a function called by DevicePolicyManager
coming from a conflicting change. This no longer makes a concrete
difference but is still a good change.

Test: m services.devicepolicy
Bug: 172183305
Change-Id: I7ee907314ddb253eb4e97d177f0ea0ab3b58cf03
2021-04-02 20:37:21 +09:00
Remi NGUYEN VAN
deed4cbcf9 Reduce framework-connectivity footprint
Cleanup framework-connectivity to reduce its memory and storage usage:
 - Build libframework-connectivity-jni using standard C and removing
   dependencies on libc++. This saves about 100kB of storage (40+60kB
   on the 32+64 bit variants).
 - Remove dependency on protobuffer libraries, as their usage has been
   removed. This saves about 15kB of storage.

From local measurements, the reduced code size also improves memory
usage.

This also removes a jarjar workaround for net-utils-device-common, as
the library is no longer used either.

Bug: 184111895
Test: device boots, connectivity working
Change-Id: Ibfbd0fe1098293812ae24812621752a7a44f9130
2021-04-02 10:18:00 +00:00
Benedict Wong
5cec03468c Downgrade list of subIds in NetworkCapabilities to @SystemApi
This change downgrades API visibility for the list-of-subIds in the
NetworkCapabilities to SystemApi

Bug: 175662146
Test: atest NetworkCapabilitiesTest#testSubIds
Test: atest FrameworksNetTests
Change-Id: I372fa9eaa7585aefd1710948ca007456feedd578
2021-04-02 01:18:11 -07:00
Steven Moreland
a732a85f7e Remove unstable IpPrefix
Seems nothing is using this.

Bug: 183654927
Test: N/A
Change-Id: I94233d79fb5d93970b38a79a09fc4d50822c3620
2021-04-01 22:59:02 +00:00
Aaron Huang
2cc32e4558 [automerger skipped] Merge "Expose BIP and VSIM relavent definitions" am: 5e6693605c am: 30129ac6cd am: 15d9affab4 -s ours
am skip reason: skip tag Change-Id I41e881c6fe39e92d5cdac2d0a02fa8a8e814c9c5 with SHA-1 d3881b98ed is already in history

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

Change-Id: I82342526cd5d9983d0459b4da014dc8e9bda9482
2021-04-01 13:49:44 +00:00
Aaron Huang
c8616c336f [automerger skipped] Merge "Move deduceRestrictedCapability to libs/net and rename it" am: 6098194278 am: af5827c506 am: 032eba8da7 -s ours
am skip reason: skip tag Change-Id I77970b3a5e5e0e9d263639694b1f06519169bf64 with SHA-1 f0fc6d7f68 is already in history

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

Change-Id: I6a434d0839828f3c2692a5cc8d523dbddc92b4ef
2021-04-01 13:47:59 +00:00
Aaron Huang
15d9affab4 Merge "Expose BIP and VSIM relavent definitions" am: 5e6693605c am: 30129ac6cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652223

Change-Id: Ibab74f3bcf6c804a31be54d4b7183ea75a6e172e
2021-04-01 13:04:07 +00:00
Aaron Huang
032eba8da7 Merge "Move deduceRestrictedCapability to libs/net and rename it" am: 6098194278 am: af5827c506
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644999

Change-Id: Idc33279ef58a6c2bc971271ccf85cafa264b1d1d
2021-04-01 13:03:23 +00:00
Aaron Huang
30129ac6cd Merge "Expose BIP and VSIM relavent definitions" am: 5e6693605c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652223

Change-Id: I1e9d92cd27fc0dcd84cc62ad7c2a591c9f5a54e5
2021-04-01 12:26:04 +00:00
Aaron Huang
af5827c506 Merge "Move deduceRestrictedCapability to libs/net and rename it" am: 6098194278
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644999

Change-Id: I088dfe837eb986c2de792d0672a2e707112b6042
2021-04-01 12:21:47 +00:00
Aaron Huang
5e6693605c Merge "Expose BIP and VSIM relavent definitions" 2021-04-01 11:38:17 +00:00
Aaron Huang
6098194278 Merge "Move deduceRestrictedCapability to libs/net and rename it" 2021-04-01 11:37:51 +00:00
Chalard Jean
1324c9acef Merge changes Ib5cd2c27,I4448a354 into sc-dev
* changes:
  [NS10] Fix a bug where registerIgnoringScore is broken
  [NS09] Implement the new ranking code
2021-04-01 09:02:15 +00:00
lifr
65b9f96159 Add session ID to VpnTransportInfo
- This will be visible only to apps with the NETWORK_SETTINGS
  permissions (signature), and will be redacted for all other callers.
- This string is expected to be the same as set by
  VpnService#setSession, and in general, VpnConfig.session. But it
  will be a general API that Vpn.java can call when setting the
  VpnTransportInfo.
- This string cannot be updated once the VPN NetworkAgent is connected.

Bug: 171872481
Test: atest ConnectivityServiceTest
      atest VpnTransportInfoTest
      atest android.net.cts.NetworkAgentTest
Change-Id: I8d09e25b83f7ee8be21ec9c9bd3c72a251f1370d
Merged-In: I8d09e25b83f7ee8be21ec9c9bd3c72a251f1370d
           (cherry-picked from ag/14011912)
2021-04-01 15:46:31 +08:00
Chalard Jean
cf9ccc83b2 Merge "Expose sendNetworkScore that takes a NetworkScore" into sc-dev 2021-04-01 07:17:48 +00:00
Remi NGUYEN VAN
6b1d41ac92 Merge "Add framework-connectivity-test-defaults" into sc-dev 2021-04-01 02:43:26 +00:00
Chalard Jean
e154dff521 Expose sendNetworkScore that takes a NetworkScore
Bug: 167544279
Test: FrameworksNetTests
CTS-Coverage-Bug: 184037351
Change-Id: I5dd9b526c53cb99a5e4ae87f1e3724a7a1870e78
2021-03-31 13:26:46 +00:00
Chalard Jean
0408f6c7d6 [NS09] Implement the new ranking code
At this stage, this is turned off. Unit tests will be
in a followup change.

Test: In a followup
Bug: 167544279
Change-Id: I4448a3546fbc1a3dddf757982c031c5f39ba2889
2021-03-31 20:59:47 +09:00