add wifi config for power calculation

Change-Id: Ic312ffeb299d199547cc75bc6977140f8e6e5f7b
This commit is contained in:
Pierre Vandwalle
2015-03-22 18:50:40 -07:00
parent 571864611b
commit ddfd35dbf9
4 changed files with 26 additions and 1 deletions

View File

@@ -486,6 +486,18 @@
<!-- Wifi driver supports batched scan -->
<bool translatable="false" name="config_wifi_batched_scan_supported">false</bool>
<!-- Idle Receive current for wifi radio. 0 by default-->
<integer translatable="false" name="config_wifi_idle_receive_cur_ma">1</integer>
<!-- Rx current for wifi radio. 0 by default-->
<integer translatable="false" name="config_wifi_active_rx_cur_ma">2</integer>
<!-- Tx current for wifi radio. 0 by default-->
<integer translatable="false" name="config_wifi_tx_cur_ma">3</integer>
<!-- Operating volatage for wifi radio. 0 by default-->
<integer translatable="false" name="config_wifi_operating_voltage_mv">4</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 -->
<bool name="config_automatic_brightness_available">false</bool>

View File

@@ -328,6 +328,10 @@
<java-symbol type="integer" name="config_wifi_framework_current_network_boost" />
<java-symbol type="string" name="config_wifi_random_mac_oui" />
<java-symbol type="integer" name="config_wifi_network_switching_blacklist_time" />
<java-symbol type="integer" name="config_wifi_idle_receive_cur_ma" />
<java-symbol type="integer" name="config_wifi_active_rx_cur_ma" />
<java-symbol type="integer" name="config_wifi_tx_cur_ma" />
<java-symbol type="integer" name="config_wifi_operating_voltage_mv" />
<java-symbol type="bool" name="editable_voicemailnumber" />

View File

@@ -116,6 +116,7 @@ public final class WifiActivityEnergyInfo implements Parcelable {
return (int)mControllerIdleTimeMs;
}
/**
* product of current(mA), voltage(V) and time(ms)
* @return energy used

View File

@@ -839,6 +839,14 @@ public class WifiManager {
public static final int WIFI_FEATURE_TDLS_OFFCHANNEL = 0x2000; // Support for TDLS off channel
/** @hide */
public static final int WIFI_FEATURE_EPR = 0x4000; // Enhanced power reporting
/** @hide */
public static final int WIFI_FEATURE_AP_STA = 0x8000; // Support for AP STA Concurrency
/** @hide */
public static final int WIFI_FEATURE_LINK_LAYER_STATS = 0x10000; // Link layer stats collection
/** @hide */
public static final int WIFI_FEATURE_LOGGER = 0x20000; // WiFi Logger
/** @hide */
public static final int WIFI_FEATURE_HAL_EPNO = 0x40000; // WiFi PNO enhanced
private int getSupportedFeatures() {
try {
@@ -950,7 +958,7 @@ public class WifiManager {
* @return true if this adapter supports advanced power/performance counters
*/
public boolean isEnhancedPowerReportingSupported() {
return isFeatureSupported(WIFI_FEATURE_EPR);
return isFeatureSupported(WIFI_FEATURE_LINK_LAYER_STATS);
}
/**