Commit Graph

11803 Commits

Author SHA1 Message Date
Chalard Jean
8b1998bfb2 Merge "[NS] Tests : don't expect a score in NF#acceptRequest" am: c6bf15898a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556098

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia0039fe7dc3ccbdabe2c2d74241029a1d62456a0
2021-02-03 08:32:55 +00:00
Chalard Jean
c6bf15898a Merge "[NS] Tests : don't expect a score in NF#acceptRequest" 2021-02-03 08:10:19 +00:00
James Mattis
24bc30f408 Merge "Adding support for multiple "default" networks" am: ca0ab687be
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532548

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifeab79368573449cad035de2209db9640f861de3
2021-02-03 05:19:41 +00:00
James Mattis
ca0ab687be Merge "Adding support for multiple "default" networks" 2021-02-03 04:17:47 +00:00
Jeongik Cha
3de6e9c81e Merge "Specify version for aidl_interface explicitly" am: 7193b792e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1569000

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id433b0dc1a6619df372a050a98d8cb76bc40f5d2
2021-02-03 02:57:26 +00:00
Jeongik Cha
7193b792e6 Merge "Specify version for aidl_interface explicitly" 2021-02-03 02:21:26 +00:00
James Mattis
8af2d60519 Adding support for multiple "default" networks
Updating ConnectivityService foundational support for multiple default
networks by extending mDefaultRequest and mDefaultNetworkNai from single
instances to a HashMap to support more than a single default network.

Bug: 176027457
Bug: 172347841
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I2f5fa96c2d21ab883499e82afa74e73f3ca606cd
2021-02-02 16:14:36 -08:00
Treehugger Robot
f477bba3c4 Merge "Update frameworks to use unbundled version of BouncyCastle." am: 9671b7eca8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I691da785142fee5967674ac2cf1261e71c1f16e3
2021-02-02 14:41:24 +00:00
Junyu Lai
6c21a4dfde Merge "[VCN08] Expose NOT_VCN_MANAGED capability as system API" am: 2c5d744e80
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1563497

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I48f029e663fe397ce0f88d2de7a758530c093012
2021-02-02 14:37:47 +00:00
Treehugger Robot
9671b7eca8 Merge "Update frameworks to use unbundled version of BouncyCastle." 2021-02-02 14:37:05 +00:00
Junyu Lai
2c5d744e80 Merge "[VCN08] Expose NOT_VCN_MANAGED capability as system API" 2021-02-02 13:57:57 +00:00
Lorenzo Colitti
6964d11672 Merge changes I4f38a539,Id4f6c7f4 am: 7b49264237
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565198

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id68e4e0ff5995bbf04859834fb2aa0936ef651bc
2021-02-02 10:46:37 +00:00
Lorenzo Colitti
7b49264237 Merge changes I4f38a539,Id4f6c7f4
* changes:
  Add the underlying networks to NetworkAgentInfo#toString.
  Improve testing for network blocking.
2021-02-02 10:06:03 +00:00
Paul Hu
03b2f0dfda Merge "Remove ArrayUtils usage in connectivity frameworks classes" am: e59f31b85a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8063e83503dce99985e999235ab7eb75f7cd747
2021-02-02 09:07:11 +00:00
Paul Hu
e59f31b85a Merge "Remove ArrayUtils usage in connectivity frameworks classes" 2021-02-02 08:47:04 +00:00
Lorenzo Colitti
b852199e0a Add the underlying networks to NetworkAgentInfo#toString.
This is useful in debugging VPN networks.

Bug: 173331190
Test: manual
Change-Id: I4f38a53980191a1813c2ef313fedc51af98f18f6
2021-02-02 16:17:22 +09:00
Lorenzo Colitti
786947b4ac Improve testing for network blocking.
This simplifies the uidNetworkingBlocked method and makes it more
realistic by supporting more combinations of rules than just the
four used by this test.

Also support RULE_ALLOW_METERED, and add test coverage for it.

