diff options
| author | Andrew Sapperstein <asapperstein@google.com> | 2014-09-10 14:39:29 -0700 |
|---|---|---|
| committer | Andrew Sapperstein <asapperstein@google.com> | 2014-09-10 14:39:29 -0700 |
| commit | 4a6abe405e4de31a14e2c5489c413c806f2f11f2 (patch) | |
| tree | 0e9122f11799b3af43f0bc250122755fcd4215b8 | |
| parent | 4af041a3b95022c10e06b6f60f934d477747cd8f (diff) | |
| download | android_frameworks_opt_photoviewer-4a6abe405e4de31a14e2c5489c413c806f2f11f2.tar.gz android_frameworks_opt_photoviewer-4a6abe405e4de31a14e2c5489c413c806f2f11f2.tar.bz2 android_frameworks_opt_photoviewer-4a6abe405e4de31a14e2c5489c413c806f2f11f2.zip | |
Call setData in launch intent. b/17391328.
Should give each photoviewer call separate recents
entries.
Change-Id: I34968e348b6b28cd4022df74532bf9d3802cc70f
| -rw-r--r-- | src/com/android/ex/photo/Intents.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/ex/photo/Intents.java b/src/com/android/ex/photo/Intents.java index 0a8fce3..99c3059 100644 --- a/src/com/android/ex/photo/Intents.java +++ b/src/com/android/ex/photo/Intents.java @@ -21,6 +21,7 @@ import android.app.Activity; import android.content.ContentProvider; import android.content.Context; import android.content.Intent; +import android.net.Uri; import com.android.ex.photo.fragments.PhotoViewFragment; @@ -260,7 +261,7 @@ public class Intents { public Intent build() { mIntent.setAction(Intent.ACTION_VIEW); - mIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); + mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); if (mPhotoIndex != null) { mIntent.putExtra(EXTRA_PHOTO_INDEX, (int) mPhotoIndex); @@ -277,6 +278,7 @@ public class Intents { if (mPhotosUri != null) { mIntent.putExtra(EXTRA_PHOTOS_URI, mPhotosUri); + mIntent.setData(Uri.parse(mPhotosUri)); } if (mResolvedPhotoUri != null) { @@ -295,9 +297,7 @@ public class Intents { mIntent.putExtra(EXTRA_MAX_INITIAL_SCALE, mMaxInitialScale); } - if (mWatchNetwork == true) { - mIntent.putExtra(EXTRA_WATCH_NETWORK, true); - } + mIntent.putExtra(EXTRA_WATCH_NETWORK, mWatchNetwork); mIntent.putExtra(EXTRA_SCALE_UP_ANIMATION, mScaleAnimation); if (mScaleAnimation) { |
