From 839fed6953f0fac28fdee670c206c4217d3e8b69 Mon Sep 17 00:00:00 2001 From: rmceoin Date: Thu, 5 Mar 2009 13:56:00 +0000 Subject: [PATCH] OI Safe: moved almost all access of the database to a new class Passwords. This new class in turn interacts with DBHelper. It retains all PassEntry and CategoryEntry data in memory. Encrypted data is only decrypted as needed. Decrypted data is kept in memory. This serves as a cache and results in a dramatic increase in speed on the CategoryList and PassList activities upon repeat use. All references to DBHelper for passwords or categories have been removed from all activities and centralized inside of Passwords. The only remaining DBHelper calls are for the Salt and MasterPassword. With this new class we should be able to more easily implement a search activity. Fixed an assortment of minor flaws surround orientation changes. Possibly fixed I210. Fixed I206 and I209. This is a major overhaul. Please help test for new bugs. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1967 72b678ce-9140-0410-bee8-679b907dd61a --- AndroidManifest.xml | 5 +- res/values/strings.xml | 1 + src/org/openintents/safe/AskPassword.java | 8 +- src/org/openintents/safe/Backup.java | 29 +- src/org/openintents/safe/CategoryEdit.java | 50 +- src/org/openintents/safe/CategoryEntry.java | 4 +- src/org/openintents/safe/CategoryList.java | 240 ++------- src/org/openintents/safe/CryptoHelper.java | 5 +- src/org/openintents/safe/DBHelper.java | 4 +- src/org/openintents/safe/IntentHandler.java | 78 ++- .../openintents/safe/PackageAccessEntry.java | 24 + src/org/openintents/safe/PassEdit.java | 135 ++--- src/org/openintents/safe/PassEntry.java | 6 +- src/org/openintents/safe/PassList.java | 191 +++---- src/org/openintents/safe/PassView.java | 112 ++-- src/org/openintents/safe/Passwords.java | 477 ++++++++++++++++++ src/org/openintents/safe/Restore.java | 1 + 17 files changed, 849 insertions(+), 521 deletions(-) create mode 100644 src/org/openintents/safe/PackageAccessEntry.java create mode 100644 src/org/openintents/safe/Passwords.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 763f6c3..f04e4e9 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,7 @@ + android:versionName="1.1.0" android:versionCode="5"> @@ -65,7 +64,7 @@ - + diff --git a/res/values/strings.xml b/res/values/strings.xml index 8ee2f61..da253e0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -171,6 +171,7 @@ New master key A new random master key has been created. Use menu > backup and store this key in a safe place. Without this key you may lose encrypted data. Switch mode + Decrypting...