diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractAppIdleTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractAppIdleTestCase.java
index ba56665..fb773cb 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractAppIdleTestCase.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractAppIdleTestCase.java
@@ -30,7 +30,6 @@
         if (!isSupported()) return;
 
         // Set initial state.
-        setUpMeteredNetwork();
         removePowerSaveModeWhitelist(TEST_APP2_PKG);
         setAppIdle(false);
         turnBatteryOff();
@@ -63,14 +62,6 @@
     }
 
     /**
-     * Sets the initial (non) metered network state.
-     *
-     * <p>By default is empty - it's up to subclasses to override.
-     */
-    protected void setUpMeteredNetwork() throws Exception {
-    }
-
-    /**
      * Resets the (non) metered network state.
      *
      * <p>By default is empty - it's up to subclasses to override.
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractBatterySaverModeTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractBatterySaverModeTestCase.java
index c1c91da..ed738a6 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractBatterySaverModeTestCase.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractBatterySaverModeTestCase.java
@@ -30,7 +30,6 @@
         if (!isSupported()) return;
 
         // Set initial state.
-        setUpMeteredNetwork();
         removePowerSaveModeWhitelist(TEST_APP2_PKG);
         setBatterySaverMode(false);
 
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractDozeModeTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractDozeModeTestCase.java
index b89cf93..cc05b04 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractDozeModeTestCase.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractDozeModeTestCase.java
@@ -31,7 +31,6 @@
         if (!isSupported()) return;
 
         // Set initial state.
-        setUpMeteredNetwork();
         removePowerSaveModeWhitelist(TEST_APP2_PKG);
         setDozeMode(false);
 
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
index 70fc51a..46d243e 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
@@ -85,6 +85,7 @@
     protected WifiManager mWfm;
     protected int mUid;
     private String mMeteredWifi;
+    private boolean mSupported;
 
     @Override
     protected void setUp() throws Exception {
@@ -96,6 +97,7 @@
         mWfm = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
         mUid = getUid(TEST_APP2_PKG);
         final int myUid = getUid(mContext.getPackageName());
+        mSupported = setUpActiveNetworkMeteringState();
 
         Log.i(TAG, "Apps status on " + getName() + ":\n"
                 + "\ttest app: uid=" + myUid + ", state=" + getProcessStateByUid(myUid) + "\n"
@@ -191,7 +193,9 @@
     /**
      * Whether this device suport this type of test.
      *
-     * <p>Should be overridden when necessary, and explicitly used before each test. Example:
+     * <p>Should be overridden when necessary (but always calling
+     * {@code super.isSupported()} first), and explicitly used before each test
+     * Example:
      *
      * <pre><code>
      * public void testSomething() {
@@ -201,7 +205,7 @@
      * @return {@code true} by default.
      */
     protected boolean isSupported() throws Exception {
-        return true;
+        return mSupported;
     }
 
     /**
@@ -399,15 +403,61 @@
     }
 
     /**
-     * Puts the device in a state where the active network is metered, or fail if it can't achieve
-     * that state.
+     * Sets the initial metering state for the active network.
+     *
+     * <p>It's called on setup and by default does nothing - it's up to the
+     * subclasses to override.
+     *
+     * @return whether the tests in the subclass are supported on this device.
      */
