diff options
author | Mitchell Wills <mwills@google.com> | 2016-05-26 00:22:45 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-05-26 00:22:45 +0000 |
commit | f038e61cf0064bd1081ece932fc268e21efe1faa (patch) | |
tree | c5d597f606d12de6590bd43da810f897cfeb911c /service/java/com/android/server/wifi/scanner | |
parent | 20213b0ab3eab35bed08cae65beeffc4fa2aa7d3 (diff) | |
parent | 9bbcd0683c16bbb64efccc9ad599cc172162133f (diff) | |
download | android_frameworks_opt_net_wifi-f038e61cf0064bd1081ece932fc268e21efe1faa.tar.gz android_frameworks_opt_net_wifi-f038e61cf0064bd1081ece932fc268e21efe1faa.tar.bz2 android_frameworks_opt_net_wifi-f038e61cf0064bd1081ece932fc268e21efe1faa.zip |
Merge "Update background scan bucket periods to align with minutes" into nyc-dev am: 528d0693bd am: 40adbd9d89
am: 9bbcd0683c
* commit '9bbcd0683c16bbb64efccc9ad599cc172162133f':
Update background scan bucket periods to align with minutes
Change-Id: I9d64c544bc41ada4fdfcc38ac1427cb54ab66a8e
Diffstat (limited to 'service/java/com/android/server/wifi/scanner')
-rw-r--r-- | service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java b/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java index 9632524b9..0f9243194 100644 --- a/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java +++ b/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java @@ -78,7 +78,7 @@ public class BackgroundScanScheduler { /** * Default period to use if no buckets are being scheduled */ - private static final int DEFAULT_PERIOD_MS = 40000; + private static final int DEFAULT_PERIOD_MS = 30000; /** * Scan report threshold percentage to assign to the schedule by default * @see com.android.server.wifi.WifiNative.ScanSettings#report_threshold_percent @@ -87,7 +87,8 @@ public class BackgroundScanScheduler { /** * List of predefined periods (in ms) that buckets can be scheduled at. Ordered by preference - * if there are not enough buckets for all periods. All periods MUST be 2^N * PERIOD_MIN_GCD_MS. + * if there are not enough buckets for all periods. All periods MUST be an integer multiple of + * the next smallest bucket with the smallest bucket having a period of PERIOD_MIN_GCD_MS. * This requirement allows scans to be scheduled more efficiently because scan requests with * intersecting channels will result in those channels being scanned exactly once at the smaller * period and no unnecessary scan being scheduled. If this was not the case and two requests @@ -106,15 +107,15 @@ public class BackgroundScanScheduler { * for each type. Regular scan requests will be packed into the remaining buckets. */ private static final int[] PREDEFINED_BUCKET_PERIODS = { - 4 * PERIOD_MIN_GCD_MS, // 40s - 2 * PERIOD_MIN_GCD_MS, // 20s - 16 * PERIOD_MIN_GCD_MS, // 160s - 32 * PERIOD_MIN_GCD_MS, // 320s + 3 * PERIOD_MIN_GCD_MS, // 30s + 12 * PERIOD_MIN_GCD_MS, // 120s + 48 * PERIOD_MIN_GCD_MS, // 480s 1 * PERIOD_MIN_GCD_MS, // 10s - 128 * PERIOD_MIN_GCD_MS, // 1280s - 64 * PERIOD_MIN_GCD_MS, // 640s - 256 * PERIOD_MIN_GCD_MS, // 2560s - 8 * PERIOD_MIN_GCD_MS, // 80s + 6 * PERIOD_MIN_GCD_MS, // 60s + 192 * PERIOD_MIN_GCD_MS, // 1920s + 24 * PERIOD_MIN_GCD_MS, // 240s + 96 * PERIOD_MIN_GCD_MS, // 960s + 384 * PERIOD_MIN_GCD_MS, // 3840s -1, // place holder for exponential back off scan }; |