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
This commit is contained in:
Naveen Singh
2025-05-08 19:53:10 +05:30
committed by GitHub
parent d69e8a611f
commit b08a2d0190

View File

@@ -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 {