Commit 1fc6d16
authored
Fix/transition sound not playing (#58)
* Set AudioAttributes on ringtone before play
Assign AudioAttributes to the Ringtone with USAGE_ALARM and CONTENT_TYPE_SONIFICATION before calling play(). This ensures correct routing/behavior (volume, focus, and stream selection) on modern Android versions and avoids unexpected muted/incorrect stream playback. Kept nullable-safe access to ringtone.
* Update FocusModeService.kt1 parent 5dadbac commit 1fc6d16
File tree
1 file changed
+7
-0
lines changed1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
623 | 630 | | |
624 | 631 | | |
625 | 632 | | |
| |||
0 commit comments