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

Commit ef72895a authored by Kweku Adams's avatar Kweku Adams
Browse files

Updating BatteryStats to account for Ambient Display sipper.

The sipper was added in http://ag/3667626 but BatteryStats wasn't
updated to properly output the data.

Bug: 77877717
Test: flash device and check batterystats output
Change-Id: Ibf98545a147f2d62dd29c57dd7efa14ed4c58aa6
parent 26f00b9d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3814,6 +3814,9 @@ public abstract class BatteryStats implements Parcelable {
                final BatterySipper bs = sippers.get(i);
                String label;
                switch (bs.drainType) {
                    case AMBIENT_DISPLAY:
                        label = "ambi";
                        break;
                    case IDLE:
                        label="idle";
                        break;
@@ -4975,6 +4978,9 @@ public abstract class BatteryStats implements Parcelable {
                final BatterySipper bs = sippers.get(i);
                pw.print(prefix);
                switch (bs.drainType) {
                    case AMBIENT_DISPLAY:
                        pw.print("    Ambient display: ");
                        break;
                    case IDLE:
                        pw.print("    Idle: ");
                        break;
@@ -7777,6 +7783,9 @@ public abstract class BatteryStats implements Parcelable {
                int n = SystemProto.PowerUseItem.UNKNOWN_SIPPER;
                int uid = 0;
                switch (bs.drainType) {
                    case AMBIENT_DISPLAY:
                        n = SystemProto.PowerUseItem.AMBIENT_DISPLAY;
                        break;
                    case IDLE:
                        n = SystemProto.PowerUseItem.IDLE;
                        break;
+1 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ message SystemProto {
      OVERCOUNTED = 10;
      CAMERA = 11;
      MEMORY = 12;
      AMBIENT_DISPLAY = 13;
    };
    optional Sipper name = 1;
    // UID, only valid for the USER sipper.