Test: test-only change
Change-Id: Id4f6c7f41429f3ae7841d3214b3e5e95ec591f85
2021-02-02 16:17:22 +09:00
Treehugger Robot
b16235f683 Merge "Have connectivity self-register manager classes" am: 5dea66088e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552657

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I73f3c0c312ae9e1786204776e98240c259416a8b
2021-02-02 05:43:12 +00:00
Treehugger Robot
5dea66088e Merge "Have connectivity self-register manager classes" 2021-02-02 05:01:04 +00:00
Lucas Lin
89dfaaee8d Merge "Use function inside NetdUtils instead of NetworkManagementService" am: 8ecb705379
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534904

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibc30a45e691ec76703452595b62b588b78cd8048
2021-02-02 04:18:56 +00:00
Lucas Lin
8ecb705379 Merge "Use function inside NetdUtils instead of NetworkManagementService" 2021-02-02 03:38:38 +00:00
junyulai
ad1760bd6d [VCN08] Expose NOT_VCN_MANAGED capability as system API
Test: m -j doc-comment-check-docs
Fix: 177299683
Bug: 175662146
Change-Id: Iaa53d21774ea48af5fe339b57bf1235c77f295a0
2021-02-02 11:34:09 +08:00
Jeongik Cha
cdd223033d Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: I4c909903521cd8a766dca5312edd98d17b9e1308
2021-02-02 10:11:31 +09:00
Serik Beketayev
cd3b07080b Merge "[Mainline] Migrate com.google.android.collect pkg" am: 9b3338820a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552881

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1648cf0bc1803d59787edb8715b0abc63728cc5d
2021-02-01 23:50:59 +00:00
Serik Beketayev
9b3338820a Merge "[Mainline] Migrate com.google.android.collect pkg" 2021-02-01 23:11:56 +00:00
Chalard Jean
efb8409f66 [NS] Tests : don't expect a score in NF#acceptRequest
The score argument is going away, so there no longer
is a need to test it. It's never been used by anybody
and is actually a problem going forward.

Since removing the argument requires a small re-arch
of the testing tool anyway, rebuild expecting requests
on top of TrackRecord. This simplifies the test a
great deal, as well as (as observed in running the
tests) makes the test faster.

Test: this
Change-Id: If03b9e64f14ac8ffa5398b964939a9a45a74b28d
2021-02-01 23:06:49 +09:00
Lorenzo Colitti
203c72f86c Merge changes Idcc9e32c,I58769bb7 am: e73a36ba21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If12227f11585de18d92995cf603765b18f91764f
2021-02-01 11:36:03 +00:00
Lorenzo Colitti
e73a36ba21 Merge changes Idcc9e32c,I58769bb7
* changes:
  Remove getFilteredNetworkState and add @NonNull in NetworkState.
  Add test coverage for get*NetworkInfo on metered networks.
2021-02-01 10:56:19 +00:00
paulhu
4797107480 Remove ArrayUtils usage in connectivity frameworks classes
Instead, use CollectionUtils from frameworks/libs/net.

Bug: 174541037
Test: atest FrameworksNetTests
Change-Id: I610e00302cf76510e9e34ac8a9a5f738e5ecd0c7
2021-02-01 16:30:08 +08:00
Remi NGUYEN VAN
fe97b48b6e Have connectivity self-register manager classes
As connectivity services are planned to move to a separate module, move
the manager classes registration from SystemServiceRegistry to
ConnectivityServicesRegistrar, using the registerContextAwareService
APIs.

This follows patterns and naming in WifiFrameworkInitializer.

Bug: 171540887
Test: device boots, connectivity working
Change-Id: I62ced1275750c73f209bac8ec3a3204b95695b83
2021-02-01 17:10:39 +09:00
Lorenzo Colitti
6f55e61287 Remove getFilteredNetworkState and add @NonNull in NetworkState.
getFilteredNetworkState is only used in two places, both of which
use only small parts of the NetworkState that is returned to
them. Remove the method and replace it with inline code in the
two callers. NetworkState is a fairly expensive object, and this
removes the need to perform lots of defensive copies of data that
the caller does not need.

Also remove the only call to the NetworkState constructor in
ConnectivityService. That leaves only one caller to the
NetworkState constructor, the one in NetworkAgentInfo. This
constructor is called with defensive copies of NetworkInfo,
LinkProperties, and NetworkCapabilities, so mark these three
parameters as @NonNull. It's also called with a non-null
Network, because NetworkAgentInfo is only constructed with
non-null Networks, so mark the network parameter @NonNull as
well.

In order to make the arguments in the NetworkState constructor
@NonNull, introduce a new constructor that sets everything to
null and make NetworkState.EMPTY call it.

Test: atest FrameworksNetTests
Change-Id: Idcc9e32c53533b0cf61494517e62d4c184fa7610
2021-02-01 16:12:04 +09:00
Lorenzo Colitti
0e920055dc Add test coverage for get*NetworkInfo on metered networks.
Test: test-only change
Change-Id: I58769bb768978d0acff1da6d32c2f6942c43508b
2021-02-01 15:58:12 +09:00
Remi NGUYEN VAN
f172ba283d Merge "Move module sources to packages/Connectivity" am: 3d70ab73eb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552656

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I42989abf6e81a4c0e7bed6b0890a1ee4f2c30191
2021-02-01 06:09:33 +00:00
Remi NGUYEN VAN
8f37b3f55b Move module sources to packages/Connectivity
Files that are planned to be part of the connectivity module are grouped
in packages/Connectivity, so they can be built separately and moved in
one operation with their history into packages/modules/Connectivity.

