mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-25 02:02:16 -05:00
always use exif helper
This commit is contained in:
parent
27f42dfb63
commit
49920649db
@ -164,22 +164,6 @@ public class FileBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getRotation(Uri image) {
|
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 {
|
try {
|
||||||
InputStream is = mXmppConnectionService.getContentResolver()
|
InputStream is = mXmppConnectionService.getContentResolver()
|
||||||
.openInputStream(image);
|
.openInputStream(image);
|
||||||
@ -188,7 +172,6 @@ public class FileBackend {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public Bitmap getImageFromMessage(Message message) {
|
public Bitmap getImageFromMessage(Message message) {
|
||||||
return BitmapFactory.decodeFile(getFile(message).getAbsolutePath());
|
return BitmapFactory.decodeFile(getFile(message).getAbsolutePath());
|
||||||
|
Loading…
Reference in New Issue
Block a user