OSDN Git Service

Start new task for Gallery trampolines
authorAlan Newberger <alann@google.com>
Sat, 9 Aug 2014 02:03:55 +0000 (19:03 -0700)
committerAlan Newberger <alann@google.com>
Sat, 9 Aug 2014 02:07:39 +0000 (19:07 -0700)
commit163a97c3d3e9e1a029e04a8e629eabd8de8f3d9f
tree1a85c56fe5f4ec955bf1353ac9776b39396a627c
parent745eb589234bac233ce62a612771b77eddbb3b89
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
src/com/android/camera/CameraActivity.java
src/com/android/gallery3d/app/Gallery.java