Skip to content

Commit b08a2d0

Browse files
authored
fix(audio): remove AUDIBILITY_ENFORCED flag from AudioAttributes (#173)
The `AUDIBILITY_ENFORCED` flag was causing full-volume alarms on Samsung devices even when alarm volume was set low. As per the docs, this flag should only be used for sounds subject to regulatory behaviors, e.g., camera shutter sound. See: #158
1 parent d69e8a6 commit b08a2d0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class AlarmService : Service() {
114114
val audioAttributes = AudioAttributes.Builder()
115115
.setUsage(AudioAttributes.USAGE_ALARM)
116116
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
117-
.setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED)
118117
.build()
119118

120119
mediaPlayer = MediaPlayer().apply {

0 commit comments

Comments
 (0)