Skip to content

Commit

Permalink
fix(android): only debug call R8 avoiding log
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 authored and siguangli committed Nov 8, 2024
1 parent 166dde2 commit 8dee058
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,29 @@ public int putVarint(long l) {
if (count + 10 > value.length) {
enlargeBuffer(count + 10);
}
LogUtils.d("CallFunction", "putVarint l " + l + ", count " + count);
if (LogUtils.isDebugMode()) {
LogUtils.d("CallFunction", "putVarint l " + l + ", count " + count);
}
long rest = l;
int bytes = 0;
byte b;
do {
b = (byte) rest;
LogUtils.d("CallFunction", "putVarint origin b " + b + ", count " + count);
if (LogUtils.isDebugMode()) {
LogUtils.d("CallFunction", "putVarint origin b " + b + ", count " + count);
}
b |= 0x80;
LogUtils.d("CallFunction", "putVarint b " + Byte.toUnsignedInt(b) + ", count " + count);
if (LogUtils.isDebugMode()) {
LogUtils.d("CallFunction", "putVarint b " + Byte.toUnsignedInt(b) + ", count " + count);
}
value[count++] = b;
rest >>>= 7;
bytes++;
} while (rest != 0);
LogUtils.d("CallFunction", "putVarint bb " + Byte.toUnsignedInt((byte) (b & 0x7f)) + ", bytes " + bytes + ", count " + count);
if (LogUtils.isDebugMode()) {
LogUtils.d("CallFunction",
"putVarint bb " + Byte.toUnsignedInt((byte) (b & 0x7f)) + ", bytes " + bytes + ", count " + count);
}
value[count - 1] = (byte) (b & 0x7f);
return bytes;
}
Expand Down

0 comments on commit 8dee058

Please sign in to comment.