* commit '384bf72708b623bf48a0395a51db94bda055f496': Add batch scan data to power stats.
This commit is contained in:
@@ -490,6 +490,15 @@ public class BatteryStatsHelper {
|
|||||||
* mPowerProfile.getAveragePower(PowerProfile.POWER_WIFI_SCAN)) / 1000;
|
* mPowerProfile.getAveragePower(PowerProfile.POWER_WIFI_SCAN)) / 1000;
|
||||||
power += p;
|
power += p;
|
||||||
if (DEBUG && p != 0) Log.i(TAG, String.format("wifi scanning power=%.2f", p));
|
if (DEBUG && p != 0) Log.i(TAG, String.format("wifi scanning power=%.2f", p));
|
||||||
|
for (int bin = 0; bin < BatteryStats.Uid.NUM_WIFI_BATCHED_SCAN_BINS; bin++) {
|
||||||
|
long batchScanTimeMs = u.getWifiBatchedScanTime(bin, uSecTime, which) / 1000;
|
||||||
|
p = (batchScanTimeMs
|
||||||
|
* mPowerProfile.getAveragePower(PowerProfile.POWER_WIFI_BATCHED_SCAN, bin));
|
||||||
|
power += p;
|
||||||
|
if (DEBUG && p != 0) {
|
||||||
|
Log.i(TAG, String.format("wifi batched scanning lvl %d = %.2f", bin, p));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Process Sensor usage
|
// Process Sensor usage
|
||||||
Map<Integer, ? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats();
|
Map<Integer, ? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats();
|
||||||
|
Reference in New Issue
Block a user