Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bec0be3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "add support for multiple listeners from same package"

parents 9a6c8eea 0f8fa208
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -5240,9 +5240,11 @@ public class WifiManager {
    /**
     * Add a listener for Scan Results. See {@link ScanResultsListener}.
     * Caller will receive the event when scan results are available.
     * Caller should use {@link WifiManager#getScanResults()} to get the scan results.
     * Caller should use {@link WifiManager#getScanResults()} requires
     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} to get the scan results.
     * Caller can remove a previously registered listener using
     * {@link WifiManager#removeScanResultsListener(ScanResultsListener)}
     * Same caller can add multiple listeners.
     * <p>
     * Applications should have the
     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} permission. Callers
@@ -5267,7 +5269,7 @@ public class WifiManager {
            iWifiManager.registerScanResultsListener(
                    new Binder(),
                    new ScanResultsListenerProxy(executor, listener),
                    mContext.getOpPackageName().hashCode());
                    listener.hashCode());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
@@ -5289,7 +5291,7 @@ public class WifiManager {
            if (iWifiManager == null) {
                throw new RemoteException("Wifi service is not running");
            }
            iWifiManager.unregisterScanResultsListener(mContext.getOpPackageName().hashCode());
            iWifiManager.unregisterScanResultsListener(listener.hashCode());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }