Skip to content

Commit

Permalink
set alarm stream type at the alarm sound
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Apr 11, 2018
1 parent ac95ff8 commit e265ac3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e265ac3

Please sign in to comment.