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 committed Nov 8, 2024
1 parent a7b03f3 commit 09c1de8
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 09c1de8

Please sign in to comment.