Skip to content

[stable-25.0.x] fix: avoid IllegalStateException crash when playing calling sound - #6686

Merged
mahibi merged 1 commit into
stable-25.0.xfrom
backport/6681/stable-25.0.x
Sep 10, 2026
Merged

[stable-25.0.x] fix: avoid IllegalStateException crash when playing calling sound#6686
mahibi merged 1 commit into
stable-25.0.xfrom
backport/6681/stable-25.0.x

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 10, 2026

Copy link
Copy Markdown

Backport of PR #6681

MediaPlayer.setLooping() was called right after setDataSource(),
before the player reached the Prepared state. On some OEM devices
this throws IllegalStateException, which was not caught since only
IOException was handled. Move setLooping() into the OnPreparedListener
callback and broaden the catch so a failure to set up the ringtone no
longer crashes the call.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@backportbot
backportbot Bot requested a review from mahibi September 10, 2026 09:10
@backportbot backportbot Bot added 3. to review Waiting for reviews AI assisted labels Sep 10, 2026
@backportbot backportbot Bot added this to the 25.0.0 milestone Sep 10, 2026
@mahibi
mahibi merged commit 7fe0039 into stable-25.0.x Sep 10, 2026
9 of 15 checks passed
@mahibi
mahibi deleted the backport/6681/stable-25.0.x branch September 10, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant