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

Commit 6bda33f6 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Don't try caching null ringtones." into nyc-dev

parents dbdca5b2 97f061bb
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -663,6 +663,7 @@ public class RingtoneManager {

        // Stream selected ringtone into cache so it's available for playback
        // when CE storage is still locked
        if (ringtoneUri != null) {
            final ContentResolver cr = context.getContentResolver();
            final Uri cacheUri = getCacheForType(type);
            try (InputStream in = cr.openInputStream(ringtoneUri);
@@ -672,6 +673,7 @@ public class RingtoneManager {
                Log.w(TAG, "Failed to cache ringtone: " + e);
            }
        }
    }

    private static String getSettingForType(int type) {
        if ((type & TYPE_RINGTONE) != 0) {