Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Dominik Schürmann
2014-08-05 00:23:15 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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);