mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-02-02 03:26:48 +01:00
set alarm stream type at the alarm sound
This commit is contained in:
parent
ac95ff8adc
commit
e265ac35cc
@ -324,9 +324,9 @@ fun Context.getAlarmNotification(pendingIntent: PendingIntent, alarm: Alarm, add
|
||||
val label = if (alarm.label.isNotEmpty()) alarm.label else getString(R.string.alarm)
|
||||
if (isOreoPlus()) {
|
||||
val audioAttributes = AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
|
||||
.setUsage(AudioAttributes.USAGE_ALARM)
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
|
||||
.setLegacyStreamType(AudioManager.STREAM_SYSTEM)
|
||||
.setLegacyStreamType(AudioManager.STREAM_ALARM)
|
||||
.setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED)
|
||||
.build()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user