The ENABLE_MATCH_NON_THREAD_LOCAL_NETWORKS compatibility flag is
now enabled for apps targeting SDK 37 or higher.
Previously, this flag was configured to enable for
Baklava (SDK 36) or higher. This is no-op because
there is no tethering network agent presents.
While the tethering network agents planned to be enabled in
25Q4, this adjustment allows developers sufficient time
to adapt to the behavior change where NetworkRequests
will match non-Thread local networks.
Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Test: atest ConnectivityCoverageTests --update-device \
--test-filter '.*Connectivity.*'
Bug: 420590461
Change-Id: I105ee1d677c6beb12b4dccd109c01ef5ff2717d3
Currently, NET_CAPABILITY_NOT_VCN_MANAGED is implicited added for
NetworkRequest built by normal apps.
However, the tethering network agent doesn't have this capability,
which makes the agent being exposed to VcnManager and cannot be
seen by normal apps.
Add NET_CAPABILITY_NOT_VCN_MANAGED to tethering NetworkAgent. Include
NET_CAPABILITY_NOT_VCN_MANAGED in local network capabilities for
metrics and API utilities to ensure correct evaluation of local
network connectivity. Update unit tests to reflect the new capability.
Flag: EXEMPT bug fix
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSSatisfiedByLocalNetworkMetricsTest \
ConnectivityCoverageTests:android.net.connectivity.com.android.metrics.SatisfiedByLocalNetworkMetricsTest \
--update-device
Test: manual generate request by CTS and statsd_testdrive -e 10247
Bug: 428098173
Change-Id: Ifa9ce0827abd22d887a0e8a2ab6f4d7391b2b8ed
On V+, ConnectivityService uses uid blocking state in BpfMap instead of
asking NetworkPolicyManager.
But, there was one behavior difference because NetworkPolicyManager
considers the network is always not blocked for apps without Internet
permission.
To ensure backward compatibility, the
NETWORK_BLOCKED_WITHOUT_INTERNET_PERMISSION flag was introduced in
aosp/3076606, aosp/3088285.
This CL updates enforceMeteredApnPolicy to respect this flag for
backward compatibility.
Test: CSEnforceMeteredApnPolicy
Bug: 404428733
Bug: 370383309
Flag: EXEMPT bugfix
Change-Id: I631f4f840818e1d40f20fccae1ec1a2cbbb6a166
The adb app compat command to enable fails for platform being old. Making this flag as disabled by default and overridable.
Bug: 405186661
Test: atest ConnectivityCoverageTests
Flag: EXEMPT bugfix
Change-Id: Ia1242803ed9b02290a5b66c4d1e224c87450d370
* changes:
Add integration test of tethering local network agent feature
Add unit test of tethering local network agent feature
Support LocalNetworkAgent for Tethering
Treehugger Robotauthored and Gerrit Code Reviewcommited 2025-03-21 07:42:40 -07:00
Currently, apps targeting V can see thread local network.
This change introduces a mechanism to make existing
apps unable to see non-thread local networks to ensure minimal
impact on existing devices and applications while adopting this
behavior. Apps targeting B+ Sdk and run on V+ devices can see
non-thread local networks.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSLocalAgentTests \
--update-device
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server --update-device
(on next/trunk_staging release config)
Bug: 349487600
Change-Id: I6aa43cebc20a9017c2d8a8a90ebb1d53040a27bb
The feature will be gradually enabled via flag rollout.
Sample ip rule output:
0: from all lookup local
10000: from all fwmark 0xc0000/0xd0000 lookup legacy_system
11000: from all iif lo oif dummy0 uidrange 0-0 lookup dummy0
11000: from all iif lo oif rmnet1 uidrange 0-0 lookup rmnet1
11000: from all iif lo oif wlan0 uidrange 0-0 lookup wlan0
16000: from all fwmark 0x10063/0x1ffff iif lo lookup local_network
16000: from all fwmark 0x10064/0x1ffff iif lo lookup rmnet1
16000: from all fwmark 0x10066/0x1ffff iif lo lookup wlan0
16000: from all fwmark 0x10063/0x1ffff iif lo lookup wlan0
17000: from all iif lo oif dummy0 lookup dummy0
17000: from all iif lo oif rmnet1 lookup rmnet1
17000: from all iif lo oif wlan0 lookup wlan0
18000: from all fwmark 0x0/0x10000 lookup legacy_system
19000: from all fwmark 0x0/0x10000 lookup legacy_network
20000: from all fwmark 0x0/0x10000 lookup local_network
20000: from all fwmark 0x0/0x10000 lookup wlan0
21000: from all iif wlan0 lookup rmnet1
23000: from all fwmark 0x64/0x1ffff iif lo lookup rmnet1
23000: from all fwmark 0x66/0x1ffff iif lo lookup wlan0
31000: from all fwmark 0x0/0xffff iif lo lookup rmnet1
32000: from all unreachable
Test: adb shell device_config put tethering tethering_local_network_agent 1
Test: atest TetheringTests:android.net.ip.IpServerTest TetheringManagerTest
Bug: 349487600
Change-Id: Iaa88dde645da917149fec0d44fff796c551bcc7e
The targetSdkVersion was set to enable after current_development version
so the test cases targetting current do not have change enabled. It was
observed that user builds did not allowed changing compat flag on
current values. Changing this to enabled after baklava.
Bug: 405183129
Test: atest ConnectivityCoverageTests
Change-Id: Ifeb7cde9f1a7d2b5a254f297207d625bf9d02731
This was causing issues with jobs execution using JobScheduler, in apps that don't request INTERNET permission.
Bug: 397348342
Flag: EXEMPT changes a compat flag
Change-Id: I1c421cbaff815ed761ec4c0da3ead942ddc55d5c
framework-connectivity is in the bootclasspath on S+, while framework-connectivity-tiramisu is in the bootclasspath on T+.
This is consistent with the RequiresApi annotations in this class.
Change-Id: I619759aa1c714738f988f77fd8fcb9de4b1ffdbf
Test: comment only change
- This CL puts RoutingCoordinator into staticlibs to make it usable by
both Tethering and ConnectivityService on R.
- This CL also changes the return type of
ConnectivityInternalApi#getRoutingCoordinatorManager() to IBinder so
it has fewer dependencies.
Bug: 350699020
Test: CI
Change-Id: Iba096e940795cd33e61c5141721394ad39e5ce6d
This allows apps built against V but run on older platform
can adopt this feature. This keep compatibility for older
apps which does not built against newest platform.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest
Fix: 339154075
Change-Id: Ia12997595579190ae0d65ad36ce39d011dde37ce
NETWORKINFO_WITHOUT_INTERNET_BLOCKED compat flag only changed the
behavior of getActiveNetworkInfo that depends on
bpfNetMaps#isUidNetworkingBlocked.
But isUidNetworkingBlocked is used from other APIs(e.g. getActiveNetwork)
This CL update all APIs that depends on isUidNetworkingBlocked to follow
the compat flag to make behavior consistent between APIs.
aosp/3079290 will update onBlockedStatusChanged callback to follow this
compat flag.
Bug: 340773991
Bug: 339780435
Test: TH
Change-Id: If64ec800f21c2adc613884838202e2dece4a8d95
Before aosp/3001087, getNetworkActiveInfo did not return network info
with blocked state for apps without PERMISSION_INTERNET even if the
network is actually blocked.
aosp/3001087 updated getNetworkActiveInfo to return correct blocked
state on V+.
However, this broke some apps that use getNetworkActiveInfo in wrong way
and depends on the previous behavior.
So this CL introduces the compat flag to keep previous behavior for apps
targeting U or older releases.
Test: TH
Bug: 333340911
Change-Id: I0e0950f2148de0ffdb45495903a5a87e0d4c1c0b
Apps that target an SDK before V will not see networks with
NET_CAPABILITY_LOCAL_NETWORK unless they explicitly set this capability
in their network requests.
Bug: 319212206
Test: CSLocalAgentTests
Change-Id: I414b03dfea9a8aac83304c6be501f03d637739b4
This can be used from S. There is no point in having a
release name in the name of this class.
Test: builds
Change-Id: I301bf032f856dd4c30554e06013f31ee57208c4e
Apps targeting sdk < U are considered to use a legacy native
daemon as NsdManager backend, but other apps use a
platform-integration mDNS implementation as backend. So add a
CompatChange flag to enable platform backend for non-legacy
apps.
Bug: 270306772
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I7ba58f8a5186fb49ad5f8aeacc8b8234bef1eabe
When the application wants to request network with
NET_CAPABILITY_PRIORITIZE_BANDWIDTH or
NET_CAPABILITY_PRIORITIZE_LATENCY, it has to declare
PackageManager.PROPERTY_NETWORK_SLICE_DECLARATIONS property and also
adds the declaration in a separate XML files. Otherwise, the request
will fail with a SecurityException being thrown.
Test: atest FrameworksNetTests CtsNetTestCases
Bug: 266524688
Change-Id: I6affc857b803211517368da288e1b2fdc06a955b
ConnectivityCompatChanges.java becomes the centralized place for all the
CompatChanges used in the Connectivity module. By putting all the
CompatChanges here, we are able to manage them under a single
platform_compat_config.
Bug: 268440216
Test: atest FrameworksNetTests
Change-Id: I3e17af545718073d7d1c96e27298e7790563fd33
This change introduces a limited library for dependencies on
framework-connectivity from Tethering,
connectivity-internal-api-util, where all classes are annotated with
@RequiresApi(S) to ensure proper API checks are done before usage.
Bug: 245972418
Change-Id: I82bafd9063341adc71d07f0858e6d68283d081f0
Igor Chernyshevcommited 2022-12-16 17:55:53 +00:00