Fix isFeatureEnabled namespace and overload usage
From service-connectivity, NAMESPACE_TETHERING must be used, as NAMESPACE_CONNECTIVITY is used for the NetworkStack module. Also the isFeatureEnabled with module name must be used, otherwise the "android" package version is queried instead of the tethering module version. BpfNetMaps is using flag value 1 to workaround this issue. flags in NsdService, AutomaticOnOffKeepaliveTracker, and ConnectivityFlags were not pushed currently. So, this change has no effect to devices. Bug: 279108992 Test: TH Change-Id: I2b4b6a13c048c20beef52b1f43b9e21aca0c637a
This commit is contained in:
@@ -91,7 +91,7 @@ import static android.net.OemNetworkPreferences.OEM_NETWORK_PREFERENCE_TEST;
|
||||
import static android.net.OemNetworkPreferences.OEM_NETWORK_PREFERENCE_TEST_ONLY;
|
||||
import static android.os.Process.INVALID_UID;
|
||||
import static android.os.Process.VPN_UID;
|
||||
import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY;
|
||||
import static android.provider.DeviceConfig.NAMESPACE_TETHERING;
|
||||
import static android.system.OsConstants.ETH_P_ALL;
|
||||
import static android.system.OsConstants.IPPROTO_TCP;
|
||||
import static android.system.OsConstants.IPPROTO_UDP;
|
||||
@@ -1393,9 +1393,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
/**
|
||||
* @see DeviceConfigUtils#isFeatureEnabled
|
||||
*/
|
||||
public boolean isFeatureEnabled(Context context, String name, boolean defaultEnabled) {
|
||||
return DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_CONNECTIVITY, name,
|
||||
TETHERING_MODULE_NAME, defaultEnabled);
|
||||
public boolean isFeatureEnabled(Context context, String name) {
|
||||
return DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING, name,
|
||||
TETHERING_MODULE_NAME, false /* defaultValue */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user