diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-11-03 11:20:32 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-11-03 11:20:32 +0100 |
commit | 49920649db192507e7088cbaec3267acf1230619 (patch) | |
tree | 6373defe37bbc7a1c32d3ee68dff70be3b829fcf /src | |
parent | 27f42dfb6358345e3c4bbe7341235512094350ae (diff) |
always use exif helper
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index 13daa27b1..0241b77e8 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -164,29 +164,12 @@ public class FileBackend { } private int getRotation(Uri image) { - if ("content".equals(image.getScheme())) { - try { - Cursor cursor = mXmppConnectionService - .getContentResolver() - .query(image, - new String[] { MediaStore.Images.ImageColumns.ORIENTATION }, - null, null, null); - if (cursor.getCount() != 1) { - return -1; - } - cursor.moveToFirst(); - return cursor.getInt(0); - } catch (IllegalArgumentException e) { - return -1; - } - } else { - try { - InputStream is = mXmppConnectionService.getContentResolver() - .openInputStream(image); - return ExifHelper.getOrientation(is); - } catch (FileNotFoundException e) { - return 0; - } + try { + InputStream is = mXmppConnectionService.getContentResolver() + .openInputStream(image); + return ExifHelper.getOrientation(is); + } catch (FileNotFoundException e) { + return 0; } } |