summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2013-09-19 15:56:15 -0700
committerMangesh Ghiware <mghiware@google.com>2013-09-19 15:59:50 -0700
commit94e122bf3dbcd316922cbd145adec30b49f2f8ae (patch)
treec3b46dbe29caca3ad0460f1fd8921006a7228f24 /src
parent9029a469b47605420454e0c74d46adeccf4ef94a (diff)
downloadandroid_packages_apps_Gallery2-94e122bf3dbcd316922cbd145adec30b49f2f8ae.tar.gz
android_packages_apps_Gallery2-94e122bf3dbcd316922cbd145adec30b49f2f8ae.tar.bz2
android_packages_apps_Gallery2-94e122bf3dbcd316922cbd145adec30b49f2f8ae.zip
Use the same taskAffinity for trampoline as Camera
Bug: 10842131 Change-Id: I2bf6961d7c411dc95e9b9589d9ec71ee34b3011f
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index c8dadbd18..f2402af7d 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -27,7 +27,10 @@ public class CameraActivity extends Activity {
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Intent intent = CameraHelper.CAMERA_LAUNCHER_INTENT;
- intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
+ // Since this is being launched from a homescreen shorcut,
+ // it's already in a new task. Start Camera activity and
+ // reset the task to its initial state if needed.
+ intent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
startActivity(intent);
finish();
}