Merge "Make sure no handlers have id = 0" into udc-dev am: 78ad5e0d41
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22905959 Change-Id: Ifa7e9115f539d4cee8a97fdb30351c2ff9839f6b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user