Add isolated Liam persona test APK profile

This commit is contained in:
zenord
2026-10-14 17:50:40 +08:00
parent 5a7be557d0
commit 4c70ff665e
12 changed files with 197 additions and 54 deletions
+4 -2
View File
@@ -62,8 +62,9 @@ fun checkCallControls() {
session.release(); AudioPlayback.activityFence = null
// Actual session/client background path: the independent profile never retains
// mic/playback/socket, including when a permission Activity pauses this Activity.
for(persona in listOf("lvbu","liam")) {
val independentStates=mutableListOf<VoiceUiState>()
val independent=VoiceSession("localhost",5011,independentStates::add,persona="lvbu",keepPermissionConnection=false)
val independent=VoiceSession("localhost",5011,independentStates::add,persona=persona,keepPermissionConnection=false)
val connection=independent.javaClass.getDeclaredField("dialogue").apply { isAccessible=true }.get(independent) as DialogueClient
val oldSocket=FakeSocket();connection.setField("socket",oldSocket);connection.setField("ready",true)
independent.javaClass.getDeclaredField("foreground").apply { isAccessible=true }.set(independent,true)
@@ -80,6 +81,7 @@ fun checkCallControls() {
connection.callbacks(0).onMessage(oldSocket,"hello");Handler.drain()
check(independentStates.last().connection==ConnectionStatus.DISCONNECTED)
independent.release()
println("PASS: lvbu background/permission pause disconnects actual session/client; late capture/playback/HELLO cannot revive it; default retention covered separately")
}
println("PASS: lvbu/liam background/permission pause disconnects actual session/client; late capture/playback/HELLO cannot revive it; default retention covered separately")
println("PASS: real VoiceSession explicit start/duplicate dial, mute discards queued capture/keeps seq/no restart while answering, audio turn/generation/abort/hangup/late-frame fences")
}
+2 -2
View File
@@ -73,8 +73,8 @@ class StartingFixture(val healthCode: Int = 200, val healthError: java.io.IOExce
fun close() { client.release(); barrier.countDown(); Handler.drain() }
}
fun runChecks() {
Fixture("lvbu").apply {
event("auth");check(socket.sent==listOf("hello persona=lvbu"))
for(persona in listOf("lvbu","liam")) Fixture(persona).apply {
event("auth");check(socket.sent==listOf("hello persona=$persona"))
event("auth");check(socket.sent.size==1)
event("hello");check(statuses==listOf(ConnectionStatus.CONNECTED))
client.disconnect()