summaryrefslogtreecommitdiff
path: root/packages/Vcn
AgeCommit message (Collapse)Author
2025-03-03Merge "Prevent VCN service from being registered twice" into main am: ↵ Yan Yan
f73ff252a8 am: f2d52f56ab Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3511351 Change-Id: I39ac77c2b34f465aecdf461db96c239fa4aa415b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-27Prevent VCN service from being registered twice Yan Yan
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
2025-02-19Merge "Set min_sdk_version of framework-connectivity-b to 36" into main Yan Yan
2025-02-19Set min_sdk_version of framework-connectivity-b to 36 Yan Yan
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
2025-02-19Merge "Add VCN tests to tethering-mainline-presubmit" into main am: ↵ Yan Yan
c6e9c176f6 am: 438e4f2742 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3496422 Change-Id: I7f1b1626625ba12006bb179d76509f3a13c49bc9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18Add VCN tests to tethering-mainline-presubmit Yan Yan
Bug: 376896491 Test: presubmit FLag: EXEMPT; TEST_MAPPING change Change-Id: I7bd2ea66aec880de1c1a20edb60eb268a798ef94
2025-01-27Set TargetApi to BAKLAVA Linus Tufvesson
Generated with `cd frameworks/base/packages/Vcn/service-b && \ fdfind -t file . -x sed -i -z 's#// TODO(b\/374174952): Replace VANILLA_ICE_CREAM with BAKLAVA after Android B finalization\n@TargetApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)#@TargetApi(Build.VERSION_CODES.BAKLAVA)#g' Flag: EXEMPT Baklava Finalization Test: lunch mainline_modules_x86_64-next-eng && m Bug: 376680864 Bug: 374174952 Bug: 392570119 Change-Id: I1dc2af23ac85d1c90b1419a14ca992e68106e9f7
2025-01-23Merge "Jarjar IndentingPrintWriter with android.net.connectivity prefix" ↵ Yan Yan
into main
2025-01-22Jarjar IndentingPrintWriter with android.net.connectivity prefix Yan Yan
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
2025-01-13Unregister DeviceIdle Receiver in IpSecPacketLossDetector Nathan Harold
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
2025-01-13Merge "Update VcnNetworkProvider to use thread safe Sets" into main Yan Yan
2025-01-10Update VcnNetworkProvider to use thread safe Sets Yan Yan
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
2025-01-08Merge "Stop statically including IndentingPrintWriter in VCN service" into main Yan Yan
2025-01-03Stop statically including IndentingPrintWriter in VCN service Yan Yan
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
2024-12-16Add documentations for VcnTransportInfo#makeCopy Yan Yan
Bug: 384055633 Test: presubmit Flag: EXEMPT documentation changes Change-Id: I87195ad977bdae93b3e0e283add0904d38fcef71
2024-12-10Conditionally remove VCN jars from non-updatable platform Yan Yan
When the build system flag RELEASE_MOVE_VCN_TO_MAINLINE is true, VCN framework and service jars will be built into Tethering module. Otherwise, VCN framework jar will be directly installed on the device and the service jar will be included into the platform services.jar Bug: 375213246 Test: atest CtsVcnTestCases && atest FrameworksVcnTests; verified with the flag on and off Flag: RELEASE_MOVE_VCN_TO_MAINLINE Change-Id: If2651f1ede34220172c419f8bf4afb0fe09c0789
2024-12-02Allow SystemServer to create VCN service with a service initializer Yan Yan
We need to use "startService" to load the service via reflection because the followup CLs will use a build system flag to control whether the service is in Tethering module or the platform. Using reflection ensures that in both case the system can build Bug: 366598445 Test: atest FrameworksVcnTests && atest CtsVcnTestCases Flag: EXEMPT no functional change (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d6ecfc7de6ca836fa2eb92e05e5abbd3c7095cd7) Change-Id: I165e83135c557619518257eb79a00b9ce5802c76 Merged-In: I165e83135c557619518257eb79a00b9ce5802c76
2024-12-02Migrate VCN to separate non-updatable libraries Yan Yan
This patch migrates VCN framework code from framework-minus-apex to framework-connectivity-b, and VCN service code to service-connectivity-b-pre-jarjar. This patch is part of the work to move VCN to the Tethering module. Design doc: go/mainline-vcn-eng-design Bug: 369703242 Test: FrameworksVcnTests, CtsVcnTestCases, CtsStrictJavaPackagesTestCases Flag: EXEMPT code refactoring; no functional change (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ab8f06b5f32318dfd883e4bdd09e0d2a2c85a62e) Change-Id: I747556281db2efab7115761147842d241fe283de Merged-In: I747556281db2efab7115761147842d241fe283de
2024-11-26Add visibilities to VCN libs Yan Yan
Add visibilities to framework-connectivity-b's implementation so that it can be added to framework-connectivity-test-defaults. Bug: 369703242 Test: atest CtsVcnTestCases Flag: EXEMPT no functional change Change-Id: I41422b77277edfd114fe5e9371ba69982829765d
2024-11-22Add VcnLocation to reflect the VCN build system flag value Yan Yan
This patch defines VcnLocation.IS_VCN_IN_MAINLINE to reflect the value of the build system flag RELEASE_MOVE_VCN_TO_MAINLINE. Specifically two versions of VcnLocation file are defined. The build system flag controls which VcnLocation file will be built in to the platform. As results, the platform can read the value of IS_VCN_IN_MAINLINE to know the value of the build system flag. Bug: 375213246 Test: build-flag set RELEASE_MOVE_VCN_TO_MAINLINE and verified IS_VCN_IN_MAINLINE value Flag: RELEASE_MOVE_VCN_TO_MAINLINE Change-Id: I550fe1cc8a582b672281fd816804726a56531ca4
2024-11-05Create empty VCN libraries Yan Yan
This is a prepartion CL to move VCN to its own libraries and eventually migrate it from the non-updatable platform to Tethering module. This CL creates a new VCN directory with an empty java_sdk_library and an empty java_library. In followup CLs, VCN source code will be migrated to this VCN folder. VCN framework code and system server code will be built into the two libraries. Bug: 369703242 Test: build and boot Flag: EXEMPT create new empty libraries; no functional change Change-Id: I0f2e02771ac81a3d3fd588a6199be888ae299e52
2024-10-25Add VCN tests to postsubmit Yan Yan
This patch is to fulfil the prerequisite for adding these tests to presubmit in this TEST_MAPPING file, as per go/test-mapping-slo-guide. It also adds postsubmit coverage for future VCN changes. Bug: 369703242 Test: build Flag: EXEMPT TEST_MAPPING change Change-Id: I83c9034b56e7a6de458f26b8a4f01df08f355e87
2024-10-16Create VCN folder Yan Yan
This is a preparation CL to decouple VCN from the platform code. It follow the steps suggested by go/mainline-onboarding-in-trunk-stable. Eventually VCN will be moved to Tethering module. Followup CLs will migrate all VCN source code to this folder and thus VCN will not automatically be built into the framework.jar and services.jar anymore. Bug: 369703242 Test: build and boot Flag: EXEMPT no functional change Change-Id: I41484406ab88a8910a87f8df9e53199731c0ce08