mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
parent
3e903362e6
commit
d286f497f0
@ -135,17 +135,20 @@ public class PebbleUtils {
|
|||||||
|
|
||||||
JSONObject knownKeys = PebbleUtils.getAppConfigurationKeys(uuid);
|
JSONObject knownKeys = PebbleUtils.getAppConfigurationKeys(uuid);
|
||||||
SparseArray<String> appKeysMap = new SparseArray<>();
|
SparseArray<String> appKeysMap = new SparseArray<>();
|
||||||
|
String inKey, outKey;
|
||||||
|
|
||||||
|
// TODO: The fact that knownKeys is null for the passed UUID means that the
|
||||||
|
// watchapp was installed by some other app, hence we cannot communicate with it.
|
||||||
|
// The user could be warned somehow.
|
||||||
if (knownKeys == null || msg == null) {
|
if (knownKeys == null || msg == null) {
|
||||||
msg = "[]";
|
msg = "[]";
|
||||||
}
|
} else {
|
||||||
|
|
||||||
String inKey, outKey;
|
|
||||||
//knownKeys contains "name"->"index", we need to reverse that
|
//knownKeys contains "name"->"index", we need to reverse that
|
||||||
for (Iterator<String> key = knownKeys.keys(); key.hasNext(); ) {
|
for (Iterator<String> key = knownKeys.keys(); key.hasNext(); ) {
|
||||||
inKey = key.next();
|
inKey = key.next();
|
||||||
appKeysMap.put(knownKeys.optInt(inKey), inKey);
|
appKeysMap.put(knownKeys.optInt(inKey), inKey);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSONArray incoming = new JSONArray(msg);
|
JSONArray incoming = new JSONArray(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user