diff options
author | Joe Onorato <joeo@android.com> | 2009-05-19 13:41:21 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-05-20 11:24:20 -0700 |
commit | d2110dbce071a236b6176de344ca797b737542eb (patch) | |
tree | 996e044c8c7bf49463394bc911f0277d969bde5d /core/java/android/backup/FileBackupHelper.java | |
parent | 40f5a4ea3bc90e43a442ab336f2342020bba86b3 (diff) | |
download | frameworks_base-d2110dbce071a236b6176de344ca797b737542eb.zip frameworks_base-d2110dbce071a236b6176de344ca797b737542eb.tar.gz frameworks_base-d2110dbce071a236b6176de344ca797b737542eb.tar.bz2 |
Hook up the backup data writer, and add a utility to read the backup data files.
Diffstat (limited to 'core/java/android/backup/FileBackupHelper.java')
-rw-r--r-- | core/java/android/backup/FileBackupHelper.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/java/android/backup/FileBackupHelper.java b/core/java/android/backup/FileBackupHelper.java index 05159dc..ec16eb1 100644 --- a/core/java/android/backup/FileBackupHelper.java +++ b/core/java/android/backup/FileBackupHelper.java @@ -53,15 +53,12 @@ public class FileBackupHelper { } // oldStateFd can be null FileDescriptor oldStateFd = oldState != null ? oldState.getFileDescriptor() : null; - if (data.fd == null) { - throw new NullPointerException(); - } FileDescriptor newStateFd = newState.getFileDescriptor(); if (newStateFd == null) { throw new NullPointerException(); } - int err = performBackup_native(basePath, oldStateFd, data.fd, newStateFd, files); + int err = performBackup_native(basePath, oldStateFd, data.mBackupWriter, newStateFd, files); if (err != 0) { throw new RuntimeException("Backup failed"); // TODO: more here @@ -69,5 +66,5 @@ public class FileBackupHelper { } native private static int performBackup_native(String basePath, FileDescriptor oldState, - FileDescriptor data, FileDescriptor newState, String[] files); + int data, FileDescriptor newState, String[] files); } |