FreeRDP
Loading...
Searching...
No Matches
com.freerdp.freerdpcore.data.AppDatabase Class Referenceabstract
Inheritance diagram for com.freerdp.freerdpcore.data.AppDatabase:
Collaboration diagram for com.freerdp.freerdpcore.data.AppDatabase:

Public Member Functions

abstract BookmarkDao bookmarkDao ()
 

Static Public Member Functions

static AppDatabase getInstance (Context context)
 

Detailed Description

Definition at line 23 of file AppDatabase.java.

Member Function Documentation

◆ 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: