diff --git a/service/src/com/android/server/BpfNetMaps.java b/service/src/com/android/server/BpfNetMaps.java index f08ffc320ce8992707bae6b2a9e3446892a775f4..2842cc3963470dc75a1b000b692e28d9bd36a9e7 100644 --- a/service/src/com/android/server/BpfNetMaps.java +++ b/service/src/com/android/server/BpfNetMaps.java @@ -43,7 +43,6 @@ import android.net.INetd; import android.os.Build; import android.os.RemoteException; import android.os.ServiceSpecificException; -import android.provider.DeviceConfig; import android.system.ErrnoException; import android.system.Os; import android.util.ArraySet; @@ -95,8 +94,8 @@ public class BpfNetMaps { private static boolean sInitialized = false; private static Boolean sEnableJavaBpfMap = null; - private static final String BPF_NET_MAPS_ENABLE_JAVA_BPF_MAP = - "bpf_net_maps_enable_java_bpf_map"; + private static final String BPF_NET_MAPS_FORCE_DISABLE_JAVA_BPF_MAP = + "bpf_net_maps_force_disable_java_bpf_map"; // Lock for sConfigurationMap entry for UID_RULES_CONFIGURATION_KEY. // This entry is not accessed by others. @@ -283,9 +282,8 @@ public class BpfNetMaps { if (sInitialized) return; if (sEnableJavaBpfMap == null) { sEnableJavaBpfMap = SdkLevel.isAtLeastU() || - DeviceConfigUtils.isFeatureEnabled(context, - DeviceConfig.NAMESPACE_TETHERING, BPF_NET_MAPS_ENABLE_JAVA_BPF_MAP, - DeviceConfigUtils.TETHERING_MODULE_NAME, false /* defaultValue */); + DeviceConfigUtils.isTetheringFeatureNotChickenedOut( + BPF_NET_MAPS_FORCE_DISABLE_JAVA_BPF_MAP); } Log.d(TAG, "BpfNetMaps is initialized with sEnableJavaBpfMap=" + sEnableJavaBpfMap); diff --git a/service/src/com/android/server/connectivity/KeepaliveTracker.java b/service/src/com/android/server/connectivity/KeepaliveTracker.java index ae7076768e24e04f729204a09828679fa097d522..feba82198d339949f5e997e3cdab689b5adf70e4 100644 --- a/service/src/com/android/server/connectivity/KeepaliveTracker.java +++ b/service/src/com/android/server/connectivity/KeepaliveTracker.java @@ -993,7 +993,7 @@ public class KeepaliveTracker { */ public boolean isAddressTranslationEnabled(@NonNull Context context) { return DeviceConfigUtils.isFeatureSupported(context, FEATURE_CLAT_ADDRESS_TRANSLATE) - && !DeviceConfigUtils.isTetheringFeatureForceDisabled( + && DeviceConfigUtils.isTetheringFeatureNotChickenedOut( CONFIG_DISABLE_CLAT_ADDRESS_TRANSLATE); } }