Revert "Skip TestDropPacketToVpnAddress if the feature is disabled"

This reverts commit 41ce7c550cce438c326c2fee00fdab5b04ff9611.

Reason for revert: fails on V release builds which lack isConnectivityServiceFeatureEnabledForTesting

Bug: 369230467
Change-Id: I55f7fb329fbdfa6dda05bc6857a3d66c593ca44a
Test: test-only change
diff --git a/framework/src/android/net/ConnectivityManager.java b/framework/src/android/net/ConnectivityManager.java
index db86e5d..a6a967b 100644
--- a/framework/src/android/net/ConnectivityManager.java
+++ b/framework/src/android/net/ConnectivityManager.java
@@ -6747,33 +6747,4 @@
             throw e.rethrowFromSystemServer();
         }
     }
-
-    /**
-     * Get the specified ConnectivityService feature status. This method is for test code to check
-     * whether the feature is enabled or not.
-     * Note that tests can not just read DeviceConfig since ConnectivityService reads flag at
-     * startup. For example, it's possible that the current flag value is "disable"(-1) but the
-     * feature is enabled since the flag value was "enable"(1) when ConnectivityService started up.
-     * If the ConnectivityManager needs to check the ConnectivityService feature status for non-test
-     * purpose, define feature in {@link ConnectivityManagerFeature} and use
-     * {@link #isFeatureEnabled} instead.
-     *
-     * @param featureFlag  target flag for feature
-     * @return {@code true} if the feature is enabled, {@code false} if the feature is disabled.
-     * @throws IllegalArgumentException if the flag is invalid
-     *
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
-    })
-    public boolean isConnectivityServiceFeatureEnabledForTesting(final String featureFlag) {
-        try {
-            return mService.isConnectivityServiceFeatureEnabledForTesting(featureFlag);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
 }
diff --git a/framework/src/android/net/IConnectivityManager.aidl b/framework/src/android/net/IConnectivityManager.aidl
index 47b3316..988cc92 100644
--- a/framework/src/android/net/IConnectivityManager.aidl
+++ b/framework/src/android/net/IConnectivityManager.aidl
@@ -262,6 +262,4 @@
     IBinder getRoutingCoordinatorService();
 
     long getEnabledConnectivityManagerFeatures();
-
-    boolean isConnectivityServiceFeatureEnabledForTesting(String featureFlag);
 }
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index fca186b..4d4dacf 100755
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -14224,14 +14224,4 @@
         }
         return features;
     }
-
-    @Override
-    public boolean isConnectivityServiceFeatureEnabledForTesting(String featureFlag) {
-        switch (featureFlag) {
-            case INGRESS_TO_VPN_ADDRESS_FILTERING:
-                return mIngressToVpnAddressFiltering;
-            default:
-                throw new IllegalArgumentException("Unknown flag: " + featureFlag);
-        }
-    }
 }
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java
index 2db1db5..e186c6b 100755
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java
@@ -213,8 +213,6 @@
 
     private static final String AUTOMATIC_ON_OFF_KEEPALIVE_VERSION =
                 "automatic_on_off_keepalive_version";
-    private static final String INGRESS_TO_VPN_ADDRESS_FILTERING =
-            "ingress_to_vpn_address_filtering";
     // Enabled since version 1 means it's always enabled because the version is always above 1
     private static final String AUTOMATIC_ON_OFF_KEEPALIVE_ENABLED = "1";
     private static final long TEST_TCP_POLLING_TIMER_EXPIRED_PERIOD_MS = 60_000L;
@@ -1951,9 +1949,6 @@
      */
     private void doTestDropPacketToVpnAddress(final boolean duplicatedAddress)
             throws Exception {
-        assumeTrue(mCM.isConnectivityServiceFeatureEnabledForTesting(
-                INGRESS_TO_VPN_ADDRESS_FILTERING));
-
         final NetworkRequest request = new NetworkRequest.Builder()
                 .removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
                 .removeCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED)