diff options
| author | Pin Ting <pinting@google.com> | 2012-01-18 17:19:42 +0800 |
|---|---|---|
| committer | Pin Ting <pinting@google.com> | 2012-02-02 12:46:59 +0800 |
| commit | 186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f (patch) | |
| tree | 9161126823996c7208ade6f341dde735638d1f10 | |
| parent | 6e3c9b849c483000911eaf18c5858f141f0df82c (diff) | |
| download | android_packages_apps_Gallery2-186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f.tar.gz android_packages_apps_Gallery2-186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f.tar.bz2 android_packages_apps_Gallery2-186f8b21cdbe6881a1e7fd452e3ef32e1d81d90f.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
| -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); } } |
