diff options
author | Roman Birg <roman@cyngn.com> | 2016-04-08 16:22:03 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-15 08:54:17 -0700 |
commit | 791434fdc31f09821e703e89cd071000807bdf32 (patch) | |
tree | 27882c62b08e1168f0e72315b997df5112517c49 | |
parent | 52a2fb4413c4b636d07a2d667143d8749211a147 (diff) | |
download | packages_apps_Settings-791434fdc31f09821e703e89cd071000807bdf32.zip packages_apps_Settings-791434fdc31f09821e703e89cd071000807bdf32.tar.gz packages_apps_Settings-791434fdc31f09821e703e89cd071000807bdf32.tar.bz2 |
Settings: check current ringtone for non-default sub ids
Otherwise the default phone sub's selection would always be pre-selected
regardless of the actual selection.
Ticket: CYNGNOS-2396
Change-Id: Ia33df47228eb2a49d48c80535876756b4ba1abf1
Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r-- | src/com/android/settings/DefaultRingtonePreference.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/settings/DefaultRingtonePreference.java b/src/com/android/settings/DefaultRingtonePreference.java index d3cbe5a..4bf2cfa 100644 --- a/src/com/android/settings/DefaultRingtonePreference.java +++ b/src/com/android/settings/DefaultRingtonePreference.java @@ -55,7 +55,11 @@ public class DefaultRingtonePreference extends RingtonePreference { @Override protected Uri onRestoreRingtone() { - return RingtoneManager.getActualDefaultRingtoneUri(getContext(), getRingtoneType()); + if (getRingtoneType() == RingtoneManager.TYPE_RINGTONE) { + return RingtoneManager.getActualRingtoneUriBySubId(getContext(), getSubId()); + } else { + return RingtoneManager.getActualDefaultRingtoneUri(getContext(), getRingtoneType()); + } } - + } |