Switch previous and new code path in updateUidLockdownRule
updateUidLockdownRule was updated to use Java BpfMap class instead
of native JNI functions in aosp/2141537.
But it is better to verify this refactoring by the experiment.
So this commit update updateUidLockdownRule to switch previous code
path(JNI) and new code path(Java) based on the flag.
Also this commit removes @GuardedBy("sUidOwnerMap") from
native_updateUidLockdownRule.
This was needed to avoid JNI and Java code modify the UidOwnerMap
concurrently when some API uses previous code path (JNI) and other APIs
use new code path (Java BpfMap class).
But, after this topic, it will not be needed because all the APIs will use JNI
"or" all the APIs will use Java BpfMap class to update UidOwnerMap.
Bug: 217624062
Test: atest BpfNetMapsTest HostsideVpnTests#testBlockIncomingPacket
Change-Id: Ifd17d8a5c3a10a92c63010e5d329f9f541b3bfbf
1 file changed