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

Commit 48e50a83 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Include batterystats constants in the service dump.

Bug: 168268504
Test: manual
Change-Id: Ib5eb3d968c84146e45490e610508fa3b671fe23d
parent 45f29fd8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.AtomicFile;
import android.util.IndentingPrintWriter;
import android.util.IntArray;
import android.util.KeyValueListParser;
import android.util.Log;
@@ -13521,7 +13522,11 @@ public class BatteryStatsImpl extends BatteryStats {
    @GuardedBy("this")
    public void dumpConstantsLocked(PrintWriter pw) {
        mConstants.dumpLocked(pw);
        final IndentingPrintWriter iPw = new IndentingPrintWriter(pw, "    ");
        iPw.println("BatteryStats constants:");
        iPw.increaseIndent();
        mConstants.dumpLocked(iPw);
        iPw.decreaseIndent();
    }
    @GuardedBy("this")
@@ -15467,6 +15472,7 @@ public class BatteryStatsImpl extends BatteryStats {
            mCameraOnTimer.logState(pr, "  ");
        }
        super.dumpLocked(context, pw, flags, reqUid, histStart);
        pw.print("Total cpu time reads: ");
        pw.println(mNumSingleUidCpuTimeReads);
        pw.print("Batched cpu time reads: ");
@@ -15477,5 +15483,8 @@ public class BatteryStatsImpl extends BatteryStats {
        pw.println(mNumAllUidCpuTimeReads);
        pw.print("UIDs removed since the later of device start or stats reset: ");
        pw.println(mNumUidsRemoved);
        pw.println();
        dumpConstantsLocked(pw);
    }
}