Home
last modified time | relevance | path

Searched refs:metered (Results 1 – 4 of 4) sorted by relevance

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DMeteredDataRestrictionTest.java181 private String setWifiMeteredStatus(boolean metered) throws Exception { in setWifiMeteredStatus() argument
186 setWifiMeteredStatus(netId, metered); in setWifiMeteredStatus()
190 private void setWifiMeteredStatus(String netId, boolean metered) throws Exception { in setWifiMeteredStatus() argument
191 Log.i(TAG, "Setting wi-fi network " + netId + " metered status to " + metered); in setWifiMeteredStatus()
192 executeCmd("cmd netpolicy set metered-network " + netId + " " + metered); in setWifiMeteredStatus()
195 private void assertWifiMeteredStatus(String netId, boolean metered) throws Exception { in assertWifiMeteredStatus() argument
197 final String expectedResult = netId + ";" + metered; in assertWifiMeteredStatus()
210 private void assertActiveNetworkMetered(boolean metered) { in assertActiveNetworkMetered() argument
211 boolean actualMeteredStatus = !metered; in assertActiveNetworkMetered()
214 if (actualMeteredStatus == metered) { in assertActiveNetworkMetered()
[all …]
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DAbstractRestrictBackgroundNetworkTestCase.java644 final boolean metered = mCm.isActiveNetworkMetered(); in setMeteredNetwork()
645 if (metered) { in setMeteredNetwork()
699 private String setWifiMeteredStatus(boolean metered) throws Exception { in setWifiMeteredStatus() argument
707 return setWifiMeteredStatus(ssid, metered); in setWifiMeteredStatus()
710 private String setWifiMeteredStatus(String ssid, boolean metered) throws Exception { in setWifiMeteredStatus() argument
715 Log.i(TAG, "Setting wi-fi network " + netId + " metered status to " + metered); in setWifiMeteredStatus()
716 final String setCommand = "cmd netpolicy set metered-network " + netId + " " + metered; in setWifiMeteredStatus()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DNetworkUsageStatsTest.java93 public void setMetered(boolean metered) { in setMetered() argument
94 this.mMetered = metered; in setMetered()
273 public boolean metered; field in NetworkUsageStatsTest.NetworkCallback
280 metered = false; in NetworkCallback()
292 metered = !mCm.getNetworkCapabilities(network) in onAvailable()
323 mNetworkInterfacesToTest[networkTypeIndex].setMetered(callback.metered); in shouldTestThisNetworkType()
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java614 private void setWifiMeteredStatus(String ssid, String metered) throws Exception { in setWifiMeteredStatus() argument
615 final String setCommand = "cmd netpolicy set metered-network " + ssid + " " + metered; in setWifiMeteredStatus()
617 assertEquals(getWifiMeteredStatus(ssid), metered); in setWifiMeteredStatus() local
635 final boolean metered = !nc.hasCapability(NET_CAPABILITY_NOT_METERED); in waitForActiveNetworkMetered()
636 if (metered == requestedMeteredness) { in waitForActiveNetworkMetered()