No description. Add one?
  • Java 78%
  • Kotlin 11.8%
  • AIDL 4.4%
  • C++ 3.7%
  • C 1.5%
  • Other 0.5%
Find a file
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
bpf bpf: Test bitmap open (duplicates GTS) 2024-12-18 13:49:45 -08:00
clatd Fix a function pointer type mismatch for C23. 2024-12-18 11:22:10 -08:00
common Merge "Export com.android.net.flags for wifi apex" into main 2024-12-18 18:56:14 -08:00
framework Add reserveNetwork API 2024-12-22 22:01:22 -08:00
framework-t Merge "Conditionally include VCN in Tethering module" into main 2024-12-11 10:41:55 -08:00
nearby Use @SdkSuppress in BluetoothFinder tests, now that Build.VERSION_CODES.VANILLA_ICE_CREAM is avilable. am: 79f907d195 2024-12-12 11:00:14 -08:00
networksecurity Add new APIs to DataStore to allow for int storage 2024-12-18 20:24:05 +00:00
remoteauth Merge "Use LazyLock rather than lazy_static macro." into main 2024-09-11 17:46:22 +00:00
service Add reserveNetwork API 2024-12-22 22:01:22 -08:00
service-b Conditionally include VCN in Tethering module 2024-12-09 12:04:12 -08:00
service-t Merge "Advertise with short hostnames" into main 2024-12-19 01:04:01 -08:00
staticlibs Return the matched event from TestableNetworkOfferCallback 2024-12-20 15:15:28 -08:00
tests Add reserveNetwork API 2024-12-22 22:01:22 -08:00
Tethering Merge "Remove WRITE_SETTINGS permission from Tethering APIs" into main 2024-12-18 18:42:49 -08:00
thread Enable ThreadNetworkDemoApp for TV launcher 2024-12-16 22:57:58 -08:00
tools Remove dependencies on the 1-variant fallback 2024-10-22 16:31:00 -07:00
.gitignore Ignores vim temporary files from git 2023-12-23 17:45:32 +08:00
OWNERS Move the owner of xfrm netlink source code to its own directory. 2023-11-22 18:50:00 +09:00
OWNERS_core_networking Mark Martin as LAST_RESORT_SUGGESTION 2024-09-26 22:29:48 +00:00
OWNERS_core_networking_xts Add "no-op refactors" reviews for delegated reviewers 2024-06-20 06:29:09 +00:00
PREUPLOAD.cfg Disable ktfmt and rely solely on ktlint for Kotlin linting 2024-12-13 12:29:19 +09:00
TEST_MAPPING Add CtsNetTestCasesUpdateStatsPermission to automotive-mumd-presubmit 2024-11-26 23:29:10 +00:00