Get rid of other singletons

This commit is contained in:
addshore 2017-05-16 11:22:17 +02:00
parent bdfbdc7579
commit c712b561d4
7 changed files with 31 additions and 31 deletions

View file

@ -12,16 +12,11 @@ public class DBOpenHelper extends SQLiteOpenHelper{
private static final String DATABASE_NAME = "commons.db";
private static final int DATABASE_VERSION = 6;
private static DBOpenHelper singleton = null;
public static synchronized DBOpenHelper getInstance(Context context) {
if ( singleton == null ) {
singleton = new DBOpenHelper(context);
}
return singleton;
}
private DBOpenHelper(Context context) {
/**
* Do not use, please call CommonsApplication.getDBOpenHelper()
*/
public DBOpenHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}