1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 12:26:48 +01:00

Pebble: fix decoding strings in appmessages from the pebble

This fixes sending SMS from "Dialer for Pebble"
This commit is contained in:
Andreas Shimokawa 2015-12-13 23:59:26 +01:00
parent e5cf22bda6
commit 14f8929439
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,8 @@
###Changelog
####Next Version
* Pebble: Allow installing apps compiled with SDK 2.x also on the balast platform (Time, Time Steel)
* Pebble: Allow installing apps compiled with SDK 2.x also on the basalt platform (Time, Time Steel)
* Pebble: Fix decoding strings in appmessages from the pebble (fixes sending SMS from "Dialer for Pebble")
* Some new and updated icons
####Version 0.6.9

View File

@ -12,7 +12,6 @@ import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
@ -1252,7 +1251,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
if (type == TYPE_BYTEARRAY) {
dict.add(new Pair<Integer, Object>(key, bytes));
} else {
dict.add(new Pair<Integer, Object>(key, Arrays.toString(bytes)));
dict.add(new Pair<Integer, Object>(key, new String(bytes)));
}
break;
default:
@ -1306,7 +1305,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
jsonObject.put("value", Base64.encode(bytes, Base64.NO_WRAP));
} else {
jsonObject.put("type", "string");
jsonObject.put("value", Arrays.toString(bytes));
jsonObject.put("value", new String(bytes));
}
break;
default: