Commit graph android_packages_modules_Co.../framework/api
Message SHA1
[NS06] Implement the don't-reap mechanism
This exposes a mechanism for network providers to tell
the network stack that a given network must be kept up
for some specific reason. This is meant to be easier
for them than to have to file a request, in particular
because there is no guaranteed way to make sure the
request will be best matched by any given network.

Test: new test for this
Bug: 167544279
Change-Id: I238a3ee5ee9262477a23b897e4141769dd1505d1

Chalard Jean   commited 2021-03-25 14:10:06 +00:00
fa33bef466
[NS05] Feed network offer callbacks
The design is very simply expressed :
An offer is needed for a request if and only if that offer
might beat the satisfier for that request.

The implementation of "might beat" is NetworkRanker#mightBeat.

Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests
Bug: 167544279
Change-Id: I0fe911eef2483ecbac48c733d56283b81538690a

Chalard Jean   commited 2021-03-25 22:13:10 +09:00
428b913abd
Add network disconnected callback
Create a network callback to notify network agent after the
native network being destroyed by netd which means the network
is fully disconnected. The NetworkAgent may handle this event
after sending disconnect state to ConnectivityService to proceed
its pending works that have to be done after it.

Bug: 178725261
Test: make update-api
Change-Id: I602ff2c688909473b03b72c9407d4286608cff4c
CTS-Coverage-Bug: 178725261

Chiachang Wang   commited 2021-03-25 09:58:48 +00:00
9affe28062
Merge "Add network created callback support" into sc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2021-03-25 08:52:56 +00:00
affca14fe6
Add network created callback support
Create a network callback to notify network agent after
netd has created the network, so that the NetworkAgent may
wait for this callback and ensure the pre-work to communicate
with netd completed.

Bug: 178725261
Test: make update-api
Change-Id: I8c2ff7bd6980ae838abc5669f9419d62741b8666
CTS-Coverage-Bug: 178725261

Chiachang Wang   commited 2021-03-25 00:27:11 +00:00
18d4281317
Merge "Add 5G/NR QOS support" am: 0deb814870 am: 05e4507857 am: 6c981f1bd3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643762

Change-Id: I74c0d7d771d0b7e067dddc582389f77b8a899542

Jayachandran Chinnakkannu   authored and   Automerger Merge Worker   commited 2021-03-24 18:58:50 +00:00
dd89c6876a
Merge "Add 5G/NR QOS support"
Jayachandran Chinnakkannu   authored and   Gerrit Code Review   commited 2021-03-24 17:44:48 +00:00
0deb814870
Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager.
These constants will now be including all the reasons for why an
uid's network access can be blocked, instead of only the
restrictions that could be imposed by NPMS.

Bug: 183473548
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Merged-In: I4c544415e12adf442fd2415c371b1b70a39c3aa4
Change-Id: I6dcea43fbefa9eac8b5a971b822a5be5422a54b4

Sudheer Shanka   authored and   Lorenzo Colitti   commited 2021-03-25 01:33:26 +09:00
f1520bb8dc
Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." into sc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2021-03-24 16:02:56 +00:00
eb04adf4bc
Merge "API to get network visible network capability name" into sc-dev
Sarah Chin   authored and   Android (Google) Code Review   commited 2021-03-24 05:27:45 +00:00
3c405692ad
Add 5G/NR QOS support
Bug: 155176305
Bug: 182317794
Test: atest ConnectivityServiceTest
      atest QosCallbackTrackerTest

Change-Id: Idf6d8a7c3b80bc50a2c1244ceaefea9381d40c2f

Jayachandran C   commited 2021-03-23 19:14:21 -07:00
d57b2853a3
API to get network visible network capability name
Test: atest DataConnectionTest, DcTrackerTest
Bug: 181916712
CTS-Coverage-Bug: 183553812
Change-Id: Iae63ac4d62641cee2bd0f0c5f50dd729750d514c

