From b08a2d0190e7d66bb9da15210935fe09b718aea7 Mon Sep 17 00:00:00 2001 From: Naveen Singh <36371707+naveensingh@users.noreply.github.com> Date: Thu, 8 May 2025 19:53:10 +0530 Subject: [PATCH] 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: https://github.com/FossifyOrg/Clock/issues/158 --- app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt b/app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt index 55c6f418..3d7b627b 100644 --- a/app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt +++ b/app/src/main/kotlin/org/fossify/clock/services/AlarmService.kt @@ -114,7 +114,6 @@ class AlarmService : Service() { val audioAttributes = AudioAttributes.Builder() .setUsage(AudioAttributes.USAGE_ALARM) .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) - .setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED) .build() mediaPlayer = MediaPlayer().apply {