show "No sound" at silent ringtones
This commit is contained in:
parent
c6a2f2c14b
commit
43e8dd3303
|
@ -499,8 +499,12 @@ class EditContactActivity : ContactActivity() {
|
|||
|
||||
val ringtone = contact!!.ringtone
|
||||
if (ringtone != null && ringtone.isNotEmpty()) {
|
||||
val contactRingtone = RingtoneManager.getRingtone(this, Uri.parse(ringtone))
|
||||
contact_ringtone.text = contactRingtone.getTitle(this)
|
||||
if (ringtone == SILENT) {
|
||||
contact_ringtone.text = getString(R.string.no_sound)
|
||||
} else {
|
||||
val contactRingtone = RingtoneManager.getRingtone(this, Uri.parse(ringtone))
|
||||
contact_ringtone.text = contactRingtone.getTitle(this)
|
||||
}
|
||||
} else {
|
||||
val default = getDefaultAlarmSound(RingtoneManager.TYPE_RINGTONE)
|
||||
contact_ringtone.text = default.title
|
||||
|
|
|
@ -576,9 +576,13 @@ class ViewContactActivity : ContactActivity() {
|
|||
|
||||
val ringtone = contact!!.ringtone
|
||||
if (ringtone != null && ringtone.isNotEmpty()) {
|
||||
val contactRingtone = RingtoneManager.getRingtone(this, Uri.parse(ringtone))
|
||||
val ringtoneTitle = contactRingtone.getTitle(this)
|
||||
contact_ringtone.text = ringtoneTitle
|
||||
if (ringtone == SILENT) {
|
||||
contact_ringtone.text = getString(R.string.no_sound)
|
||||
} else {
|
||||
val contactRingtone = RingtoneManager.getRingtone(this, Uri.parse(ringtone))
|
||||
val ringtoneTitle = contactRingtone.getTitle(this)
|
||||
contact_ringtone.text = ringtoneTitle
|
||||
}
|
||||
} else {
|
||||
val default = getDefaultAlarmSound(RingtoneManager.TYPE_RINGTONE)
|
||||
contact_ringtone.text = default.title
|
||||
|
|
Loading…
Reference in New Issue