summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2012-09-07 14:33:52 -0700
committerDoris Liu <tianliu@google.com>2012-09-07 14:33:52 -0700
commit0f229418c48d0d54004702b175564c4e638f15bd (patch)
treed5eb6970aa7f4cc529238e5338ea72ff0b5abb19 /src
parent0bfb719a5a7996539d7aaaa4a920c49b14c7faf7 (diff)
downloadandroid_packages_apps_Snap-0f229418c48d0d54004702b175564c4e638f15bd.tar.gz
android_packages_apps_Snap-0f229418c48d0d54004702b175564c4e638f15bd.tar.bz2
android_packages_apps_Snap-0f229418c48d0d54004702b175564c4e638f15bd.zip
Back button should progress through the app
When Gallery is launched via notification, back button should progress through the app before return to Home Bug: 6925612 Change-Id: I9da2120c6f607f8b6d3fa57d8a70225bc66fb8ef
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/Gallery.java5
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: