diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-19 14:21:34 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-19 14:21:34 +0200 |
commit | 7ee4a44afaee08c72b78af571ee478486f86968c (patch) | |
tree | 45a8bf3a9f6ec0d60f146b4dc4d6973df88c2f91 /OpenKeychain/src/main | |
parent | 71d8bcc8f4f3a7bd8e3dbe6be3bfc4316088311f (diff) | |
download | open-keychain-7ee4a44afaee08c72b78af571ee478486f86968c.tar.gz open-keychain-7ee4a44afaee08c72b78af571ee478486f86968c.tar.bz2 open-keychain-7ee4a44afaee08c72b78af571ee478486f86968c.zip |
Fix some smaller annoyances, closes #583, #582
Diffstat (limited to 'OpenKeychain/src/main')
2 files changed, 5 insertions, 11 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java index aafc2eb34..991729b38 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java @@ -281,10 +281,6 @@ public class KeychainDatabase extends SQLiteOpenHelper { Log.e(Constants.TAG, "Unknown blob data type!"); } } - - // Move to a different file (but don't delete, just to be safe) - Log.d(Constants.TAG, "All done - moving apg.db to apg_old.db"); - context.getDatabasePath("apg.db").renameTo(context.getDatabasePath("apg_old.db")); } catch (IOException e) { Log.e(Constants.TAG, "Error importing apg.db!", e); } finally { @@ -296,6 +292,9 @@ public class KeychainDatabase extends SQLiteOpenHelper { } } + // Move to a different file (but don't delete, just to be safe) + Log.d(Constants.TAG, "All done - moving apg.db to apg_old.db"); + context.getDatabasePath("apg.db").renameTo(context.getDatabasePath("apg_old.db")); } private static void copy(File in, File out) throws IOException { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java index 466665247..3d3e48c30 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java @@ -609,12 +609,7 @@ public class KeychainProvider extends ContentProvider { String packageName = uri.getPathSegments().get(1); values.put(ApiAccounts.PACKAGE_NAME, packageName); - Log.d(Constants.TAG, "provider packageName: " + packageName); - db.insertOrThrow(Tables.API_ACCOUNTS, null, values); - // TODO: this is wrong: -// rowUri = ApiAccounts.buildIdUri(Long.toString(rowId)); - break; default: @@ -630,7 +625,7 @@ public class KeychainProvider extends ContentProvider { getContext().getContentResolver().notifyChange(uri, null); } catch (SQLiteConstraintException e) { - Log.e(Constants.TAG, "Constraint exception on insert! Entry already existing?", e); + Log.d(Constants.TAG, "Constraint exception on insert! Entry already existing?", e); } return rowUri; @@ -732,7 +727,7 @@ public class KeychainProvider extends ContentProvider { getContext().getContentResolver().notifyChange(uri, null); } catch (SQLiteConstraintException e) { - Log.e(Constants.TAG, "Constraint exception on update! Entry already existing?", e); + Log.d(Constants.TAG, "Constraint exception on update! Entry already existing?", e); } return count; |