Merge "Channel settings updates" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-04-18 15:03:54 +00:00
committed by Android (Google) Code Review
5 changed files with 52 additions and 5 deletions

View File

@@ -177,9 +177,7 @@ public class ChannelNotificationSettings extends NotificationSettingsBase {
mRingtone.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
Uri ringtone = Uri.parse((String) newValue);
mRingtone.setRingtone(ringtone);
mChannel.setSound(ringtone, mChannel.getAudioAttributes());
mChannel.setSound((Uri) newValue, mChannel.getAudioAttributes());
mChannel.lockFields(NotificationChannel.USER_LOCKED_SOUND);
mBackend.updateChannel(mPkg, mUid, mChannel);
return false;
@@ -240,7 +238,7 @@ public class ChannelNotificationSettings extends NotificationSettingsBase {
mImportance.setEntryValues(values.toArray(new String[0]));
mImportance.setEntries(summaries.toArray(new String[0]));
mImportance.setValue(String.valueOf(mChannel.getImportance()));
mImportance.setSummary("%s");
mImportance.setSummary(getImportanceSummary(mChannel.getImportance()));
if (mAppRow.lockedImportance) {
mImportance.setEnabled(false);
} else {