Commit Graph

232 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
ff2bca11b2 Merge "Add ParseException constructors to API" am: a10ea9b5ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635044

Change-Id: I2eca0681d3a94da26307663d56975327bbd06c6a
2021-03-16 06:49:08 +00:00
Remi NGUYEN VAN
a10ea9b5ee Merge "Add ParseException constructors to API" 2021-03-16 06:25:16 +00:00
Remi NGUYEN VAN
33674f408b Merge "Create ServiceConnectivityResources" am: d9d976f8f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620871

Change-Id: I91fb801ef2edf64fcaaf082f57eaadb3e7612efa
2021-03-16 03:11:25 +00:00
Remi NGUYEN VAN
d9d976f8f5 Merge "Create ServiceConnectivityResources" 2021-03-16 02:29:31 +00:00
Aaron Huang
f0392a4704 Merge changes from topic "pacproxy-service" am: 87c4904ab2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553959

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I29e9e324f25e584d645900f83d31a00a4e151cbb
2021-03-15 12:12:48 +00:00
Aaron Huang
87c4904ab2 Merge changes from topic "pacproxy-service"
* changes:
  Make PacProxyService be a system service
  Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
2021-03-15 11:49:45 +00:00
Frank Li
b2a10bfdbd Merge "[CS15]Do not use hidden API of PlatformProperties" am: 08ad593dbb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623261

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I623fd33e756f9ada6b73f716a30778fd6236f6ae
2021-03-15 08:42:02 +00:00
Frank Li
08ad593dbb Merge "[CS15]Do not use hidden API of PlatformProperties" 2021-03-15 08:01:26 +00:00
Remi NGUYEN VAN
871f91a517 Merge "Revert "Remove connectivity dependency on Preconditions"" am: 310ef3e954
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7dbcb1e49162210b44bd0cf2204b853c34bb5871
2021-03-15 07:44:21 +00:00
Remi NGUYEN VAN
310ef3e954 Merge "Revert "Remove connectivity dependency on Preconditions"" 2021-03-15 07:30:20 +00:00
Remi NGUYEN VAN
3f0e7dd4e7 Revert "Remove connectivity dependency on Preconditions"
This reverts commit fa5eacc89f.

Reason for revert: Build broken: b/182721112

Change-Id: Ibc84ec6d7900fdcf0bc14cd7036f9c08287711db
2021-03-15 07:27:44 +00:00
Paul Hu
70f311507c Merge "Replace InetAddress#parseNumericAddress" am: 2622bfd00a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8f1112eef6086798a6f089dde2f297828c0b4f2e
2021-03-15 07:06:12 +00:00
Paul Hu
2622bfd00a Merge "Replace InetAddress#parseNumericAddress" 2021-03-15 07:03:46 +00:00
Remi NGUYEN VAN
18925df41b Merge "Remove connectivity dependency on Preconditions" am: 00e1d9ee70
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628399

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3c0c2572ff84a2b163fb2e4e0f3e2cfec043313d
2021-03-15 07:03:36 +00:00
Aaron Huang
ed0fe3ecd3 Make PacProxyService be a system service
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.

ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.

So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
2021-03-15 14:40:58 +08:00
Remi NGUYEN VAN
00e1d9ee70 Merge "Remove connectivity dependency on Preconditions" 2021-03-15 06:36:15 +00:00
lifr
c0d25c19b3 [CS15]Do not use hidden API of PlatformProperties
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Using PlatformProperties
as a static library instead of hidden API.

Bug: 170917042
Test: atest FrameworksNetTests
Merged-In: I3a3deca5d2e0f690db8c0061de2db2217376d268
Change-Id: I3a3deca5d2e0f690db8c0061de2db2217376d268
2021-03-15 14:14:18 +08:00
Remi NGUYEN VAN
59ad107b0f Merge "Remove VpnType usage in VpnTransportInfo" am: 8828fc0b65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629273

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41431bfba97a6fe0678b9a5dc72b19479d5d4c66
2021-03-15 02:07:39 +00:00
Remi NGUYEN VAN
a239a8e669 Merge "Create a service-connectivity-pre-jarjar library" am: 5d3948005d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625866

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17ca508f3da731404306d6e65e9743120a7e0860
2021-03-15 02:05:41 +00:00
Remi NGUYEN VAN
8828fc0b65 Merge "Remove VpnType usage in VpnTransportInfo" 2021-03-15 01:52:30 +00:00
Remi NGUYEN VAN
5d3948005d Merge "Create a service-connectivity-pre-jarjar library" 2021-03-15 01:32:47 +00:00
Remi NGUYEN VAN
25dcabf72d Add ParseException constructors to API
ParseException constructors are used by both platform and mainline
module code, so they can't be package-private.
Removing dependencies on either side is not possible as the class
itself is part of the public API, and supports APIs on both sides.

