Initial archive export stub

This commit is contained in:
tarsin committed 2022-06-14 09:48:48 +08:00
1 parent de6a664729
commit ce8da252c3
6 files changed
+68

No files matched your search

@@ -102,4 +102,18 @@ public class UriArchiveAccessor implements Closeable {
}
}
}
private static native boolean compressDirToOutStream(String dirname, int format, OutputStream os);
public static synchronized boolean exportGalleryArchive(String dirName, int format, Uri target, Context context) {
try {
OutputStream os = context.getContentResolver().openOutputStream(target);
compressDirToOutStream(dirName, format, os);
os.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
}