diff options
| author | Doris Liu <tianliu@google.com> | 2012-09-10 10:24:45 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-10 10:24:45 -0700 |
| commit | 3e654aabf9af7a5396faa7fbea11bc7076db1c3e (patch) | |
| tree | d7f02818bae941a63813c44df542bd01e048cd73 | |
| parent | 8c7f513066e2b927384f4333b6bcc0b63133f738 (diff) | |
| parent | aeb4cccdc14c2b3199658a1d109a1fd89a53a288 (diff) | |
| download | android_packages_apps_Gallery2-3e654aabf9af7a5396faa7fbea11bc7076db1c3e.tar.gz android_packages_apps_Gallery2-3e654aabf9af7a5396faa7fbea11bc7076db1c3e.tar.bz2 android_packages_apps_Gallery2-3e654aabf9af7a5396faa7fbea11bc7076db1c3e.zip | |
Merge "Back button should progress through the app" into gb-ub-photos-arches
| -rw-r--r-- | src/com/android/gallery3d/app/Gallery.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/Gallery.java b/src/com/android/gallery3d/app/Gallery.java index ae104eb53..b35c11496 100644 --- a/src/com/android/gallery3d/app/Gallery.java +++ b/src/com/android/gallery3d/app/Gallery.java @@ -202,6 +202,11 @@ public final class Gallery extends AbstractGalleryActivity implements OnCancelLi data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, itemPath.toString()); if (intent.getBooleanExtra(PhotoPage.KEY_TREAT_BACK_AS_UP, false)) { data.putBoolean(PhotoPage.KEY_TREAT_BACK_AS_UP, true); + } else if ((intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) { + // when FLAG_ACTIVITY_NEW_TASK is set, (e.g. when intent is fired + // from notification), back button should behave the same as up button + // rather than taking users back to the home screen + data.putBoolean(PhotoPage.KEY_TREAT_BACK_AS_UP, true); } // Displays the filename as title, reading the filename from the interface: |
