summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-08-17 00:46:04 +0200
committerYves Fischer <yvesf-git@xapek.org>2014-08-17 00:46:04 +0200
commit4a271a922348590e999e209535f050fd861cac11 (patch)
tree58def984264f0077da65feb8c3028eb649db8310 /src
parentfc07e620e834dfa3495323e29ae10e21c3621804 (diff)
downloadandiodine-4a271a922348590e999e209535f050fd861cac11.tar.gz
andiodine-4a271a922348590e999e209535f050fd861cac11.zip
Do not dump whole configuration to debug when selected or updated.
closes #6
Diffstat (limited to 'src')
-rw-r--r--src/org/xapek/andiodine/config/ConfigDatabase.java8
-rw-r--r--src/org/xapek/andiodine/config/IodineConfiguration.java5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/org/xapek/andiodine/config/ConfigDatabase.java b/src/org/xapek/andiodine/config/ConfigDatabase.java
index ffc1656..c4245ba 100644
--- a/src/org/xapek/andiodine/config/ConfigDatabase.java
+++ b/src/org/xapek/andiodine/config/ConfigDatabase.java
@@ -66,7 +66,6 @@ public class ConfigDatabase extends SQLiteOpenHelper {
long id = writableDatabase.insertOrThrow(TABLE_NAME_CONF, null, config);
writableDatabase.close();
config.put(COLUMN_CONF_ID, id);
-
Log.d(TAG, "Insert id=" + id);
}
@@ -77,7 +76,6 @@ public class ConfigDatabase extends SQLiteOpenHelper {
int rows = writableDatabase.update(TABLE_NAME_CONF, config, COLUMN_CONF_ID + " = ?",
new String[]{config.getAsString(COLUMN_CONF_ID)});
writableDatabase.close();
- Log.d(TAG, config.toString());
Log.d(TAG, "Update rows=" + rows);
return rows;
}
@@ -96,11 +94,11 @@ public class ConfigDatabase extends SQLiteOpenHelper {
SQLiteDatabase readableDatabase = getReadableDatabase();
Cursor query = readableDatabase.query(TABLE_NAME_CONF, null, COLUMN_CONF_ID + " = ?",
new String[]{id.toString()}, null, null, null);
- assert query.isLast();
query.moveToFirst();
DatabaseUtils.cursorRowToContentValues(query, v);
- Log.d(TAG, "Selected: " + v.toString());
- return new IodineConfiguration(v);
+ IodineConfiguration iodineConfiguration = new IodineConfiguration(v);
+ Log.d(TAG, "Selected: " + iodineConfiguration);
+ return iodineConfiguration;
}
public List<IodineConfiguration> selectAll() throws SQLException {
diff --git a/src/org/xapek/andiodine/config/IodineConfiguration.java b/src/org/xapek/andiodine/config/IodineConfiguration.java
index c41621b..21aac6c 100644
--- a/src/org/xapek/andiodine/config/IodineConfiguration.java
+++ b/src/org/xapek/andiodine/config/IodineConfiguration.java
@@ -124,4 +124,9 @@ public class IodineConfiguration {
public ContentValues getContentValues() {
return v;
}
+
+ @Override
+ public String toString() {
+ return "[IodineConfiguration name=" + getName() + "]";
+ }
}