diff options
| author | 2016-09-19 18:34:42 +0000 | |
|---|---|---|
| committer | 2016-09-19 18:34:42 +0000 | |
| commit | b2eb8ea894220e3ee055b44574e259950b05a4fd (patch) | |
| tree | a8df78f4f2b1fe42f9598d00a2f14435cfa694af | |
| parent | 5a07e3b2e877847f8680758a92b5f65a11b1811a (diff) | |
| parent | 16e1007481f508e292505bc348cec2320cbe9d08 (diff) | |
Merge "fix wrong algorithm in WifiPowerPerPacket()"
am: 16e1007481
Change-Id: I3bacf3deb99b10c5ae8fe22a02ad7066afc321e0
| -rw-r--r-- | core/java/com/android/internal/os/WifiPowerEstimator.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/com/android/internal/os/WifiPowerEstimator.java b/core/java/com/android/internal/os/WifiPowerEstimator.java index 3bd79f7e35a9..d175202163b2 100644 --- a/core/java/com/android/internal/os/WifiPowerEstimator.java +++ b/core/java/com/android/internal/os/WifiPowerEstimator.java @@ -38,13 +38,13 @@ public class WifiPowerEstimator extends PowerCalculator { } /** - * Return estimated power (in mAs) of sending a byte with the Wi-Fi radio. + * Return estimated power per Wi-Fi packet in mAh/packet where 1 packet = 2 KB. */ private static double getWifiPowerPerPacket(PowerProfile profile) { final long WIFI_BPS = 1000000; // TODO: Extract average bit rates from system final double WIFI_POWER = profile.getAveragePower(PowerProfile.POWER_WIFI_ACTIVE) / 3600; - return (WIFI_POWER / (((double)WIFI_BPS) / 8 / 2048)) / (60*60); + return WIFI_POWER / (((double)WIFI_BPS) / 8 / 2048); } @Override |