OSDN Git Service

Fix some backup reader/writer issues; make local transport do backup
authorChristopher Tate <ctate@google.com>
Fri, 12 Jun 2009 22:20:04 +0000 (15:20 -0700)
committerChristopher Tate <ctate@google.com>
Mon, 15 Jun 2009 02:39:29 +0000 (19:39 -0700)
commit2fdd428e0f18384160f7c38ce3a2cd9ba7e7b2c2
tree985ee68d951d7c141e296aa4fec60d41f667538a
parent31390c752828dce0a33d0adeacdf10a49ff847ce
Fix some backup reader/writer issues; make local transport do backup

As of this change, LocalTransport is successfully propagating data changes from
the backup data format into a repository stored in /cache/backup/[packagename].
Each backup key gets a separate file there for ease of manipulation and testing.

The general semantics of BackupDataReader have been tweaked, too; it now just
returns simple "we're done with the data" when it hits the end, even if no
footer has been found, because on the writing side the footer isn't being
written.  Also, reading an entity now merely requires a "big enough" buffer, not
an exactly-sized one.

This is all a work in progress, but this is at least working now for purposes of
this local transport.

Still to do: proper change vs deletion detection, as well as expanding the data
format itself to include necessary metadata etc.
core/java/com/android/internal/backup/LocalTransport.java
core/jni/android_backup_BackupDataInput.cpp
core/jni/android_backup_BackupDataOutput.cpp