Sarah Chin   commited 2021-03-24 00:27:11 +00:00
34fbbbb6b9
Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager.
These constants will now be including all the reasons for why an
uid's network access can be blocked, instead of only the
restrictions that could be imposed by NPMS.

Bug: 183473548
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Merging internally first to handle conflicts.
Change-Id: I4c544415e12adf442fd2415c371b1b70a39c3aa4

Sudheer Shanka   commited 2021-03-23 15:26:29 -07:00
1d0d9b4627
Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" am: 1a6e0ea3fd am: 17b490ed13 am: 5a0360c6a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649288

Change-Id: Ibc6553b1471ee8e0ab362979ba9525c2e328a275

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 14:02:47 +00:00
d86c8c2c8a
Merge changes I638ed5cd,I29f15571,I21a22ed1 am: 750e8ca69e am: b1fbb5ca62 am: 787caa8c08
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648068

Change-Id: I6d897cdcfb5b0e4809a32312071eb77623754f94

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 14:01:19 +00:00
f7cf543a86
Merge "Expose NetworkAgent constructor taking a NetworkScore parameter" into sc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2021-03-23 12:45:24 +00:00
3cccf48918
Merge "Expose NetworkScore to external caller" into sc-dev
Lucas Lin   authored and   Android (Google) Code Review   commited 2021-03-23 12:18:23 +00:00
d8e8a9557b
Merge "Add NetworkRequest.Builder creating from an existing instance"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-03-23 10:46:20 +00:00
074c7d7537
Expose NetworkAgent constructor taking a NetworkScore parameter
Vpn constructs NetworkAgent with this exposed NetworkAgent
constructor. Given NetworkAgent is moving into the incoming
connectivity module, Vpn which is outside the module will not
be able to access it if it's not in the API surface. Thus,
expose it to allow Vpn to use it.

Bug: 182963397
Test: make update-api
Change-Id: Ic2357dcfff3233e0dd17b48b0e376a5095ef60fa
CTS-Coverage-Bug: 172183305

Chiachang Wang   commited 2021-03-23 08:51:05 +00:00
3ee63e5132
Expose NetworkScore to external caller
NetworkScore will be a part of mainline module, so the external
callers cannot call its hidden APIs. Expose needed APIs to
the external callers.

CTS-Coverage-Bug: 182963397
Bug: 182963397
Test: m
Change-Id: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb

lucaslin   commited 2021-03-23 16:17:37 +08:00
18158aa33b
Add NetworkRequest.Builder creating from an existing instance
Provide a formal way to construct a new NetworkRequest from an
existing instance. The network capabilities inside the
NetworkRequest is hidden. There is no way to pass a
NetworkRequest and update its capabilities. Add
NetworkRequest.Builder creating from an existing instance to
allow to clone the network capabilities.

Bug: 172183305
Test: make update-api
Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531
Merged-In: I068462b2a1410daf67b0c95f2b643d396f079531

Chiachang Wang   commited 2021-03-23 14:50:03 +08:00
e2179dd1cc
[JS01]Remove hidden API usage of Connectivity Sevice
The Connectivity service will become the mainline module.
Therefore, remove the caller of using Connectivity's
hidden API outside the module and expose the required
connectivity API used in Jobscheduler.

Bug: 183456204
CTS-Coverage-Bug: 170598012
Test: atest JobStoreTest
Change-Id: Ie6bc81ff382fb242b98f35d28a96defc207c7987

lifr   commited 2021-03-23 13:58:48 +08:00
308bcccd2b
Merge "[VCN15] expose addUnwantedCapability and related APIs"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-03-23 05:02:22 +00:00
84ebe6693a
Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-03-23 04:40:50 +00:00
1a6e0ea3fd
Merge "[TL02]Remove hidden API usage of NetworkAgent" into sc-dev
Frank Li   authored and   Android (Google) Code Review   commited 2021-03-23 02:03:59 +00:00
6fa238f167
[TL02]Remove hidden API usage of NetworkAgent
The connection service will become the mainline module.
Remove the hidden API usage of NetworkAgent.

