diff options
author | Christopher Tate <ctate@google.com> | 2011-10-17 16:35:58 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2011-10-18 15:47:59 -0700 |
commit | fb2ea43112bdf5a7dc121b59e2ef7e8b411bd019 (patch) | |
tree | c1edb5a390815ad31cce3b42f81a2d0804e3bd73 /packages/SharedStorageBackup | |
parent | 7c3a18398f8cd8977079fad34a6bfc3fdab6378e (diff) | |
download | frameworks_base-fb2ea43112bdf5a7dc121b59e2ef7e8b411bd019.zip frameworks_base-fb2ea43112bdf5a7dc121b59e2ef7e8b411bd019.tar.gz frameworks_base-fb2ea43112bdf5a7dc121b59e2ef7e8b411bd019.tar.bz2 |
Fix full backup of shared storage
The manifest said android:allowBackup="false" for vestigal reasons;
originally, the incremental and full backup agents were separate, and
it was not possible to opt out of full backup. When that got fixed,
unfortunately this one manifest was not corrected to the new regime.
Bug 5411789
Change-Id: Iafc8f1fdefc312dff59454485604b6c5c400f469
Diffstat (limited to 'packages/SharedStorageBackup')
-rw-r--r-- | packages/SharedStorageBackup/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/packages/SharedStorageBackup/AndroidManifest.xml b/packages/SharedStorageBackup/AndroidManifest.xml index 39c36f1..fc21df3 100644 --- a/packages/SharedStorageBackup/AndroidManifest.xml +++ b/packages/SharedStorageBackup/AndroidManifest.xml @@ -23,7 +23,6 @@ <application android:allowClearUserData="false" android:permission="android.permission.CONFIRM_FULL_BACKUP" - android:backupAgent=".SharedStorageAgent" - android:allowBackup="false" > + android:backupAgent="SharedStorageAgent" > </application> </manifest> diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java index 6c677b8..a6415b2 100644 --- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java +++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java @@ -2,11 +2,8 @@ package com.android.sharedstoragebackup; import android.app.backup.FullBackupAgent; import android.app.backup.FullBackup; -import android.app.backup.BackupDataInput; -import android.app.backup.BackupDataOutput; import android.app.backup.FullBackupDataOutput; import android.content.Context; -import android.os.Environment; import android.os.ParcelFileDescriptor; import android.os.storage.StorageManager; import android.os.storage.StorageVolume; @@ -40,6 +37,7 @@ public class SharedStorageAgent extends FullBackupAgent { // hierarchy backup process on them. By convention in the Storage Manager, the // "primary" shared storage volume is first in the list. if (mVolumes != null) { + if (DEBUG) Slog.i(TAG, "Backing up " + mVolumes.length + " shared volumes"); for (int i = 0; i < mVolumes.length; i++) { StorageVolume v = mVolumes[i]; // Express the contents of volume N this way in the tar stream: @@ -58,7 +56,7 @@ public class SharedStorageAgent extends FullBackupAgent { public void onRestoreFile(ParcelFileDescriptor data, long size, int type, String domain, String relpath, long mode, long mtime) throws IOException { - Slog.d(TAG, "Shared restore: [ " + domain + " : " + relpath + "]"); + if (DEBUG) Slog.d(TAG, "Shared restore: [ " + domain + " : " + relpath + "]"); File outFile = null; |