aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/cbaines/suma/DatabaseHelper.java5
-rw-r--r--src/net/cbaines/suma/SouthamptonUniversityMapActivity.java5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/net/cbaines/suma/DatabaseHelper.java b/src/net/cbaines/suma/DatabaseHelper.java
index 5a7e9aa..a72faca 100644
--- a/src/net/cbaines/suma/DatabaseHelper.java
+++ b/src/net/cbaines/suma/DatabaseHelper.java
@@ -186,11 +186,6 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
public void copyDataBase() throws IOException {
Log.i(TAG, "Begining copy database");
- // By calling this method and empty database will be created into the default system path
- // of your application so we are gonna be able to overwrite that database with our database.
- Log.i(TAG, "GetReadableDatabase");
- this.getWritableDatabase().close();
-
InputStream myInput = context.getAssets().open(DATABASE_NAME);
// Path to the just created empty db
diff --git a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
index b5a006d..927f41e 100644
--- a/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
+++ b/src/net/cbaines/suma/SouthamptonUniversityMapActivity.java
@@ -237,6 +237,11 @@ public class SouthamptonUniversityMapActivity extends OrmLiteBaseActivity<Databa
if (useBundledDatabase) {
try {
+ // By calling this method and empty database will be created into the default system path
+ // of your application so we are gonna be able to overwrite that database with our database.
+ Log.i(TAG, "GetReadableDatabase");
+ helper.getWritableDatabase().close();
+
helper.copyDataBase();
Log.i(TAG, "Out of copy database");
} catch (IOException ioe) {