Enhanced import/export support.

1) Allow imports from the stock SMS database at any time.

2) Provide plaintext export support, in a format compatible with
   the "SMS Backup And Restore" app.

3) Fix the DB weirdness on encrypted restore that previously
   required killing the app.
This commit is contained in:
Moxie Marlinspike
2013-06-24 21:02:30 -07:00
parent 903ab92f5f
commit aa25f94291
37 changed files with 1343 additions and 199 deletions

View File

@@ -102,6 +102,11 @@ public class EncryptingSmsDatabase extends SmsDatabase {
Types.ENCRYPTION_SYMMETRIC_BIT);
}
public Reader getMessages(MasterSecret masterSecret, int skip, int limit) {
Cursor cursor = super.getMessages(skip, limit);
return new DecryptingReader(masterSecret, cursor);
}
public Reader getOutgoingMessages(MasterSecret masterSecret) {
Cursor cursor = super.getOutgoingMessages();
return new DecryptingReader(masterSecret, cursor);