Rename to isTetheringFeatureEnabled
DeviceConfigUtils has isFeatureEnabled for NetworkStack and Tethering which were confusing since the difference was only the arguments. This CL renames isFeatureEnabled for Tethering module to isTetheringFeatureEnabled to avoid confusion. Bug: 279108992 Test: m Change-Id: I05255bb38619afbe621d29524d7910d206a149f1
This commit is contained in:
@@ -112,8 +112,8 @@ public class TetheringConfiguration {
|
||||
* config_tether_upstream_automatic when set to true.
|
||||
*
|
||||
* This flag is enabled if !=0 and less than the module APEX version: see
|
||||
* {@link DeviceConfigUtils#isFeatureEnabled}. It is also ignored after R, as later devices
|
||||
* should just set config_tether_upstream_automatic to true instead.
|
||||
* {@link DeviceConfigUtils#isTetheringFeatureEnabled}. It is also ignored after R, as later
|
||||
* devices should just set config_tether_upstream_automatic to true instead.
|
||||
*/
|
||||
public static final String TETHER_FORCE_UPSTREAM_AUTOMATIC_VERSION =
|
||||
"tether_force_upstream_automatic_version";
|
||||
@@ -181,7 +181,7 @@ public class TetheringConfiguration {
|
||||
public static class Dependencies {
|
||||
boolean isFeatureEnabled(@NonNull Context context, @NonNull String namespace,
|
||||
@NonNull String name, @NonNull String moduleName, boolean defaultEnabled) {
|
||||
return DeviceConfigUtils.isFeatureEnabled(context, namespace, name,
|
||||
return DeviceConfigUtils.isTetheringFeatureEnabled(context, namespace, name,
|
||||
moduleName, defaultEnabled);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ public class NsdService extends INsdManager.Stub {
|
||||
* "mdns_advertiser_allowlist_othertype_version"
|
||||
* would be used to toggle MdnsDiscoveryManager / MdnsAdvertiser for each type. The flags will
|
||||
* be read with
|
||||
* {@link DeviceConfigUtils#isFeatureEnabled(Context, String, String, String, boolean)}.
|
||||
* {@link DeviceConfigUtils#isTetheringFeatureEnabled}
|
||||
*
|
||||
* @see #MDNS_DISCOVERY_MANAGER_ALLOWLIST_FLAG_PREFIX
|
||||
* @see #MDNS_ADVERTISER_ALLOWLIST_FLAG_PREFIX
|
||||
@@ -1657,9 +1657,9 @@ public class NsdService extends INsdManager.Stub {
|
||||
* @return true if the MdnsDiscoveryManager feature is enabled.
|
||||
*/
|
||||
public boolean isMdnsDiscoveryManagerEnabled(Context context) {
|
||||
return isAtLeastU() || DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
|
||||
MDNS_DISCOVERY_MANAGER_VERSION, DeviceConfigUtils.TETHERING_MODULE_NAME,
|
||||
false /* defaultEnabled */);
|
||||
return isAtLeastU() || DeviceConfigUtils.isTetheringFeatureEnabled(context,
|
||||
NAMESPACE_TETHERING, MDNS_DISCOVERY_MANAGER_VERSION,
|
||||
DeviceConfigUtils.TETHERING_MODULE_NAME, false /* defaultEnabled */);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1669,9 +1669,9 @@ public class NsdService extends INsdManager.Stub {
|
||||
* @return true if the MdnsAdvertiser feature is enabled.
|
||||
*/
|
||||
public boolean isMdnsAdvertiserEnabled(Context context) {
|
||||
return isAtLeastU() || DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
|
||||
MDNS_ADVERTISER_VERSION, DeviceConfigUtils.TETHERING_MODULE_NAME,
|
||||
false /* defaultEnabled */);
|
||||
return isAtLeastU() || DeviceConfigUtils.isTetheringFeatureEnabled(context,
|
||||
NAMESPACE_TETHERING, MDNS_ADVERTISER_VERSION,
|
||||
DeviceConfigUtils.TETHERING_MODULE_NAME, false /* defaultEnabled */);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1685,10 +1685,10 @@ public class NsdService extends INsdManager.Stub {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeviceConfigUtils#isFeatureEnabled(Context, String, String, String, boolean)
|
||||
* @see DeviceConfigUtils#isTetheringFeatureEnabled
|
||||
*/
|
||||
public boolean isFeatureEnabled(Context context, String feature) {
|
||||
return DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
|
||||
return DeviceConfigUtils.isTetheringFeatureEnabled(context, NAMESPACE_TETHERING,
|
||||
feature, DeviceConfigUtils.TETHERING_MODULE_NAME, false /* defaultEnabled */);
|
||||
}
|
||||
|
||||
|
||||
@@ -1413,10 +1413,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeviceConfigUtils#isFeatureEnabled
|
||||
* @see DeviceConfigUtils#isTetheringFeatureEnabled
|
||||
*/
|
||||
public boolean isFeatureEnabled(Context context, String name) {
|
||||
return DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING, name,
|
||||
return DeviceConfigUtils.isTetheringFeatureEnabled(context, NAMESPACE_TETHERING, name,
|
||||
TETHERING_MODULE_NAME, false /* defaultValue */);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user