This allows VpnManagerServiceTest continues to work after
adding an attribution tag to VpnManagerService
Ignore-AOSP-First: This project will automerge from AOSP to
udc-mainline-prod but the dependency CL in
frameworks/base/ will not. Thus changes will be
merged to udc-dev first and then cherry picked
to AOSP
Bug: 278943609
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.VpnManagerServiceTest
Change-Id: I4228a7fb308b8d01aee53f0734f4c5753908473a
* changes:
Update record receipt time on records updated
Renew the SRV/TXT records if half of TTL passed
Turn on removeExpiredService feature
Import the MdnsConstants and MdnsRecord
Following CLs update LegacyNetworkActivityTracker to support multiple
network activities including non default network.
To avoid breaking default network activity APIs, this CL adds tests.
Following CL fix known issues of LegacyNetworkActivityTracker so this
CL also adds test for known issue behavior.
Bug: 279380356
Test: FrameworksNetTests
Change-Id: Ic180efe690807e940d0b412a38ebc5e6d22691c4
When a TCP keepalive start request is sent from ConnectivityService
to KeepaliveTracker, the keepalive is tracked on both
AutomaticOnOffKeepaliveTracker and KeepaliveTracker. The existing
design stops the keepalive inside KeepaliveTracker without
notifying AutomaticOnOffKeepaliveTracker for fd initiated stops.
This causes AutomaticOnOffKeepaliveTracker to lose track of these
fd initiated stops and cause a leak on the object.
The updated design sends the event to ConnectivityService handler
to handle the event down from ConnectivityService. This ensures
that each stakeholder class will get the stop event.
Bug: 283885097
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Change-Id: I3c40d80694cd2c046f3a19ddb8f437878c98ab43
When the cache flush bit is set on host address records in a response,
known records are cleared and replaced with the contents of the packet.
However even if the response contains the same records as before, this
caused it to be marked as modified, and response modified callbacks are
sent for every incoming packet.
Instead, ensure that the response is only marked as modified if a
previously unknown address record is added, or if a previously known
address record is removed.
The issue wasn't found by the existing testDecodeWithNoChange test,
because it used a service record for testhost2 instead of testhost1, so
the address records were ignored.
Original change: https://r.android.com/2619297
Bug: 285997766
Bug: 285084489
Test: atest CtsNetTest FrameworksNetTests
Change-Id: I178ed8398afe4354c09bdb3fa5c221377385417e
Merged-In: Ic0f19adf5d9bde7cdab766e49cf677b319a2219b
In case that the task is not canceled successfully, use session ID to
check if this task should continue to schedule more.
Bug: 285260665
Test: atest CtsNetTest FrameworksNetTests
Change-Id: Ic953ae781449a7ebf943999c8c8d3040a97641d9
If the MdnsServiceTypeClient was removed when the
SocketCreationCallback#onAllSocketsDestroyed() was called, the
MdnsSocketClientBase#notifyNetworkUnrequested() will not be
called when a listener is unregistered from the
MdnsDiscoveryManager. This is because the serviceTypeClients will
be cleared after the socket is destroyed. However, these dead
listeners will be re-added to the MdnsServiceTypeClient when a
new socket is created. They will then continue to send callbacks
to the NsdService. Therefore, the notifyNetworkUnrequested()
should be moved to the beginning of the handleRegisterListener()
to ensure that the socket unregistration is properly notified.
Original change: https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2618620
Bug: 285997766
Change-Id: Iff78d02ad685f187e6906d29851bc857c61a0a53
Test: atest FrameworksNetTests android.net.cts.NsdManagerTest
Merged-In: I31c766305018889f50a7c12c836174c340d01d7f
When the cache flush bit is set on host address records in a response,
known records are cleared and replaced with the contents of the packet.
However even if the response contains the same records as before, this
caused it to be marked as modified, and response modified callbacks are
sent for every incoming packet.
Instead, ensure that the response is only marked as modified if a
previously unknown address record is added, or if a previously known
address record is removed.
The issue wasn't found by the existing testDecodeWithNoChange test,
because it used a service record for testhost2 instead of testhost1, so
the address records were ignored.
Bug: 285997766
Bug: 285084489
Test: atest CtsNetTest FrameworksNetTests
Change-Id: Ic0f19adf5d9bde7cdab766e49cf677b319a2219b
Test: new test for this behavior in the preliminary change
Test: FrameworksNetTests NetworkStackTests
Fixes: 138810051
Fixes: 140610528
(cherry picked from https://android-review.googlesource.com/q/commit:9fe47bee099125cf01fa153cdef28e100b9f3a0c)
Merged-In: I95a979d232fb60ece2e33e972bf5d66d20357a1f
Change-Id: I95a979d232fb60ece2e33e972bf5d66d20357a1f
Bug: 263074841
If the MdnsServiceTypeClient was removed when the
SocketCreationCallback#onAllSocketsDestroyed() was called, the
MdnsSocketClientBase#notifyNetworkUnrequested() will not be
called when a listener is unregistered from the
MdnsDiscoveryManager. This is because the serviceTypeClients will
be cleared after the socket is destroyed. However, these dead
listeners will be re-added to the MdnsServiceTypeClient when a
new socket is created. They will then continue to send callbacks
to the NsdService. Therefore, the notifyNetworkUnrequested()
should be moved to the beginning of the handleRegisterListener()
to ensure that the socket unregistration is properly notified.
Bug: 285997766
Test: atest FrameworksNetTests android.net.cts.NsdManagerTest
Change-Id: I31c766305018889f50a7c12c836174c340d01d7f
Some modules defined in the build file are only data dependencies of cts test modules. In this case, they will be packaged to corresponding test modules. For example, if module A is a data dependency of test module B, the module A can be found under android-cts/testcases/B/ directory. Therefore it is unnecesasry to tag data dependencies which will cause a duplicate folder, e.g. android-cts/testcases/A.
Change-Id: I1b0f08c245dc51419ed12283c40df2e6ee71ebce
Test: m cts
Bug: 283199104
Ignore-AOSP-First: The clean-up is for package size improvement on U. The backfill will apply to aosp later.
Currently, when lower/upper bound of Range is incorrect,
there is no useful information for debugging.
Test: atest TrafficStatsTest
Bug: 285452306
Change-Id: I0e390692c20b37e14958ecc0fd45c93f73fe63e2
The receipt time in the MdnsResponse need to be updated every time new
packet is received. And then the record refreshing logic could calculate
remaining TTL correctly.
Original change: https://r.android.com/2614892
Change-Id: I4fea296496c2bd3e988601079513365b35a52ad8
Fixes: 285260665
Test: atest CtsNetTest FrameworksNetTests
Merged-In: Ib7a290ea0ea8e552c71c657696397e8114fcee52