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

Commit 4771a739 authored by Etan Cohen's avatar Etan Cohen
Browse files

[PASSPOINT] Add API to return all matching configurations

Add API which returns all Wi-Fi configurations corresponding to
Passpoint configurations installed on the device AND usable on
the specified AP (ScanResult).

Bug: 67891871
Test: unit tests
Change-Id: Ie9e6abea23f4376f78c75d09b3a2e25e58a416b0
parent f73f9ed5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ interface IWifiManager

    WifiConfiguration getMatchingWifiConfig(in ScanResult scanResult);

    List<WifiConfiguration> getAllMatchingWifiConfigs(in ScanResult scanResult);

    List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult);

    int addOrUpdateNetwork(in WifiConfiguration config);
+20 −0
Original line number Diff line number Diff line
@@ -1028,6 +1028,26 @@ public class WifiManager {
        }
    }

    /**
     * Return all matching WifiConfigurations for this ScanResult.
     *
     * An empty list will be returned when no configurations are installed or if no configurations
     * match the ScanResult.
     *
     * @param scanResult scanResult that represents the BSSID
     * @return A list of {@link WifiConfiguration}
     * @throws UnsupportedOperationException if Passpoint is not enabled on the device.
     * @hide
     */
    public List<WifiConfiguration> getAllMatchingWifiConfigs(ScanResult scanResult) {
        try {
            return mService.getAllMatchingWifiConfigs(scanResult);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }


    /**
     * Returns a list of Hotspot 2.0 OSU (Online Sign-Up) providers associated with the given AP.
     *