-    protected void setMeteredNetwork() throws Exception {
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return true;
+    }
+
+    /**
+     * Makes sure the active network is not metered.
+     *
+     * <p>If the device does not supoprt un-metered networks (for example if it
+     * only has cellular data but not wi-fi), it should return {@code false};
+     * otherwise, it should return {@code true} (or fail if the un-metered
+     * network could not be set).
+     *
+     * @return {@code true} if the network is now unmetered.
+     */
+    protected boolean setUnmeteredNetwork() throws Exception {
+        final NetworkInfo info = mCm.getActiveNetworkInfo();
+        assertNotNull("Could not get active network", info);
+        if (!mCm.isActiveNetworkMetered()) {
+            Log.d(TAG, "Active network is not metered: " + info);
+        } else if (info.getType() == ConnectivityManager.TYPE_WIFI) {
+            Log.i(TAG, "Setting active WI-FI network as not metered: " + info );
+            setWifiMeteredStatus(false);
+        } else {
+            Log.d(TAG, "Active network cannot be set to un-metered: " + info);
+            return false;
+        }
+        assertActiveNetworkMetered(false); // Sanity check.
+        return true;
+    }
+
+    /**
+     * Enables metering on the active network if supported.
+     *
+     * <p>If the device does not support metered networks it should return
+     * {@code false}; otherwise, it should return {@code true} (or fail if the
+     * metered network could not be set).
+     *
+     * @return {@code true} if the network is now metered.
+     */
+    protected boolean setMeteredNetwork() throws Exception {
         final NetworkInfo info = mCm.getActiveNetworkInfo();
         final boolean metered = mCm.isActiveNetworkMetered();
         if (metered) {
             Log.d(TAG, "Active network already metered: " + info);
-            return;
+            return true;
+        } else if (info.getType() != ConnectivityManager.TYPE_WIFI) {
+            Log.w(TAG, "Active network does not support metering: " + info);
+            return false;
         } else {
             Log.w(TAG, "Active network not metered: " + info);
         }
@@ -418,31 +468,21 @@
         // Sanity check.
         assertWifiMeteredStatus(netId, true);
         assertActiveNetworkMetered(true);
+        return true;
     }
 
     /**
-     * Puts the device in a state where the active network is not metered, or fail if it can't
-     * achieve that state.
-     * <p>It assumes the device has a valid WI-FI connection.
+     * Resets the device metering state to what it was before the test started.
+     *
+     * <p>This reverts any metering changes made by {@code setMeteredNetwork}.
      */
     protected void resetMeteredNetwork() throws Exception {
         if (mMeteredWifi != null) {
             Log.i(TAG, "resetMeteredNetwork(): SID '" + mMeteredWifi
                     + "' was set as metered by test case; resetting it");
             setWifiMeteredStatus(mMeteredWifi, false);
-        } else {
-            final NetworkInfo info = mCm.getActiveNetworkInfo();
-            assertNotNull("Could not get active network", info);
-            if (!mCm.isActiveNetworkMetered()) {
-                Log.d(TAG, "Active network is not metered: " + info);
-            } else if (info.getType() == ConnectivityManager.TYPE_WIFI) {
-                Log.i(TAG, "Setting active WI-FI network as metered: " + info );
-                setWifiMeteredStatus(false);
-            } else {
-                fail("Active network is not WI-FI hence cannot be set as non-metered: " + info);
-            }
+            assertActiveNetworkMetered(false); // Sanity check.
         }
-        assertActiveNetworkMetered(false); // Sanity check.
     }
 
     private void assertActiveNetworkMetered(boolean expected) throws Exception {
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleMeteredTest.java
index e008c69..622d993 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleMeteredTest.java
@@ -19,8 +19,8 @@
 public class AppIdleMeteredTest extends AbstractAppIdleTestCase {
 
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        setMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setMeteredNetwork();
     }
 
     @Override
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleNonMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleNonMeteredTest.java
index 633dc81..bde71f9 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleNonMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AppIdleNonMeteredTest.java
@@ -17,9 +17,8 @@
 package com.android.cts.net.hostside;
 
 public class AppIdleNonMeteredTest extends AbstractAppIdleTestCase {
-
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        resetMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setUnmeteredNetwork();
     }
 }
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeMeteredTest.java
index 3a88bbd..3071cfe 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeMeteredTest.java
@@ -19,8 +19,8 @@
 public class BatterySaverModeMeteredTest extends AbstractBatterySaverModeTestCase {
 
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        setMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setMeteredNetwork();
     }
 
     @Override
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeNonMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeNonMeteredTest.java
index 646c4b9..6d3076f 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeNonMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/BatterySaverModeNonMeteredTest.java
@@ -19,7 +19,7 @@
 public class BatterySaverModeNonMeteredTest extends AbstractBatterySaverModeTestCase {
 
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        resetMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setUnmeteredNetwork();
     }
 }
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DataSaverModeTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
index 3e6bd33..ac35bd4 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
@@ -33,7 +33,6 @@
         if (!isSupported()) return;
 
         // Set initial state.
-        setMeteredNetwork();
         setRestrictBackground(false);
         removeRestrictBackgroundWhitelist(mUid);
         removeRestrictBackgroundBlacklist(mUid);
@@ -55,6 +54,11 @@
         }
     }
 
+    @Override
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setMeteredNetwork();
+    }
+
     public void testGetRestrictBackgroundStatus_disabled() throws Exception {
         if (!isSupported()) return;
 
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeMeteredTest.java
index 656d274..e4189af 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeMeteredTest.java
@@ -19,8 +19,8 @@
 public class DozeModeMeteredTest extends AbstractDozeModeTestCase {
 
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        setMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setMeteredNetwork();
     }
 
     @Override
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeNonMeteredTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeNonMeteredTest.java
index c761238..edbbb9e 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeNonMeteredTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/DozeModeNonMeteredTest.java
@@ -19,7 +19,7 @@
 public class DozeModeNonMeteredTest extends AbstractDozeModeTestCase {
 
     @Override
-    protected void setUpMeteredNetwork() throws Exception {
-        resetMeteredNetwork();
+    protected boolean setUpActiveNetworkMeteringState() throws Exception {
+        return setUnmeteredNetwork();
     }
 }
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/MixedModesTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/MixedModesTest.java
index af52eee..ec49eee 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/MixedModesTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/MixedModesTest.java
@@ -68,7 +68,11 @@
         }
 
         Log.i(TAG, "testDataAndBatterySaverModes_meteredNetwork() tests");
-        setMeteredNetwork();
+        if (!setMeteredNetwork()) {
+            Log.w(TAG, "testDataAndBatterySaverModes_meteredNetwork() skipped because "
+                    + "device cannot use a metered network");
+            return;
+        }
 
         try {
             setRestrictBackground(true);
@@ -139,7 +143,7 @@
             return;
         }
 
-        if (mCm.isActiveNetworkMetered()) {
+        if (!setUnmeteredNetwork()) {
             Log.w(TAG, "testDataAndBatterySaverModes_nonMeteredNetwork() skipped because network"
                     + " is metered");
             return;
diff --git a/tests/cts/hostside/src/com/android/cts/net/HostsideNetworkTestCase.java b/tests/cts/hostside/src/com/android/cts/net/HostsideNetworkTestCase.java
index 6642512..e96537c 100644
--- a/tests/cts/hostside/src/com/android/cts/net/HostsideNetworkTestCase.java
+++ b/tests/cts/hostside/src/com/android/cts/net/HostsideNetworkTestCase.java
@@ -65,8 +65,6 @@
         assertNotNull(mAbi);
         assertNotNull(mCtsBuild);
 
-        assertTrue("wi-fi not enabled", getDevice().isWifiEnabled());
-
         uninstallPackage(TEST_PKG, false);
         installPackage(TEST_APK);
     }
