Fix Liam waiting rotation and capability ready acknowledgement

This commit is contained in:
zenord
2026-10-15 10:41:23 +08:00
parent 654630dea5
commit f705c27eee
13 changed files with 426 additions and 34 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
package org.json
// Bounded flat AUTH/HELLO response adapter. Outbound JSON uses production protocol.
// Bounded flat AUTH/HELLO/capability response adapter. Outbound JSON uses production protocol.
// This does not exercise Android's JSON parser, which the APK build compiles.
class JSONObject() {
private val fields=linkedMapOf<String,Any>()
constructor(text: String):this() {
check(text.length<2048 && text.startsWith("{") && text.endsWith("}"))
val entries=Regex("\"([a-z_]+)\":(\"[a-z_]+\"|true|false|[0-9]+)").findAll(text)
val entries=Regex("\"([a-z0-9_]+)\"\\s*:\\s*(\"[a-z0-9_.-]*\"|true|false|[0-9]+)").findAll(text)
entries.forEach {
val raw=it.groupValues[2]
fields[it.groupValues[1]]=when {