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

Commit a62b4a79 authored by Wei Wang's avatar Wei Wang
Browse files

SystemServiceManager: fix boot time logging

1) add phase number to avoid duplicate entries
2) replace space with '_' for test parser

Bug: 157930717
Test: Boot
Change-Id: I2dde56d888bc43fcd893b8f1ff608a6da425ac65
parent 061dec3e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -198,12 +198,12 @@ public class SystemServiceManager {

        Slog.i(TAG, "Starting phase " + mCurrentPhase);
        try {
            t.traceBegin("OnBootPhase " + phase);
            t.traceBegin("OnBootPhase_" + phase);
            final int serviceLen = mServices.size();
            for (int i = 0; i < serviceLen; i++) {
                final SystemService service = mServices.get(i);
                long time = SystemClock.elapsedRealtime();
                t.traceBegin("OnBootPhase " + service.getClass().getName());
                t.traceBegin("OnBootPhase_" + phase + "_" + service.getClass().getName());
                try {
                    service.onBootPhase(mCurrentPhase);
                } catch (Exception ex) {
@@ -332,7 +332,7 @@ public class SystemServiceManager {
                }
                continue;
            }
            t.traceBegin("ssm.on" + onWhat + "User-" + curUserId + " " + serviceName);
            t.traceBegin("ssm.on" + onWhat + "User-" + curUserId + "_" + serviceName);
            long time = SystemClock.elapsedRealtime();
            try {
                switch (onWhat) {