Commit Graph

294 Commits

Author SHA1 Message Date
Treehugger Robot
6ae29ff41a Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" am: 33457035e7 am: 32f85c2cf3 am: 281f77c93c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640985

Change-Id: I933407d55e33a2cfac44ded44bc58fc0deb9da80
2021-03-19 05:32:21 +00:00
Remi NGUYEN VAN
eed43af3a4 Merge "Remove Preconditions usage in TestNetworkSpecifier" into sc-dev 2021-03-19 04:49:52 +00:00
Remi NGUYEN VAN
6b40be797e Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" into sc-dev 2021-03-19 04:49:06 +00:00
Treehugger Robot
33457035e7 Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" 2021-03-19 04:13:36 +00:00
Remi NGUYEN VAN
7e0ffd0ec4 Merge "Add InetAddressCompat" am: 871321f41b am: 2c311c8b74 am: 0afced9423
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645289

Change-Id: I90dba64e96080cbd29f538de6dcb514dea4b6cbd
2021-03-19 02:52:58 +00:00
Remi NGUYEN VAN
61e1e15104 Merge "Move network selection utils to Connectivity" am: d3410e053e am: da9eba3873 am: 73d3166547
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645291

Change-Id: I0b984a01e1688b8484f3500945d0e429e1b3ca00
2021-03-19 02:52:41 +00:00
Remi NGUYEN VAN
bcd9def075 Remove Preconditions usage in TestNetworkSpecifier
Preconditions is a hidden API utility. It can be easily replace by
inline checks.

Bug: 177046265
Test: m
Change-Id: I3f722075fb9c74e12e40348ba4faad2f0fa67178
2021-03-19 00:35:27 +00:00
Remi NGUYEN VAN
1818dbb99a Revert "Revert "Remove connectivity dependency on Preconditions""
Preconditions.checkNotNull is deprecated to be replaced by
Objects.requireNonNull, and other methods can easily be replaced by
inline checks.

Preconditions is an internal API class that should not be used by
unbundled jars.

Bug: 177046265
Change-Id: I3a67d266b32142c034520acbcdc30f7213db5e13
Test: m
2021-03-19 00:35:27 +00:00
Remi NGUYEN VAN
871321f41b Merge "Add InetAddressCompat" 2021-03-18 23:58:16 +00:00
Remi NGUYEN VAN
d3410e053e Merge "Move network selection utils to Connectivity" 2021-03-18 23:57:34 +00:00
Anthony Stange
f968c741b8 Merge changes from topic "revert-1626206-replaceUidRange-MSYTKFNGUE" am: 35b926cc47 am: e0eeb8261e am: ed172af621
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645768

Change-Id: Ia5cedb12112b04885c3f9270b9171c6494b8d2af
2021-03-18 18:29:41 +00:00
Lucas Lin
7d528eeee3 Merge "Expose systemReady for SystemServer" am: 56564e061c am: d77b8f6384 am: a71f7d4697
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640142

Change-Id: I95488b39a32ed9086839eab6c457ed6f75472df1
2021-03-18 18:27:08 +00:00
Chiachang Wang
866e634681 Merge changes from topic "replaceUidRange" am: 268a9f56f2 am: a0f1955623 am: 4195f030e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626206

Change-Id: Ibc5e47f175a0e5433492f81068da9f42496e660b
2021-03-18 18:26:42 +00:00
Chiachang Wang
c93ae1c2a9 Merge "Expose APIs for Settings" am: e584943ca1 am: 65ec6feca0 am: 9ecd16980c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644202

Change-Id: I13a56aa7dcc19efef3dc268fabfa52069360eb18
2021-03-18 18:26:16 +00:00
Chalard Jean
3303b63519 Merge "Move constants to MODULE_LIB" am: 8c288603d1 am: 9759496ca0 am: 42e932bc2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640141

Change-Id: I514f5a3d1a4b1498f58170ac652ede394ddf6aeb
2021-03-18 18:24:57 +00:00
Anthony Stange
35b926cc47 Merge changes from topic "revert-1626206-replaceUidRange-MSYTKFNGUE"
* changes:
  Revert "Replace the usage of UidRange"
  Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."
2021-03-18 16:40:53 +00:00
Anthony Stange
b6c51b2c97 Revert "Replace the usage of UidRange"
Revert "Add shims for NetworkRequest"

Revert submission 1626206-replaceUidRange

Reason for revert: Breaking build - b/183106405
Reverted Changes:
I0b79c73e8:Add shims for NetworkRequest
I4bc0daf5a:Replace the usage of UidRange
I4e5aec6ef:Replace the usage of UidRange
I107c329d4:Expose uids related APIs in NetworkRequest and Net...

Change-Id: I6290429db1c8e787f8138b55b98fd92a74ac6402
2021-03-18 16:30:59 +00:00
Anthony Stange
fa6349a6c7 Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."
Revert "Add shims for NetworkRequest"

Revert submission 1626206-replaceUidRange

