Commit Graph

12736 Commits

Author SHA1 Message Date
Paul Hu
970d67d760 Merge "Replace interal okhttp APIs" am: e3ed08a24d am: c7b4df71f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622669

Change-Id: I11df051ca4a32ab72b93cf0e7ebb21457e9a5196
2021-03-16 13:03:58 +00:00
Paul Hu
c7b4df71f6 Merge "Replace interal okhttp APIs" am: e3ed08a24d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622669

Change-Id: I9f4e11b6e2ed2c5c09d7ea38e885de7186871edf
2021-03-16 12:44:35 +00:00
Lucas Lin
cb2db75d6f Merge "Remove NETWORK_STACK_UID check" am: 5f7eb9024e am: f23bda53b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635323

Change-Id: I82eec664bd11bfb713e52c08fc38dc49dec973c4
2021-03-16 12:44:29 +00:00
Paul Hu
e3ed08a24d Merge "Replace interal okhttp APIs" 2021-03-16 12:18:49 +00:00
Lucas Lin
f23bda53b2 Merge "Remove NETWORK_STACK_UID check" am: 5f7eb9024e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635323

Change-Id: I5ae4b49d3168e48ccd6b61ee349ae89041e3de05
2021-03-16 12:06:10 +00:00
Lucas Lin
5f7eb9024e Merge "Remove NETWORK_STACK_UID check" 2021-03-16 11:26:24 +00:00
Lucas Lin
8885169a2e Merge "Add comments to describe the value of converting hex to decimal" am: 26f778d2bd am: dc6444c414
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635221

Change-Id: I200d8ccb606e3bf440aaba0a875097b56b79a0c6
2021-03-16 09:45:35 +00:00
lucaslin
2d72a13e60 Remove NETWORK_STACK_UID check
NETWORK_STACK_UID check was introduced by aosp/1134635, and it
assumed that wifi factories/agents will be running on the network
stack process, but it didn't eventually. It runs in the system
server instead. So remove this check.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ie11268738e364e252f18876f7a4a0dc064ca8b9c
2021-03-16 09:16:38 +00:00
Lucas Lin
dc6444c414 Merge "Add comments to describe the value of converting hex to decimal" am: 26f778d2bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635221

Change-Id: Id012600c0f06b25c90598543a20673e6f515bf29
2021-03-16 09:05:38 +00:00
Lucas Lin
9ecf4d330b Merge "Have a new API to get private DNS mode" am: 11a286c9b5 am: eafa4097bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620860

Change-Id: I5441212823663f02d20cecfbfdba126c8ed6e0de
2021-03-16 08:46:31 +00:00
Lucas Lin
26f778d2bd Merge "Add comments to describe the value of converting hex to decimal" 2021-03-16 08:31:10 +00:00
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
a73e64726f Merge "[NS01] Add NetworkScore" am: 98de10a7a1 am: 18294fcbb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556099

Change-Id: I3fede24f8b38222d259f42e86ac27962ca687fb4
2021-03-16 07:08:25 +00:00
Remi NGUYEN VAN
40078d1567 Merge "Add ParseException constructors to API" am: ef7b38b334 am: 2299e83d12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635044

Change-Id: If6c7a232857a801ea5872c3beeba90d426a72d5a
2021-03-16 07:08:04 +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
19e5014a61 Merge "Create ServiceConnectivityResources" am: eb46aa1c58 am: 4df498eb9a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620871

Change-Id: Ia7855ef7125726ecec0c4509b5026aeb5621cd3d
2021-03-16 03:50:47 +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
paulhu
e5852fbc9a Replace interal okhttp APIs
Connectivity is becoming a mainline module in S but mainline
modules are not allowed to use non-formal APIs. Thus, replace
internal okhttp APIs to stable libcore APIs which are created for
using HttpURLConnectionFactory.

Bug: 182238821
Test: atest FrameworksNetTests
Change-Id: I56ba1b9e6e94f9c6519c3f1c8f0c5993fccbe185
2021-03-15 23:06:15 +08:00
Lorenzo Colitti
35667ce499 Merge "Call clearCallingIdentity when calling registerNetworkProvider in TNS" am: 85bea4887f am: 3e0314d68f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635045

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6edda160620b4a3cbcf85f21081a41d959cf3173
2021-03-15 14:24:34 +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
2b89f2ae7f Merge changes from topic "pacproxy-service" am: 267bebc6a9 am: de062690cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553959

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ife210de3adbdaff6c88caf744d805571b365b294
2021-03-15 12:30:17 +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
Sorin Basca
5d1f25b158 Merge changes from topic "jni-errno-exception" am: 685a40571c am: d43926c07a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619421

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib4106aed41c8e00a27fa8fb6dbc4dba5ac08d6c2
2021-03-15 12:12:35 +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
lucaslin
286330701c Add comments to describe the value of converting hex to decimal
Bug: 172183305
Test: N/A
Change-Id: Id274295d6c8c97d3014214f875168ff968f79bb6
2021-03-15 09:55:39 +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
7e3ba1577f Merge "[CS15]Do not use hidden API of PlatformProperties" am: b9db86ff3b am: 44d34df483
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623261

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bd903cd723f0c3d87ac9d2aae14a95132e7a2ea
2021-03-15 09:18:29 +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
d38a017b28 Merge "Revert "Remove connectivity dependency on Preconditions"" am: c407499db5 am: 46adcba662
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I396e8936cf8adc0c46555a3ef5d7771d3a268594
2021-03-15 08:01:03 +00:00
Paul Hu
174ffe652c Merge "Replace InetAddress#parseNumericAddress" am: 67503fefc6 am: 23be8da17e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5f14d0196b3c641108b1e82def2998d2744cb855
2021-03-15 07:44:28 +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
3ddc646220 Merge "Remove connectivity dependency on Preconditions" am: 83c34e272a am: b8c6c46986
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628399

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I462f0d97bf150af7f32238e15e88d34e4c17eed7
2021-03-15 07:44:12 +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