Merge "Update DocumentsContract call to handle exception properly."
diff --git a/src/com/android/documentsui/services/CompressJob.java b/src/com/android/documentsui/services/CompressJob.java
index e42f20b..20367c3 100644
--- a/src/com/android/documentsui/services/CompressJob.java
+++ b/src/com/android/documentsui/services/CompressJob.java
@@ -101,8 +101,13 @@
displayName = service.getString(R.string.new_archive_file_name, NEW_ARCHIVE_EXTENSION);
}
- final Uri archiveUri = DocumentsContract.createDocument(
+ Uri archiveUri;
+ try {
+ archiveUri = DocumentsContract.createDocument(
resolver, mDstInfo.derivedUri, "application/zip", displayName);
+ } catch (Exception e) {
+ archiveUri = null;
+ }
try {
mDstInfo = DocumentInfo.fromUri(resolver, ArchivesProvider.buildUriForArchive(