Merge "Check whether feature is enabled by compare with apex version"

This commit is contained in:
Mark Chien
2021-05-18 03:09:20 +00:00
committed by Gerrit Code Review

View File

@@ -58,6 +58,8 @@ public class TetheringConfiguration {
private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final String[] EMPTY_STRING_ARRAY = new String[0];
private static final String TETHERING_MODULE_NAME = "com.android.tethering";
// Default ranges used for the legacy DHCP server. // Default ranges used for the legacy DHCP server.
// USB is 192.168.42.1 and 255.255.255.0 // USB is 192.168.42.1 and 255.255.255.0
// Wifi is 192.168.43.1 and 255.255.255.0 // Wifi is 192.168.43.1 and 255.255.255.0
@@ -473,7 +475,8 @@ public class TetheringConfiguration {
@VisibleForTesting @VisibleForTesting
protected boolean isFeatureEnabled(Context ctx, String featureVersionFlag) { protected boolean isFeatureEnabled(Context ctx, String featureVersionFlag) {
return DeviceConfigUtils.isFeatureEnabled(ctx, NAMESPACE_CONNECTIVITY, featureVersionFlag); return DeviceConfigUtils.isFeatureEnabled(ctx, NAMESPACE_CONNECTIVITY, featureVersionFlag,
TETHERING_MODULE_NAME, false /* defaultEnabled */);
} }
private Resources getResources(Context ctx, int subId) { private Resources getResources(Context ctx, int subId) {