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

Commit 05e061b1 authored by Kweku Adams's avatar Kweku Adams Committed by Android (Google) Code Review
Browse files

Merge "Fixing issue related to printing out of display state and idle mode in...

Merge "Fixing issue related to printing out of display state  and idle mode in the batterystats checkin."
parents 77840f4e 030980a1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4415,7 +4415,7 @@ public abstract class BatteryStats implements Parcelable {
        if (!checkin) {
            pw.println(header);
        }
        String[] lineArgs = new String[4];
        String[] lineArgs = new String[5];
        for (int i=0; i<count; i++) {
            long duration = steps.getDurationAt(i);
            int level = steps.getLevelAt(i);
@@ -4430,7 +4430,7 @@ public abstract class BatteryStats implements Parcelable {
                        case Display.STATE_ON: lineArgs[2] = "s+"; break;
                        case Display.STATE_DOZE: lineArgs[2] = "sd"; break;
                        case Display.STATE_DOZE_SUSPEND: lineArgs[2] = "sds"; break;
                        default: lineArgs[1] = "?"; break;
                        default: lineArgs[2] = "?"; break;
                    }
                } else {
                    lineArgs[2] = "";
@@ -4441,9 +4441,9 @@ public abstract class BatteryStats implements Parcelable {
                    lineArgs[3] = "";
                }
                if ((modMode&STEP_LEVEL_MODE_DEVICE_IDLE) == 0) {
                    lineArgs[3] = (initMode&STEP_LEVEL_MODE_DEVICE_IDLE) != 0 ? "i+" : "i-";
                    lineArgs[4] = (initMode&STEP_LEVEL_MODE_DEVICE_IDLE) != 0 ? "i+" : "i-";
                } else {
                    lineArgs[3] = "";
                    lineArgs[4] = "";
                }
                dumpLine(pw, 0 /* uid */, "i" /* category */, header, (Object[])lineArgs);
            } else {
@@ -4459,7 +4459,7 @@ public abstract class BatteryStats implements Parcelable {
                        case Display.STATE_ON: pw.print("screen-on"); break;
                        case Display.STATE_DOZE: pw.print("screen-doze"); break;
                        case Display.STATE_DOZE_SUSPEND: pw.print("screen-doze-suspend"); break;
                        default: lineArgs[1] = "screen-?"; break;
                        default: pw.print("screen-?"); break;
                    }
                    haveModes = true;
                }
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public final class BatteryStatsImpl extends BatteryStats {
    private static final int MAGIC = 0xBA757475; // 'BATSTATS'

    // Current on-disk Parcel version
    private static final int VERSION = 122 + (USE_OLD_HISTORY ? 1000 : 0);
    private static final int VERSION = 123 + (USE_OLD_HISTORY ? 1000 : 0);

    // Maximum number of items we will record in the history.
    private static final int MAX_HISTORY_ITEMS = 2000;