Merge "Fix isFeatureEnabled namespace and overload usage"

This commit is contained in:
Treehugger Robot
2023-05-08 03:19:27 +00:00
committed by Gerrit Code Review
6 changed files with 15 additions and 15 deletions

View File

@@ -19,7 +19,6 @@ package com.android.server;
import static android.net.ConnectivityManager.NETID_UNSET;
import static android.net.nsd.NsdManager.MDNS_DISCOVERY_MANAGER_EVENT;
import static android.net.nsd.NsdManager.MDNS_SERVICE_EVENT;
import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY;
import static android.provider.DeviceConfig.NAMESPACE_TETHERING;
import static com.android.modules.utils.build.SdkLevel.isAtLeastU;
@@ -1352,8 +1351,8 @@ 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_CONNECTIVITY, MDNS_DISCOVERY_MANAGER_VERSION,
return isAtLeastU() || DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
MDNS_DISCOVERY_MANAGER_VERSION, DeviceConfigUtils.TETHERING_MODULE_NAME,
false /* defaultEnabled */);
}
@@ -1364,8 +1363,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_CONNECTIVITY, MDNS_ADVERTISER_VERSION, false /* defaultEnabled */);
return isAtLeastU() || DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
MDNS_ADVERTISER_VERSION, DeviceConfigUtils.TETHERING_MODULE_NAME,
false /* defaultEnabled */);
}
/**