summaryrefslogtreecommitdiffstats
path: root/core/java/android/backup/FileBackupHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/backup/FileBackupHelper.java')
-rw-r--r--core/java/android/backup/FileBackupHelper.java7
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);
}