Loading core/java/android/os/BatteryStats.java +43 −7 Original line number Diff line number Diff line Loading @@ -986,13 +986,13 @@ public abstract class BatteryStats implements Parcelable { public abstract void getDeferredJobsLineLocked(StringBuilder sb, int which); /** * Returns the battery consumption (in microcoulombs) of the screen while on and uid active, * Returns the battery consumption (in microcoulombs) of bluetooth for this uid, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getScreenOnMeasuredBatteryConsumptionUC(); public abstract long getBluetoothMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the uid's cpu usage, derived from Loading @@ -1003,6 +1003,24 @@ public abstract class BatteryStats implements Parcelable { */ public abstract long getCpuMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the screen while on and uid active, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getScreenOnMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of wifi for this uid, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getWifiMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) used by this uid for each * {@link android.hardware.power.stats.EnergyConsumer.ordinal} of (custom) energy consumer Loading Loading @@ -2505,11 +2523,29 @@ public abstract class BatteryStats implements Parcelable { }; /** * Returned value if power data is unavailable * Returned value if power data is unavailable. * * {@hide} */ public static final long POWER_DATA_UNAVAILABLE = -1L; /** * Returns the battery consumption (in microcoulombs) of bluetooth, derived from on * device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public static final long POWER_DATA_UNAVAILABLE = -1; public abstract long getBluetoothMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the cpu, derived from on device power * measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getCpuMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the screen while on, derived from on Loading @@ -2530,13 +2566,13 @@ public abstract class BatteryStats implements Parcelable { public abstract long getScreenDozeMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the cpu, derived from on device power * measurement data. * Returns the battery consumption (in microcoulombs) of wifi, derived from on * device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getCpuMeasuredBatteryConsumptionUC(); public abstract long getWifiMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) that each Loading core/java/android/os/connectivity/WifiActivityEnergyInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public final class WifiActivityEnergyInfo implements Parcelable { } // Calculate energy used using PowerProfile. PowerProfile powerProfile = new PowerProfile(context); final double rxIdleCurrent = powerProfile.getAveragePower( final double idleCurrent = powerProfile.getAveragePower( PowerProfile.POWER_WIFI_CONTROLLER_IDLE); final double rxCurrent = powerProfile.getAveragePower( PowerProfile.POWER_WIFI_CONTROLLER_RX); Loading @@ -121,7 +121,7 @@ public final class WifiActivityEnergyInfo implements Parcelable { return (long) ((txDurationMillis * txCurrent + rxDurationMillis * rxCurrent + idleDurationMillis * rxIdleCurrent) + idleDurationMillis * idleCurrent) * voltage); } Loading Loading
core/java/android/os/BatteryStats.java +43 −7 Original line number Diff line number Diff line Loading @@ -986,13 +986,13 @@ public abstract class BatteryStats implements Parcelable { public abstract void getDeferredJobsLineLocked(StringBuilder sb, int which); /** * Returns the battery consumption (in microcoulombs) of the screen while on and uid active, * Returns the battery consumption (in microcoulombs) of bluetooth for this uid, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getScreenOnMeasuredBatteryConsumptionUC(); public abstract long getBluetoothMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the uid's cpu usage, derived from Loading @@ -1003,6 +1003,24 @@ public abstract class BatteryStats implements Parcelable { */ public abstract long getCpuMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the screen while on and uid active, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getScreenOnMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of wifi for this uid, * derived from on device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getWifiMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) used by this uid for each * {@link android.hardware.power.stats.EnergyConsumer.ordinal} of (custom) energy consumer Loading Loading @@ -2505,11 +2523,29 @@ public abstract class BatteryStats implements Parcelable { }; /** * Returned value if power data is unavailable * Returned value if power data is unavailable. * * {@hide} */ public static final long POWER_DATA_UNAVAILABLE = -1L; /** * Returns the battery consumption (in microcoulombs) of bluetooth, derived from on * device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public static final long POWER_DATA_UNAVAILABLE = -1; public abstract long getBluetoothMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the cpu, derived from on device power * measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getCpuMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the screen while on, derived from on Loading @@ -2530,13 +2566,13 @@ public abstract class BatteryStats implements Parcelable { public abstract long getScreenDozeMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) of the cpu, derived from on device power * measurement data. * Returns the battery consumption (in microcoulombs) of wifi, derived from on * device power measurement data. * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable. * * {@hide} */ public abstract long getCpuMeasuredBatteryConsumptionUC(); public abstract long getWifiMeasuredBatteryConsumptionUC(); /** * Returns the battery consumption (in microcoulombs) that each Loading
core/java/android/os/connectivity/WifiActivityEnergyInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public final class WifiActivityEnergyInfo implements Parcelable { } // Calculate energy used using PowerProfile. PowerProfile powerProfile = new PowerProfile(context); final double rxIdleCurrent = powerProfile.getAveragePower( final double idleCurrent = powerProfile.getAveragePower( PowerProfile.POWER_WIFI_CONTROLLER_IDLE); final double rxCurrent = powerProfile.getAveragePower( PowerProfile.POWER_WIFI_CONTROLLER_RX); Loading @@ -121,7 +121,7 @@ public final class WifiActivityEnergyInfo implements Parcelable { return (long) ((txDurationMillis * txCurrent + rxDurationMillis * rxCurrent + idleDurationMillis * rxIdleCurrent) + idleDurationMillis * idleCurrent) * voltage); } Loading