Recents backup helper
Handles backup/restore of recent tasks for the system. Currently the
thumbnails are not saved.
At restore time the historical task records are placed in a designated
separate location rather than directly in the live bookkeeping; this
avoids ID duplication issues and makes it easier to deal with lazy
adoption of the historical task state as apps are installed on the
device post-restore.
Bug 17303286
Bug 15986349
Change-Id: Ie156c1e2ab9c9a7e7ac0447b27016fdcef55dded
diff --git a/services/core/java/com/android/server/am/TaskPersister.java b/services/core/java/com/android/server/am/TaskPersister.java
index b331c84..9311f25 100644
--- a/services/core/java/com/android/server/am/TaskPersister.java
+++ b/services/core/java/com/android/server/am/TaskPersister.java
@@ -63,6 +63,12 @@
private static final String IMAGES_DIRNAME = "recent_images";
static final String IMAGE_EXTENSION = ".png";
+ // Directory where restored historical task XML/PNG files are placed. This directory
+ // contains subdirs named after TASKS_DIRNAME and IMAGES_DIRNAME mirroring the
+ // ancestral device's dataset. This needs to match the RECENTS_TASK_RESTORE_DIR
+ // value in RecentsBackupHelper.
+ private static final String RESTORED_TASKS = "restored_" + TASKS_DIRNAME;
+
private static final String TAG_TASK = "task";
static File sImagesDir;