Don't remove task from recents if closed by caption button.

When the user clicks X in non client decor of a freeform task, we
don't want it to be removed from recents. The task gets finished,
but it will remain in recents.

Bug: 24718309

Change-Id: I8f47e310903ee7f839ec92f5c8ff3a9f1e09118c
This commit is contained in:
Filip Gruszczynski
2015-10-08 11:08:44 -07:00
parent 38f4313707
commit c29ecc86c2
2 changed files with 36 additions and 16 deletions

View File

@@ -687,9 +687,15 @@ public class Activity extends ContextThemeWrapper
/** @hide Task isn't finished when activity is finished */
public static final int DONT_FINISH_TASK_WITH_ACTIVITY = 0;
/** @hide Task is finished if the finishing activity is the root of the task */
/**
* @hide Task is finished if the finishing activity is the root of the task. To preserve the
* past behavior the task is also removed from recents.
*/
public static final int FINISH_TASK_WITH_ROOT_ACTIVITY = 1;
/** @hide Task is finished along with the finishing activity*/
/**
* @hide Task is finished along with the finishing activity, but it is not removed from
* recents.
*/
public static final int FINISH_TASK_WITH_ACTIVITY = 2;
static final String FRAGMENTS_TAG = "android:fragments";