* commit 'b0e9e731f284601fb6f544596d4c5973df111355': Fix incorrect default wifi power draw values
This commit is contained in:
@@ -57,6 +57,11 @@ public class WifiPowerCalculator extends PowerCalculator {
|
|||||||
statsType);
|
statsType);
|
||||||
app.wifiTxBytes = u.getNetworkActivityBytes(BatteryStats.NETWORK_WIFI_TX_DATA,
|
app.wifiTxBytes = u.getNetworkActivityBytes(BatteryStats.NETWORK_WIFI_TX_DATA,
|
||||||
statsType);
|
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
|
@Override
|
||||||
|
|||||||
@@ -16,11 +16,14 @@
|
|||||||
package com.android.internal.os;
|
package com.android.internal.os;
|
||||||
|
|
||||||
import android.os.BatteryStats;
|
import android.os.BatteryStats;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Estimates WiFi power usage based on timers in BatteryStats.
|
* Estimates WiFi power usage based on timers in BatteryStats.
|
||||||
*/
|
*/
|
||||||
public class WifiPowerEstimator extends PowerCalculator {
|
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 mWifiPowerPerPacket;
|
||||||
private final double mWifiPowerOn;
|
private final double mWifiPowerOn;
|
||||||
private final double mWifiPowerScan;
|
private final double mWifiPowerScan;
|
||||||
@@ -75,6 +78,10 @@ public class WifiPowerEstimator extends PowerCalculator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.wifiPowerMah = wifiPacketPower + wifiLockPower + wifiScanPower + wifiBatchScanPower;
|
app.wifiPowerMah = wifiPacketPower + wifiLockPower + wifiScanPower + wifiBatchScanPower;
|
||||||
|
if (DEBUG && app.wifiPowerMah != 0) {
|
||||||
|
Log.d(TAG, "UID " + u.getUid() + ": power=" +
|
||||||
|
BatteryStatsHelper.makemAh(app.wifiPowerMah));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -501,16 +501,16 @@
|
|||||||
<bool translatable="false" name="config_wifi_ssid_white_list_enable">true</bool>
|
<bool translatable="false" name="config_wifi_ssid_white_list_enable">true</bool>
|
||||||
|
|
||||||
<!-- Idle Receive current for wifi radio. 0 by default-->
|
<!-- 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-->
|
<!-- 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-->
|
<!-- 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-->
|
<!-- 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.
|
<!-- 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 -->
|
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
||||||
|
|||||||
Reference in New Issue
Block a user