package de.stephanlindauer.criticalmaps.utils;

import android.content.ContentResolver;
import android.content.Intent;
import android.os.Build;

public class GpxUtils {

    public static void persistPermissionOnFile(Intent data, ContentResolver contentResolver) {
        final int permissionFlags = data.getFlags()
                & (Intent.FLAG_GRANT_READ_URI_PERMISSION
                | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && data.getData() != null) {
            contentResolver.takePersistableUriPermission(data.getData(), permissionFlags);
        }
    }
}

@@ -313,28 +313,11 @@
 gs()
-%0A               
  & 
-(
 Inte
@@ -353,66 +353,8 @@
 SION
-%0A                %7C Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
 ;%0A  

Remove persisting of unnecessary permission