Correct WiFi exponential back off scan
Correct the comments for exponential back off scan. Only binary
exponential back off scan is supported.
Updated the API doc. A couple of un-related fields which were
not updated get updated as well.
Bug: 26236392
Change-Id: I5668092f393b564aa40904ed609a51aa16890614
diff --git a/api/system-current.txt b/api/system-current.txt
index cdf17e5..1df4861 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -21283,7 +21283,6 @@
method public void writeToParcel(android.os.Parcel, int);
field public int band;
field public android.net.wifi.WifiScanner.ChannelSpec[] channels;
- field public int exponent;
field public int maxPeriodInMs;
field public int maxScansToCache;
field public int numBssidsPerScan;
@@ -25611,8 +25610,8 @@
ctor public UserHandle(android.os.Parcel);
method public int describeContents();
method public int getIdentifier();
- method public boolean isOwner();
- method public static int myUserId();
+ method public final boolean isOwner();
+ method public static final int myUserId();
method public static android.os.UserHandle readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
method public static void writeToParcel(android.os.UserHandle, android.os.Parcel);
diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java
index 5534cad..76c679c 100644
--- a/wifi/java/android/net/wifi/WifiScanner.java
+++ b/wifi/java/android/net/wifi/WifiScanner.java
@@ -170,18 +170,14 @@
public int maxScansToCache;
/**
* if maxPeriodInMs is non zero or different than period, then this bucket is
- * an exponential backoff bucket and the scan period will grow exponentially
- * as per formula: actual_period(N) = period ^ (N/(step_count+1))
- * to a maximum period of max_period.
+ * 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
*/
public int maxPeriodInMs;
/**
- * for exponential back off bucket: multiplier: new_period=old_period*exponent
- */
- public int exponent;
- /**
- * for exponential back off bucket, number of scans performed at a given
- * period and until the exponent is applied
+ * for truncated binary exponential back off bucket, number of scans to perform
+ * for a given period
*/
public int stepCount;
@@ -198,7 +194,6 @@
dest.writeInt(numBssidsPerScan);
dest.writeInt(maxScansToCache);
dest.writeInt(maxPeriodInMs);
- dest.writeInt(exponent);
dest.writeInt(stepCount);
if (channels != null) {
@@ -226,7 +221,6 @@
settings.numBssidsPerScan = in.readInt();
settings.maxScansToCache = in.readInt();
settings.maxPeriodInMs = in.readInt();
- settings.exponent = in.readInt();
settings.stepCount = in.readInt();
int num_channels = in.readInt();
settings.channels = new ChannelSpec[num_channels];