feat: deliver clean avatar home in 0.6.2 UI debug candidate
Keep the avatar mounted while all connection, permission, privacy and diagnostic controls live in a settings sheet. Save the tested continuous-body renderer, safe transition driver and foreground HELLO/permission workflow from this session. Pin runtime03 for the code14 UI-only candidate; mouth deformation remains unresolved. Add source UI contracts, an optional sensor-free device probe, exact asset import and candidate packaging checks. Portrait binaries and diagnostics remain private and untracked.
This commit is contained in:
+20
-32
@@ -6,16 +6,27 @@ import android.media.MediaPlayer
|
||||
import android.view.TextureView
|
||||
|
||||
fun main() {
|
||||
checkContinuous()
|
||||
checkEngineering()
|
||||
checkSafeDriver()
|
||||
checkCodecPort()
|
||||
checkAutoConversation()
|
||||
checkSafePlanner()
|
||||
checkSafetyManifest()
|
||||
val unannotated = AvatarVideoView(Context(),AvatarPack("idle.mp4","talk.mp4","static.png","waiting.png"))
|
||||
unannotated.render(AvatarMode.IDLE,true); unannotated.render(AvatarMode.TALK,true)
|
||||
check(MediaPlayer.created.isEmpty()) // no implicit hard-cut path for unreviewed metadata
|
||||
unannotated.dispose()
|
||||
val controller = AvatarController()
|
||||
for (emotion in RoleEmotion.entries) for (intensity in if (emotion == RoleEmotion.NEUTRAL) listOf(0) else listOf(1,2)) {
|
||||
val request = ReplyEmotion(emotion, intensity, EmotionSource.MODEL,7L,2)
|
||||
val selected = controller.select(true,request,PlaybackActivity(7,3,true,960,1920))
|
||||
check(selected.mode == AvatarMode.TALK && selected.requestedEmotion == request)
|
||||
check(selected.desiredMode == AvatarMode.TALK && selected.requestedEmotion == request)
|
||||
check(selected.resolvedAssetEmotion == AssetEmotion())
|
||||
check(selected.emotionFallback == (emotion != RoleEmotion.NEUTRAL))
|
||||
check(controller.select(false,request,PlaybackActivity(7,3,true,960,1920)).mode == AvatarMode.WAITING)
|
||||
check(controller.select(true,request,PlaybackActivity(6,2,true,960,1920)).mode == AvatarMode.IDLE)
|
||||
check(controller.select(true,request,null).mode == AvatarMode.IDLE)
|
||||
check(controller.select(false,request,PlaybackActivity(7,3,true,960,1920)).desiredMode == AvatarMode.WAITING)
|
||||
check(controller.select(true,request,PlaybackActivity(6,2,true,960,1920)).desiredMode == AvatarMode.IDLE)
|
||||
check(controller.select(true,request,null).desiredMode == AvatarMode.IDLE)
|
||||
}
|
||||
val call = CallIntent()
|
||||
check(!call.consumeStart(true,true,true))
|
||||
@@ -32,33 +43,10 @@ fun main() {
|
||||
check(call.consumeStart(true,true,true))
|
||||
check(call.dial(false,true)); call.background(); check(!call.pending)
|
||||
|
||||
val view = AvatarVideoView(Context(),AvatarPack("idle.mp4","talk.mp4","static.png","waiting.png"))
|
||||
view.render(AvatarMode.IDLE,true)
|
||||
check(MediaPlayer.created.size == 2)
|
||||
val players = MediaPlayer.created.toList()
|
||||
check(players.all { it.looping && it.volume == 0f })
|
||||
val textures = view.children.filterIsInstance<TextureView>()
|
||||
players.forEach { it.prepared?.invoke(it) }
|
||||
players[0].info?.invoke(players[0],MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START,0)
|
||||
view.render(AvatarMode.TALK,true)
|
||||
check(textures.all { it.alpha == 0f }) // first-frame gate, static stays visible
|
||||
players[1].info?.invoke(players[1],MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START,0)
|
||||
check(textures[1].alpha == 1f && textures[0].alpha == 0f)
|
||||
repeat(10) { view.render(if (it%2==0) AvatarMode.IDLE else AvatarMode.TALK,true) }
|
||||
check(MediaPlayer.created.size == 2) // switches don't recreate or seek players
|
||||
view.render(AvatarMode.WAITING,true)
|
||||
check(players.all { it.released } && textures.all { it.alpha == 0f })
|
||||
view.render(AvatarMode.IDLE,true)
|
||||
check(MediaPlayer.created.size == 4)
|
||||
players[1].info?.invoke(players[1],MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START,0)
|
||||
check(textures.all { it.alpha == 0f }) // stale callbacks can't show old talk
|
||||
val latest = MediaPlayer.created.takeLast(2)
|
||||
latest[0].error?.invoke(latest[0],1,0)
|
||||
check(latest.all { it.released } && textures.all { it.alpha == 0f })
|
||||
view.render(AvatarMode.TALK,true); check(MediaPlayer.created.size == 4) // fail to static for the current run
|
||||
view.render(AvatarMode.IDLE,false); view.render(AvatarMode.IDLE,true)
|
||||
check(MediaPlayer.created.size == 6)
|
||||
view.dispose(); check(MediaPlayer.created.all { it.released })
|
||||
val still = AvatarVideoView(Context(),AvatarPack(fallback="standing.png"))
|
||||
still.render(AvatarMode.TALK,true,5,1)
|
||||
check(MediaPlayer.created.isEmpty()) // metadata absence cannot activate arbitrary switching
|
||||
still.render(AvatarMode.IDLE,false); still.dispose()
|
||||
AvatarVideoView(Context(),null).render(AvatarMode.TALK,true)
|
||||
println("PASS: seven requested labels preserved/neutral resolved fallback, old-turn fence; explicit dial/permission/cancel/background; actual video view two muted loops/first-frame gate/switch reuse/stale callback/failure/static/missing pack/lifecycle")
|
||||
println("PASS: seven requested labels preserved/neutral resolved fallback, old-turn fence; explicit dial/permission/cancel/background; static standing view/missing graph never allocates legacy players")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user