summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-11-26 14:29:34 -0800
committerRoshan Pius <rpius@google.com>2019-11-26 22:10:15 -0800
commit3b427469a906bada01022d1eb80d4ea0dd974ad9 (patch)
tree86975b7109bc78196be455ed917aecd4cd70e235 /service
parent6a8a76b9c3549fda81480dd366db4cb724959539 (diff)
ScanRequestProxy: Don't use @hide RemoteCallbackList.broadcast()
Bug: 142935310 Test: Compiles Change-Id: I6ed72bb92baa7df5cf237817a7d3139481d061da
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ScanRequestProxy.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/ScanRequestProxy.java b/service/java/com/android/server/wifi/ScanRequestProxy.java
index 9decba06a..0a648d4b4 100644
--- a/service/java/com/android/server/wifi/ScanRequestProxy.java
+++ b/service/java/com/android/server/wifi/ScanRequestProxy.java
@@ -537,14 +537,15 @@ public class ScanRequestProxy {
}
private void sendScanResultsAvailableToCallbacks() {
- mRegisteredScanResultsCallbacks.broadcast(
- iScanResultsCallback -> {
- try {
- iScanResultsCallback.onScanResultsAvailable();
- } catch (RemoteException e) {
- Log.e(TAG, "onScanResultsAvailable: remote exception -- " + e);
- }
- });
+ int itemCount = mRegisteredScanResultsCallbacks.beginBroadcast();
+ for (int i = 0; i < itemCount; i++) {
+ try {
+ mRegisteredScanResultsCallbacks.getBroadcastItem(i).onScanResultsAvailable();
+ } catch (RemoteException e) {
+ Log.e(TAG, "onScanResultsAvailable: remote exception -- " + e);
+ }
+ }
+ mRegisteredScanResultsCallbacks.finishBroadcast();
}
/**