mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-18 21:36:47 +01:00
Pebble: fix decoding strings in appmessages from the pebble
This fixes sending SMS from "Dialer for Pebble"
This commit is contained in:
parent
e5cf22bda6
commit
14f8929439
@ -1,7 +1,8 @@
|
|||||||
###Changelog
|
###Changelog
|
||||||
|
|
||||||
####Next Version
|
####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
|
* Some new and updated icons
|
||||||
|
|
||||||
####Version 0.6.9
|
####Version 0.6.9
|
||||||
|
@ -12,7 +12,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -1252,7 +1251,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
|||||||
if (type == TYPE_BYTEARRAY) {
|
if (type == TYPE_BYTEARRAY) {
|
||||||
dict.add(new Pair<Integer, Object>(key, bytes));
|
dict.add(new Pair<Integer, Object>(key, bytes));
|
||||||
} else {
|
} else {
|
||||||
dict.add(new Pair<Integer, Object>(key, Arrays.toString(bytes)));
|
dict.add(new Pair<Integer, Object>(key, new String(bytes)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1306,7 +1305,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
|||||||
jsonObject.put("value", Base64.encode(bytes, Base64.NO_WRAP));
|
jsonObject.put("value", Base64.encode(bytes, Base64.NO_WRAP));
|
||||||
} else {
|
} else {
|
||||||
jsonObject.put("type", "string");
|
jsonObject.put("type", "string");
|
||||||
jsonObject.put("value", Arrays.toString(bytes));
|
jsonObject.put("value", new String(bytes));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user