Bug: 170598012
CTS-Coverage-Bug: 170598012
Test: atest FrameworksNetTests FrameworksTelephonyTests
      atest FrameworksWifiTests
Change-Id: I4e4040ae7f94bdf479c7df9ec2ffabafbe06331c

lifr   authored and   Paul Hu   commited 2021-03-23 02:01:38 +00:00
c4fd62072b
Merge changes I638ed5cd,I29f15571,I21a22ed1
* changes:
  Expose registerDefaultNetworkCallbackAsUid.
  Support calling registerDefaultNetworkCallback for another UID.
  Store the effective UID in NetworkRequestInfo.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-03-23 01:27:58 +00:00
750e8ca69e
Merge "[VCN15] expose addUnwantedCapability and related APIs" into sc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2021-03-23 01:19:39 +00:00
1cd2428be0
Have a new method in NetworkAgentConfig.Builder to set allowBypass
Have a new method in NetworkAgentConfig.Builder for Vpn to set
allowBypass.

Bug: 182963397
Test: m
Change-Id: I3f244464438325ee7f8a1b953d3fb28186293628

lucaslin   authored and   Lorenzo Colitti   commited 2021-03-23 09:01:40 +09:00
0e345e9b1a
Revert "Have a new method in NetworkAgentConfig.Builder to set allowBypass"
This reverts commit 974644dd3c.

Reason for revert: Broken build b/183416288

Change-Id: Id9ec9fb98b8f88eeb7db1d1442d76456aaf350d1

Joshua Mccloskey   commited 2021-03-22 18:55:32 +00:00
02da918919
Have a new method in NetworkAgentConfig.Builder to set allowBypass
Have a new method in NetworkAgentConfig.Builder for Vpn to set
allowBypass.

Bug: 182963397
Test: m
Change-Id: I3f244464438325ee7f8a1b953d3fb28186293628

lucaslin   authored and   Lucas Lin   commited 2021-03-22 18:44:48 +00:00
974644dd3c
Merge "Add NetworkRequest.Builder creating from an existing instance" into sc-dev
Chiachang Wang   authored and   Android (Google) Code Review   commited 2021-03-22 13:17:43 +00:00
577911cc62
Add NetworkRequest.Builder creating from an existing instance
Provide a formal way to construct a new NetworkRequest from an
existing instance. The network capabilities inside the
NetworkRequest is hidden. There is no way to pass a
NetworkRequest and update its capabilities. Add
NetworkRequest.Builder creating from an existing instance to
allow to clone the network capabilities.

Bug: 172183305
Test: make update-api
Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531
CTS-Coverage-Bug: 172183305

Chiachang Wang   commited 2021-03-22 13:05:10 +00:00
7625498617
Merge "Swap parameters in QosCallback#registerQosCallback" am: dcc2fb2a19 am: 507df2663e am: 2e744846a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628901

Change-Id: Ice84bb2e6d855ed88e7e432cf49739e69c9e01de

Jayachandran Chinnakkannu   authored and   Automerger Merge Worker   commited 2021-03-22 12:30:40 +00:00
687d2a3118
[VCN15] expose addUnwantedCapability and related APIs
Test: m -j doc-comment-check-docs
Bug: 175662146
Change-Id: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7

junyulai   authored and   Junyu Lai   commited 2021-03-22 11:11:26 +00:00
e76b5f7004
Expose registerDefaultNetworkCallbackAsUid.
Bug: 165835257
Test: atest FrameworksNetTests
Change-Id: I638ed5cd5273d456919630aba1e22f099df1b36c

Lorenzo Colitti   commited 2021-03-22 19:50:27 +09:00
b90bdbdbf4
[VCN15] expose addUnwantedCapability and related APIs
Test: m -j doc-comment-check-docs
Bug: 175662146
Merged-In: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7
Change-Id: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7
  (cherry-picked from ag/13929102)

