Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3642,6 +3642,7 @@ package android.net.wifi { public class WifiManager { method public void connect(android.net.wifi.WifiConfiguration, android.net.wifi.WifiManager.ActionListener); method public java.util.List<android.net.wifi.WifiConfiguration> getAllMatchingWifiConfigs(java.util.List<android.net.wifi.ScanResult>); method public java.util.List<android.net.wifi.hotspot2.OsuProvider> getMatchingOsuProviders(java.util.List<android.net.wifi.ScanResult>); method public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks(); method public android.net.wifi.WifiConfiguration getWifiApConfiguration(); method public int getWifiApState(); Loading wifi/java/android/net/wifi/IWifiManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ interface IWifiManager List<WifiConfiguration> getAllMatchingWifiConfigs(in List<ScanResult> scanResult); List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult); List<OsuProvider> getMatchingOsuProviders(in List<ScanResult> scanResult); int addOrUpdateNetwork(in WifiConfiguration config, String packageName); Loading wifi/java/android/net/wifi/WifiManager.java +7 −5 Original line number Diff line number Diff line Loading @@ -1095,19 +1095,21 @@ public class WifiManager { } /** * Returns a list of Hotspot 2.0 OSU (Online Sign-Up) providers associated with the given AP. * Returns a list of unique Hotspot 2.0 OSU (Online Sign-Up) providers associated with a given * list of ScanResult. * * An empty list will be returned if no match is found. * * @param scanResult scanResult that represents the BSSID * @return list of {@link OsuProvider} * @param scanResults a list of ScanResult * @return A list of {@link OsuProvider} that does not contain duplicate entries. * @throws UnsupportedOperationException if Passpoint is not enabled on the device. * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public List<OsuProvider> getMatchingOsuProviders(ScanResult scanResult) { public List<OsuProvider> getMatchingOsuProviders(List<ScanResult> scanResults) { try { return mService.getMatchingOsuProviders(scanResult); return mService.getMatchingOsuProviders(scanResults); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading wifi/java/com/android/server/wifi/AbstractWifiService.java +13 −1 Original line number Diff line number Diff line Loading @@ -108,11 +108,23 @@ public abstract class AbstractWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override /** * Returns a list of Hotspot 2.0 OSU (Online Sign-Up) providers associated with the given AP. * * @param scanResult a single ScanResult Object * @return * @deprecated use {@link #getMatchingOsuProviders(List)} instead. */ @Deprecated public List<OsuProvider> getMatchingOsuProviders(ScanResult scanResult) { throw new UnsupportedOperationException(); } @Override public List<OsuProvider> getMatchingOsuProviders(List<ScanResult> scanResults) { throw new UnsupportedOperationException(); } @Override public int addOrUpdateNetwork(WifiConfiguration config, String packageName) { throw new UnsupportedOperationException(); Loading wifi/tests/src/android/net/wifi/WifiManagerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -1278,12 +1278,12 @@ i * Verify that a call to cancel WPS immediately returns a failure. /** * Check the call to getMatchingOsuProviders calls getMatchingOsuProviders of WifiService * with the provided a single ScanResult. * with the provided a list of ScanResult. */ @Test public void testGetMatchingOsuProviders() throws Exception { mWifiManager.getMatchingOsuProviders(new ScanResult()); mWifiManager.getMatchingOsuProviders(new ArrayList<>()); verify(mWifiService).getMatchingOsuProviders(any(ScanResult.class)); verify(mWifiService).getMatchingOsuProviders(any(List.class)); } } Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3642,6 +3642,7 @@ package android.net.wifi { public class WifiManager { method public void connect(android.net.wifi.WifiConfiguration, android.net.wifi.WifiManager.ActionListener); method public java.util.List<android.net.wifi.WifiConfiguration> getAllMatchingWifiConfigs(java.util.List<android.net.wifi.ScanResult>); method public java.util.List<android.net.wifi.hotspot2.OsuProvider> getMatchingOsuProviders(java.util.List<android.net.wifi.ScanResult>); method public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks(); method public android.net.wifi.WifiConfiguration getWifiApConfiguration(); method public int getWifiApState(); Loading
wifi/java/android/net/wifi/IWifiManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ interface IWifiManager List<WifiConfiguration> getAllMatchingWifiConfigs(in List<ScanResult> scanResult); List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult); List<OsuProvider> getMatchingOsuProviders(in List<ScanResult> scanResult); int addOrUpdateNetwork(in WifiConfiguration config, String packageName); Loading
wifi/java/android/net/wifi/WifiManager.java +7 −5 Original line number Diff line number Diff line Loading @@ -1095,19 +1095,21 @@ public class WifiManager { } /** * Returns a list of Hotspot 2.0 OSU (Online Sign-Up) providers associated with the given AP. * Returns a list of unique Hotspot 2.0 OSU (Online Sign-Up) providers associated with a given * list of ScanResult. * * An empty list will be returned if no match is found. * * @param scanResult scanResult that represents the BSSID * @return list of {@link OsuProvider} * @param scanResults a list of ScanResult * @return A list of {@link OsuProvider} that does not contain duplicate entries. * @throws UnsupportedOperationException if Passpoint is not enabled on the device. * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public List<OsuProvider> getMatchingOsuProviders(ScanResult scanResult) { public List<OsuProvider> getMatchingOsuProviders(List<ScanResult> scanResults) { try { return mService.getMatchingOsuProviders(scanResult); return mService.getMatchingOsuProviders(scanResults); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
wifi/java/com/android/server/wifi/AbstractWifiService.java +13 −1 Original line number Diff line number Diff line Loading @@ -108,11 +108,23 @@ public abstract class AbstractWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override /** * Returns a list of Hotspot 2.0 OSU (Online Sign-Up) providers associated with the given AP. * * @param scanResult a single ScanResult Object * @return * @deprecated use {@link #getMatchingOsuProviders(List)} instead. */ @Deprecated public List<OsuProvider> getMatchingOsuProviders(ScanResult scanResult) { throw new UnsupportedOperationException(); } @Override public List<OsuProvider> getMatchingOsuProviders(List<ScanResult> scanResults) { throw new UnsupportedOperationException(); } @Override public int addOrUpdateNetwork(WifiConfiguration config, String packageName) { throw new UnsupportedOperationException(); Loading
wifi/tests/src/android/net/wifi/WifiManagerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -1278,12 +1278,12 @@ i * Verify that a call to cancel WPS immediately returns a failure. /** * Check the call to getMatchingOsuProviders calls getMatchingOsuProviders of WifiService * with the provided a single ScanResult. * with the provided a list of ScanResult. */ @Test public void testGetMatchingOsuProviders() throws Exception { mWifiManager.getMatchingOsuProviders(new ScanResult()); mWifiManager.getMatchingOsuProviders(new ArrayList<>()); verify(mWifiService).getMatchingOsuProviders(any(ScanResult.class)); verify(mWifiService).getMatchingOsuProviders(any(List.class)); } }