android_packages_modules_Co.../framework/src/android/net
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
..
apf Update document for ApfCapabilities.hashCode() 2024-06-13 20:44:46 +09:00
connectivity Add app compat change ID for LNP 2024-12-13 13:43:26 +00:00
util Move ConnectivityResources to service-connectivity 2023-04-28 19:18:39 +09:00
BpfNetMapsConstants.java Add firewall chains for HAPPY_BOX and user/admin PENALTY_BOX 2024-04-23 15:04:28 +09:00
BpfNetMapsUtils.java Fix to return BLOCKED_REASON_NONE for system uids 2024-07-30 16:56:52 +09:00
CaptivePortal.java CaptivePortal: implement setDelegateUid API. 2024-12-11 20:27:10 +09:00
CaptivePortalData.java Use String in CaptivePortalData underlying types 2021-04-08 08:23:20 +00:00
ConnectionInfo.aidl Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
ConnectionInfo.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
ConnectivityDiagnosticsManager.java Check location permission for ConnDiags last. 2021-05-21 16:22:50 +00:00
ConnectivityFrameworkInitializer.java Don't expose raw IBinder APIs. 2021-04-15 18:47:21 +09:00
ConnectivityManager.java Add reserveNetwork API 2024-12-22 22:01:22 -08:00
ConnectivitySettingsManager.java wear proxy behind portal 2023-09-27 07:28:05 +00:00
ConnectivityThread.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
DhcpInfo.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
DhcpOption.java Address API review comments for DhcpOption object 2022-02-07 19:42:40 -08:00
DnsResolver.java Add test for downstream tethering 2023-09-12 17:53:37 +09:00
DnsResolverServiceManager.java Use jarjar rule generator for connectivity rules 2022-07-20 19:57:11 +09:00
DscpPolicy.java Move the DscpPolicy status constants and IntDef to NetworkAgent. 2022-03-25 01:06:46 +09:00
ICaptivePortal.aidl CaptivePortal: implement setDelegateUid API. 2024-12-11 20:27:10 +09:00
IConnectivityDiagnosticsCallback.aidl Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
IConnectivityManager.aidl Skip TestDropPacketToVpnAddress if the feature is disabled 2024-09-02 15:21:30 +09:00
InetAddresses.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
INetworkActivityListener.aidl [IT06]Move INetworkActivityListener into connectivity module 2021-02-18 12:03:21 +08:00
INetworkAgent.aidl Process DSCP QoS events for policies 2022-01-27 10:19:27 +00:00
INetworkAgentRegistry.aidl Reapply "Add LocalNetworkConfig" 2023-10-18 15:50:02 +09:00
INetworkOfferCallback.aidl [NS05] Feed network offer callbacks 2021-06-07 10:57:48 +00:00
InvalidPacketException.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
IOnCompleteListener.aidl Move network selection utils to Connectivity 2021-03-18 23:57:26 +09:00
IpConfiguration.java Expose public APIs for IP & static IP configuration 2022-02-07 19:57:07 +00:00
IpPrefix.java Revert "Revert "Unhide IpPrefix(InetAddress, int)"" 2021-12-19 11:54:56 +00:00
IQosCallback.aidl Add 5G/NR QOS support 2021-03-23 19:14:21 -07:00
ISocketKeepaliveCallback.aidl [DK3] Send onPause/onResume keepalive callbacks 2023-02-06 13:23:13 +00:00
ITestNetworkManager.aidl TestNetworkService: add support to disable DAD on test interfaces 2022-07-21 10:20:16 -07:00
KeepalivePacketData.java Add KeepalivePacketData toString() 2022-02-11 19:17:10 +00:00
LinkAddress.java Deduplicate the isIpv6ULA implementation. 2023-07-18 20:04:43 +09:00
LinkProperties.java LinkProperties: use ordered comparison for P-CSCFs - only on U+ 2023-05-18 05:57:51 +00:00
LocalNetworkConfig.java Prepare exposing LocalNetworkConfig and its satellites 2023-11-09 14:26:13 +09:00
LocalNetworkInfo.java Add LocalNetworkInfo and send callbacks when it changes 2023-11-07 17:29:38 +09:00
MacAddress.java Address comment from ag/12107302 2023-07-27 17:29:18 +09:00
MulticastRoutingConfig.java Add equals, hashCode to MulticastRoutingConfig 2023-11-10 13:06:22 +08:00
NattKeepalivePacketData.java Correct typo variable 2023-06-15 01:43:07 +00:00
NattSocketKeepalive.java Add underpinned Network parameter in SocketKeepalive.start() 2023-02-14 10:29:19 +00:00
Network.java Ensure created fd being closed 2021-12-01 14:46:29 +08:00
NetworkAgent.java NetworkAgent: Log a metric if a message is queued before registration 2024-11-21 05:41:16 -08:00
NetworkAgentConfig.java Add SkipNativeNetworkCreation flag in NetworkAgentConfig 2024-12-11 15:22:36 +08:00
NetworkCapabilities.java Add reservationId to NetworkCapabilities 2024-12-12 14:18:54 -08:00
NetworkConfig.java Move module sources to packages/Connectivity 2021-02-01 11:52:14 +09:00
NetworkInfo.java Fix agents disconnecting in SUSPENDED state. 2023-05-16 16:35:03 +09:00
NetworkProvider.java NetworkProvider: improve documentation of unregisterNetworkOffer 2022-07-25 13:31:14 -07:00
NetworkReleasedException.java Expose constructor of Exceptions. 2022-03-17 18:05:56 +00:00
NetworkRequest.java Do not allow any request to pass in reservationId 2024-12-22 22:01:22 -08:00
NetworkScore.java Rename KEEP_CONNECTED_DOWNSTREAM_NETWORK to K_C_LOCAL_NETWORK 2023-11-02 23:25:31 +09:00
NetworkStackBpfNetMaps.java Move isChainEnabled and getUidRule to BpfNetMapsUtils 2024-03-19 04:21:29 +00:00
NetworkState.java Remove Slog usage in NetworkState 2021-03-11 21:01:30 +09:00
NetworkUtils.java Check whether kernel is for X86 via JNI 2024-02-09 19:13:07 +00:00
OemNetworkPreferences.java Adding OEM Network Preferences for testing 2021-04-05 21:51:09 -07:00
ParseException.java Set ParseException constructors as public 2021-04-08 15:57:31 +09:00
ProfileNetworkPreference.java Correct javadoc usage 2022-07-15 03:44:46 +00:00
ProxyInfo.java Fix a bug where the PAC proxy port is not set correctly. 2023-06-05 20:24:59 +09:00
QosCallback.java Move QoS API classes to Connectivity 2021-03-01 18:09:30 +09:00
QosCallbackConnection.java Use jarjar rule generator for connectivity rules 2022-07-20 19:57:11 +09:00
QosCallbackException.java Use jarjar rule generator for connectivity rules 2022-07-20 19:57:11 +09:00
QosFilter.java Support QosCallback for UDP socket: Expose API&CTS 2022-09-29 08:54:08 +00:00
QosFilterParcelable.java Support QosCallback for UDP socket -Filter 2022-04-20 22:46:21 +00:00
QosSession.java Fix typedef retention 2023-11-10 13:28:07 +00:00
QosSessionAttributes.java Move QoS API classes to Connectivity 2021-03-01 18:09:30 +09:00
QosSocketFilter.java Support QosCallback for UDP socket -Filter 2022-04-20 22:46:21 +00:00
QosSocketInfo.java Support QosCallback for UDP socket: Expose API&CTS 2022-09-29 08:54:08 +00:00
RouteInfo.java Add a routing coordinator class 2023-10-24 22:12:26 +09:00
SocketKeepalive.java DO not throw exception for ERROR_NO_SUCH_SLOT error 2023-05-23 05:08:45 +00:00
SocketLocalAddressChangedException.java Expose constructor of Exceptions. 2022-03-17 18:05:56 +00:00
SocketNotBoundException.java Expose constructor of Exceptions. 2022-03-17 18:05:56 +00:00
SocketNotConnectedException.java Support QosCallback for UDP socket: Expose API&CTS 2022-09-29 08:54:08 +00:00
SocketRemoteAddressChangedException.java Support QosCallback for UDP socket: Expose API&CTS 2022-09-29 08:54:08 +00:00
StaticIpConfiguration.java Expose public APIs for IP & static IP configuration 2022-02-07 19:57:07 +00:00
TcpKeepalivePacketData.java Replace fields with getters in keepalive API 2021-04-08 14:06:53 +09:00
TcpRepairWindow.java Remove TcpRepairWindow from module-lib API 2021-04-12 14:26:55 +08:00
TcpSocketKeepalive.java Correct nullability and add extra check for underpinnedNetwork 2023-03-13 09:00:43 +00:00
TestNetworkInterface.java TestNetworkInterface: improve documentation of newly added methods 2022-11-18 09:44:30 -08:00
TestNetworkManager.java TestNetworkService: use IFF_NO_CARRIER to bring up iface without carrier 2023-01-30 15:08:49 -08:00
TestNetworkSpecifier.java Remove Preconditions usage in TestNetworkSpecifier 2021-03-22 00:02:10 +00:00
TransportInfo.java resolve merge conflicts of 403b7fd0b0a6736bcee1817fb5c774f8c8a040de to stage-aosp-master 2021-03-21 19:16:33 +00:00
UidOwnerValue.java [BR01.1] Support BpfNetMapsReader 2023-10-23 20:11:02 +08:00
UidRange.aidl Move UidRange to connectivity 2021-03-02 15:35:36 +09:00
UidRange.java Genericize NC#hasSameUids 2021-12-16 23:03:42 +09:00
VpnTransportInfo.java Rename getBypassable to isBypassable 2022-12-15 04:22:43 +00:00