Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c702990 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Fix logic in fallback ringtone handling" into klp-dev

parents 9f54a583 19a4671b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;