Commit Graph

12465 Commits

Author SHA1 Message Date
Lucas Lin
eafa4097bd Merge "Have a new API to get private DNS mode" am: 11a286c9b5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620860

Change-Id: I2600965b38f3039c0cca1c39d294ad9665aeab17
2021-03-16 08:06:35 +00:00
Lucas Lin
11a286c9b5 Merge "Have a new API to get private DNS mode" 2021-03-16 07:39:35 +00:00
Chalard Jean
18294fcbb3 Merge "[NS01] Add NetworkScore" am: 98de10a7a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556099

Change-Id: I71f1937ffd099283d7f753b843d4cf2a771fe22b
2021-03-16 06:53:52 +00:00
Remi NGUYEN VAN
2299e83d12 Merge "Add ParseException constructors to API" am: ef7b38b334
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635044

Change-Id: I2eca0681d3a94da26307663d56975327bbd06c6a
2021-03-16 06:49:08 +00:00
Chalard Jean
98de10a7a1 Merge "[NS01] Add NetworkScore" 2021-03-16 06:36:07 +00:00
Remi NGUYEN VAN
ef7b38b334 Merge "Add ParseException constructors to API" 2021-03-16 06:25:16 +00:00
Remi NGUYEN VAN
4df498eb9a Merge "Create ServiceConnectivityResources" am: eb46aa1c58
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
eb46aa1c58 Merge "Create ServiceConnectivityResources" 2021-03-16 02:29:31 +00:00
Lorenzo Colitti
3e0314d68f Merge "Call clearCallingIdentity when calling registerNetworkProvider in TNS" am: 85bea4887f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635045

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie0ca67f38da9d4a70911485d2630fe8bae4cbdfa
2021-03-15 13:48:39 +00:00
Lorenzo Colitti
85bea4887f Merge "Call clearCallingIdentity when calling registerNetworkProvider in TNS" 2021-03-15 13:09:14 +00:00
Aaron Huang
de062690cc Merge changes from topic "pacproxy-service" am: 267bebc6a9
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
267bebc6a9 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
Sorin Basca
d43926c07a Merge changes from topic "jni-errno-exception" am: 685a40571c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619421

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If704b8e72e74f0e1afcfc59d5ad03c3003e2643a
2021-03-15 11:34:48 +00:00
Sorin Basca
685a40571c Merge changes from topic "jni-errno-exception"
* changes:
  Using jniThrowErrnoException in android_util_Process
  Using jniThrowErrnoException in android_os_SharedMemory
  Using jniThrowErrnoException in android_net_NetworkUtils
2021-03-15 11:16:14 +00:00
Chalard Jean
dd75352682 [NS01] Add NetworkScore
As attested by numerous TODOs in the code, a new way of
representing network quality and policy is needed instead
of an int.

An int representing the quality of the network requires
all parties using it to know how all other parties are
using it, and implementation details about the decision
algorithm. For all intents and purposes, the selection
is left to individual network factories who try to
achieve a desired result while piecing together all
possible states of the system.

As the number of such cases and desires increases, this
becomes both intractable and unmaintainable. Indeed, at
this time in the codebase nobody can really predict exactly
how a given change in score will affect selection across
the board, and it is essentially impossible to figure out
the behavior of network selection by inspecting the code
because the moving parts are scattered throughout the
entire codebase.

Having an object encapsulating policy and quality values
will let us centralize the selection and make it again
possible to maintain without knowledge of all behaviors
of all network factories. It will also provide better
guarantees of respecting policy, and allow bugfixes that
were not possible before because they'd touch too many
parts of the code.

Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests
Change-Id: I3185a6412b9b659798faf0c6882699e9c63cc115
2021-03-15 09:49:47 +00:00
Frank Li
44d34df483 Merge "[CS15]Do not use hidden API of PlatformProperties" am: b9db86ff3b
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
b9db86ff3b Merge "[CS15]Do not use hidden API of PlatformProperties" 2021-03-15 08:01:26 +00:00
Remi NGUYEN VAN
46adcba662 Merge "Revert "Remove connectivity dependency on Preconditions"" am: c407499db5
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
c407499db5 Merge "Revert "Remove connectivity dependency on Preconditions"" 2021-03-15 07:30:20 +00:00
Remi NGUYEN VAN
00c531f4e0 Revert "Remove connectivity dependency on Preconditions"
This reverts commit 1c17c88002.

Reason for revert: Build broken: b/182721112

