Fix overwriting existing areaDatabaseHelper #79

Merged
Starfish merged 1 commits from dicer/TinyWeatherForecastGermany:issue74 into master 5 months ago
  1. 3
      app/src/main/java/de/kaffeemitkoffein/tinyweatherforecastgermany/AreaContentProvider.java

3
app/src/main/java/de/kaffeemitkoffein/tinyweatherforecastgermany/AreaContentProvider.java

@ -61,7 +61,6 @@ public class AreaContentProvider extends ContentProvider {
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
areaDatabaseHelper = new AreaDatabaseHelper(context);
sqLiteDatabase = areaDatabaseHelper.getReadableDatabase();
Cursor c = sqLiteDatabase.query(AreaContentProvider.AreaDatabaseHelper.TABLE_NAME, projection, selection, selectionArgs, null, null, sortOrder, null);
return c;
@ -203,4 +202,4 @@ public class AreaContentProvider extends ContentProvider {
return i;
// this should have triggered the update.
}
}
}

Loading…
Cancel
Save