Merge "Grant Permanent Write Uri Permission" into main
diff --git a/src/com/android/contacts/vcard/ExportProcessor.java b/src/com/android/contacts/vcard/ExportProcessor.java
index 0b96ea1..fd5134c 100755
--- a/src/com/android/contacts/vcard/ExportProcessor.java
+++ b/src/com/android/contacts/vcard/ExportProcessor.java
@@ -81,6 +81,12 @@
         mExportRequest = exportRequest;
         mJobId = jobId;
         mCallingActivity = callingActivity;
+        try {
+            mResolver.takePersistableUriPermission(exportRequest.destUri,
+                    Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
+        } catch (SecurityException e) {
+            Log.w(LOG_TAG, "SecurityException error", e);
+        }
     }
 
     @Override