Having the constructors part of the API makes the class usable by both
sides.

Fixes: 182705505
Test: CtsNetTestCases for APIs using the exception
Change-Id: Ia396ab2fa3afaed3cf474c8e60f72fc7f3f4fded
2021-03-15 10:26:02 +09:00
paulhu
0494b85ffb Replace InetAddress#parseNumericAddress
-Connectivity is becoming a mainline module in S but mainline
modules are not allowed to use non-formal APIs. Thus, replace
non-formal API InetAddress#parseNumericAddress to
InetAddresses#parseNumericAddress.
- Add deprecated method legacyParseIpAndMask() for IpPrefix and
LinkAddress. Because InetAddresses#parseNumericAddress has
a little different behavior in some case, but these two classes
should keep working as before. So these two classes will use
the new deprecated method.

Bug: 181756157
Test: FrameworksNetTests
Change-Id: I1c96b75f0b8d5e93304a39b4a8c8849964e5e810
2021-03-12 19:57:40 +08:00
Remi NGUYEN VAN
ba744b34b8 Merge "Remove usage of hidden InetSocketAddress constructor" am: 7e9e7dce89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e2bc5128658973dc873aa3f6eb41593d8d9a308
2021-03-12 09:30:30 +00:00
Remi NGUYEN VAN
9b47fcca83 Remove VpnType usage in VpnTransportInfo
The VpnType annotation is a hidden symbol, and should be
kept hidden as annotations are disallowed by API guidelines.

Remove its usage in VpnTransportInfo as users of annotated constants
that build against API stubs are expected not to use the annotation.

Bug: 173331190
Test: m
Change-Id: I171fa57f6279defad081c3cd16265d58ec55e57d
2021-03-12 18:30:30 +09:00
Treehugger Robot
19feee80d0 Merge "Remove hidden @NetworkType in NetworkInfo" am: e01042965a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628359

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie8cdd5f7eec86f8bc882f70dbc7480a0c0669358
2021-03-12 09:27:20 +00:00
Treehugger Robot
21c40a1905 Merge "Remove hidden INVALID_RESOURCE_ID in unused param" am: de66768a6c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ida08886109393bc8255de1eec64d5f0a45970eba
2021-03-12 09:24:09 +00:00
Treehugger Robot
3a146b660e Merge "Use ParcelDescriptor.fromSocket instead of getFileDescriptor" am: c899c4fee6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625439

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3b3e8b098eb80098198b1e1cf6c2ce2fe138bc0a
2021-03-12 09:22:33 +00:00
Remi NGUYEN VAN
7e9e7dce89 Merge "Remove usage of hidden InetSocketAddress constructor" 2021-03-12 09:02:15 +00:00
Treehugger Robot
e01042965a Merge "Remove hidden @NetworkType in NetworkInfo" 2021-03-12 08:59:35 +00:00
Treehugger Robot
de66768a6c Merge "Remove hidden INVALID_RESOURCE_ID in unused param" 2021-03-12 08:57:55 +00:00
Treehugger Robot
c899c4fee6 Merge "Use ParcelDescriptor.fromSocket instead of getFileDescriptor" 2021-03-12 08:57:47 +00:00
Junyu Lai
4c60c95d3c Merge changes from topics "vcn04", "vcn12" am: 992f747392
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628400

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If14f8b2c89483095f22a2b1bc77b0d76cdcb8366
2021-03-12 07:50:50 +00:00
Junyu Lai
992f747392 Merge changes from topics "vcn04", "vcn12"
* changes:
  [VCN12] Expose setSubIds/getSubIds APIs
  [VCN04] Add Subscription Id set into NetworkCapabilities