junyulai   commited 2021-03-22 16:51:50 +08:00
b15b7dbdd4
Expose some APIs from ConnectivityManager
- Expose setRequireVpnForUids to Vpn.java
- Expose setLegacyLockdownVpnEnabled to LockdownVpnTracker.java
- Expose requestRouteToHostAddress to
  GnssNetworkConnectivityHandler.java

Bug: 182963397
Test: m
Change-Id: I1fb5ecfbe37878ba3534e6c6c7599ca29db2735c

lucaslin   commited 2021-03-22 11:51:27 +08:00
97fb10a3a6
Merge "Swap parameters in QosCallback#registerQosCallback" am: dcc2fb2a19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628901

Change-Id: I2c371b6f1dc25f84a389480e46d9d582e9da148b

Jayachandran Chinnakkannu   authored and   Automerger Merge Worker   commited 2021-03-22 03:18:17 +00:00
507df2663e
Merge "Swap parameters in QosCallback#registerQosCallback"
Jayachandran Chinnakkannu   authored and   Gerrit Code Review   commited 2021-03-21 21:02:36 +00:00
dcc2fb2a19
resolve merge conflicts of 454f122745 to stage-aosp-master
Merged-In: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3
Change-Id: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3

Roshan Pius   commited 2021-03-21 19:20:35 +00:00
122fc06389
resolve merge conflicts of 403b7fd0b0a6736bcee1817fb5c774f8c8a040de to stage-aosp-master
Change-Id: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3

Roshan Pius   commited 2021-03-21 19:16:33 +00:00
1e97e45498
Merge changes from topics "revert-1645768-revert-1626206-replaceUidRange-MSYTKFNGUE-HIUTVTIGIR", "ti_redaction"
* changes:
  TransportInfo: Add a generic redaction mechanism
  Revert "Revert "Expose uids related APIs in NetworkRequest and N..."
  Revert^2 "Replace the usage of UidRange"

Treehugger Robot   authored and   Gerrit Code Review   commited 2021-03-21 16:41:13 +00:00
454f122745
TransportInfo: Add a generic redaction mechanism
This replaces the existing mechanism for redacting location sensitive
fields with a more extensible mechanism. Currently supported redactions
are for the following permissions:
i. ACCESS_FINE_LOCATION
ii. LOCAL_MAC_ADDRESS
iii. NETWORK_SETTINGS

Also, removed WifiInfo from ConnectivityServiceTest to reduce cross
dependencies on wifi code.

Bug: 156867433
Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: I2bb980c624667a55c1383f13ab71b9b97ed6eeab

Roshan Pius   commited 2021-03-19 20:15:21 +00:00
e2d2838805
Merge "Reland: CaptivePortalData: use CharSequence in VenueFriendlyName API" into sc-dev
Chalard Jean   authored and   Android (Google) Code Review   commited 2021-03-19 14:26:06 +00:00
4be4b3eee7
Merge "Add startCaptivePortalApp to system API" am: 1756295fc5 am: c5472a3cf7 am: 8020cb4517
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639899

Change-Id: Ia3be29892f62b82d23a165bc8334a083c674aefb

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-19 13:09:03 +00:00
abe928e7eb
Merge "Expose getCapabilities" am: ca98471c77 am: f21c73b7ad am: 00a76b180b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641919

Change-Id: I9a6b6f405ee4b7d5d03173d6c5e22e1018dc3417

Lucas Lin   authored and   Automerger Merge Worker   commited 2021-03-19 11:32:07 +00:00
7ead06e186
Merge "Add startCaptivePortalApp to system API"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-03-19 11:30:20 +00:00
1756295fc5
Merge "Expose constants of ConnectivityManager" into sc-dev
Chiachang Wang   authored and   Android (Google) Code Review   commited 2021-03-19 10:40:49 +00:00
473b69519b
Merge "Expose getCapabilities"
Lucas Lin   authored and   Gerrit Code Review   commited 2021-03-19 10:24:25 +00:00
ca98471c77