summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/fuelgauge
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-11-08 19:05:00 -0800
committerDianne Hackborn <hackbod@google.com>2010-11-08 19:05:00 -0800
commit21023464b23ec43ffbd2f22a09eec2bbd2c70f88 (patch)
tree9a0f5d7e8f63de6cfc2931f9243b30001e85a1a7 /src/com/android/settings/fuelgauge
parent4e4ed14ee2b82cb90a25b3027eb36f190ce2e1e7 (diff)
downloadpackages_apps_settings-21023464b23ec43ffbd2f22a09eec2bbd2c70f88.zip
packages_apps_settings-21023464b23ec43ffbd2f22a09eec2bbd2c70f88.tar.gz
packages_apps_settings-21023464b23ec43ffbd2f22a09eec2bbd2c70f88.tar.bz2
Fix issue #3177284: Account for wake lock power usage on Crespo
Change-Id: I5988d28fd192cd7fdb85140172a92141eb389964
Diffstat (limited to 'src/com/android/settings/fuelgauge')
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageSummary.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
index e0d614d..ea28c59 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -457,6 +457,10 @@ public class PowerUsageSummary extends PreferenceActivity implements Runnable {
}
wakelockTime /= 1000; // convert to millis
+ // Add cost of holding a wake lock
+ power += (wakelockTime
+ * mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_AWAKE)) / 1000;
+
// Add cost of data traffic
long tcpBytesReceived = u.getTcpBytesReceived(mStatsType);
long tcpBytesSent = u.getTcpBytesSent(mStatsType);