From 49920649db192507e7088cbaec3267acf1230619 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 3 Nov 2014 11:20:32 +0100 Subject: always use exif helper --- .../conversations/persistance/FileBackend.java | 29 +++++----------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index 13daa27b..0241b77e 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; } } -- cgit v1.2.3