From e62da11410f7e3428d647909df06a0f638e57bb6 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Wed, 20 Nov 2019 14:39:04 -0800 Subject: wifi(p2p): Rename Context.sendBroadcastMultiplePermissions Renaming based on API council feedback. Bug: 144793100 Test: Compiles Change-Id: I02cc8946457394555904a0868e04bcfad1c38df6 --- service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java | 3 ++- .../src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java index 8fc0a8f6b..dff33baaf 100644 --- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java +++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java @@ -3005,7 +3005,8 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub { private void sendBroadcastMultiplePermissions(Intent intent) { Context context = mContext.createContextAsUser(UserHandle.ALL, 0); - context.sendBroadcastMultiplePermissions(intent, RECEIVER_PERMISSIONS_FOR_BROADCAST); + context.sendBroadcastWithMultiplePermissions( + intent, RECEIVER_PERMISSIONS_FOR_BROADCAST); } private void sendThisDeviceChangedBroadcast() { 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 95ffbc6c2..ff4642d5a 100644 --- a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java @@ -645,7 +645,7 @@ public class WifiP2pServiceImplTest extends WifiBaseTest { String[] permission_gold = new String[] {android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}; ArgumentCaptor permissionCaptor = ArgumentCaptor.forClass(String[].class); - verify(mContext, atLeastOnce()).sendBroadcastMultiplePermissions( + verify(mContext, atLeastOnce()).sendBroadcastWithMultiplePermissions( intentCaptor.capture(), permissionCaptor.capture()); String [] permission = permissionCaptor.getValue(); Arrays.sort(permission); -- cgit v1.2.3