android_packages_modules_Co.../Vcn/tests/unit/java
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yan Yan a2284ca391 Fix VcnConfig garbage collection
The garbageCollectAndWriteVcnConfigsLocked is for removing
configs whose subgroups do not have any subscriptions. This
patch fixes the issue of it in handling race condition when
subscription changes.

Previously the garbage collection checks a subGroup's
subscriptions based on SubscriptionManager. When
SubscriptionManager and TelephonySubscriptionSnapshot are
out-of-synced, the config of an active VCN instance will be
removed. It can cause NPE in getUnderlyingNetworkPolicy. This
patch fixes it by checking subscriptions against the snapshot.

This patch also fixes the safety check in
getUnderlyingNetworkPolicy so that if VCN instance exists but
its config does not, it will not attempt querying data from
the VcnConfig

Bug: 370862489
Test: FrameworksVcnTests(new tests); CtsVcnTestCases
Flag: android.net.vcn.fix_config_garbage_collection
Change-Id: Id54adabcc1910102a2ab20c432b693a8f52c5c95
2024-10-30 11:16:11 -07:00
..
android/net/vcn Add VcnUtils to easily get WifiInfo and subId from NetworkCapabilities 2024-10-01 17:28:04 -07:00
com/android/server Fix VcnConfig garbage collection 2024-10-30 11:16:11 -07:00