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

Commit c8ae9d5a 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

Change-Id: Ia99142562cd97ad5aeec2dfa40a63d80657a2c0d
parents 45ba2ef2 d44afb99
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -943,7 +943,8 @@ public class RingtoneManager {

        // Sanity-check: are we actually being asked to install an audio file?
        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/*\"."
                    + " Given file has MIME type \"" + mimeType + "\"");
        }