Reason for revert: Breaking build - b/183106405
Reverted Changes:
I0b79c73e8:Add shims for NetworkRequest
I4bc0daf5a:Replace the usage of UidRange
I4e5aec6ef:Replace the usage of UidRange
I107c329d4:Expose uids related APIs in NetworkRequest and Net...

Change-Id: I45e08f89533af0d6851add38fecb5c6c114615ae
2021-03-18 16:30:59 +00:00
Remi NGUYEN VAN
5bfc990e4a Move network selection utils to Connectivity
NetworkScore, IOnCompleteListener should be in the Connectivity scope,
as they are supporting classes for the ConnectivityManager APIs.

Bug: 181512874
Test: m
Change-Id: I6dc40a80e0bf5f86f5625b657b01eba969d41fcf
2021-03-18 23:57:26 +09:00
Remi NGUYEN VAN
342ddddd9d Add InetAddressCompat
Although the InetAddress symbols used by Connectivity are stable core
platform API, and should be usable, the core_current stubs are not yet
part of the module_current API.
Until that is fixed, add an InetAddressCompat utility that calls the
three static methods by reflection.

Test: atest FrameworksNetTests CtsNetTestCases
Bug: 183097033
Change-Id: I797009aeff1d39ae2dc06ef69d2e235689b43c89
2021-03-18 23:54:04 +09:00
Paul Hu
4e8bb42a55 resolve merge conflicts of c85aeee86ec35f9e942e02e7d13450dce47b1325 to sc-dev
Bug: 182538166
Test: atest FrameworksNetTests
Change-Id: Idd5d75e0e9a7ad4f840b88da55d28fbaa2275dd0
2021-03-18 14:50:05 +00:00
Remi NGUYEN VAN
a796abb03f Merge changes I4ad0ca60,I8a03162b into sc-dev
* changes:
  Expose isUidNetworkingBlocked and isUidRestrictedOnMeteredNetworks
  Add multipath preference, background status API
2021-03-18 14:07:12 +00:00
Lucas Lin
56564e061c Merge "Expose systemReady for SystemServer" 2021-03-18 13:40:54 +00:00
Chiachang Wang
268a9f56f2 Merge changes from topic "replaceUidRange"
* changes:
  Expose uids related APIs in NetworkRequest and NetworkCapabilities
  Replace the usage of UidRange
2021-03-18 13:36:39 +00:00
Chiachang Wang
e584943ca1 Merge "Expose APIs for Settings" 2021-03-18 13:27:47 +00:00
Chalard Jean
8c288603d1 Merge "Move constants to MODULE_LIB" 2021-03-18 12:29:38 +00:00
Paul Hu
b998511728 Merge "Add more connectivity module settings" 2021-03-18 12:22:55 +00:00
Remi NGUYEN VAN
749a39a431 Migrate framework-connectivity internal resources
Use ServiceConnectivityResources instead.
Start by creating resources in the ServiceConnectivityResources package
to match the internal configuration, and common overlays.

Bug: 182125649
Test: device boots, has connectivity
Change-Id: I77a3efca2cd644f9828db1ed5d3cae8070fb8363
2021-03-18 09:02:13 +00:00
Remi NGUYEN VAN
8c2d521b8d Add connectivity protos to framework-connectivity
The protos are built separately by framework-connectivity from framework
protos, keeping only android.net protos for the connectivity jar.

Bug: 171860710
Test: m framework-connectivity.impl
Change-Id: I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c
2021-03-18 08:07:20 +00:00
Remi NGUYEN VAN
1fdeb50d9a Add multipath preference, background status API
Add APIs for getMultipathPreference and getRestrictBackgroundStatus.
Both are used by Connectivity to back the external
ConnectivityManager.getRestrictBackgroundStatus, and
ConnectivityManager.getMultipathPreference APIs.

Test: atest CtsNetTestCases
      atest ConnectivityServiceTests
      atest NetworkPolicyManagerServiceTest
Bug: 176289731
Change-Id: I8a03162b2f6691086bb64e75ffd354cdfca7f86a
2021-03-18 06:08:00 +00:00
Remi NGUYEN VAN
2c196b6487 Merge "Add framework-connectivity.impl" am: 0fcb8d6db4 am: 5e478bf5bf am: 954160f749
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635039

Change-Id: Ief30f77f949669d9b52ae3a6fe84f8db91179841
2021-03-18 04:36:38 +00:00
paulhu
c9925e096b Add more connectivity module settings
Add more connectivity module settings and update all references
to ConnectivitySettingsManager.

Bug: 182538166
Test: atest FrameworksNetTests
Change-Id: Ie96fbd0996ed3acb37099b6270bf3d4c2e558e9a
2021-03-18 11:58:29 +08:00
Remi NGUYEN VAN
5e478bf5bf Merge "Add framework-connectivity.impl" am: 0fcb8d6db4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635039

Change-Id: I9956c78228c2d04e20edf6fee1061861e26978b9
2021-03-18 03:33:42 +00:00
Chiachang Wang
f9294e7cd1 Expose APIs for Settings
ConnectivityManager will be a part of incoming connectivity
mainline. Settings will no longer to access the hidden methods.
For those methods that accept the interaction from users, they
should be exposed as formal interface to allow the
functionality. Expose them to API surface.

