Simplifiled directory creation
This commit is contained in:
@@ -436,12 +436,6 @@ class BaresipService: Service() {
|
|||||||
Config.initialize(applicationContext)
|
Config.initialize(applicationContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File(filesDir, "tmp").exists())
|
|
||||||
File(filesDir, "tmp").mkdir()
|
|
||||||
|
|
||||||
if (!File(filesDir, "recordings").exists())
|
|
||||||
File(filesDir, "recordings").mkdir()
|
|
||||||
|
|
||||||
if (contactsMode != "android")
|
if (contactsMode != "android")
|
||||||
Contact.restoreBaresipContacts()
|
Contact.restoreBaresipContacts()
|
||||||
if (contactsMode != "baresip") {
|
if (contactsMode != "baresip") {
|
||||||
@@ -463,14 +457,21 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val recordings = File(filesDir, "recordings")
|
||||||
|
|
||||||
val restored = File(filesPath, "restored")
|
val restored = File(filesPath, "restored")
|
||||||
if (restored.exists()) {
|
if (restored.exists()) {
|
||||||
Log.d(TAG, "Clearing recordings")
|
Log.d(TAG, "Clearing recordings")
|
||||||
CallHistoryNew.clearRecordings()
|
CallHistoryNew.clearRecordings()
|
||||||
CallHistoryNew.save()
|
CallHistoryNew.save()
|
||||||
|
if (recordings.exists())
|
||||||
|
recordings.deleteRecursively()
|
||||||
restored.delete()
|
restored.delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File(filesDir, "recordings").mkdir()
|
||||||
|
File(filesDir, "tmp").mkdir()
|
||||||
|
|
||||||
Message.restore()
|
Message.restore()
|
||||||
|
|
||||||
hotSpotAddresses = Utils.hotSpotAddresses()
|
hotSpotAddresses = Utils.hotSpotAddresses()
|
||||||
|
|||||||
Reference in New Issue
Block a user