Do not backup recordings
This commit is contained in:
@@ -1790,16 +1790,12 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun backup(password: String) {
|
private fun backup(password: String) {
|
||||||
val files = arrayListOf("accounts", "history", "config", "contacts", "messages",
|
val files = arrayListOf("accounts", "config", "contacts", "call_history",
|
||||||
"gzrtp.zid", "cert.pem", "ca_cert", "ca_certs.crt")
|
"messages", "gzrtp.zid", "cert.pem", "ca_cert", "ca_certs.crt")
|
||||||
File(BaresipService.filesPath).walk().forEach {
|
File(BaresipService.filesPath).walk().forEach {
|
||||||
if (it.name.endsWith(".png"))
|
if (it.name.endsWith(".png"))
|
||||||
files.add(it.name)
|
files.add(it.name)
|
||||||
}
|
}
|
||||||
File("${BaresipService.filesPath}/recordings").walk().forEach {
|
|
||||||
if (it.name.startsWith("dump"))
|
|
||||||
files.add("recordings/${it.name}")
|
|
||||||
}
|
|
||||||
val zipFile = getString(R.string.app_name) + ".zip"
|
val zipFile = getString(R.string.app_name) + ".zip"
|
||||||
val zipFilePath = BaresipService.filesPath + "/$zipFile"
|
val zipFilePath = BaresipService.filesPath + "/$zipFile"
|
||||||
if (!Utils.zip(files, zipFile)) {
|
if (!Utils.zip(files, zipFile)) {
|
||||||
@@ -1853,6 +1849,17 @@ class MainActivity : AppCompatActivity() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
Utils.deleteFile(File(zipFilePath))
|
Utils.deleteFile(File(zipFilePath))
|
||||||
|
|
||||||
|
File("${BaresipService.filesPath}/recordings").walk().forEach {
|
||||||
|
if (it.name.startsWith("dump"))
|
||||||
|
Utils.deleteFile(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
CallHistoryNew.restore()
|
||||||
|
for (h in BaresipService.callHistory)
|
||||||
|
h.recording = arrayOf("", "")
|
||||||
|
CallHistoryNew.save()
|
||||||
|
|
||||||
with(MaterialAlertDialogBuilder(this, R.style.AlertDialogTheme)) {
|
with(MaterialAlertDialogBuilder(this, R.style.AlertDialogTheme)) {
|
||||||
setTitle(getString(R.string.info))
|
setTitle(getString(R.string.info))
|
||||||
setMessage(getString(R.string.restored))
|
setMessage(getString(R.string.restored))
|
||||||
|
|||||||
@@ -548,8 +548,9 @@
|
|||||||
<string name="call_is_secure">Tämä puhelu on turvallinen ja kohde on
|
<string name="call_is_secure">Tämä puhelu on turvallinen ja kohde on
|
||||||
todennettu! Haluatko poistaa todennuksen\?</string>
|
todennettu! Haluatko poistaa todennuksen\?</string>
|
||||||
<string name="unverify">Poista todennus</string>
|
<string name="unverify">Poista todennus</string>
|
||||||
<string name="backed_up">Sovelluksen tiedot talletettiin tiedostoon \'%1$s\'. Android
|
<string name="backed_up">Sovelluksen tiedot (äänityksiä lukuunottamatta)
|
||||||
versiossa 9 tiedosto löytyy Download-kansiosta.</string>
|
talletettiin tiedostoon \'%1$s\'. Android versiossa 9 tiedosto löytyy
|
||||||
|
Download-kansiosta.</string>
|
||||||
<string name="backup_failed">Sovelluksen tietojen talletus
|
<string name="backup_failed">Sovelluksen tietojen talletus
|
||||||
tiedostoon \'%1$s\' epäonnistui. Android versiossa 9 tarkista
|
tiedostoon \'%1$s\' epäonnistui. Android versiossa 9 tarkista
|
||||||
Asetukset → Sovellukset → baresip → Käyttöluvat → Tallennustila.</string>
|
Asetukset → Sovellukset → baresip → Käyttöluvat → Tallennustila.</string>
|
||||||
|
|||||||
@@ -527,8 +527,8 @@
|
|||||||
Do you want to unverify the peer\?
|
Do you want to unverify the peer\?
|
||||||
</string>
|
</string>
|
||||||
<string name="unverify">Unverify</string>
|
<string name="unverify">Unverify</string>
|
||||||
<string name="backed_up">Application data has been backed up to file \'%1$s\'. In Android
|
<string name="backed_up">Application data (excluding recordings) backed up
|
||||||
version 9, the file is in Download folder.</string>
|
to file \'%1$s\'. In Android version 9, the file is in Download folder.</string>
|
||||||
<string name="backup_failed">Failed to back up application data to file
|
<string name="backup_failed">Failed to back up application data to file
|
||||||
\'%1$s\'. Check Apps → baresip → Permissions → Storage.</string>
|
\'%1$s\'. Check Apps → baresip → Permissions → Storage.</string>
|
||||||
<string name="restart_request">Restart Request</string>
|
<string name="restart_request">Restart Request</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user