This places the files in the existing framework-connectivity-sources
filegroup instead of the current framework-core-sources filegroup. Both
are used the same way in framework-non-updatable-sources.

Bug: 171540887
Test: m
Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e
2021-02-01 11:52:14 +09:00
Junyu Lai
d53184a4de Merge "[FUI16] Expose setSubscriberId in NetworkAgentConfig as system API" am: bc1a11fdb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556552

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4d3eb542b1c3a9aabf51c58b8d83ad3e669f2077
2021-01-29 23:04:04 +00:00
Junyu Lai
ba245e077f Merge "[FUI04] Refactor VpnInfo" am: 149add890e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537211

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I59054bfe1761e28cdfb8e8e6d67e4aabda399adc
2021-01-29 22:55:54 +00:00
Junyu Lai
336c5d93a7 Merge "[VCN06] Support request background network" am: 2141aec60a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553866

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic959a453489767781ebb8fb71effb2c14e0f69d8
2021-01-29 22:46:27 +00:00
Junyu Lai
bc1a11fdb2 Merge "[FUI16] Expose setSubscriberId in NetworkAgentConfig as system API" 2021-01-29 17:15:28 +00:00
junyulai
6e74469a64 [FUI16] Expose setSubscriberId in NetworkAgentConfig as system API
The wifi (mainline module) need to set the subscriberId for specific
wifi network.

Bug: 176396812
Test: TreeHugger
Change-Id: Ib568ce0c2d1b629e1c20e7ac8d8b78579cf4825c
2021-01-29 22:09:10 +08:00
Junyu Lai
149add890e Merge "[FUI04] Refactor VpnInfo" 2021-01-29 13:54:53 +00:00
Junyu Lai
2141aec60a Merge "[VCN06] Support request background network" 2021-01-29 11:02:02 +00:00
junyulai
62d35f7e59 [FUI04] Refactor VpnInfo
As a preparation of exposing system API. This patch does some
harmless refactoring, which includes:
  1. Change raw arrays into lists according to API guidelines.
  2. Write test.
  3. Rename class to UnderlyingNetworkInfo.
  4. Rename vpnIface to iface.
  5. Make underlyingIfaces @NonNull in order to adapt new
     unparceling code.
  6. implement equals and hashCode for testing.

Test: atest android.net.UnderlyingNetworkInfoTest
Bug: 174123988

Change-Id: I405c21e57c4af8a12a9dd0a1749b9e6690f87045
2021-01-29 17:44:32 +08:00
Junyu Lai
23568a4f04 [VCN06] Support request background network
This will be mainly used by VCN management service which will
need to hold the networks but preserve the backgrounded-ness
of the networks.

Test: android.net.ConnectivityManagerTest#testRequestType
Test: android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork /
      --rerun-until-failure 100
Test: ConnectivityServiceTest#testBackgroundNetworks
Test: m -j doc-comment-check-docs
Bug: 175662146

Change-Id: I463c7a3139a286e50ea71e674060975ce228caa9
2021-01-29 14:42:32 +08:00
Junyu Lai
227fc5d23d Merge "[VCN01] Add NOT_VCN_MANAGED capability" am: 00caf89795
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549897

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I30b0cc54c340150884bebfd289824f1e562eea88
2021-01-28 13:25:50 +00:00
Junyu Lai
00caf89795 Merge "[VCN01] Add NOT_VCN_MANAGED capability" 2021-01-28 13:04:59 +00:00
Treehugger Robot
73a7e5b4e9 Merge "Note network interfaces based on transport" am: a7656b2d7e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562876

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iae2ae51e3819b37cf2c85ce12715978d6ba68c55
2021-01-28 08:32:23 +00:00
Daulet Zhanguzin
8ef2001b7f Update frameworks to use unbundled version of BouncyCastle.
Previously BouncyCastle methods were exposed as libcore APIs (@CorePlatformApi), which no longer possible when ART is updatable module (and can't guarantee BouncyCastle API stability)

Bug: 154796679
Test: Treehugger

Change-Id: I908681841a6766de88761767c77c4e2d4b5f56d5
2021-01-28 07:51:22 +00:00
Treehugger Robot
a7656b2d7e Merge "Note network interfaces based on transport" 2021-01-28 07:45:20 +00:00
Lorenzo Colitti
d892e45c9b Merge "Fix legacy APIs when VPN switches to suspended underlying network." am: 83563fd735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547497

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I385f93ef5fc3a627fcc2ae827c72e0785c464d8f
2021-01-28 07:22:25 +00:00
Chiachang Wang
6d0e73ed67 Merge "Replace hidden getFileDescriptor$()" am: f13926d8dc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553966

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib6f87447485fd0a4ee008bcabea80b4827fdd99b
2021-01-28 07:15:15 +00:00