summaryrefslogtreecommitdiffstats
path: root/packages/SharedStorageBackup
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2015-04-17 18:22:51 -0700
committerMatthew Williams <mjwilliams@google.com>2015-05-03 16:19:27 -0700
commit303650c9cdb7cec88e7ec20747b161d9fff10719 (patch)
tree310f95b0e6ff91830cebfdc015ee158015fc5d27 /packages/SharedStorageBackup
parentca030f8ed5fd52f2821d159b9c16d0c514dc0688 (diff)
downloadframeworks_base-303650c9cdb7cec88e7ec20747b161d9fff10719.zip
frameworks_base-303650c9cdb7cec88e7ec20747b161d9fff10719.tar.gz
frameworks_base-303650c9cdb7cec88e7ec20747b161d9fff10719.tar.bz2
Add full backup criteria to android manifest
BUG: 20010079 Api change: ApplicationInfo now has a fullBackupContent int where -1 is (off) 0 is (on) and >0 indicates an xml resource that should be parsed in order for a developer to indicate exactly which files they want to include/exclude from the backup set. dd: https://docs.google.com/document/d/1dnNctwhWOI-_qtZ7I3iNRtrbShmERj2GFTzwV4xXtOk/edit#heading=h.wcfw1q2pbmae Change-Id: I90273dc0aef5e9a3230c6b074a45e8f5409ed5ce
Diffstat (limited to 'packages/SharedStorageBackup')
-rw-r--r--packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
index 89f84fc..e453cf5 100644
--- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
+++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
@@ -8,11 +8,11 @@ import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
+import android.util.ArraySet;
import android.util.Slog;
import java.io.File;
import java.io.IOException;
-import java.util.HashSet;
public class SharedStorageAgent extends FullBackupAgent {
static final String TAG = "SharedStorageAgent";
@@ -42,7 +42,7 @@ public class SharedStorageAgent extends FullBackupAgent {
if (DEBUG) Slog.i(TAG, "Backing up " + mVolumes.length + " shared volumes");
// Ignore all apps' getExternalFilesDir() content; it is backed up as part of
// each app-specific payload.
- HashSet<String> externalFilesDirFilter = new HashSet<String>();
+ ArraySet<String> externalFilesDirFilter = new ArraySet();
final File externalAndroidRoot = new File(Environment.getExternalStorageDirectory(),
Environment.DIRECTORY_ANDROID);
externalFilesDirFilter.add(externalAndroidRoot.getCanonicalPath());
@@ -53,7 +53,9 @@ public class SharedStorageAgent extends FullBackupAgent {
// shared/N/path/to/file
// The restore will then extract to the given volume
String domain = FullBackup.SHARED_PREFIX + i;
- fullBackupFileTree(null, domain, v.getPath(), externalFilesDirFilter, output);
+ fullBackupFileTree(null, domain, v.getPath(),
+ null /* manifestExcludes */,
+ externalFilesDirFilter /* systemExcludes */, output);
}
}
}