This commit adds the version control for keepalive packet address
translation design to prevent device crash if the network stack
is not updated to a newer version. This commit also adds a
DeviceConfig to control the design in newer module version.
Bug: 291870956
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Id4efbf51dae9154d2bc3a1ee405e2139d5c91e36
Follow-up from commit Ie60829a65d0d9b5b63ad353695a820c0586e3665,
the interface field was cleared before returning the result to
the caller. However, this can cause problems in the
NetworkStats#subtract method. If the interface field is cleared,
the findIndexHinted method can match to a wrong entry.
This is because the keys of multiple entries will now be the
same. This can cause the subtract result to be unexpectedly
large and the return value of getUidStatsForTransport to be
mismatched with the values retrieved from other APIs.
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest \
FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
Bug: 290728278
Change-Id: I891ab29b8a2902663febc7c32b04417caf510926
aosp/2605757 updated isDefaultNetworkActive returns false when there is
no default network.
But this change was not merged to U release branch and this change was
not well tested by dogfooding.
So this CL reverts the isDefaultNetworkActivity behavior change.
Bug: 279380356
Bug: 291870075
Test: atest FrameworksNetTests
Change-Id: Id88662faea9eeaba93d59ab2729f6204a3631ab1
aosp/2605757 changed onNetworkActive callback behavior on U+ but this
change was not merged to U release branch.
This CL reverts the behavior change and keep the current behavior on U+.
Bug: 279380356
Bug: 291870075
Test: atest FrameworksNetTests
Change-Id: I91ccc7ee93f0827986401f316997b4a2df11318f
This commit updates test to
- Execute IkeSessionCallback inside executor. The callback should
be called from executor in production code but test trigger the
callback from test main thread which will result in unexpected
code interaction.
- Verify the timer directly. The origin design verifies
interactions with Captor with uncertain interaction. Test
should be able to verify the schedule() calls with the expected
timeout value. Also, in lower performance device, device may
still process previous interaction. Add longer timeout to reduce
flakes.
Bug: 293233390
Test: atest FrameworksNetTests
Test: atest VpnTest#testStartPlatformVpnFailedWithRecoverableError
--rerun-until-failure 100
Change-Id: Ie42a2597a382800d6484a086b6d808490dfbdd32
* changes:
Unregister BroadcastReceiver and OnSubscriptionsChangedListener.
Disable KeepaliveStatsTracker before T.
Disable KeepaliveStatsTracker instead of throwing.
The first tethering test case may experience tethering restart
with IP conflict handling. Tethering would cache the last
upstreams so that the next enabled tethering avoids
picking up the address that is in conflict with the upstreams.
To protect subsequent tests, turn tethering on and off before
running them.
Bug: 254183718
Test: atest CtsTetheringTest
atest MtsTetheringTestLatestSdk
Change-Id: I03729d3212a03bd9fcfe2c09cf327840f13b250c
In failed log, VPN still process the migration which does not
send the network capabilities update to network agent.
In low performance devices like cuttlefish, it may sometimes
cause flaky. Specify a longer timeout to deflake the test.
Bug: 293233390
Test: atest FrameworksNetTests
Change-Id: I4e6c80c03e19efb448ee2806c5a250425b0e068f
Listen SoftAp callback to make sure soft ap is disabled
before start hotspot.
Bug: 277856014
Test: atest ConnectivityManagerTest#testFactoryReset
Change-Id: I95050be703b7c97da7a14541ac74718fdcbd7f13
Skip presubmit for tests that have been reported to be >0.5% flaky in
presubmit, or in mainline-presubmit. Tests that only meet that criteria
in mainline-presubmit are only marked as @SkipMainlinePresubmit.
Ensure that the tests are still run in postsubmit so they can be moved
back to presubmit after getting fixed.
Test: TH
Bug: 284534251
Bug: 292174275
Bug: 292173706
Bug: 292174832
Bug: 289879947
Bug: 286701510
Bug: 293239598
Bug: 279846955
Bug: 277567450
Bug: 293239828
Bug: 293240365
Change-Id: I986a1079709057d3210016c50b632fe0f3bff1e2