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

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

Fix debug dump.

1. Remove unnecessary blank line.
2. Add missing REGULATIONs.
3. Dump transactions in chronological order.

Bug: 240726265
Test: Check output of `adb shell dumpsys tare`
Change-Id: I606c92268739b7b788703206ffba55f9635fefc1
parent b16d908f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1325,7 +1325,6 @@ class Agent {

    @GuardedBy("mLock")
    void dumpLocked(IndentingPrintWriter pw) {
        pw.println();
        mBalanceThresholdAlarmQueue.dump(pw);

        pw.println();
+4 −0
Original line number Diff line number Diff line
@@ -405,6 +405,10 @@ public abstract class EconomicPolicy {
                return "PROMOTION";
            case REGULATION_DEMOTION:
                return "DEMOTION";
            case REGULATION_BG_RESTRICTED:
                return "BG_RESTRICTED";
            case REGULATION_BG_UNRESTRICTED:
                return "BG_UNRESTRICTED";
        }
        return "UNKNOWN_REGULATION:" + Integer.toHexString(eventId);
    }
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ class Ledger {

        boolean printedTransactionTitle = false;
        for (int t = 0; t < Math.min(MAX_TRANSACTION_COUNT, numRecentTransactions); ++t) {
            final int idx = (mTransactionIndex - t + MAX_TRANSACTION_COUNT) % MAX_TRANSACTION_COUNT;
            final int idx = (mTransactionIndex + t) % MAX_TRANSACTION_COUNT;
            final Transaction transaction = mTransactions[idx];
            if (transaction == null) {
                continue;