Change-Id: Ibc84ec6d7900fdcf0bc14cd7036f9c08287711db
2021-03-15 07:27:44 +00:00
Paul Hu
23be8da17e Merge "Replace InetAddress#parseNumericAddress" am: 67503fefc6
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
67503fefc6 Merge "Replace InetAddress#parseNumericAddress" 2021-03-15 07:03:46 +00:00
Remi NGUYEN VAN
b8c6c46986 Merge "Remove connectivity dependency on Preconditions" am: 83c34e272a
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
b2ad4a95ba 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
83c34e272a Merge "Remove connectivity dependency on Preconditions" 2021-03-15 06:36:15 +00:00
lifr
51b9799737 [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
lucaslin
b0228dae26 Call clearCallingIdentity when calling registerNetworkProvider in TNS
The caller to create a TestNetworkService via
ConnectivityManager#startOrGetTestNetworkManager should have
passed the MANAGE_TEST_NETWORKS permission check and the caller
doesn't need to declare the permission to pass the permission
check of registerNetworkProvider. So call clearCallingIdentity
when calling registerNetworkProvider in TestNetworkService.

Bug: 181573283
Test: atest CtsNetTestCases:ConnectivityManagerTest#testRequestBackgroundNetwork
Change-Id: Ia28627dacf933d1937978ed9709b975c9a4660ce
2021-03-15 03:29:29 +00:00
Remi NGUYEN VAN
b13973838a Merge "Remove VpnType usage in VpnTransportInfo" am: e7ea40527a
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
64f37fc02d Merge "Create a service-connectivity-pre-jarjar library" am: 1e976dd3af
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
e7ea40527a Merge "Remove VpnType usage in VpnTransportInfo" 2021-03-15 01:52:30 +00:00
Remi NGUYEN VAN
1e976dd3af Merge "Create a service-connectivity-pre-jarjar library" 2021-03-15 01:32:47 +00:00
Remi NGUYEN VAN
91efc0fa86 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
cbe7381c31 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
lucaslin
8f02661e3f Have a new API to get private DNS mode
- Expose PRIVATE_DNS_MODE_OFF, PRIVATE_DNS_MODE_OPPORTUNISTIC and
PRIVATE_DNS_MODE_PROVIDER_HOSTNAME for external users.
- Since PRIVATE_DNS_DEFAULT_MODE_FALLBACK might be changed from
release to release, so it cannot be exposed as a system API.
Remove PRIVATE_DNS_DEFAULT_MODE_FALLBACK and have a new API -
getPrivateDnsMode() for users to get the private DNS mode instead.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I02a1e91b4eafb5f5df3eada1c07b99849a050c3c
Merged-In: I02a1e91b4eafb5f5df3eada1c07b99849a050c3c
2021-03-12 17:56:09 +08:00
Remi NGUYEN VAN
b392e8ffa6 Merge "Remove usage of hidden InetSocketAddress constructor" am: 7e8db8aed8
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
16f7830964 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
2e28bfa25b Merge "Remove hidden @NetworkType in NetworkInfo" am: f829e86db8
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
3fef231b42 Merge "Remove hidden INVALID_RESOURCE_ID in unused param" am: 31558edb8e
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
43b1fa710e Merge "Use ParcelDescriptor.fromSocket instead of getFileDescriptor" am: 0a30c831a4
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
7e8db8aed8 Merge "Remove usage of hidden InetSocketAddress constructor" 2021-03-12 09:02:15 +00:00
Treehugger Robot
f829e86db8 Merge "Remove hidden @NetworkType in NetworkInfo" 2021-03-12 08:59:35 +00:00
Treehugger Robot
31558edb8e Merge "Remove hidden INVALID_RESOURCE_ID in unused param" 2021-03-12 08:57:55 +00:00
Treehugger Robot
0a30c831a4 Merge "Use ParcelDescriptor.fromSocket instead of getFileDescriptor" 2021-03-12 08:57:47 +00:00
Junyu Lai
10af6fb500 Merge changes from topics "vcn04", "vcn12" am: d219f4807c
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
d219f4807c 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
312bcb6871 Merge "ConnectivityManager: Provide API's to include location sensitive info" am: f72f1d9e28
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
f72f1d9e28 Merge "ConnectivityManager: Provide API's to include location sensitive info" 2021-03-12 05:56:29 +00:00
Paul Hu
d5eb1fad4d Merge "Stop using PackageManagerInternal in PermissionMonitor" am: 2269d7e3fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620879

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I61c84ce1b8e1a9ccdb8fd1581bf0c3906db943f3
2021-03-12 05:51:23 +00:00
Paul Hu
2269d7e3fa Merge "Stop using PackageManagerInternal in PermissionMonitor" 2021-03-12 05:23:05 +00:00
Treehugger Robot
15516e3f0b Merge "Remove Slog usage in NetworkState" am: 437ee783c4
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