diff options
Diffstat (limited to 'photoviewer/src/com/android')
3 files changed, 3 insertions, 6 deletions
diff --git a/photoviewer/src/com/android/ex/photo/Intents.java b/photoviewer/src/com/android/ex/photo/Intents.java index 7e31169..be90b69 100644 --- a/photoviewer/src/com/android/ex/photo/Intents.java +++ b/photoviewer/src/com/android/ex/photo/Intents.java @@ -128,11 +128,6 @@ public class Intents { /** Build the intent */ public Intent build() { - if (TextUtils.isEmpty(mPhotosUri) && TextUtils.isEmpty(mResolvedPhotoUri)) { - throw new IllegalArgumentException( - "Either PhotosUri or ResolvedPhotoUri must be set."); - } - mIntent.setAction(Intent.ACTION_VIEW); mIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); diff --git a/photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java b/photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java index 0c7ba63..28756c1 100644 --- a/photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java +++ b/photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java @@ -48,7 +48,7 @@ public class PhotoPagerAdapter extends BaseCursorPagerAdapter { // create new PhotoViewFragment final PhotoViewIntentBuilder builder = Intents.newPhotoViewFragmentIntentBuilder(mContext); - builder + builder .setPhotoName(photoName) .setResolvedPhotoUri(photoUri) .setThumbnailUri(thumbnailUri); diff --git a/photoviewer/src/com/android/ex/photo/util/ImageUtils.java b/photoviewer/src/com/android/ex/photo/util/ImageUtils.java index 7519d6f..8564457 100644 --- a/photoviewer/src/com/android/ex/photo/util/ImageUtils.java +++ b/photoviewer/src/com/android/ex/photo/util/ImageUtils.java @@ -105,6 +105,8 @@ public class ImageUtils { // Do nothing - the photo will appear to be missing
} catch (IOException exception) {
// Do nothing - the photo will appear to be missing
+ } catch (IllegalArgumentException exception) { + // Do nothing - the photo will appear to be missing } finally {
try {
if (inputStream != null) {
|