Commit Graph

2498 Commits

Author SHA1 Message Date
Daniel Bright
946f6661c2 Merge "Add method to match address \ port with QosFilter" am: 591fe5327c am: c6e47cad53 am: 22b01d88ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1510591

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id9951a0be8821192e3fb403787d096c538d691cf
2021-01-26 00:22:58 +00:00
Chalard Jean
04ba35dc06 Merge "Add Qos Callback support" am: 29f0f6d47f am: b97f23ae96 am: f14671c09a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1386623

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If0a123f16951c88cc5881fba8865fae822ba92f0
2021-01-22 14:52:58 +00:00
Daniel Bright
07dd129bbe Add method to match address \ port with QosFilter
* The match method is only for local address and port since we have
no other use case.

Bug: 155176305
Test: Added new test
Change-Id: I7b45f9912af6a192fc60606f5e0b4cc479aea93f
2021-01-22 06:24:41 -08:00
Chalard Jean
29f0f6d47f Merge "Add Qos Callback support" 2021-01-22 13:09:24 +00:00
Remi NGUYEN VAN
066b792d54 Merge "Mark connectivity test utilities as module API" am: 5ef8031d57 am: a9630d29d0 am: 9dce262648
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547643

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3537f92a718d8494234e698df20b535383dc8e90
2021-01-22 11:35:33 +00:00
Remi NGUYEN VAN
7d4530b98d Mark connectivity test utilities as module API
The API surface is planned to move to the Connectivity module, meaning
that it will be maintained across multiple Android releases.
This is incompatible with TestApi semantics, which are designed to be
removable across releases. Effectively the APIs become SystemApi, so
mark them as such considering that TestApi is not supported by modules.

Remove the NetworkCapabilities.getCapabilities test API that is not
essential for tests, and mark other APIs as module API.

Test: m
Bug: 174436414
Change-Id: Ic04551a9874b3d756cf5e6c77ceabfc7c85d52a6
2021-01-22 16:16:57 +09:00
Daniel Bright
60f02ed76b Add Qos Callback support
* Provide App Developers Qos related info associated to
  a bound socket through ConnectivityManager
* Qos sessions are generated and filtered by Network Agents
  and sent back through the Connectivity Service to the
  API consumer.
* The structure of the code within com.android.server
  is designed to support different types of filters in the
  the future.
* The first type of Qos Attributes are related to EPS
  Bearers in order support RCS.

Bug: 155176305
Test: Added to cts/NetworkAgentTest
Test: Added to ConnectivityServiceTest
Change-Id: I145dd065d9deeee449eb9695ab3f6c8556ee7c09
2021-01-21 20:14:52 -08:00
Remi NGUYEN VAN
2de4515158 Merge "Use network list in UNDERLYING_NETWORKS_CHANGED" am: a6f4de3432 am: ef75b38a4d am: 599b2b1d17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536308

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I28e3fc36dd42316f3cc618c29d610a02ffad8722
2021-01-22 02:31:40 +00:00
Remi NGUYEN VAN
d793eb34ca Use network list in UNDERLYING_NETWORKS_CHANGED
The bundle is no longer necessary, as this message is not sent across
processes: the network list can be sent directly in the message obj
pair.

Bug: 173574274
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: Iae049a24212ff9df19b29aead20bf4a594f05f99
2021-01-21 22:36:54 +09:00
Chiachang Wang
6443ace807 Merge "Use ParcelFileDescriptor instead of FileDescriptor in the aidl" am: 0ad97bf744 am: 8178ec8ea2 am: 9d49128dc9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554098

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8c873db971acd19cba9dd45a874e036587f88940
2021-01-21 09:25:51 +00:00
Paul Hu
010f5749d8 Merge "Replace Context @hide API in MultinetworkPolicyTracker" am: 161e0b9b78 am: 0b1c92d785 am: 39400248ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf4d66456d3b3675d16a80b1538949c3807ddcbc
2021-01-21 09:18:45 +00:00
Chiachang Wang
979f46a693 Use ParcelFileDescriptor instead of FileDescriptor in the aidl
Using FileDescriptor in the aidl will refer to
Parcel.readRawFileDescriptor() and Parcel.writeRawFileDescriptor()
whilie trying to do parcel operations. Those two APIs are hidden
and not accessible for the incoming ConnectivityService mainline
module. For such use cases in a module, it should be replaced by
using ParcelFileDescriptor that is designed for such usages.

