summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2019-12-04 16:27:55 -0800
committerDavid Su <dysu@google.com>2019-12-09 10:24:58 -0800
commit158c3f29da578d4a61ee9c04c65b91438f0802f3 (patch)
tree6b57c201716100cd3bb9940e6da2563764ab7474 /tests
parenta669e034decb682f145e089cec6c204b09e0c07c (diff)
WifiServiceImpl: Remove sync version of getWifiActivityEnergyInfo
Remove synchronous version of getting the WifiActivityEnergyInfo since the async version is the official API. Bug: 145244073 Test: atest FrameworksWifiTests Change-Id: Ie3d5612582748369c878ce2f1e0f5b5faeca0597
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index d45c48e13..e08038d88 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -4688,27 +4688,6 @@ public class WifiServiceImplTest extends WifiBaseTest {
mWifiServiceImpl.acquireWifiLock(mAppBinder, wifiLockModeInvalid, "", null);
}
- /**
- * Tests that {@link WifiServiceImpl#reportActivityInfo()} throws {@link SecurityException} if
- * the caller doesn't have the necessary permissions.
- */
- @Test(expected = SecurityException.class)
- public void reportActivityInfoNoPermission() throws Exception {
- doThrow(SecurityException.class)
- .when(mContext).enforceCallingOrSelfPermission(eq(ACCESS_WIFI_STATE), any());
- mWifiServiceImpl.reportActivityInfo();
- }
-
- /**
- * Tests that {@link WifiServiceImpl#reportActivityInfo()} returns null if link layer stats is
- * unsupported.
- */
- @Test
- public void reportActivityInfoFeatureUnsupported() throws Exception {
- when(mClientModeImpl.syncGetSupportedFeatures(any())).thenReturn(0L);
- assertNull(mWifiServiceImpl.reportActivityInfo());
- }
-
private void setupReportActivityInfo() {
WifiLinkLayerStats stats = new WifiLinkLayerStats();
stats.on_time = 1000;
@@ -4739,18 +4718,6 @@ public class WifiServiceImplTest extends WifiBaseTest {
}
/**
- * Tests that {@link WifiServiceImpl#reportActivityInfo()} returns the expected values on
- * success.
- */
- @Test
- public void reportActivityInfoSuccess() throws Exception {
- when(mClientModeImpl.syncGetSupportedFeatures(any())).thenReturn(Long.MAX_VALUE);
- setupReportActivityInfo();
- WifiActivityEnergyInfo info = mWifiServiceImpl.reportActivityInfo();
- validateWifiActivityEnergyInfo(info);
- }
-
- /**
* Tests that {@link WifiServiceImpl#getWifiActivityEnergyInfoAsync} throws
* {@link SecurityException} if the caller doesn't have the necessary permissions.
*/