Merge "WifiScanner: Revise deprecation notes"

This commit is contained in:
Roshan Pius
2020-02-05 21:03:37 +00:00
committed by Android (Google) Code Review

View File

@@ -293,26 +293,34 @@ public class WifiScanner {
public final List<HiddenNetwork> hiddenNetworks = new ArrayList<>();
/**
* period of background scan; in millisecond, 0 => single shot scan
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int periodInMs;
/**
* must have a valid REPORT_EVENT value
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int reportEvents;
/**
* defines number of bssids to cache from each scan
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int numBssidsPerScan;
/**
* defines number of scans to cache; use it with REPORT_EVENT_AFTER_BUFFER_FULL
* to wake up at fixed interval
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int maxScansToCache;
@@ -321,14 +329,18 @@ public class WifiScanner {
* a truncated binary exponential backoff bucket and the scan period will grow
* exponentially as per formula: actual_period(N) = period * (2 ^ (N/stepCount))
* to maxPeriodInMs
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int maxPeriodInMs;
/**
* for truncated binary exponential back off bucket, number of scans to perform
* for a given period
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public int stepCount;
@@ -806,7 +818,9 @@ public class WifiScanner {
/**
* Framework co-ordinates scans across multiple apps; so it may not give exactly the
* same period requested. If period of a scan is changed; it is reported by this event.
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This
* support may not be present on newer devices. Use {@link #startScan(ScanSettings,
* ScanListener)} instead for single scans.
*/
@Deprecated
public void onPeriodChanged(int periodInMs);
@@ -913,7 +927,9 @@ public class WifiScanner {
* @param listener specifies the object to report events to. This object is also treated as a
* key for this scan, and must also be specified to cancel the scan. Multiple
* scans should also not share this object.
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This support
* may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
* instead for single scans.
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
@@ -935,7 +951,9 @@ public class WifiScanner {
* stop an ongoing wifi scan
* @param listener specifies which scan to cancel; must be same object as passed in {@link
* #startBackgroundScan}
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This support
* may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
* instead for single scans.
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
@@ -953,7 +971,9 @@ public class WifiScanner {
/**
* reports currently available scan results on appropriate listeners
* @return true if all scan results were reported correctly
* @deprecated Background scan support is removed.
* @deprecated Background scan support has always been hardware vendor dependent. This support
* may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
* instead for single scans.
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)