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;