No need to use apply setContentText accept null parameter.
This commit is contained in:
parent
f1e12c1c1c
commit
1c8b637858
1 changed files with 2 additions and 6 deletions
|
|
@ -133,12 +133,8 @@ class RingingCallNotificationCreator(
|
|||
.setWhen(timestamp)
|
||||
.setOngoing(true)
|
||||
.setShowWhen(false)
|
||||
.apply {
|
||||
if (textContent != null) {
|
||||
setContentText(textContent)
|
||||
// Else the content text is set by the style (will be "Incoming call")
|
||||
}
|
||||
}
|
||||
// If textContent is null, the content text is set by the style (will be "Incoming call")
|
||||
.setContentText(textContent)
|
||||
.setSound(Settings.System.DEFAULT_RINGTONE_URI, AudioManager.STREAM_RING)
|
||||
.setTimeoutAfter(ElementCallConfig.RINGING_CALL_DURATION_SECONDS.seconds.inWholeMilliseconds)
|
||||
.setContentIntent(answerIntent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue