Merge "Make sure no handlers have id = 0" into udc-dev am: 78ad5e0d41 am: 5a48c5dd2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22905959 Change-Id: I3ddc5cc3d3673d473de5ff4b73e2de542521b72c 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