commit | eb6ceb942b587d468e4fc03234202f47759bbd5c | [log] [tgz] |
---|---|---|
author | Minghao Li <[email protected]> | Thu Mar 07 20:20:53 2024 +0800 |
committer | Minghao Li <[email protected]> | Thu Mar 07 20:20:53 2024 +0800 |
tree | 8c51354169384dc76c604e3483922f36bb36827e | |
parent | 9cb6d9e93baa6d4e0b8a650126a1fa3ef4c9810e [diff] |
Align the behavior of returning Byte[] and returning byte[]
diff --git a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/JsonBuilder.java b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/JsonBuilder.java index f543b62..f996fce 100644 --- a/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/JsonBuilder.java +++ b/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/JsonBuilder.java
@@ -40,6 +40,9 @@ if (data == null) { return JSONObject.NULL; } + if (data instanceof Byte) { + return (Byte) data & 0xFF; + } if (data instanceof Integer) { return data; }