Merge "Fix incorrect default wifi power draw values" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bce3eb22af
@@ -57,6 +57,11 @@ public class WifiPowerCalculator extends PowerCalculator {
|
||||
statsType);
|
||||
app.wifiTxBytes = u.getNetworkActivityBytes(BatteryStats.NETWORK_WIFI_TX_DATA,
|
||||
statsType);
|
||||
|
||||
if (DEBUG && app.wifiPowerMah != 0) {
|
||||
Log.d(TAG, "UID " + u.getUid() + ": idle=" + idleTime + "ms rx=" + rxTime + "ms tx=" +
|
||||
txTime + "ms power=" + BatteryStatsHelper.makemAh(app.wifiPowerMah));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,11 +16,14 @@
|
||||
package com.android.internal.os;
|
||||
|
||||
import android.os.BatteryStats;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Estimates WiFi power usage based on timers in BatteryStats.
|
||||
*/
|
||||
public class WifiPowerEstimator extends PowerCalculator {
|
||||
private static final boolean DEBUG = BatteryStatsHelper.DEBUG;
|
||||
private static final String TAG = "WifiPowerEstimator";
|
||||
private final double mWifiPowerPerPacket;
|
||||
private final double mWifiPowerOn;
|
||||
private final double mWifiPowerScan;
|
||||
@@ -75,6 +78,10 @@ public class WifiPowerEstimator extends PowerCalculator {
|
||||
}
|
||||
|
||||
app.wifiPowerMah = wifiPacketPower + wifiLockPower + wifiScanPower + wifiBatchScanPower;
|
||||
if (DEBUG && app.wifiPowerMah != 0) {
|
||||
Log.d(TAG, "UID " + u.getUid() + ": power=" +
|
||||
BatteryStatsHelper.makemAh(app.wifiPowerMah));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -501,16 +501,16 @@
|
||||
<bool translatable="false" name="config_wifi_ssid_white_list_enable">true</bool>
|
||||
|
||||
<!-- Idle Receive current for wifi radio. 0 by default-->
|
||||
<integer translatable="false" name="config_wifi_idle_receive_cur_ma">1</integer>
|
||||
<integer translatable="false" name="config_wifi_idle_receive_cur_ma">0</integer>
|
||||
|
||||
<!-- Rx current for wifi radio. 0 by default-->
|
||||
<integer translatable="false" name="config_wifi_active_rx_cur_ma">2</integer>
|
||||
<integer translatable="false" name="config_wifi_active_rx_cur_ma">0</integer>
|
||||
|
||||
<!-- Tx current for wifi radio. 0 by default-->
|
||||
<integer translatable="false" name="config_wifi_tx_cur_ma">3</integer>
|
||||
<integer translatable="false" name="config_wifi_tx_cur_ma">0</integer>
|
||||
|
||||
<!-- Operating volatage for wifi radio. 0 by default-->
|
||||
<integer translatable="false" name="config_wifi_operating_voltage_mv">4</integer>
|
||||
<integer translatable="false" name="config_wifi_operating_voltage_mv">0</integer>
|
||||
|
||||
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
|
||||
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
||||
|
||||
Reference in New Issue
Block a user