Add missing close

This commit is contained in:
Mathieu Maret 2011-10-30 01:16:33 +02:00
parent 7b8a2c9638
commit 1119047891

View File

@ -101,10 +101,12 @@ public class DeliveryDbAdapter {
public DeliveryDbAdapter open() throws SQLException { public DeliveryDbAdapter open() throws SQLException {
mDbHelper = new DeliveryDbHelper(mCtx); mDbHelper = new DeliveryDbHelper(mCtx);
mDb = mDbHelper.getWritableDatabase(); mDb = mDbHelper.getWritableDatabase();
return this; return this;
} }
public void close() { public void close() {
mDb.close();
mDbHelper.close(); mDbHelper.close();
} }
@ -125,7 +127,7 @@ public class DeliveryDbAdapter {
initialValues.put(KEY_DELIVERY_ENTRY_NUMBER, number); initialValues.put(KEY_DELIVERY_ENTRY_NUMBER, number);
initialValues.put(KEY_DELIVERY_ENTRY_DELIVERY_ID, deliveryID); initialValues.put(KEY_DELIVERY_ENTRY_DELIVERY_ID, deliveryID);
initialValues.put(KEY_DELIVERY_ENTRY_DELIVERED, 0); initialValues.put(KEY_DELIVERY_ENTRY_DELIVERED, 0);
return mDb.insert(DATABASE_DELIVERY_ENTRY_TABLE, null, initialValues); return mDb.insert(DATABASE_DELIVERY_ENTRY_TABLE, null, initialValues);
} }