From c9c03f1460f6646aed6a423aae317c2949c8a8e8 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Apr 2019 19:34:23 +0200 Subject: [PATCH] Log long extras in hex --- app/src/main/java/eu/faircode/email/Log.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 862336cc06..4b8b87200e 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -79,11 +79,16 @@ public class Log { String[] elements = new String[length]; for (int i = 0; i < length; i++) { Object element = Array.get(v, i); - elements[i] = (element == null ? null : element.toString()); + if (element instanceof Long) + elements[i] = "0x" + Long.toHexString((Long) element); + else + elements[i] = (element == null ? null : element.toString()); } value = TextUtils.join(",", elements); } - } + } else if (v instanceof Long) + value = "0x" + Long.toHexString((Long) v); + stringBuilder.append(key) .append("=") .append(value)