Commit 44d4b826 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Test the new RequirePermission annotation

parent 6d192fef
......@@ -30,6 +30,7 @@ import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.provider.MediaStore;
import android.support.annotation.RequiresPermission;
import android.util.Log;
import android.widget.Toast;
......@@ -75,6 +76,7 @@ public class AudioUtil {
*/
public static String PLAYLIST_DIR = null;
@RequiresPermission(android.Manifest.permission.WRITE_SETTINGS)
public static void setRingtone(MediaWrapper song, Context context){
File newringtone = AndroidUtil.UriToFile(song.getUri());
if(newringtone == null || !newringtone.exists()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment