summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2013-12-06 07:58:38 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-12-06 07:58:38 +0000
commitb3d5a3db00fc7485ca64855ac0c0129636c3ed90 (patch)
treea52c88dd338de30a04fa7d47ec08e9a7c2aca9c9
parent0630e2c1ff8d2840967e477066051c8f43caa4a5 (diff)
parent1f5a48f05d5f60bfbbc0fd3bf1e2fff2fa97b4ad (diff)
downloadandroid_packages_apps_Gallery2-b3d5a3db00fc7485ca64855ac0c0129636c3ed90.tar.gz
android_packages_apps_Gallery2-b3d5a3db00fc7485ca64855ac0c0129636c3ed90.tar.bz2
android_packages_apps_Gallery2-b3d5a3db00fc7485ca64855ac0c0129636c3ed90.zip
Merge "Gallery : Check if image has orientation" into cm-10.2
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropLoader.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropLoader.java b/src/com/android/gallery3d/filtershow/crop/CropLoader.java
index fc461f5d0..ef190fdff 100644
--- a/src/com/android/gallery3d/filtershow/crop/CropLoader.java
+++ b/src/com/android/gallery3d/filtershow/crop/CropLoader.java
@@ -86,7 +86,7 @@ public abstract class CropLoader {
cursor = context.getContentResolver().query(uri,
new String[] { MediaStore.Images.ImageColumns.ORIENTATION },
null, null, null);
- if (cursor.moveToNext()) {
+ if (cursor.moveToNext() && !cursor.isNull(0)) {
int ori = cursor.getInt(0);
return (ori < 0) ? 0 : ori;
}