diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java index 14ebe227f3b42..79138b7b3fbd8 100644 --- a/core/java/com/android/internal/os/PowerProfile.java +++ b/core/java/com/android/internal/os/PowerProfile.java @@ -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"; @@ -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); } } } diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml index 76b5fe1e1b55e..2e593a3dc6e85 100644 --- a/core/res/res/xml/power_profile.xml +++ b/core/res/res/xml/power_profile.xml @@ -94,11 +94,27 @@ 1000 - - .0002 - .002 - .02 - .2 - 2 + + + 0 + + 0 + + 0 + + + + 0 + + + .0002 + .002 + .02 + .2 + 2 + +