mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Get rid of other singletons
This commit is contained in:
parent
bdfbdc7579
commit
c712b561d4
7 changed files with 31 additions and 31 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue