Commit d099d33
Fix always-listening bug when session ends
- Check isSessionActive before processing commands in onCommandCaptured
- Check isSessionActive before speaking responses in onAgentMessage
- Set isSessionActive=false BEFORE handling voice service to prevent race
- Stop VoiceCommandService entirely when wake word is disabled
This fixes the bug where the app would continue listening and speaking
responses after the conversation session had ended.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 9733256 commit d099d33
1 file changed
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
538 | | - | |
539 | | - | |
| 537 | + | |
540 | 538 | | |
541 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| |||
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
611 | 627 | | |
612 | 628 | | |
613 | 629 | | |
| |||
651 | 667 | | |
652 | 668 | | |
653 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
654 | 678 | | |
655 | 679 | | |
656 | 680 | | |
| |||
0 commit comments