mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-04 01:09:47 +01:00
Pebble: convert Boolean to String for app configuration
This commit is contained in:
parent
bd7b34985b
commit
1e44bb03fb
@ -110,7 +110,11 @@ public class ExternalPebbleJSActivity extends Activity {
|
|||||||
cur_key = key.next();
|
cur_key = key.next();
|
||||||
int pebbleAppIndex = knownKeys.optInt(cur_key);
|
int pebbleAppIndex = knownKeys.optInt(cur_key);
|
||||||
if (pebbleAppIndex != 0) {
|
if (pebbleAppIndex != 0) {
|
||||||
out.put(String.valueOf(pebbleAppIndex), in.get(cur_key));
|
Object obj = in.get(cur_key);
|
||||||
|
if (obj instanceof Boolean) {
|
||||||
|
obj = ((Boolean) obj) ? "true" : "false";
|
||||||
|
}
|
||||||
|
out.put(String.valueOf(pebbleAppIndex), obj);
|
||||||
} else {
|
} else {
|
||||||
GB.toast("Discarded key " + cur_key + ", not found in the local configuration.", Toast.LENGTH_SHORT, GB.WARN);
|
GB.toast("Discarded key " + cur_key + ", not found in the local configuration.", Toast.LENGTH_SHORT, GB.WARN);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user