summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/ContextWrapper.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2014-07-11 17:25:57 -0700
committerChristopher Tate <ctate@android.com>2014-07-14 22:56:04 +0000
commita7835b6b6b00923b608a6bc3194e7840f67de7a8 (patch)
tree17f914d3a2e608714d3833c90d6c0cf2db6ffc7b /core/java/android/content/ContextWrapper.java
parent4ad58a4738048ade35f4bee91554dd84aeab3f88 (diff)
downloadframeworks_base-a7835b6b6b00923b608a6bc3194e7840f67de7a8.zip
frameworks_base-a7835b6b6b00923b608a6bc3194e7840f67de7a8.tar.gz
frameworks_base-a7835b6b6b00923b608a6bc3194e7840f67de7a8.tar.bz2
Add Context.getNoBackupFilesDir()
This is an app-private filesystem space exactly like the one reported by Context.getFilesDir(), with one exception: files placed here are never backed up by the full-backup infrastructure. If an app attempts to back up any of its contents via the normal API it's immediately ignored with a logged warning. The restriction is also enforced on the restore side, because apps using support libraries might wind up creating full backup archives containing no_backup subdirs on pre-L devices (via adb backup, Helium, &c.). We check for this before passing the restore data to the app, and drop it if we detect the situation so that the app never sees the bits. Bug 16240573 Change-Id: I11216a391f1d32117ec7ce15aafc9cd93d0337de
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
-rw-r--r--core/java/android/content/ContextWrapper.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index dbf9122..13eed07 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -200,7 +200,12 @@ public class ContextWrapper extends Context {
public File getFilesDir() {
return mBase.getFilesDir();
}
-
+
+ @Override
+ public File getNoBackupFilesDir() {
+ return mBase.getNoBackupFilesDir();
+ }
+
@Override
public File getExternalFilesDir(String type) {
return mBase.getExternalFilesDir(type);