summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorAlan Newberger <alann@google.com>2014-08-08 19:03:55 -0700
committerAlan Newberger <alann@google.com>2014-08-08 19:07:39 -0700
commit163a97c3d3e9e1a029e04a8e629eabd8de8f3d9f (patch)
tree1a85c56fe5f4ec955bf1353ac9776b39396a627c /src/com/android/camera
parent745eb589234bac233ce62a612771b77eddbb3b89 (diff)
downloadandroid_packages_apps_Gallery2-163a97c3d3e9e1a029e04a8e629eabd8de8f3d9f.tar.gz
android_packages_apps_Gallery2-163a97c3d3e9e1a029e04a8e629eabd8de8f3d9f.tar.bz2
android_packages_apps_Gallery2-163a97c3d3e9e1a029e04a8e629eabd8de8f3d9f.zip
Start new task for Gallery trampolines
When testing the Camera trampoline, even in the full gallery app from a JB to K upgrade, I noticed that the Camera app was starting in the Gallery trampoline's task -- two recents even with excludeFromRecents true. Was still the case in the new trampoline. Adding FLAG_ACTIVITY_NEW_TASK addressed this, also with some manifest changes in the trampoline in another CL. Photos was working, I believe because photos activities explicitly set a task affinity to shield themselves from G+, thus forcing a new task. Also, this helped shield activities when both trampolines are active. That is, if Camera was started via its trampoline, then Photos, the Photos shortcut opened Camera because it already had an activity in the trampoline's task. Even if Photos works now, this does no harm and ensures we're not relying on the implementation of another APK. Bug: 16843573 Change-Id: Ifa6d65ef2b00a4ffc6df78f13dba16270113509d
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/CameraActivity.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 4ed6309d2..b74af47b3 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -31,6 +31,7 @@ public class CameraActivity extends Activity {
// 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);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}