android_packages_modules_Co.../tests/unit/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hansen Kurli 0d179a3ff0 Ensure autoKi is not stored when keepalive stops or is not started.
In the cases below, the keepalive is already cleaned up internally in
KeepaliveTracker, but are not be cleaned up in
AutomaticOnOffKeepaliveTracker. This means the mAutomaticOnOffKeepalives
list is storing stopped keepalives and the metrics will still conisder
the keepalive as active.

1. In KeepaliveInfo.start, return whether the keepalive is successfully
   starting(i.e. mStartedState == STARTING). Check for this in
   handleStartKeepalive and return early on failure, without storing the
   autoKi. Also check in handleResumeKeepalive.
2. In handleEventSocketKeepalive, return whether the handleStopKeepalive
   is called, indicating the keepalive is forced to stop and was not
   already STOPPING. This should happen when the state is STARTING but
   the network agent returned an unsuccessful event.
3. In handleCheckKeepalivesStillValid, move the checking logic to
   AutomaticOnOffKeepaliveTracker so the handleStopKeepalive is called.

Bug: 281646074
Test: atest FrameworksNetTests
Change-Id: I7839464534baed43abbd40b321287132da25b978
2023-06-01 06:02:16 +00:00
..
connectivity Ensure autoKi is not stored when keepalive stops or is not started. 2023-06-01 06:02:16 +00:00
ethernet Connectivity Tests: join handler thread after calling quitSafely 2023-03-17 01:01:09 -07:00
net Fix template for test network needs fine location permission 2023-05-04 11:01:33 +08:00
BpfNetMapsTest.java Close sockets from ConnectivityService#setFirewallChainEnabled 2023-05-11 12:22:09 +09:00
ConnectivityServiceTest.java Instrument SDK level and change IDs to help testing 2023-05-29 18:42:31 +09:00
IpSecServiceParameterizedTest.java Require IPSEC_TUNNEL_MIGRATION feature flag to migrate transforms 2022-12-21 23:12:48 +00:00
IpSecServiceRefcountedResourceTest.java Add some non-connectivity-module-test back to ConnectivityCoverageTests 2022-05-27 07:16:46 +00:00
IpSecServiceTest.java Experimental support for IPv6 UDP encap. 2023-02-08 15:05:07 +09:00
LegacyTypeTrackerTest.kt Build ethernet framework source into framework-connectivity-tiramisu 2022-03-14 14:06:35 +00:00
NetIdManagerTest.kt Address comments on aosp/1781202 2022-08-17 07:11:55 +00:00
NsdServiceTest.java Pass NsdService thread looper to MdnsDiscoveryManager 2023-05-16 14:39:09 +08:00
VpnManagerServiceTest.java Update VpnManagerServiceTest to work with lockdown VPN main user changes. 2023-01-06 16:43:47 +00:00
VpnTestBase.java Test VPN app exclusion 2022-06-29 06:15:41 +00:00