Note that disconnected events are also important for getting correct validated duration metrics. Since they are whenever we teardown the network or VcnConnectionConfig, they will mark the end duration for network validated state also.
Flag: EXEMPT METRICS
Test: atest FrameworksVcnTests, CtsVcnTestCases
Bug: 288600040
Change-Id: I34401568287700e6ab356cff029620b6372354d0
This change adds logging for when a VcnGatewayConnection enters and
exits safe mode.
Flag: EXEMPT METRICS
Test: atest FrameworksVcnTests, CtsVcnTestCases. go/atomtester
Bug: 288600040
Change-Id: I6423b9fe7a1785fe31b363c8acb0b99f8d5f7df3
Add genrule for VCN metrics atoms and add wrapper utility class for logging using the generated java code, which currently has func for logging safe mode and VCN network validation states.
Bug: 288600040
Flag: EXEMPT METRICS
Test: atest CtsVcnTestCases, FrameworksVcnTests
Change-Id: Ia0f42c3435752399eb3ed480bfe62ffac31ccc1e
In most places the `@hide` doctag is treated as a block tag on its own
line. However, there are a few places where it is treated as an inline
doctag, e,g. `{@hide}`, and some places where it looks like a block
tag but is inline in the text, e.g. `Some text. @hide`. Dealing with
all the types increases the complexity of Metalava and makes it
slightly slower.
This change replaces the non-block tag forms with a block tag.
Flag: EXEMPT change the form of @hide does not change the API or behavior
Bug: 429965593
Test: m checkapi
Change-Id: I4ffe44a329dbcb7f0a7bd61af16c3bd99cacdac4
During VCN code move, git histories of OWNERS files and VcnUtils was
also moved to the VCN mainline code in the "git filter-repo" process.
Though it is unexpected, it is very hard to filter them out. Thus CL
is created to delete these files as a followup.
Bug: 430967429
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Flag: EXEMPT code move
Change-Id: I866b38eea1a8702d87c7fbb05e32213b3d96afa7
This CL changes the license of FrameworksVcnTests since it will
be moved out of frameworks/base
It also adds the estination location to the "visibility" field
Bug: 379938062
Flag: EXEMPT; license changes
Test: presubmit
Change-Id: I261f3821632d0a063b7ce60ae62dada339161fb3
This is a preparation CL before moving VCN code from frameworks/base
to p/m/Connectivity/
After VCN is move out of frameworks/base/, the IPsec module will
no longer include PersistableBundleUtils via framework-ike-shared-srcs
but will do that via vcn-utils-framework-ipsec
Bug: 379938062
Flag: EXEMPT; pure refactoring
Test: CtsIkeTestCases, FrameworksIkeTestCases
Change-Id: I2d405be630a05f5019e7711946fa46b4cf2a6ef8
This patch sets POLICY_VCN in its network offer. This new policy
allows VCN to win over a physical cell network and thus fixs the issue
where VCN cannot exit safe mode when there is already a phsical cell
Bug: 391977557
Test: CtsVcnTestCases(new test)
Flag: EXEMPT bugfix
Change-Id: I68bea55c96051d0c7510df3713bfc52ff3460a01
This new field ensures that the dependency is properly packaged with the module.
(original context: b/262397555)
Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: I8dd5afedc35fc603d6ab7ddc27da6bf3efcea16a
Configuring restricted transport types is for experiments purposes and
only allowed on a debuggable build. This patch ensures relevant unit
tests are skipped on user builds.
Since the experimental configurability is no longer needed anymore, there will be followup CLs to remove the feature and the tests.
Bug: 397874808
Test: run mts-user -m FrameworksVcnTests on a BP2A.250218.001 user build
Flag: EXEMPT; test code change
Change-Id: I9ca23b2901d740d3ddc5ba4febba4a300e0812bb
Yan Yanauthored and Nathan Haroldcommited 2025-02-27 11:33:21 -08:00
This patch is for migrating VCN registration from platform to
Tethering module. Becuase the system image has switched to use
mainline prebuilts, the mainline change cannot merged together
with the platform change. The plan is to update the mainline
prebuilt first and then merge the platform change. Thus there
will be a short window where ConnectivityServiceInitializerB
will be called twice to register VCN. This patch allows
ConnectivityServiceInitializerB to prevent the duplicate
registration.
This patch allows Tethering module to know whether VCN is moved
to mainline at runtime. If VCN is in mainline, Tethering
module (instead of SystemServer) will register the VCN service.
Bug: 385203616
Test: atest CtsVcnTestCases && FrameworksVcnTests
Test: verified registration on Android B and Android V
Flag: EXEMPT; no functional code change
Change-Id: If551167f4bafc39a592d8b325be3ceecf16f0b6e
FrameworksVcnTests is included in Tethering MTS. Since Tethering
is an R module, this test suite needs to be installable on R devices
Bug: 396782079
Test: presubmit
Flag: EXEMPT; test change
Change-Id: Iff6f4a5b1b949510da34ea741a55671eeff9f155
VCN will be moved to Tethering module from Android B. Thus
setting the min_sdk_version to 36
Bug: 390096003
Test: atest FrameworkVcnTests && atest CtsVcnTestCases
Test: Enable VCN in mainline, sideload module and
run mts-user -m CtsStrictJavaPackagesTestCases on AP3A
Flag: EXEMPT; bug fix
Change-Id: I427b2e0231e2ccdc870500399be9387036b14edc
This patch adds FrameworksVcnTests to tethering MTS. Consequently,
these tests will be monthly updated and installed with Tethering
module on all Android R/R+ devices. Thus the patch also adds
SDK checks to make sure the mainline updated tests will be skipped
if SDK <= Android V, to avoid compatability issues.
Bug: 376896491
Test: lunch mainline_modules_arm64-mainline-userdebug &&
m mts && mts-tradefed run mts-tethering;
Verified on V and B
Flag: EXEMPT; test code change
Change-Id: Ied3596e0e63d8333c4d1019b96284b1c3547b23b
This patch adds CtsVcnTests to tethering MTS. Consequently,
these tests will be monthly updated and installed with Tethering
module on all Android R/R+ devices. Thus the patch also adds
SDK checks to make sure the mainline updated tests will be skipped
if SDK <= Android V, to avoid compatability issues.
Bug: 376896491
Test: lunch mainline_modules_arm64-mainline-userdebug &&
m mts && mts-tradefed run mts-tethering;
Verified on V and B
Flag: EXEMPT; test code change
Change-Id: Ib6d3d698925feef472d472be6def080580aa6ec3
Verify that VCN dumpsys will not crash the system. This patch prevents
dumpsys issues that caused by VCN service and framework code having
mismatched classes
Bug: 390490391
Bug: 386225194
Test: VcnManagerTest#testSetVcnConfigOnTestNetworkAndDumpsys
Flag: EXEMPT; test code
Change-Id: I5a61ffaf6ee6eb4275e43085a5c10ae037b90551
This patch is to fix NoSuchMethodError thrown from VCN dumpsys when
VCN is in the Tethering mainline module.
Because VCN is in Tethering module, the VCN service will use a
jarjared IndentingPrintWriter. During dumpsys,
VcnManagementService#dump will create a IndentingPrintWriter
and pass it to VcnUnderlyingNetworkTemplate#dump. Then because
VcnUnderlyingNetworkTemplate fails to recognize the jarjared class, it
will throw NoSuchMethodError.
This patch fixes this issue by also jarjaring the IndentingPrintWriter
in VCN framework library. It is aligned with the end state where all
classes in the VCN framework code except APIs will be jarjared to
have a android.net.connectivity prefix
Bug: 390490391
Bug: 386225194
Test: atest CtsVcnTestCases(new tests)
Flag: EXEMPT; low risk and small scope bug fix
Change-Id: I34be6dbf816c752f6ba0b77dc4ad98c8ad71e743
Remove an unused import due to changes in code review.
Bug: 8675309
Test: compilation
Flag: exempt Trivial cleanup
Change-Id: I69b580de6725cad29af6dd17bc10deccf95cdda4
Ensure that when the IpSecPacketLossDetector cleans up due to the
underlying network changing, that the broadcast receiver it's listening
to is cleaned up. Previously this would leak broadcast receivers.
Based on inspection, all instances that touch the BroadcastReceiver
are done on the same looper, so we shouldn't need to guard the creation
and destruction of the receiver.
Also, stop closing the monitored IpSecTransform. The monitor should not
have been closing the transform in the first place. Most of the time it
isn't an issue; however, in the event of MOBIKE, the transform will
remain open, so this is a functional bug.
Bug: 389208101
Test: atest IpSecPacketLossDetectorTest:testClose
Flag: EXEMPT bugfix
Change-Id: I26245960c36eaa0557d377b1672cc76ab0f70b03
This patch is to fix a race condition when two threads
access VcnNetworkProvider.mRequests at the same time. The
issue happened when the VCN thread is removing elements and the
binder thread is iterating the Set. It causes the binder thread
to end up with a Null element and throw NPE
This patch fixes this threading issue by changing the Set to
be a thread-safe Set
Bug: 382106220
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Test: Set up test environment to make the race condition 90%
reproducible; verified the fix by running the test for
100 times on forrest
Flag: EXEMPT; low risk and small scope bug fix
Change-Id: Id7598a861368454efcd0aa49721c54e11aaebdf1
This patch is to deflake testEnterSafeModeImmediately_safeModeEnabled.
Previously this test required that within 0.5 seconds after
setVcnConfig was called, VCN should send a VCN_STATUS_CODE_ACTIVE
callback to the cts. However, sending this callback requires
cts to gain carrier privileges and in some devices it takes longer
than 0.5 seconds. This patch mitigates the test issue by extending
the timeout.
Bug: 386884143
Test: CtsVcnTestCases
Flag: EXEMPT; test code
Change-Id: Id5f7b70a0c7f68e58ab045be2126194f936ebb0f
VCN service depends on LocalLog.java and WakeupMessage.java. Previously
VCN service will statically include framework-connectivity-shared-srcs
filegroup that has the two required classes. To avoid name class
conflicts, all classes in this filegroup need to be jarjared.
As results, VCN service will use a jarjared IndentingPrintWriter. During
dumpsys, VcnManagementService#dump will create a IndentingPrintWriter
and pass it to VcnUnderlyingNetworkTemplate#dump. Then because
VcnUnderlyingNetworkTemplate fails to recognize the jarjared class, it
will throw NoSuchMethodError.
This issue only exists when VCN is in the platform. When VCN is built
into Tethering module, a different build architecture is used and this
issue will be gone.
This patch fixes the NoSuchMethodError issue by creating temporary
copies of LocalLog and WakeupMessage and updating VCN service to
statically include them. When VCN modularization is fully done, these
two copies can be removed
Bug: 386225194
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Test: adb dumpsys vcn_management
Flag: EXEMPT; low risk and small scope bug fix
Change-Id: Ie5c099ac04133093c23f8ef6181bab08d1bf8e4b