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

Commit 4d9d0fd7 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Make sure no handlers have id = 0

Otherwise the proto parser complains that a required field is missing since 0 or missing is equivalent when dump to proto

Test: load these traces in Winscope where the proto parser complains about this

Bug: 277181336
Change-Id: I39dc1ca5506a18dd4f6931510808d7ba89927a93
parent eaf61d88
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ public class Tracer implements ShellCommandHandler.ShellCommandActionHandler {
        if (mHandlerIds.containsKey(handler)) {
            handlerId = mHandlerIds.get(handler);
        } else {
            handlerId = mHandlerIds.size();
            // + 1 to avoid 0 ids which can be confused with missing value when dumped to proto
            handlerId = mHandlerIds.size() + 1;
            mHandlerIds.put(handler, handlerId);
        }