From d2110dbce071a236b6176de344ca797b737542eb Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 19 May 2009 13:41:21 -0700 Subject: Hook up the backup data writer, and add a utility to read the backup data files. --- core/java/android/backup/FileBackupHelper.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/java/android/backup/FileBackupHelper.java') 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); } -- cgit v1.1