diff options
| author | Pin Ting <pinting@google.com> | 2012-02-01 22:58:57 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-01 22:58:57 -0800 |
| commit | b333d7a407d108d3c6de4bf016d0d6f7854ef903 (patch) | |
| tree | 43bfaa1c2e8592628598f4ed4decfd3403067067 | |
| parent | bea9889873cc08775aa85dd169d9247a9eab42b3 (diff) | |
| parent | 186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f (diff) | |
| download | android_packages_apps_Gallery2-b333d7a407d108d3c6de4bf016d0d6f7854ef903.tar.gz android_packages_apps_Gallery2-b333d7a407d108d3c6de4bf016d0d6f7854ef903.tar.bz2 android_packages_apps_Gallery2-b333d7a407d108d3c6de4bf016d0d6f7854ef903.zip | |
Merge "Shows image filename passed from other apps."
| -rw-r--r-- | src/com/android/gallery3d/app/Gallery.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/Gallery.java b/src/com/android/gallery3d/app/Gallery.java index 253af2bbb..7ab762812 100644 --- a/src/com/android/gallery3d/app/Gallery.java +++ b/src/com/android/gallery3d/app/Gallery.java @@ -201,6 +201,14 @@ public final class Gallery extends AbstractGalleryActivity implements OnCancelLi albumPath.toString()); } data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, itemPath.toString()); + + // Displays the filename as title, which is passed through intent from other apps. + // If other apps don't set this value, just display empty string. + // TODO: modify the javadoc of android.content.Intent.EXTRA_TITLE to include this + // usage + final String title = intent.getStringExtra(Intent.EXTRA_TITLE); + setTitle((title != null) ? title : ""); + getStateManager().startState(PhotoPage.class, data); } } |
