Check the voicemail IDs as opposed to the whole URI.
When determining whether to notify for a particular voicemail, check the
voicemail IDs instead of the whole URI since sometimes the URI will
include query parameters and sometimes not so we don't want to do a
direct string comparison. Doing a direct comparison was causing a bug
where the sound and vibration of the new notification would be suppressed.
Bug: 19716109
Change-Id: I7a33b4d3bcd9ca707db9462fcebfec27fd5f8a74
diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
index 970cad6..61f8635 100644
--- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
+++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
@@ -143,7 +143,8 @@
}
}
// Check if this is the new call we need to notify about.
- if (newCallUri != null && newCallUri.equals(newCall.voicemailUri)) {
+ if (newCallUri != null &&
+ ContentUris.parseId(newCallUri) == ContentUris.parseId(newCall.voicemailUri)) {
callToNotify = newCall;
}
}