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

Commit 26acf279 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz Committed by Android (Google) Code Review
Browse files

Merge changes I9b91ed27,Ia77d0eac,I014c2ee9

* changes:
  Fix PowerStatsView AppPicker activity start
  Utilize Measured Energy data in PowerStatsViewer
  Introduce MeasuredEnergyStats to BatteryStatsImpl
parents dfde1bd0 c86d61fc
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -2481,6 +2481,29 @@ public abstract class BatteryStats implements Parcelable {
        "group", "compl", "dorm", "uninit"
    };

    /**
     * Returned value if energy data is unavailable
     *
     * {@hide}
     */
    public static final long ENERGY_DATA_UNAVAILABLE = -1;

    /**
     * Returns the energy in microjoules that the screen consumed while on.
     * Will return {@link #ENERGY_DATA_UNAVAILABLE} if data is unavailable
     *
     * {@hide}
     */
    public abstract long getScreenOnEnergy();

    /**
     * Returns the energy in microjoules that the screen consumed while in doze
     * Will return {@link #ENERGY_DATA_UNAVAILABLE} if data is unavailable
     *
     * {@hide}
     */
    public abstract long getScreenDozeEnergy();

    public static final BitDescription[] HISTORY_STATE_DESCRIPTIONS = new BitDescription[] {
        new BitDescription(HistoryItem.STATE_CPU_RUNNING_FLAG, "running", "r"),
        new BitDescription(HistoryItem.STATE_WAKE_LOCK_FLAG, "wake_lock", "w"),
+17 −0
Original line number Diff line number Diff line
@@ -1390,6 +1390,23 @@ public final class Display {
        return state == STATE_ON || state == STATE_VR;
    }

    /**
     * Returns true if the display is in an off state such as {@link #STATE_OFF}.
     * @hide
     */
    public static boolean isOffState(int state) {
        return state == STATE_OFF;
    }

    /**
     * Returns true if the display is in an on state such as {@link #STATE_ON}
     * or {@link #STATE_VR} or {@link #STATE_ON_SUSPEND}.
     * @hide
     */
    public static boolean isOnState(int state) {
        return state == STATE_ON || state == STATE_VR || state == STATE_ON_SUSPEND;
    }

    /**
     * A mode supported by a given display.
     *
+165 −56

File changed.

Preview size limit exceeded, changes collapsed.

+66 −0

File added.

Preview size limit exceeded, changes collapsed.

+307 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading