summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/Gallery.java
diff options
context:
space:
mode:
authorPin Ting <pinting@google.com>2012-01-18 17:19:42 +0800
committerPin Ting <pinting@google.com>2012-02-02 12:46:59 +0800
commit22c0aec58109136fe8916bb3570857306eeb3c88 (patch)
treea3b5978fb8b17b17a8debb8028dbe9dad9050b74 /src/com/android/gallery3d/app/Gallery.java
parentc9bb527e3a3a22b294e11cb0352ab7dd4e4376fb (diff)
downloadandroid_packages_apps_Snap-22c0aec58109136fe8916bb3570857306eeb3c88.tar.gz
android_packages_apps_Snap-22c0aec58109136fe8916bb3570857306eeb3c88.tar.bz2
android_packages_apps_Snap-22c0aec58109136fe8916bb3570857306eeb3c88.zip
Shows image filename passed from other apps.
bug:5796182 This change will be followed up by a change to the class android.content.Intent. Change-Id: I3c607c535a4e90d867a98528118d1b6f10fa45cf
Diffstat (limited to 'src/com/android/gallery3d/app/Gallery.java')
-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);
}
}