Use correct in-thread message tone on O+.

We manually play the ringtone when in-thread notifications are enabled,
but we weren't using the sound specified by the channel in the system
settings. This fixes that problem by reading the NotificationChannel
setting.
This commit is contained in:
Greyson Parrelli
2018-08-22 11:58:41 -07:00
parent 54715e9c43
commit f1efe2b589
5 changed files with 33 additions and 9 deletions

View File

@@ -356,7 +356,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
mutePreference.setChecked(recipient.isMuted());
ringtoneMessagePreference.setSummary(getRingtoneSummary(getContext(), recipient.getMessageRingtone()));
ringtoneMessagePreference.setSummary(getRingtoneSummary(getContext(), recipient.getMessageRingtone(getContext())));
ringtoneCallPreference.setSummary(getRingtoneSummary(getContext(), recipient.getCallRingtone()));
Pair<String, Integer> vibrateMessageSummary = getVibrateSummary(getContext(), recipient.getMessageVibrate());
@@ -496,7 +496,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
current = recipient.getCallRingtone();
defaultUri = TextSecurePreferences.getCallNotificationRingtone(getContext());
} else {
current = recipient.getMessageRingtone();
current = recipient.getMessageRingtone(getContext());
defaultUri = TextSecurePreferences.getNotificationRingtone(getContext());
}