From 96c2b755cf0c503fc152268e3e5761f3074ac6b1 Mon Sep 17 00:00:00 2001 From: Wenyi Wang Date: Tue, 15 Sep 2015 17:02:17 -0700 Subject: Modified getCallerInfo() to handle silent ringtone Bug: 12800232 Change-Id: I002c3df378cbaf367f212bf266d3682f6119daec Modified code here so that it is consistent with framework/base/... and this module will be used in the future. --- InCallUI/src/com/android/incallui/CallerInfo.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'InCallUI') diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java index 88d1be1ab..8979b7f4b 100644 --- a/InCallUI/src/com/android/incallui/CallerInfo.java +++ b/InCallUI/src/com/android/incallui/CallerInfo.java @@ -243,7 +243,12 @@ public class CallerInfo { // in the database. columnIndex = cursor.getColumnIndex(PhoneLookup.CUSTOM_RINGTONE); if ((columnIndex != -1) && (cursor.getString(columnIndex) != null)) { - info.contactRingtoneUri = Uri.parse(cursor.getString(columnIndex)); + if (cursor.getString(columnIndex).equals("")) { + // make it consistent with frameworks/base/.../CallerInfo.java + info.contactRingtoneUri = Uri.EMPTY; + } else { + info.contactRingtoneUri = Uri.parse(cursor.getString(columnIndex)); + } } else { info.contactRingtoneUri = null; } -- cgit v1.2.3