Loading core/java/com/android/internal/os/PowerProfile.java +8 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ public class PowerProfile { public static final String POWER_WIFI_CONTROLLER_IDLE = "wifi.controller.idle"; public static final String POWER_WIFI_CONTROLLER_RX = "wifi.controller.rx"; public static final String POWER_WIFI_CONTROLLER_TX = "wifi.controller.tx"; public static final String POWER_WIFI_CONTROLLER_TX_LEVELS = "wifi.controller.tx_levels"; public static final String POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE = "wifi.controller.voltage"; public static final String POWER_BLUETOOTH_CONTROLLER_IDLE = "bluetooth.controller.idle"; Loading Loading @@ -287,9 +288,15 @@ public class PowerProfile { }; for (int i = 0; i < configResIds.length; i++) { String key = configResIdKeys[i]; // if we already have some of these parameters in power_profile.xml, ignore the // value in config.xml if ((sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0)) { continue; } int value = resources.getInteger(configResIds[i]); if (value > 0) { sPowerMap.put(configResIdKeys[i], (double) value); sPowerMap.put(key, (double) value); } } } Loading core/res/res/xml/power_profile.xml +21 −5 Original line number Diff line number Diff line Loading @@ -94,6 +94,21 @@ <!-- This is the battery capacity in mAh (measured at nominal voltage) --> <item name="battery.capacity">1000</item> <!-- Wifi related values. --> <!-- Idle Receive current for wifi radio in mA. 0 by default--> <item name="wifi.controller.idle">0</item> <!-- Rx current for wifi radio in mA. 0 by default--> <item name="wifi.controller.rx">0</item> <!-- Tx current for wifi radio in mA. 0 by default--> <item name="wifi.controller.tx">0</item> <!-- Current at each of the wifi Tx levels in mA. The number of tx levels varies per device and is available only of wifi chipsets which support the tx level reporting. Use wifi.tx for other chipsets. none by default --> <array name="wifi.controller.tx_levels"> <!-- mA --> </array> <!-- Operating volatage for wifi radio in mV. 0 by default--> <item name="wifi.controller.voltage">0</item> <array name="wifi.batchedscan"> <!-- mA --> <value>.0002</value> <!-- 1-8/hr --> <value>.002</value> <!-- 9-64/hr --> Loading @@ -101,4 +116,5 @@ <value>.2</value> <!-- 513-4,096/hr --> <value>2</value> <!-- 4097-/hr --> </array> </device> Loading
core/java/com/android/internal/os/PowerProfile.java +8 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ public class PowerProfile { public static final String POWER_WIFI_CONTROLLER_IDLE = "wifi.controller.idle"; public static final String POWER_WIFI_CONTROLLER_RX = "wifi.controller.rx"; public static final String POWER_WIFI_CONTROLLER_TX = "wifi.controller.tx"; public static final String POWER_WIFI_CONTROLLER_TX_LEVELS = "wifi.controller.tx_levels"; public static final String POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE = "wifi.controller.voltage"; public static final String POWER_BLUETOOTH_CONTROLLER_IDLE = "bluetooth.controller.idle"; Loading Loading @@ -287,9 +288,15 @@ public class PowerProfile { }; for (int i = 0; i < configResIds.length; i++) { String key = configResIdKeys[i]; // if we already have some of these parameters in power_profile.xml, ignore the // value in config.xml if ((sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0)) { continue; } int value = resources.getInteger(configResIds[i]); if (value > 0) { sPowerMap.put(configResIdKeys[i], (double) value); sPowerMap.put(key, (double) value); } } } Loading
core/res/res/xml/power_profile.xml +21 −5 Original line number Diff line number Diff line Loading @@ -94,6 +94,21 @@ <!-- This is the battery capacity in mAh (measured at nominal voltage) --> <item name="battery.capacity">1000</item> <!-- Wifi related values. --> <!-- Idle Receive current for wifi radio in mA. 0 by default--> <item name="wifi.controller.idle">0</item> <!-- Rx current for wifi radio in mA. 0 by default--> <item name="wifi.controller.rx">0</item> <!-- Tx current for wifi radio in mA. 0 by default--> <item name="wifi.controller.tx">0</item> <!-- Current at each of the wifi Tx levels in mA. The number of tx levels varies per device and is available only of wifi chipsets which support the tx level reporting. Use wifi.tx for other chipsets. none by default --> <array name="wifi.controller.tx_levels"> <!-- mA --> </array> <!-- Operating volatage for wifi radio in mV. 0 by default--> <item name="wifi.controller.voltage">0</item> <array name="wifi.batchedscan"> <!-- mA --> <value>.0002</value> <!-- 1-8/hr --> <value>.002</value> <!-- 9-64/hr --> Loading @@ -101,4 +116,5 @@ <value>.2</value> <!-- 513-4,096/hr --> <value>2</value> <!-- 4097-/hr --> </array> </device>