Skip to content

Commit 806dbc7

Browse files
committed
Apply review suggestions
1 parent 36227d2 commit 806dbc7

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class RingingCallNotificationCreator @Inject constructor(
124124
setContentText(textContent)
125125
// Else the content text is set by the style (will be "Incoming call")
126126
}
127-
setSound(Settings.System.DEFAULT_RINGTONE_URI, AudioManager.STREAM_RING)
128127
}
128+
.setSound(Settings.System.DEFAULT_RINGTONE_URI, AudioManager.STREAM_RING)
129129
.setTimeoutAfter(ElementCallConfig.RINGING_CALL_DURATION_SECONDS.seconds.inWholeMilliseconds)
130130
.setContentIntent(answerIntent)
131131
.setDeleteIntent(declineIntent)

libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannels.kt

+8-10
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,14 @@ class DefaultNotificationChannels @Inject constructor(
157157
)
158158
.setName(stringProvider.getString(R.string.notification_channel_ringing_calls).ifEmpty { "Ringing calls" })
159159
.setVibrationEnabled(true)
160-
.apply {
161-
setSound(
162-
Settings.System.DEFAULT_RINGTONE_URI,
163-
AudioAttributes.Builder()
164-
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
165-
.setLegacyStreamType(AudioManager.STREAM_RING)
166-
.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)
167-
.build()
168-
)
169-
}
160+
.setSound(
161+
Settings.System.DEFAULT_RINGTONE_URI,
162+
AudioAttributes.Builder()
163+
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
164+
.setLegacyStreamType(AudioManager.STREAM_RING)
165+
.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)
166+
.build()
167+
)
170168
.setDescription(stringProvider.getString(R.string.notification_channel_ringing_calls))
171169
.setLightsEnabled(true)
172170
.setLightColor(accentColor)

0 commit comments

Comments
 (0)