- Removed context var from BaresipService.

This commit is contained in:
Juha Heinanen
2019-05-08 14:09:41 +03:00
parent 64d96a10d7
commit 8a29dc1c6c
3 changed files with 4 additions and 7 deletions
@@ -1,13 +1,12 @@
package com.tutpro.baresip
import android.content.Context
import java.io.File
object Config {
private val path = BaresipService.filesPath + "/config"
private val file = File(path)
private val context = BaresipService.context
private var config = Utils.getFileContents(file)
fun initialize() {
@@ -75,8 +74,8 @@ object Config {
add(variable, value)
}
fun reset() {
Utils.copyAssetToFile(context!!, "config", path)
fun reset(ctx: Context) {
Utils.copyAssetToFile(ctx, "config", path)
}
fun save() {