There was no such method in R release, use SdkLevel to check
framework version and use different API accordingly.
Test: TH
Fix: 297768044
Change-Id: I357c0d56646ffd5eb018b6bb4efe47d4c48e71d3
Report more advertising metrics data below when the service is
unregistered.
- Replied request count (sum across interfaces)
- Sent packet count (including announcements and probes)
- Number of conflicts during probing
- Nubmer of conflicts after probing
Bug: 287546772
Test: atest FrameworksNetTestCases NsdManagerTest
Ignore-AOSP-First: BB on this branch when running TH on AOSP.
Change-Id: I50c54a35dc523422e3a7302c059bbbc38eac5631
Per RFC6762#10.1, the cache flush bit should be false for
existing announcement. Otherwise, the record will be deleted
immediately when receiving this response.
Bug: 299054783
Test: atest FrameworksNetTestCases NsdManagerTest
Change-Id: I8bf1a5b1914b49720862836abb543b232185f5f5
Add the missing logic to send the rawOffloadPacket to OffloadEngine.
Bug: 297314970
Test: atest CtsNetTestCases FrameworksNetTestCases
Change-Id: I06d7a9bb84df72808eff4f0c9df60f7e60aa2a2c
Most failures were due to two conflicting wifi configurations being used
on the test infrastructure. Re-enable the test now that the
configurations have been updated.
Fixes: 286701510
Test: TH
Change-Id: I601c089ed4e9c6b8bfe296e05397e83ac20ff8c1
For an app to register itself as an offloadEngine, it must have either
of the following permissions: NETWORK_STACK,
PERMISSION_MAINLINE_NETWORK_STACK, NETWORK_SETTINGS,
REGISTER_NSD_OFFLOAD_ENGINE.
Bug: 294777050
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I19fe9b996a02b1ae23116c02a1b8406d93b3ecf1
This change includes:
1. Mark groupedBy*() deprecated and throw after android U.
2. Modify map() to mapKeysNotNull().
3. rename clearInterfaces to withoutInterfaces and refactoring.
4. Modify tests accordingly.
Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
Fix: 296149902
Fix: 296150018
Change-Id: I5d97422ba957a212c0c5fbc1eee3f8b174343348
Closing TCP sockets sends RST packets. If the cellular modem is idle,
sending RST packets will wake the modem up and consume battery.
This CL adds delay_destroy_frozen_sockets_version flag.
When this flag and destroy_frozen_sockets_version is enabled,
ConnectivityService delays closing socket until the cellular modem wakes up.
Pending frozen sockets are closed also when cellular network becomes no
longer the default network.
This CL also adds flag status and pending uids to the dump.
Bug: 284900338
Test: FrameworksNetTests
Change-Id: I2562568390dda36d02f72afb3a96f824788964c0
The Next app is only necessary in development branches and right now the
in-development SDK is V.
Test: TH
Change-Id: I6aa72d70bc124ae7cf40962b172965d1f0fdb437
When the OffloadEngine is registered, it should get notice about all the
currently offloaded service.
Bug: 297314970
Test: atest CtsNetTestCases
Change-Id: I1b977a40476a1f5c30a075b559e72656a42865ae
These flake occasionally because registering a request increases
the current request count synchronously while unregistering
decreases it asynchronously, meaning if the test has time to
call register 100 times before unregister can run it will
wrongfully flake.
This could be addressed in production code but as comments in
the change explain, this isn't worth the complexity. Hence
just have a pinpoint fix in the test. See aosp/2707373 for
what a fix in the production code would look like.
Test: manual
Bug: 289530922
Change-Id: Iad9a725eda91406f820abe4706bca0a4756352a4
Update tests to verify that the underlying network reevaluation
is triggered when VPN validation status switches to unvalidated.
Bug: 296183603
Test: atest FrameworksNetTests
Change-Id: I80934cce6e7f2d56039bdd6ad63c6f7173a597cb
There is a race between releaseTetheredInterface() and a new interface
being created. Calling setEthernetEnabled(true) forces the test to wait
on a callback that is generated on the ethernet handler thread (and
therefore guarantees releaseTetheredInterface() has been processed).
Bug: 296012516
Test: atest EthernetManagerTest
Change-Id: I7a1a763ba5c1c50274a112b8c1b8c04f35696f12
This is a no-op refactoring that splits constants and utility
methods into standalone classes which will be shared with
a bpf reader class in subsequent CLs.
NO_IFTTT=No-op refactoring
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
Bug: 297836825
Change-Id: I6d7ea044e43180ae001573009a166be74ebe6a5d