Bug: 170598012
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: Ia7e3a71ccb4b136cc55c9e90a384870c32cfd37b
2021-01-21 08:40:12 +00:00
Paul Hu
161e0b9b78 Merge "Replace Context @hide API in MultinetworkPolicyTracker" 2021-01-21 07:53:19 +00:00
Remi NGUYEN VAN
75ac6c42a1 Merge "Mark TestNetworkManager as module API" am: cc041a72e7 am: 4bfba0d2e1 am: 45d22e4ccc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547638

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2a8aa17d6acdaed8ee7419990493b631c0eb6d1c
2021-01-21 07:28:46 +00:00
Remi NGUYEN VAN
cc041a72e7 Merge "Mark TestNetworkManager as module API" 2021-01-21 06:02:25 +00:00
Remi NGUYEN VAN
5eee3ec919 Mark TestNetworkManager as module API
The API surface is planned to move to the Connectivity module, meaning
that it will be maintained across multiple Android releases.
This is incompatible with TestApi semantics, which are designed to be
removable across releases. Effectively the APIs become System/module
API, so mark them as such considering that TestApi is not supported by
modules.

Test: m
Bug: 174436414
Change-Id: Icd32fcbb65e9a4bb2b67cb9da7c971281be0781a
2021-01-21 10:45:04 +09:00
paulhu
fd8dac4fe5 Replace Context @hide API in MultinetworkPolicyTracker
MultinetworkPolicyTracker is part of Connectivity mainline module
which cannot call @hide API Context#registerReceiverAsUser. Thus,
replace it to Context#registerReceiverForAllUsers.

Bug: 170634463
Test: atest FrameworksNetTests
Test: Manully check that receiving intent and unregistering
      receiver can work normally.
Change-Id: Ie22a3aa40bc9243082672a64dba7c7940f9ff21a
2021-01-21 01:19:09 +08:00
Junyu Lai
12703ee175 Merge "Revert "[VCN06] Support request background network"" am: 2fa034c812 am: b7b3064394 am: dd7029fd30
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553864

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I896c2008e29163527b03f031623e1c70d16e1da4
2021-01-19 12:39:27 +00:00
Junyu Lai
2fa034c812 Merge "Revert "[VCN06] Support request background network"" 2021-01-19 10:24:47 +00:00
Junyu Lai
34263da2c9 Revert "[VCN06] Support request background network"
Revert submission 1545847-vcn06

Reason for revert: b/177876289 presubmit failure
Reverted Changes:
I8042ce197:[VCN06.1] Add CTS for request background network
If9aaa87b7:[VCN06] Support request background network

