summaryrefslogtreecommitdiffstats
path: root/photoviewer
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2012-07-27 11:24:04 -0700
committerAndrew Sapperstein <asapperstein@google.com>2012-07-27 11:24:55 -0700
commit8085e1fcda882074ed387d3e999c448a84d6eb3b (patch)
treef6be30f58c2f435aebdecc0d44f47f040e930fc0 /photoviewer
parent9ceb1b41122f649cd26234f34edc2c1cf75b2f95 (diff)
downloadandroid_frameworks_ex-8085e1fcda882074ed387d3e999c448a84d6eb3b.tar.gz
android_frameworks_ex-8085e1fcda882074ed387d3e999c448a84d6eb3b.tar.bz2
android_frameworks_ex-8085e1fcda882074ed387d3e999c448a84d6eb3b.zip
Partial fix of 6890014.
No longer crashing. But the attachment is now in a very weird state. Change-Id: If688d9c19a81124cbd1ecd0266821800f76f3c74
Diffstat (limited to 'photoviewer')
-rw-r--r--photoviewer/src/com/android/ex/photo/Intents.java5
-rw-r--r--photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java2
-rw-r--r--photoviewer/src/com/android/ex/photo/util/ImageUtils.java2
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) {