Definition at line 23 of file AppDatabase.java.
◆ getInstance()
| static AppDatabase com.freerdp.freerdpcore.data.AppDatabase.getInstance |
( |
Context |
context | ) |
|
|
inlinestatic |
Definition at line 37 of file AppDatabase.java.
38 {
39 if (instance == null)
40 {
41 synchronized (AppDatabase.class)
42 {
43 if (instance == null)
44 {
45 byte[] key = getOrCreateDbKey(context);
46 migrateUnencryptedIfNeeded(context, key);
47
48 instance = Room.databaseBuilder(context.getApplicationContext(),
49 AppDatabase.class, DB_NAME)
50 .openHelperFactory(new SupportOpenHelperFactory(key))
51 .addMigrations(MIGRATION_10_11)
52 .addMigrations(MIGRATION_11_12)
53 .build();
54 }
55 }
56 }
57 return instance;
58 }
The documentation for this class was generated from the following file: