diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-11-15 00:06:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-11-15 00:06:15 +0000 |
commit | 765fe3125d17fdb0a079b8b415e48042e730fdf0 (patch) | |
tree | 83ae8ce389ce013b7505b5b14fecc20aeddee24b /tests | |
parent | edd72d98589769a37d39dfddb5a7759b054ce7fe (diff) | |
parent | 042a508c5b3495a93867f40c6c79cdbfc93817cf (diff) |
Merge "Migrate usage of deprecated Binder APIs"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index f69df49cc..2f5415ab9 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -1492,7 +1492,8 @@ public class WifiServiceImplTest extends WifiBaseTest { doThrow(new SecurityException()).when(mContext) .enforceCallingOrSelfPermission(eq(android.Manifest.permission.CHANGE_WIFI_STATE), eq("WifiService")); - mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); } /** @@ -1505,7 +1506,8 @@ public class WifiServiceImplTest extends WifiBaseTest { .when(mWifiPermissionsUtil).enforceLocationPermission(eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID), anyInt()); - mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); } /** @@ -1515,7 +1517,8 @@ public class WifiServiceImplTest extends WifiBaseTest { @Test(expected = SecurityException.class) public void testStartLocalOnlyHotspotThrowsSecurityExceptionWithoutLocationEnabled() { when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false); - mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); } /** @@ -1526,7 +1529,8 @@ public class WifiServiceImplTest extends WifiBaseTest { when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(false); - int result = mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + int result = mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); assertEquals(LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE, result); } @@ -1564,7 +1568,8 @@ public class WifiServiceImplTest extends WifiBaseTest { when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true); when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(true); mLooper.dispatchAll(); - int returnCode = mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + int returnCode = mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); assertEquals(ERROR_INCOMPATIBLE_MODE, returnCode); } @@ -1578,7 +1583,8 @@ public class WifiServiceImplTest extends WifiBaseTest { when(mUserManager.hasUserRestrictionForUser( eq(UserManager.DISALLOW_CONFIG_TETHERING), any())) .thenReturn(true); - int returnCode = mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + int returnCode = mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); assertEquals(ERROR_TETHERING_DISALLOWED, returnCode); } @@ -1590,7 +1596,8 @@ public class WifiServiceImplTest extends WifiBaseTest { registerLOHSRequestFull(); // now do the second request that will fail - mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME); + mWifiServiceImpl.startLocalOnlyHotspot( + mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); } /** @@ -2547,7 +2554,8 @@ public class WifiServiceImplTest extends WifiBaseTest { ILocalOnlyHotspotCallback callback2 = mock(ILocalOnlyHotspotCallback.class); when(callback2.asBinder()).thenReturn(mock(IBinder.class)); - int result = mWifiServiceImpl.startLocalOnlyHotspot(callback2, TEST_PACKAGE_NAME); + int result = mWifiServiceImpl.startLocalOnlyHotspot( + callback2, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null); assertEquals(LocalOnlyHotspotCallback.REQUEST_REGISTERED, result); mLooper.dispatchAll(); |