Bug: 172183305
Test: make update-api
Change-Id: Id4533b94291766bb060af0091b5ccb81a00630fd
2021-03-18 11:18:56 +08:00
Paul Hu
56824ea17f Merge "Add ConnectivitySettingsManager" am: 236835e920 am: f1fbb30c09 am: dc9bfe3386
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641759

Change-Id: Ib5ec1f8cc443d1b92215e6ab200fa383d719d053
2021-03-17 22:21:22 +00:00
Remi NGUYEN VAN
c13ff4aff6 Merge "Remove Protocol.BASE_* usage in Connectivity" am: 5a819fb84d am: 41fe4bfcd4 am: b9a3b1b03b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629266

Change-Id: I0bb7aec183efdeed894447a3b5abc446b9ca46c8
2021-03-17 22:20:59 +00:00
Lucas Lin
3fca5b232f Merge "Modify the comment of getPrivateDnsMode" am: 625db39870 am: bdc4e22fe4 am: afcec9cbfe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640143

Change-Id: I60147e1c828e5d82556e58b67b8f138f63228e8f
2021-03-17 22:19:20 +00:00
Chalard Jean
0f15b90f34 Merge changes I335e82e2,I84ba363d,I8f18083b,I854a952d,I00e23441 am: 24a9b5cad6 am: 1f51df82b1 am: 35b284e0ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622621

Change-Id: I5fa8e7b8bf35a5464868fdca4d115b3f9132c65f
2021-03-17 22:13:06 +00:00
Remi NGUYEN VAN
7f22e754de Merge "Remove MessageUtils usage in VpnTransportInfo" am: 4ad3ac7de6 am: d7bd61b340 am: bdaef78b90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635041

Change-Id: Ibf1592220cedb387d8edba27a7bbe49a36f42dc0
2021-03-17 22:10:16 +00:00
Junyu Lai
88ee4f1d03 Merge "[VCN14] Expose registerBestMatchingNetworkCallback" am: 29908cf3c4 am: 96e1290b7a am: 71bc2b560d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635047

Change-Id: Ic0cb87f3ac4e9df7b0b6e2d0344c43e66499900e
2021-03-17 22:08:56 +00:00
Junyu Lai
b4d8384170 Merge "[VCN13] Implement tracking best matching network" am: f98037abb3 am: 67a2b3eb30 am: 14865c4e07
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1633519

Change-Id: Ie252014cd9047c27fad3e451b80047493935dc3d
2021-03-17 16:08:50 +00:00
Paul Hu
4d39725b04 Merge "Replace interal okhttp APIs" am: 4fe7ff8d1f am: 7bd3aa2a13 am: 542786989d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622669

Change-Id: Ida687a8987385ef4525e41e609d7c8fedda9f1da
2021-03-17 16:07:31 +00:00
Lucas Lin
76c10401b5 Merge "Add comments to describe the value of converting hex to decimal" am: 3453ec5024 am: 3fa2c3e87a am: 172cce09da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635221

Change-Id: I0f978fd5fa0283a40db2897478483d680d44e9e9
2021-03-17 16:05:47 +00:00
Chalard Jean
7f2fddf60e Merge "[NS01] Add NetworkScore" am: 2a9450c234 am: c8aa29e41e am: 2d07595731
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556099

Change-Id: I953a773f8914152578a98d71b43d0a2e30a51aba
2021-03-17 16:04:22 +00:00
Remi NGUYEN VAN
fa39a26f93 Merge "Add ParseException constructors to API" am: a10ea9b5ee am: ff2bca11b2 am: a375a561a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635044

Change-Id: I4e4b1f4a70fcfaa43fa9b612e7fbd151093fd8fe
2021-03-17 16:03:23 +00:00
Remi NGUYEN VAN
eb6aa22205 Add framework-connectivity.impl
The library will be included in the connectivity module APEX when
migrating its sources out of framework-minus-apex.

Bug: 171540887
Test: m
Change-Id: I1595521eaced6e6997c076bb56b06ffdd22a4fa0
2021-03-18 00:29:08 +09:00
Paul Hu
f1fbb30c09 Merge "Add ConnectivitySettingsManager" am: 236835e920
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641759

Change-Id: I84e3e2eb6f507abf6220b43886f6ab9e1fad4218
2021-03-17 15:27:02 +00:00
Remi NGUYEN VAN
41fe4bfcd4 Merge "Remove Protocol.BASE_* usage in Connectivity" am: 5a819fb84d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629266

Change-Id: Ieca69d4ff1d2a7f3b369bb4dcabaa702fbab4594
2021-03-17 15:19:31 +00:00
Chiachang Wang
0c32e09028 Expose uids related APIs in NetworkRequest and NetworkCapabilities
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.

Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.

Test: make update-api
Bug: 172183305
Change-Id: I107c329d4d7130d488772166eae8b5e7aaa2ff04
2021-03-17 23:13:39 +08:00
Chiachang Wang
92ebd70044 Replace the usage of UidRange
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
2021-03-17 23:02:22 +08:00