android_packages_modules_Co.../tests/unit/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Patrick Rohr 73eee542a1 Add reserveNetwork API
reserveNetwork allows a requestor to initiate the creation of a network
that requires the system to preallocate resources which can then be
advertised by the requestor on or off device in order to help create the
network.

For example, this API will be used to reserve a IP over L2cap server
network, which requires the system to first create a
BluetoothServerSocket and reserve a PSM (i.e. port). This information is
passed back to the requestor via onReserved() callback and subsequently
advertised via a BLE advertisement. The network is established as soon
as the client connects to the advertised PSM, which will trigger a call
to onAvailable(), just like a regular NetworkRequest.

onReserved() callbacks are exclusive to the reserveNetwork API and are
sent when an NetworkOffer is registered that matches the reservation ID
of an existing request. A reserved offer always follows the reservation
request as it is created in direct response. onReserved() can only be
called once. If for some reason the reservation gets cancelled by the
system (i.e. the NetworkOffer is retracted) or cannot be fulfilled,
onUnavailable() is called. It is up to the app to file a new
NetworkRequest when this happens.

An onReserved() callback is not queued, because
a) it cannot be called more than once for the same reservation,
b) it must always be the first callback, and
c) it only gets cancelled by onUnavailable().

This change does not handle NetworkOffer migrations, such as updating
the score, properly. This must be addressed before the feature can ship
as the yieldToBadWifi logic can update the score on all NetworkOffers.

API-Coverage-Bug: 372936361
Test: Very basic CSNetworkReservationTest; more to follow.
Change-Id: I9b349d469830bf28e006cf403c605574371db267
2024-12-22 22:01:22 -08:00
..
connectivity Merge "Advertise with short hostnames" into main 2024-12-19 01:04:01 -08:00
connectivityservice Add reserveNetwork API 2024-12-22 22:01:22 -08:00
ethernet Add support for link state tracking 2024-06-21 08:25:26 -07:00
net Add config for client-side traffic stats rate-limit cache. 2024-10-30 23:02:59 +08:00
BpfNetMapsTest.java Fix to return BLOCKED_REASON_NONE for system uids 2024-07-30 16:56:52 +09:00
CallbackQueueTest.kt Rename getShrinkedBackingArray to getMinimized* 2024-08-02 19:27:41 +09:00
ConnectivityServiceTest.java Make the idle timer for network data tracking configurable 2024-10-29 19:06:42 -07:00
IpSecServiceParameterizedTest.java Reland "Support getting transform state in IpSecService" 2023-12-12 22:19:55 +00:00
IpSecServiceRefcountedResourceTest.java Add some non-connectivity-module-test back to ConnectivityCoverageTests 2022-05-27 07:16:46 +00:00
IpSecServiceTest.java Experimental support for IPv6 UDP encap. 2023-02-08 15:05:07 +09:00
IpSecXfrmControllerTest.java [XFRM_MSG_NEWSA] Support polling SA state with netlink message 2023-12-11 18:43:34 +00:00
IpSecXfrmControllerTestHex.java [XFRM_MSG_NEWSA] Support polling SA state with netlink message 2023-12-11 18:43:34 +00:00
LegacyTypeTrackerTest.kt Build ethernet framework source into framework-connectivity-tiramisu 2022-03-14 14:06:35 +00:00
NetIdManagerTest.kt Address comments on aosp/1781202 2022-08-17 07:11:55 +00:00
NsdServiceTest.java Report isKnownService in discovery stop metrics 2024-05-29 08:23:37 +00:00