2021-03-12 07:12:59 +00:00
Roshan Pius
e0e069d4cf Merge "ConnectivityManager: Provide API's to include location sensitive info" am: a03f3bbf0e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1595396

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf358f0532023ab990dea0ad958eacaa441e107c
2021-03-12 05:58:11 +00:00
Roshan Pius
a03f3bbf0e Merge "ConnectivityManager: Provide API's to include location sensitive info" 2021-03-12 05:56:29 +00:00
Treehugger Robot
c3d9db6ed9 Merge "Remove Slog usage in NetworkState" am: 18cc3dc34f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628360

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6e01b140db4d44de081ba4d87cca63578271500e
2021-03-12 05:15:42 +00:00
Remi NGUYEN VAN
f80b769f4e Merge "Move ParseException to Connectivity" am: 24162a26ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626205

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I06ac628c283c0a59a756fb5d6e94afb5aef949dd
2021-03-12 05:12:33 +00:00
Treehugger Robot
18cc3dc34f Merge "Remove Slog usage in NetworkState" 2021-03-12 05:12:26 +00:00
Remi NGUYEN VAN
24162a26ff Merge "Move ParseException to Connectivity" 2021-03-12 04:27:55 +00:00
Lucas Lin
ca62593ba7 Merge changes Ib80f814f,Ic605e489 am: 3ef74f3cab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626209

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94fd187e5f2cc0428807668f82b3a29ad8b66c47
2021-03-12 03:56:18 +00:00
Lucas Lin
3ef74f3cab Merge changes Ib80f814f,Ic605e489
* changes:
  Use new API - getIpSecNetIdRange() in IpSecService
  Add a new API to get the network ID range of IPSec tunnel interface
2021-03-12 03:30:32 +00:00
Remi NGUYEN VAN
907ebd4f90 Create ServiceConnectivityResources
Create the ServiceConnectivityResources package, which contains
resources Connectivity unbundled from platform resources.

Migrate the first few resources from ConnectivityService that have no
RRO in AOSP. To avoid boot time impact, avoid loading the resources in
the ConnectivityService constructor.

Bug: 182125649
Test: atest FrameworksNetTests
Merged-In: I77ac6f4303c54acc96f16e18ef02add30298ff3d
Change-Id: I77ac6f4303c54acc96f16e18ef02add30298ff3d
2021-03-12 12:09:13 +09:00
Roshan Pius
e08bc1803c ConnectivityManager: Provide API's to include location sensitive info
Existing NetworkCallback users will get NetworkCapabilities with
location sensitive data removed (except for ownerUid which will be
added for existing apps for backwards compatibility). Apps
have to opt-in to receive location sensitive data.

Note: This was chosen because WifiInfo is the only TransportInfo tha
has location sensitive info & that was added only in Android 12. If we
choose to default to true, all existings apps retrieving
NetworkCapabilities for wifi networks will be blamed for location access
unnecessarily.

Changes:
i) Add a flag in NetworkCallback creation to retrieve
NetworkCapabilities with location sensitive info in their callback.
(More flags are being planned for NetworkCallback for throttling
callback frequency, etc)
ii) For NetworkCapabilities.getOwnerUid(), we will continue to send the
data for apps targeting older SDK (since this is an existing field and
the new flag defaults location sensitive data to off).

Bug: 156867433
Test: atest android.net
Test: atest com.android.server
Change-Id: If70b5ea6f5c8885f0c353c8df08a826d55fe7f7a
2021-03-11 18:27:18 -08:00
Remi NGUYEN VAN
17ad9338bc Merge changes from topic "ethernet_specifier" am: de3d545cf1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626207

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ef1a287439b5f5705ff3b3b4de4ded54f61c1c1
2021-03-12 00:12:52 +00:00
Remi NGUYEN VAN
40fe7c287b Add Ethernet, TestNetworkSpecifier API am: ea33ac97f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574300

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1a1b38fb6b8b6831bac016a8352ae9073758f9af
2021-03-12 00:10:08 +00:00
Remi NGUYEN VAN
de3d545cf1 Merge changes from topic "ethernet_specifier"
* changes:
  Fix common tests on Q and R
  Add Ethernet, TestNetworkSpecifier API
2021-03-11 23:51:49 +00:00
Treehugger Robot
de1cef76d7 Merge changes Iac9487e8,Ifa411c7b am: 999506022f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622675

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2cf126259f903d407830b1e8bc2d3fcdc02b97c2
2021-03-11 23:15:17 +00:00
lucaslin
5cdbcfb7fa Add a new API to get the network ID range of IPSec tunnel interface
- Add a new API to get the network ID range of IPSec tunnel
interface.
- Use the new API in IpSecServiceTest to make sure the result is
the same. Follow-up commit will change the logic in
IpSecService#reserveNetId(), the modified test can ensure the
correctness of the new change.

Bug: 172183305
Test: atest FrameworksNetTests:IpSecServiceTest
Change-Id: Ic605e48941fc9d6482cdcd01a8adcdc9b6d586a6
2021-03-12 00:46:33 +08:00
junyulai
e1b65bdbfe [VCN12] Expose setSubIds/getSubIds APIs
Test: atest NetworkCapabilitiesTest
Bug: 175662146
Change-Id: Ia4b98bc6c5fcefee44233f3b7fbb6517a0e8870e
2021-03-11 23:03:19 +08:00