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

Commit c5eb0d22 authored by Christine Franks's avatar Christine Franks Committed by android-build-merger
Browse files

Merge "Allow ogg files to be selected as ringtones" into oc-dev am: d44afb99

am: c8ae9d5a

Change-Id: I878d4dce0113535d43b9cdc9fb7d230bb38082b7
parents 22dac27c c8ae9d5a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -943,7 +943,8 @@ public class RingtoneManager {


        // Sanity-check: are we actually being asked to install an audio file?
        // Sanity-check: are we actually being asked to install an audio file?
        final String mimeType = mContext.getContentResolver().getType(fileUri);
        final String mimeType = mContext.getContentResolver().getType(fileUri);
        if(mimeType == null || !mimeType.startsWith("audio/")) {
        if(mimeType == null ||
                !(mimeType.startsWith("audio/") || mimeType.equals("application/ogg"))) {
            throw new IllegalArgumentException("Ringtone file must have MIME type \"audio/*\"."
            throw new IllegalArgumentException("Ringtone file must have MIME type \"audio/*\"."
                    + " Given file has MIME type \"" + mimeType + "\"");
                    + " Given file has MIME type \"" + mimeType + "\"");
        }
        }