Change-Id: I9270b02a2d6d1ffcdd83b4f41becaf09a2b91e0a
2021-01-19 09:06:00 +00:00
Junyu Lai
635c79aeff Merge "[VCN06] Support request background network" am: 95f0791724 am: bf098917d8 am: d57038a8b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545847

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I12d2cbe4a5fc10a7ec7abf8038c088fe13b02d59
2021-01-19 01:50:31 +00:00
Junyu Lai
95f0791724 Merge "[VCN06] Support request background network" 2021-01-19 01:04:20 +00:00
junyulai
6ecf04d6f7 [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: If9aaa87b7e71c2b695ac7b08858850e975b28bb6
2021-01-18 16:32:08 +08:00
Chiachang Wang
a26c02f27a Merge "Replace hidden ParcelFileDescriptor constructor usage" am: b60805b832 am: bddce89449 am: 263b7e551f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38369186c581fcde3e21c91af6b35ccd88320509
2021-01-18 03:27:17 +00:00
Chiachang Wang
b60805b832 Merge "Replace hidden ParcelFileDescriptor constructor usage" 2021-01-18 01:59:10 +00:00
Chiachang Wang
c5f86f48b0 Replace hidden ParcelFileDescriptor constructor usage
If IOException happens while trying to start keepalives sockets,
an invalid fd will be constructed. It will fail with
ERROR_INVALID_SOCKET if the user later calls start(). Current
design to construct the invalid fd use the hidden
ParcelFileDescriptor constructor which will not work for the
incoming ConnectivityService mainline. Thus, replace it with
the other formal API.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I57fd7ec2281c5e8c75481200bbde723ecf96982a
2021-01-18 01:58:49 +00:00
Roshan Pius
7cdb30ec22 Merge "NetworkCapabilities: Embed location senstive TransportInfo" 2021-01-14 15:38:15 +00:00
Aaron Huang
afb977d841 Merge "Migrate Slog usage in MultinetworkPolicyTracker to Log" am: 3637b6d0bf am: 8754a60bb9 am: 644892e3cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549720

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad48fae63c7ef8c72e565cee8426fcbdd20c6295
2021-01-14 10:20:03 +00:00
Aaron Huang
3637b6d0bf Merge "Migrate Slog usage in MultinetworkPolicyTracker to Log" 2021-01-14 09:10:17 +00:00
Junyu Lai
d151942b6a Merge "[VCN05] Pass request type when requesting network" am: 8188af4521 am: b728deeb7f am: 53f3094fb0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545846

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4280a78822db2943f0a62a3d729aac3b5f64326d
2021-01-14 09:05:35 +00:00
Junyu Lai
8188af4521 Merge "[VCN05] Pass request type when requesting network" 2021-01-14 06:52:46 +00:00
Aaron Huang
728980f276 Merge "Rename PacManager to PacProxyInstaller" am: 8505c870cd am: 51203ec517 am: 2a89cb3753
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513130

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I10ff3bab210dbfeb10a19ea99459038499ce5ed9
2021-01-14 04:44:01 +00:00
Aaron Huang
fc52b82254 Migrate Slog usage in MultinetworkPolicyTracker to Log
Connectivity mainline module cannot use hidden API so
replace Slog with Log which is a public API.

Test: FrameworksNetTests
Change-Id: I8758079cf635ff4ab218df53c0f7bf6fc23ce476
2021-01-14 09:53:38 +08:00
Aaron Huang
8505c870cd Merge "Rename PacManager to PacProxyInstaller" 2021-01-14 01:52:24 +00:00
Roshan Pius
0a0c036906 Merge changes from topic "revert-13329427-revert-13274595-XTPTORCRLV-WLDUPFEJWD"
* changes:
  NetworkControllerWifiTest: Fix unit tests
  Revert "Revert "NetworkCapabilities: Embed location senstive Tra..."
2021-01-14 01:19:34 +00:00
Roshan Pius
dd76fab606 Revert "Revert "NetworkCapabilities: Embed location senstive Tra..."
Revert^2 "WifiLocationTest: Add test for Wifi TransportInfo"

b548aac6081a6899e966d7a8d961f2a47147e244

Exempt-From-Owner-Approval: Reland of approved CL

Bug: 162602799
Bug: 177390648
Test: atest com.android.systemui.statusbar.policy.NetworkControllerWifiTest
Change-Id: Iec8d1441e8d02ff43037fdcb0c90065adff8e716
2021-01-13 22:28:01 +00:00
satayev
5d2639e7e2 Merge "Revert "[VCN01] Add NOT_VCN_MANAGED capability"" am: ca95071a98 am: f9253eefae am: b8cf9e427b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549962

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I051a51e5ee5898784d3a126140536ddeec6a0ba6
2021-01-13 18:53:37 +00:00
satayev
ca95071a98 Merge "Revert "[VCN01] Add NOT_VCN_MANAGED capability"" 2021-01-13 17:40:03 +00:00
satayev
5e2b869dfc Revert "[VCN01] Add NOT_VCN_MANAGED capability"
This reverts commit 869e7020a0.

Reason for revert: b/177411288 broken test

Bug: 177411288
Bug: 175662146
Change-Id: I02a25b83e62ab9a2ed22a98530d62b08de73f56e
2021-01-13 15:04:23 +00:00
Rick Yiu
56e47c492e Merge "Revert "NetworkCapabilities: Embed location senstive TransportInfo"" 2021-01-13 14:30:52 +00:00
Junyu Lai
aeb5c17911 Merge "Align coding style of line-wrapping in NetworkCapabilities" am: 74d132736b am: deb6c74bd8 am: c7714d1c32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529105

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15dc61c1c845de22cd973156e00549395800edeb
2021-01-13 12:09:32 +00:00
Junyu Lai
5591c1c73e Merge "[VCN01] Add NOT_VCN_MANAGED capability" am: 82ffaf2ac2 am: 0afa8fa899 am: 101173a281
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529959

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2ef798c4f1d66196322796c5e7ca9254300b5f78
2021-01-13 09:00:08 +00:00
Rick Yiu
a427afd7e3 Revert "NetworkCapabilities: Embed location senstive TransportInfo"
Revert "WifiLocationTest: Add test for Wifi TransportInfo"

Revert "WifiInfo: Embed location sensitive TransportInfo"

Revert submission 13274595

Reason for revert: DroidMonitor: Potential culprit for Bug 177390648 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
Ibcf0c6711:WifiInfo: Embed location sensitive TransportInfo
Ic68546e2a:WifiService: Use WifiInfo for masking
Ie522d8c75:NetworkCapabilities: Embed location senstive Trans...
Iaf0fef999:WifiLocationTest: Add test for Wifi TransportInfo
I017de6d4c:ClientModeImpl: Fill info elements for connected b...
I384c9321e:WifiInfo: Add info elements for connected bssid

Change-Id: I4e96850b96dc5ea71d9bb6af2ff17343b8d09d68
2021-01-13 08:36:22 +00:00
Aaron Huang
11e7cb2433 Rename PacManager to PacProxyInstaller
Generally, a manager class in Android is used to access
system services and it should be obtained from Context.
This class is a bit different from the definition of a
manager class.

API linter will detect an error if trying to expose a
class name end with Manager. ProxyTracker will create a
new instance of this class so this class needs to be
renamed to avoid API lint error.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I9185d4fb4342bd285a575f0bdd3518b758f37eb6
2021-01-13 15:47:45 +08:00
junyulai
70988816f9 Align coding style of line-wrapping in NetworkCapabilities
Test: TH
Change-Id: Ic864524a60954f8dbcce265643c2cb3ac3aefca8
2021-01-13 07:45:18 +00:00
Hai Shalom
41473668e1 Merge "Support for Venue URL and friendly name from Network agent" am: 6fce4189cd am: 5485906661 am: 16750033ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1515261

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52b5fdc3445d35a19c0281469b4780bc5fe12199
2021-01-13 03:48:44 +00:00
junyulai
869e7020a0 [VCN01] Add NOT_VCN_MANAGED capability
Add new capability to indicate whether a network is
managed by Virtual Carrier Network (VCN). This is needed
to identify networks between VCN managed network and
others. And this capability will be:
  1. mutable
  2. requestable
  3. set by default for network agents and requests
  4. allowed for test networks

Test: 1. atest FrameworksNetTests CtsNetTestCases
      2. adb shell dumpsys connectivity
      3. atest ConnectivityServiceTest#testLoseMutableAndRequestableCaps
Bug: 175662146

Change-Id: Ia5eeb3912a687164fa95d7ba5516fd73abca79ba
2021-01-13 11:05:40 +08:00
Roshan Pius
d04061ee77 Merge "NetworkCapabilities: Embed location senstive TransportInfo" 2021-01-13 02:26:34 +00:00
Roshan Pius
423fff6300 NetworkCapabilities: Embed location senstive TransportInfo
Changes:
i) Add a new constructor for NetworkCapabilities which accepts whether
location sensitive fields need to be parceled or not. Defalts to false
on the other constructor. This boolean should only be set on the copy of
NetworkCapabilities when sent to apps that hold location permission.
(Similar to how sensitive fields are handled in LinkProperties)
ii) Add a new makeCopy() method in the TransportInfo interface which
accepts whether location sensitive fields need to be parceled or not.
iii) Migrate the existing NetworkCapabilities owner UID masking to use
this new mechanism (instead of existing masking in ConnectivityService).
iv) Always set parcelLocationSensitiveFields to true in the NetworkAgent
surface (since that is a privileged surface from the transports to the
connectivity service)
v) Add a hasSensitiveFields() in TransportInfo interface to avoid
perfoming location permission checks for location insensitive
TrasnsportInfo.

Also, migrate to the new SdkLevel util for isAtLeastR() & isAtLeastS()
checks.

Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: Ie522d8c75a82ae521ccfd5165823d0c72642e651
Merged-In: Ie522d8c75a82ae521ccfd5165823d0c72642e651
2021-01-13 02:25:49 +00:00
Hai Shalom
6fce4189cd Merge "Support for Venue URL and friendly name from Network agent" 2021-01-13 01:54:05 +00:00