Twelve: Use application context
May help to avoid leaks
diff --git a/app/src/main/java/org/lineageos/twelve/TwelveApplication.kt b/app/src/main/java/org/lineageos/twelve/TwelveApplication.kt
index 1255f72..82bc5b9 100644
--- a/app/src/main/java/org/lineageos/twelve/TwelveApplication.kt
+++ b/app/src/main/java/org/lineageos/twelve/TwelveApplication.kt
@@ -12,8 +12,8 @@
import kotlin.properties.Delegates
class TwelveApplication : Application() {
- private val database by lazy { TwelveDatabase.getInstance(this) }
- val mediaRepository by lazy { MediaRepository(this, database) }
+ private val database by lazy { TwelveDatabase.getInstance(applicationContext) }
+ val mediaRepository by lazy { MediaRepository(applicationContext, database) }
var audioSessionId by Delegates.notNull<Int>()
override fun onCreate() {