Joe Onorato
dc355a90a3
Add a test for SharedPreferencesBackupHelper
...
(which nobody had ever tested. I like it when stuff
just works the first time).
2009-06-26 14:45:25 -04:00
Joe Onorato
aae628b445
Test that we correctly back up an empty file.
...
(It turns out that we do. It didn't used to work, I'm not
sure what changed)
2009-06-26 12:57:45 -04:00
Joe Onorato
4a64bded06
Add some helpful tests scripts for backup and make bmgr restore wait until the backup is done.
2009-06-25 23:53:29 -04:00
Joe Onorato
4ababd922e
Make the BackupHelperDispatcher properly handle multiple helpers.
2009-06-25 20:36:09 -04:00
Christopher Tate
5cbbf5652a
Pass the originating app's versionCode along with a restore set
...
This change amends the doRestore() / onRestore() interface to backup agents to
provide the integer android:versionCode of the app that stored the backup set.
This should help agents figure out how to handle whatever historical data set
they're handed at restore time.
2009-06-22 16:44:51 -07:00
Joe Onorato
06290a4bb9
Helper API cleanup. Allows multiple helpers to function,
...
because they'll always go in the same order, and this lets
us not have to write headers to keep them paired.
2009-06-22 13:02:24 -07:00
Joe Onorato
d2d9ceb730
Make RestoreHelper and friends also write out the snapshot state.
2009-06-18 18:41:11 -07:00
Joe Onorato
83248c432f
backup fixes:
...
- BackupTestAgent calls the DispatchHelper
- Make BackupAgent.onRestore take a BackupDataInput, not just a
generic ParcelFileDescriptor.
2009-06-17 17:57:30 -07:00
Joe Onorato
efd0fab04b
FileRestoreHelper and RestoreHelperDispatcher work.
2009-06-17 16:20:55 -07:00
Joe Onorato
1cf587496f
Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput.
2009-06-12 16:21:24 -07:00
Joe Onorato
ce88cb15b5
Make the file backup helper not crash if a file you requested
...
can't be stated. This means you don't need to know if the files
you are backing up exist or not -- we'll figure it out for you.
2009-06-11 14:51:45 -07:00
Joe Onorato
23ecae3bbb
Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
...
This took quite a bit of refactoring.
2009-06-11 11:29:57 -07:00
Mathias Agopian
8ae2335a3c
rename a few files to camel-case, add copyright notices
2009-06-04 13:53:57 -07:00
Christopher Tate
181fafaf48
Retool the backup process to use a new 'BackupAgent' class
...
Backups will be handled by launching the application in a special
mode under which no activities or services will be started, only
the BackupAgent subclass named in the app's android:backupAgent
manifest property. This takes the place of the BackupService class
used earlier during development.
In the cases of *full* backup or restore, an application that does
not supply its own BackupAgent will be launched in a restricted
manner; in particular, it will be using the default Application
class rather than any manifest-declared one. This ensures that the
app is not running any code that may try to manipulate its data
while the backup system reads/writes its data set.
2009-05-31 13:10:03 -07:00
Joe Onorato
d2110dbce0
Hook up the backup data writer, and add a utility to read the backup data files.
2009-05-20 11:24:20 -07:00
Joe Onorato
2e1da32203
Add the backup data file writer C++ class.
2009-05-15 18:20:19 -04:00
Joe Onorato
4535e40544
Implement the C++ class to write the backed up file data.
2009-05-15 10:37:10 -04:00
Joe Onorato
290bb011c5
Get the backup calling through to the file backup helper.
...
This includes some cleanup to make the parameters match
between BackupService.onBackup and FileBackupHelper.performBackup.
2009-05-14 09:39:32 -04:00
Joe Onorato
8ad028117d
With this, the BackupService onBackup method is called.
...
It took a bunch of refactoring inside BackupManagerService,
which is unfortunately all temporary anyway, but it unblocks
a bunch of stuff.
2009-05-13 01:41:44 -04:00
Joe Onorato
c825d3ebd6
fix the sim build. disables the tests for now.
2009-05-08 09:33:19 -07:00
Joe Onorato
b1a7ffef3a
More backup tests
2009-05-07 15:32:48 -07:00
Joe Onorato
f9225f89aa
Add a test app for the backup
2009-05-05 18:34:31 -07:00
Joe Onorato
3ad977b41c
Add some C++ code to do raw files for backup
2009-05-05 13:45:25 -07:00