summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-11-13 08:25:38 -0800
committerRoshan Pius <rpius@google.com>2019-11-13 12:22:46 -0800
commit08d8f7a6d15e05994d0dc3d32398ad75047cd9db (patch)
tree2e6e83df09ed175690a77618b9bbf5c11f7729cf /tests
parent77f8ce94b89bae2a15ee1e7aab6d8c4fac19fcbd (diff)
WifiP2pServiceImpl: Use @SystemApi for sendBroadcastMultiplePermissions
Bug: 141943978 Test: Compiles Change-Id: I6f52c2a87a8265f5c4df49e772a7c47dbff4e5b4
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
index e5d1c3e68..95ffbc6c2 100644
--- a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
@@ -150,7 +150,6 @@ public class WifiP2pServiceImplTest extends WifiBaseTest {
@Spy FakeWifiLog mLog;
@Spy MockWifiP2pMonitor mWifiMonitor;
-
private void generatorTestData() {
mTestWifiP2pGroup = new WifiP2pGroup();
mTestWifiP2pGroup.setNetworkName("TestGroupName");
@@ -646,8 +645,8 @@ public class WifiP2pServiceImplTest extends WifiBaseTest {
String[] permission_gold = new String[] {android.Manifest.permission.ACCESS_FINE_LOCATION,
android.Manifest.permission.ACCESS_WIFI_STATE};
ArgumentCaptor<String []> permissionCaptor = ArgumentCaptor.forClass(String[].class);
- verify(mContext, atLeastOnce()).sendBroadcastAsUserMultiplePermissions(
- intentCaptor.capture(), eq(UserHandle.ALL), permissionCaptor.capture());
+ verify(mContext, atLeastOnce()).sendBroadcastMultiplePermissions(
+ intentCaptor.capture(), permissionCaptor.capture());
String [] permission = permissionCaptor.getValue();
Arrays.sort(permission);
Arrays.sort(permission_gold);
@@ -769,6 +768,8 @@ public class WifiP2pServiceImplTest extends WifiBaseTest {
setUpWifiP2pServiceImpl(true);
mClient1 = new Binder();
mClient2 = new Binder();
+
+ when(mContext.createContextAsUser(any(), anyInt())).thenReturn(mContext);
}
/**