summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPin Ting <pinting@google.com>2012-02-01 22:58:57 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-01 22:58:57 -0800
commitb333d7a407d108d3c6de4bf016d0d6f7854ef903 (patch)
tree43bfaa1c2e8592628598f4ed4decfd3403067067
parentbea9889873cc08775aa85dd169d9247a9eab42b3 (diff)
parent186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f (diff)
downloadandroid_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.java8
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);
}
}