summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2019-07-24 11:28:27 -0700
committerHai Shalom <haishalom@google.com>2019-07-24 11:31:33 -0700
commit6e2376924bfa1e0e716c4dc1d80accaf542998dc (patch)
tree6323de274503642544da0fe45b17f5c51fb6f8a2 /tests
parentd96818365c33d132ae21c4708195f9179e16917d (diff)
[Passpoint] Remove FEATURE_WIFI_PASSPOINT
Remove FEATURE_WIFI_PASSPOINT conditionals from WifiServiceImpl.java and WifiInjector.java, since Passpoint is a feature that must be enabled. Removed unnecessary unit test cases. Bug: 134099536 Test: atest WifiServiceImplTest Change-Id: I8f3e27a8ddf69e511bad5e467f8504578fd8e0d4
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index 80b7406ee..d6651e727 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -385,8 +385,6 @@ public class WifiServiceImplTest {
when(mWifiInjector.getWifiScoreCard()).thenReturn(mWifiScoreCard);
when(mClientModeImpl.syncStartSubscriptionProvisioning(anyInt(),
any(OsuProvider.class), any(IProvisioningCallback.class), any())).thenReturn(true);
- when(mPackageManager.hasSystemFeature(
- PackageManager.FEATURE_WIFI_PASSPOINT)).thenReturn(true);
// Create an OSU provider that can be provisioned via an open OSU AP
mOsuProvider = PasspointProvisioningTestUtil.generateOsuProvider(true);
when(mContext.getOpPackageName()).thenReturn(TEST_PACKAGE_NAME);
@@ -2514,7 +2512,6 @@ public class WifiServiceImplTest {
config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
PackageManager pm = mock(PackageManager.class);
- when(pm.hasSystemFeature(PackageManager.FEATURE_WIFI_PASSPOINT)).thenReturn(true);
when(mContext.getPackageManager()).thenReturn(pm);
when(pm.getApplicationInfo(any(), anyInt())).thenReturn(mApplicationInfo);
when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
@@ -2594,21 +2591,6 @@ public class WifiServiceImplTest {
}
/**
- * Verify that the call to startSubscriptionProvisioning is not directed to the Passpoint
- * specific API startSubscriptionProvisioning when the feature is not supported.
- */
- @Test(expected = UnsupportedOperationException.class)
- public void testStartSubscriptionProvisioniningPasspointUnsupported() throws Exception {
- when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
- anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
- when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETUP_WIZARD),
- anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
- when(mPackageManager.hasSystemFeature(
- PackageManager.FEATURE_WIFI_PASSPOINT)).thenReturn(false);
- mWifiServiceImpl.startSubscriptionProvisioning(mOsuProvider, mProvisioningCallback);
- }
-
- /**
* Verify that the call to startSubscriptionProvisioning is not redirected to the Passpoint
* specific API startSubscriptionProvisioning when the caller provides invalid arguments
*/
@@ -3521,29 +3503,6 @@ public class WifiServiceImplTest {
}
/**
- * Verify that Passpoint configuration is not removed in factoryReset if Passpoint feature
- * is not supported.
- */
- @Test
- public void testFactoryResetWithoutPasspointSupport() throws Exception {
- setupClientModeImplHandlerForPost();
-
- mWifiServiceImpl.mClientModeImplChannel = mAsyncChannel;
- when(mPackageManager.hasSystemFeature(
- PackageManager.FEATURE_WIFI_PASSPOINT)).thenReturn(false);
-
- mWifiServiceImpl.factoryReset(TEST_PACKAGE_NAME);
- mLooper.dispatchAll();
-
- verify(mClientModeImpl).syncGetConfiguredNetworks(anyInt(), any(), anyInt());
- verify(mClientModeImpl, never()).syncGetPasspointConfigs(any());
- verify(mClientModeImpl, never()).syncRemovePasspointConfig(any(), anyString());
- verify(mWifiConfigManager).clearDeletedEphemeralNetworks();
- verify(mClientModeImpl).clearNetworkRequestUserApprovedAccessPoints();
- verify(mWifiNetworkSuggestionsManager).clear();
- }
-
- /**
* Verify that a call to factoryReset throws a SecurityException if the caller does not have
* the CONNECTIVITY_INTERNAL permission.
*/