Use size of input uris for progress bar in encrypt/decrypt

This commit is contained in:
mar-v-in committed 2014-08-04 20:34:00 +02:00
1 parent de6950377c
commit 2712c18a7a
2 files changed
+7 -3

No files matched your search

@@ -193,7 +193,11 @@ public class FileHelper {
}
public static long getFileSize(Context context, Uri uri) {
long size = -1;
return getFileSize(context, uri, -1);
}
public static long getFileSize(Context context, Uri uri, long def) {
long size = def;
try {
Cursor cursor = context.getContentResolver().query(uri, new String[]{OpenableColumns.SIZE}, null, null, null);