Merge "Add getMaxNumScanSsids() API to WifiNl80211Manager." into tm-dev am: 81e9b65c69 am: 2ad83638e9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17036546

Change-Id: I5d13c9d0fa13749e9fc9f592b954fe0f4ee7909b
This commit is contained in:
TreeHugger Robot
2022-03-08 22:04:24 +00:00
committed by Automerger Merge Worker
2 changed files with 20 additions and 0 deletions

View File

@@ -9036,6 +9036,7 @@ package android.net.wifi.nl80211 {
method public void enableVerboseLogging(boolean);
method @NonNull public int[] getChannelsMhzForBand(int);
method @Nullable public android.net.wifi.nl80211.DeviceWiphyCapabilities getDeviceWiphyCapabilities(@NonNull String);
method public int getMaxNumScanSsids(@NonNull String);
method @NonNull public java.util.List<android.net.wifi.nl80211.NativeScanResult> getScanResults(@NonNull String, int);
method @Nullable public android.net.wifi.nl80211.WifiNl80211Manager.TxPacketCounters getTxPacketCounters(@NonNull String);
method public void notifyCountryCodeChanged(@Nullable String);

View File

@@ -962,6 +962,25 @@ public class WifiNl80211Manager {
return results;
}
/**
* Get the max number of SSIDs that the driver supports per scan.
*
* @param ifaceName Name of the interface.
*/
public int getMaxNumScanSsids(@NonNull String ifaceName) {
IWifiScannerImpl scannerImpl = getScannerImpl(ifaceName);
if (scannerImpl == null) {
Log.e(TAG, "No valid wificond scanner interface handler for iface=" + ifaceName);
return 0;
}
try {
return scannerImpl.getMaxNumScanSsids();
} catch (RemoteException e1) {
Log.e(TAG, "Failed to getMaxNumScanSsids");
}
return 0;
}
/**
* Return scan type for the parcelable {@link SingleScanSettings}
*/