mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 01:24:03 +03:00
annotate JvmStatic for more idiomatic access from Java
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
74fc56fa7e
commit
c9ba0fe870
2 changed files with 2 additions and 1 deletions
|
@ -93,6 +93,6 @@ public class DatabaseModule {
|
|||
@Provides
|
||||
@Singleton
|
||||
public TalkDatabase provideTalkDatabase(@NonNull final Context context) {
|
||||
return TalkDatabase.Companion.getInstance(context);
|
||||
return TalkDatabase.getInstance(context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ abstract class TalkDatabase : RoomDatabase() {
|
|||
@Volatile
|
||||
private var INSTANCE: TalkDatabase? = null
|
||||
|
||||
@JvmStatic
|
||||
fun getInstance(context: Context): TalkDatabase =
|
||||
INSTANCE ?: synchronized(this) {
|
||||
INSTANCE ?: build(context).also { INSTANCE = it }
|
||||
|
|
Loading…
Reference in a new issue