To ensure that all access to the MdnsServiceTypeClient is done on
the handler thread, a handler thread check must be added to all
public methods in the MdnsServiceTypeClient. This will allow the
synchronized lock to be removed in future changes, and it will
also ensure that MdnsServiceTypeClient can access MdsServiceCache
properly.
Bug: 265787401
Test: atest FrameworksNetTests
Change-Id: I0206874eb0acdf0272b8ad23d29f3e764bfdec38
The MdnsServiceTypeClient is now created using a SocketKey, so
the MdnsServiceCache should also use the SocketKey to deal with
the caching services.
Bug: 265787401
Test: atest FrameworksNetTests
Change-Id: I6165ffd420a39e750c06778b4851142a3ba3cf44
After numOfQueriesBeforeBackoff query, the mDNS discovery logic will
enter backoff mode. In backoff mode, the query frequency will be
updated to max(20, 0.8 * shortest remaining TTL) seconds. It will help
to reduce mDNS query frequency in certain use cases.
Bug: 284480315
Test: atest CtsNetTest FrameworksNetTests
Change-Id: Iac8baaaf58cf9b3b8e67e1cd80402fdecde1d3d4
This is no-op refactoring but allows subsequent
changes to use modern JUnit4 functionalities such
as @BeforeClass annotation.
Test: atest HostsideNetworkCallbackTests \
HostsideConnOnActivityStartTest \
HostsideSelfDeclaredNetworkCapabilitiesCheckTest \
HostsideVpnTests HostsideNetworkPolicyManagerTests
Bug: 289002798
Change-Id: I503c13ffcb239c4535781ba5d660a3280b7a395b
[MUST_SLEEP]ActivityThread may not have time to set the updated
proxy into properties yet and cause flaky. Wait for some time in
the test to deflake the test.
Bug: 286551100
Test: com.android.cts.net.HostsideVpnTests
Change-Id: I74d3d7378adcf12c094cb9c0706579d6e0b0826b
Data stall recovery in VPN does not rely on the data stall
event now. Update the tests accordingly.
Bug: 289746779
Test: atest FrameworksNetTests
Change-Id: I4d2d96fe2f76706512325b6653b3e7cced10f207
We've never observed this crash but we're also not very
confident it never happens. wtf is a lot safer and will
report to us if it ever happens.
Test: manual
Change-Id: I56edb069f0ef9bd0f6e5c9a737fdfd708ec7bc57
Repeated fields are only supported on T+ and the metrics in
KeepaliveStatsTracker contains repeated fields. Hence, guard the write
with a T+ check.
Bug: 289344384
Test: Manual test
Change-Id: If3be75292b5a79aa753bddb772fe2c52c9dde994
This will hopefully help provide more information for debugging b/272147742.
Bug: 272147742
Test: atest RateLimitTest
Change-Id: I58ca7ee62d34302eb96056fced5bbc2f9a3e2e72
This should be reverted as soon as it is merged into U
and the build request is submitted.
Bug: 286649301
Test: NetworkAgentTest, TH
Change-Id: I2cbe990675b109e4ba744101dd7dbbb20229376f
Merged-In: I2cbe990675b109e4ba744101dd7dbbb20229376f
When a network was explicitly selected, the user just tapped it and
is likely waiting for it to connect. A shorter timeout is therefore
more appropriate for these.
Bug: 281970908
Test: New test in ConnectivityServiceTest
(cherry picked from https://android-review.googlesource.com/q/commit:0f1413395df672328c3e77cccc0ca3600b2bec84)
Merged-In: I99a263960cbc9292868fc4bb46a4f3b2f3c71541
Change-Id: I99a263960cbc9292868fc4bb46a4f3b2f3c71541
Requested by Samsung for their upcoming U release
When config_notifyNoInternetAsDialogWhenHighPriority is on, the
LOST_INTERNET notification intent should be fired immediately
rather than as a pending intent.
Bug: 281970908
Test: Improve test for this in NetworkNotificationManagerTest
(cherry picked from https://android-review.googlesource.com/q/commit:e13b833b21342d80ef940783acba4b3eecfce968)
Merged-In: I88565839a12a1ab4b096f763250944ebaf6c5349
Change-Id: I88565839a12a1ab4b096f763250944ebaf6c5349
This commit translates the address of keepalive packet to v6
in order to make NATT keepalive work on v6 only network.
Sending a v4 NATT keepalive on a v6 only network is bogus if
hardware does not translate the packet automatically. Network
may drop the packet or reject the attempt by hardware. This
results in ERROR_INVALID_IP_ADDRESS and stop the keepalive
request.
Bug: 196453719
Test: atest FrameworksNetTests
Test: Manually connect to v6 only network and check if the
keepalive packets are sent
Change-Id: I798c5d48661d8151b19902435732f465b5aa725b