summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/android/camera/CameraActivity.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 69d16ca98..a8ffe43ef 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -177,9 +177,9 @@
<activity android:name="com.android.camera.CameraActivity"
android:icon="@mipmap/ic_launcher_camera"
android:label="@string/camera_label"
+ android:taskAffinity="com.android.camera.CameraActivity"
android:theme="@style/android:Theme.NoDisplay" />
<activity-alias android:name="com.android.camera.CameraLauncher"
- android:excludeFromRecents="true"
android:label="@string/camera_label"
android:targetActivity="com.android.camera.CameraActivity">
<intent-filter>
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();
}