feat(android): add isolated lvbu persona build and pinned asset selection
This commit is contained in:
@@ -60,5 +60,26 @@ fun checkCallControls() {
|
||||
session.resetConnection()
|
||||
check(states.last().connection == ConnectionStatus.DISCONNECTED)
|
||||
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.
|
||||
val independentStates=mutableListOf<VoiceUiState>()
|
||||
val independent=VoiceSession("localhost",5011,independentStates::add,persona="lvbu",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)
|
||||
independent.javaClass.getDeclaredField("state").apply { isAccessible=true }.set(independent,VoiceUiState(connection=ConnectionStatus.CONNECTED))
|
||||
independent.startVoice()
|
||||
val lateCapture=checkNotNull(AudioCapture.lastFrame);val latePlayback=checkNotNull(AudioPlayback.lastActivity)
|
||||
val sent=DialogueProtocol.uplinks.size
|
||||
independent.background(keepConnectionForPermission=true)
|
||||
check(oldSocket.cancelled && independentStates.last().connection==ConnectionStatus.DISCONNECTED)
|
||||
check(!independentStates.last().voiceActive && independentStates.last().playbackActivity==null)
|
||||
check(independent.javaClass.getDeclaredField("backgroundTimeout").apply { isAccessible=true }.get(independent)==null)
|
||||
lateCapture(ByteArray(640));latePlayback(PlaybackActivity(999,7,true,960,1920));Handler.drain()
|
||||
check(DialogueProtocol.uplinks.size==sent && independentStates.last().playbackActivity==null)
|
||||
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: real VoiceSession explicit start/duplicate dial, mute discards queued capture/keeps seq/no restart while answering, audio turn/generation/abort/hangup/late-frame fences")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user