aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/FileBackend.java29
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 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;
}
}