Fix some smaller annoyances, closes #583, #582

This commit is contained in:
Dominik Schürmann 2014-04-19 14:21:34 +02:00
parent 71d8bcc8f4
commit 7ee4a44afa
2 changed files with 5 additions and 11 deletions

View File

@ -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 {

View File

@ -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;