Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 538db821 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov Committed by Android (Google) Code Review
Browse files

Merge "Attribution of WiFi power per process state"

parents daeda6e7 d6cfe1ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ public abstract class BatteryConsumer {
    private static final int[] SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE = {
            POWER_COMPONENT_CPU,
            POWER_COMPONENT_MOBILE_RADIO,
            POWER_COMPONENT_WIFI,
    };

    static final int COLUMN_INDEX_BATTERY_CONSUMER_TYPE = 0;
+17 −0
Original line number Diff line number Diff line
@@ -460,6 +460,12 @@ public abstract class BatteryStats implements Parcelable {
         */
        public abstract long getCountLocked(int which);

        /**
         * Returns the count accumulated by this Counter for the specified process state.
         * If the counter does not support per-procstate tracking, returns 0.
         */
        public abstract long getCountForProcessState(@BatteryConsumer.ProcessState int procState);

        /**
         * Temporary for debugging.
         */
@@ -1095,6 +1101,17 @@ public abstract class BatteryStats implements Parcelable {
         */
        public abstract long getWifiMeasuredBatteryConsumptionUC();

        /**
         * Returns the battery consumption (in microcoulombs) of the uid's wifi usage when in the
         * specified process state.
         * Will return {@link #POWER_DATA_UNAVAILABLE} if data is unavailable.
         *
         * {@hide}
         */
        public abstract long getWifiMeasuredBatteryConsumptionUC(
                @BatteryConsumer.ProcessState int processState);


        /**
         * Returns the battery consumption (in microcoulombs) used by this uid for each
         * {@link android.hardware.power.stats.EnergyConsumer.ordinal} of (custom) energy consumer
Loading