Skip to content

Commit

Permalink
Handle StackOverflowErrors associated with ExifInterface
Browse files Browse the repository at this point in the history
android.support.media.ExifInterface.readImageFileDirectory (ExifInterface.java:2618)
android.support.media.ExifInterface.readImageFileDirectory (ExifInterface.java:2795)
android.support.media.ExifInterface.readImageFileDirectory (ExifInterface.java:2795)
android.support.media.ExifInterface.readImageFileDirectory (ExifInterface.java:2795)
  • Loading branch information
ianhanniballake committed Jan 28, 2017
1 parent 2b9d4c1 commit 965814c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -71,7 +71,7 @@ protected BitmapRegionLoader openDownloadedCurrentArtwork(boolean forceReload) {
case ExifInterface.ORIENTATION_ROTATE_180: rotation = 180; break;
case ExifInterface.ORIENTATION_ROTATE_270: rotation = 270; break;
}
} catch (IOException e) {
} catch (IOException|StackOverflowError e) {
Log.w(TAG, "Couldn't open EXIF interface on artwork", e);
}
return BitmapRegionLoader.newInstance(
Expand Down
Expand Up @@ -117,7 +117,7 @@ private static int getRotation(Context context) {
case ExifInterface.ORIENTATION_ROTATE_180: rotation = 180; break;
case ExifInterface.ORIENTATION_ROTATE_270: rotation = 270; break;
}
} catch (IOException ignored) {
} catch (IOException|StackOverflowError ignored) {
}
return rotation;
}
Expand Down
Expand Up @@ -439,7 +439,7 @@ private void ensureMetadataExists(@NonNull Uri imageUri) {
}

getContentResolver().insert(GalleryContract.MetadataCache.CONTENT_URI, values);
} catch (ParseException|IOException e) {
} catch (ParseException|IOException|StackOverflowError e) {
Log.w(TAG, "Couldn't read image metadata.", e);
}
}
Expand Down

0 comments on commit 965814c

Please sign in to comment.