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

am: c8ae9d5a60

Change-Id: I878d4dce0113535d43b9cdc9fb7d230bb38082b7
This commit is contained in:
Christine Franks
2017-05-10 16:22:27 +00:00
committed by android-build-merger

View File

@@ -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 + "\"");
}