Skip to content

Conversation

@SeniorZhai
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes an issue where voice playback would stop when the screen locks or when the app authentication screen appears. The fix ensures audio continues playing in these scenarios.

Changes:

  • Updated the audio pause logic in ConversationFragment.onPause() to also check if the app authentication screen is being shown
  • Set the appAuthShown flag earlier in the authentication flow (in checkAndShowAppAuth method) to ensure proper state tracking before the authentication activity starts

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/src/main/java/one/mixin/android/ui/conversation/ConversationFragment.kt Modified audio pause condition to check for app authentication screen in addition to screen lock
app/src/main/java/one/mixin/android/MixinApplication.kt Added appAuthShown = true before showing the authentication activity to ensure the flag is set early

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

override fun onPause() {
// don't stop audio player if triggered by screen off
if (powerManager.isInteractive) {
// don't stop audio player if triggered by screen off or app lock overlay
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment refers to "app lock overlay" but AppAuthActivity is a separate activity, not an overlay. Consider updating the comment to say "app lock screen" or "app authentication" for accuracy.

Suggested change
// don't stop audio player if triggered by screen off or app lock overlay
// don't stop audio player if triggered by screen off or app lock screen

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants