DO NOT MERGE Fix wrong voice mail ringtone for secondary SIM.
Cherry-picked from https://android-review.googlesource.com/#/c/217340/
Reproduce steps:
1. Android One with Dual SIM.
2. Set different ringtone for both voice mail.
3. SIM2 receives a voice mail but ring tone is SIM1's.
Solution:
The ring tone URI for voice mail is from default phone object,
change phone object to the right one.
Change-Id: I497b681a697456c84aea5f71b68419b3c4afac2d
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 0a583a0..8f1b1f1 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -302,12 +302,12 @@
Uri ringtoneUri = null;
if (enableNotificationSound) {
- ringtoneUri = VoicemailNotificationSettingsUtil.getRingtoneUri(mPhone);
+ ringtoneUri = VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
}
Resources res = mContext.getResources();
PersistableBundle carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
- mPhone.getSubId());
+ subId);
Notification.Builder builder = new Notification.Builder(mContext);
builder.setSmallIcon(resId)
.setWhen(System.currentTimeMillis())