summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/java/android/media/Ringtone.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/java/android/media/Ringtone.java b/media/java/android/media/Ringtone.java
index c335e55..1283e9b 100644
--- a/media/java/android/media/Ringtone.java
+++ b/media/java/android/media/Ringtone.java
@@ -280,7 +280,7 @@ public class Ringtone {
private boolean playFallbackRingtone() {
if (mAudioManager.getStreamVolume(mStreamType) != 0) {
int ringtoneType = RingtoneManager.getDefaultType(mUri);
- if (ringtoneType != -1 &&
+ if (ringtoneType == -1 ||
RingtoneManager.getActualDefaultRingtoneUri(mContext, ringtoneType) != null) {
// Default ringtone, try fallback ringtone.
try {
@@ -309,6 +309,8 @@ public class Ringtone {
} catch (NotFoundException nfe) {
Log.e(TAG, "Fallback ringtone does not exist");
}
+ } else {
+ Log.w(TAG, "not playing fallback for " + mUri);
}
}
return false;