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