fix ArrayIndexOutOfBoundsException while starting WifiScannerScan
bug: 21663831 Change-Id: I9aea30907aae00c98d8fb1dc1fff3f4935108fa4
This commit is contained in:
@@ -4634,7 +4634,7 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
@Override
|
||||
public void noteWifiBatchedScanStartedLocked(int csph, long elapsedRealtimeMs) {
|
||||
int bin = 0;
|
||||
while (csph > 8 && bin < NUM_WIFI_BATCHED_SCAN_BINS) {
|
||||
while (csph > 8 && bin < NUM_WIFI_BATCHED_SCAN_BINS-1) {
|
||||
csph = csph >> 3;
|
||||
bin++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user