- Use app_name string in backup/restore file name.
This commit is contained in:
@ -1118,43 +1118,54 @@ class MainActivity : AppCompatActivity() {
|
||||
File(BaresipService.filesPath).walk().forEach {
|
||||
if (it.name.endsWith(".png")) files.add(it.name)
|
||||
}
|
||||
val backupFilePath = BaresipService.downloadsPath + "/baresip.bs"
|
||||
val zipFilePath = BaresipService.filesPath + "/baresip.zip"
|
||||
if (!Utils.zip(files, "baresip.zip")) {
|
||||
Log.w("Baresip", "Failed to write zip file 'baresip.zip")
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.backup_failed))
|
||||
val bsFile = getString(R.string.app_name) + ".bs"
|
||||
val backupFilePath = BaresipService.downloadsPath + "/$bsFile"
|
||||
val zipFile = getString(R.string.app_name) + ".zip"
|
||||
val zipFilePath = BaresipService.filesPath + "/$zipFile"
|
||||
if (!Utils.zip(files, zipFile)) {
|
||||
Log.w("Baresip", "Failed to write zip file '$zipFile'")
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.backup_failed), bsFile))
|
||||
return
|
||||
}
|
||||
val content = Utils.getFileContents(zipFilePath)
|
||||
if (content == null) {
|
||||
Log.w("Baresip", "Failed to read zip file 'baresip.zip")
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.backup_failed))
|
||||
Log.w("Baresip", "Failed to read zip file '$zipFile'")
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.backup_failed), bsFile))
|
||||
return
|
||||
}
|
||||
if (!Utils.encryptToFile(backupFilePath, content, password)) {
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.backup_failed))
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.backup_failed), bsFile))
|
||||
return
|
||||
}
|
||||
Utils.alertView(this, getString(R.string.info), getString(R.string.backed_up))
|
||||
Utils.alertView(this, getString(R.string.info),
|
||||
String.format(getString(R.string.backed_up), bsFile))
|
||||
Utils.deleteFile(File(zipFilePath))
|
||||
}
|
||||
|
||||
private fun restore(password: String) {
|
||||
val backupFilePath = BaresipService.downloadsPath + "/baresip.bs"
|
||||
val zipFilePath = BaresipService.filesPath + "/baresip.zip"
|
||||
val bsFile = getString(R.string.app_name) + ".bs"
|
||||
val backupFilePath = BaresipService.downloadsPath + "/$bsFile"
|
||||
val zipFile = getString(R.string.app_name) + ".zip"
|
||||
val zipFilePath = BaresipService.filesPath + "/$zipFile"
|
||||
val zipData = Utils.decryptFromFile(backupFilePath, password)
|
||||
if (zipData == null) {
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.restore_failed))
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.restore_failed), bsFile))
|
||||
return
|
||||
}
|
||||
if (!Utils.putFileContents(zipFilePath, zipData)) {
|
||||
Log.w("Baresip", "Failed to write zip file 'baresip.zip")
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.restore_failed))
|
||||
Log.w("Baresip", "Failed to write zip file '$zipFile'")
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.restore_failed), bsFile))
|
||||
return
|
||||
}
|
||||
if (!Utils.unZip(zipFilePath)) {
|
||||
Log.w("Baresip", "Failed to unzip file 'baresip.zip")
|
||||
Utils.alertView(this, getString(R.string.error), getString(R.string.restore_failed))
|
||||
Log.w("Baresip", "Failed to unzip file '$zipFile'")
|
||||
Utils.alertView(this, getString(R.string.error),
|
||||
String.format(getString(R.string.restore_failed), bsFile))
|
||||
return
|
||||
}
|
||||
Utils.deleteFile(File(zipFilePath))
|
||||
|
||||
@ -253,10 +253,10 @@
|
||||
<string name="peer_not_verified">Това обаждане е СИГУРНО, но другият абонат НЕ е потвърдил!</string>
|
||||
<string name="call_is_secure">Този разговор е СИГУРЕН и другият абонат е ПРОВЕРЕН! Искате ли да го потвърдите? </string>
|
||||
<string name="unverify">Отмяна на потвърждението</string>
|
||||
<string name="backed_up">Данните от приложението са архивирани във файла за изтегляне на папки \'baresip.bs\'.</string>
|
||||
<string name="backup_failed">Неуспешно архивиране на данни от приложението за изтегляне на файла с папки \'baresip.bs\'. Проверете Приложения → baresip → Разрешения → Съхранение</string>
|
||||
<string name="backed_up">Данните от приложението са архивирани във файла за изтегляне на папки \'%1$s\'.</string>
|
||||
<string name="backup_failed">Неуспешно архивиране на данни от приложението за изтегляне на файла с папки \'%1$s\'. Проверете Приложения → baresip → Разрешения → Съхранение</string>
|
||||
<string name="restored">Данните за приложението са възстановени. baresip трябва да се рестартира. Рестартирай сега?</string>
|
||||
<string name="restore_failed">Възстановяването на данните на приложението от папката за изтегляне не бе успешно. Проверете Приложения → baresip → Разрешения → Съхранение и този архивен файл \'baresip.bs\' съществува в папката и ако е така, вие сте дали правилна парола за дешифриране.</string>
|
||||
<string name="restore_failed">Възстановяването на данните на приложението от папката за изтегляне не бе успешно. Проверете Приложения → baresip → Разрешения → Съхранение и този архивен файл \'%1$s\' съществува в папката и ако е така, вие сте дали правилна парола за дешифриране.</string>
|
||||
<string name="audio_modules_title">Аудио модули</string>
|
||||
<string name="audio_modules_help">Аудио кодеци предоставени от проверените модули могат да бъдат използвани от акаунтите.</string>
|
||||
<string name="failed_to_load_module">Не могат да бъдат заредени модулите.</string>
|
||||
|
||||
@ -246,13 +246,13 @@
|
||||
<string name="call_is_secure">¡Esta llamada es SEGURA y el compañero está VERIFICADO!
|
||||
¿Quieres desverificar al compañero?</string>
|
||||
<string name="unverify">No verificar</string>
|
||||
<string name="backed_up">Se respaldaron los datos de la aplicación en el archivo de la carpeta Descargas «baresip.bs».</string>
|
||||
<string name="backup_failed">Falló la creación de la copia de respaldo de los datos de la aplicación en el archivo «baresip.bs» en la carpeta Descargas. Revise Aplicaciones ▸ baresip ▸ Permisos ▸ Almacenamiento</string>
|
||||
<string name="backed_up">Se respaldaron los datos de la aplicación en el archivo de la carpeta Descargas «%1$s».</string>
|
||||
<string name="backup_failed">Falló la creación de la copia de respaldo de los datos de la aplicación en el archivo «%1$s» en la carpeta Descargas. Revise Aplicaciones ▸ baresip ▸ Permisos ▸ Almacenamiento</string>
|
||||
<string name="restored">Se restauraron los datos de la aplicación. Baresip necesita reiniciarse. ¿Quiere reiniciar ahora\?</string>
|
||||
<string name="restore_failed">Falló la restauración de los datos de la aplicación desde la carpeta Descargas. Revise Aplicaciones ▸ baresip ▸ Permisos ▸ Almacenamiento y si existe el archivo de la copia de respaldo «baresip.bs» en la carpeta; si es así, proporcione la contraseña de descifrado correcta.</string>
|
||||
<string name="restore_failed">Falló la restauración de los datos de la aplicación desde la carpeta Descargas. Revise Aplicaciones ▸ baresip ▸ Permisos ▸ Almacenamiento y si existe el archivo de la copia de respaldo «%1$s» en la carpeta; si es así, proporcione la contraseña de descifrado correcta.</string>
|
||||
<string name="config_restart">Es necesario reiniciar Baresip para que surta efecto la configuración nueva. ¿Quiere reiniciar ahora\?</string>
|
||||
<string name="audio_modules_title">Módulos de audio</string>
|
||||
<string name="audio_modules_help">Las cuentas pueden utiilzar códecs de audio provistos por los módulos comprobados.</string>
|
||||
<string name="failed_to_load_module">Falló la carga del módulo.</string>
|
||||
<string name="no_calls">No es posible hacer o responder llamadas sin el permiso Micrófono.</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@ -343,17 +343,17 @@
|
||||
todennettu! Haluatko poistaa todennuksen?</string>
|
||||
<string name="unverify">Poista todennus</string>
|
||||
<string name="backed_up">Sovelluksen tiedot talletettiin Download-kansion tiedostoon
|
||||
\'baresip.bs\'.
|
||||
\'%1$s\'.
|
||||
</string>
|
||||
<string name="backup_failed">Sovelluksen tietojen talletus Download-kansion tiedostoon
|
||||
\'baresip.bs\' epäonnistui. Tarkista Asetukset → Sovellukset → baresip →
|
||||
\'%1$s\' epäonnistui. Tarkista Asetukset → Sovellukset → baresip →
|
||||
Käyttöluvat → Tallennustila.</string>
|
||||
<string name="restored">Sovelluksen tiedot palautettiin. baresip pitää käynnistää
|
||||
uudelleen. Käynnistä uudelleen nyt?
|
||||
</string>
|
||||
<string name="restore_failed">Sovelluksen tietojen palauttaminen Download-kansiosta epäonnistui.
|
||||
Tarkista Asetukset → Sovellukset → baresip → Käyttöluvat → Tallennustila ja että tallennettu
|
||||
tiedosto \'baresip.bs\' on kansiossa ja (jos on) että annoit oikean salasanan.
|
||||
tiedosto \'%1$s\' on kansiossa ja (jos on) että annoit oikean salasanan.
|
||||
</string>
|
||||
<string name="no_calls">Et voi soittaa puheluita tai vastata niihin
|
||||
ilman Mikrofoni-käyttöoikeutta.
|
||||
|
||||
@ -186,10 +186,10 @@
|
||||
<string name="config_restart">Ønsker du å starte baresip på ny for å aktivere de nye innstillingene nå\?</string>
|
||||
<string name="backup">Sikkerhetskopier</string>
|
||||
<string name="restore">Gjenopprett</string>
|
||||
<string name="backed_up">Programdata sikkerhetskopiert til nedlastingsmappen som \"baresip.bs\".</string>
|
||||
<string name="backup_failed">Klarte ikke å sikkerhetskopiere programdata til nedlastingsmappe som \'baresip.bs\'. Sjekk \"Programmer → baresip → Tilganger → Lagring</string>
|
||||
<string name="backed_up">Programdata sikkerhetskopiert til nedlastingsmappen som \"%1$s\".</string>
|
||||
<string name="backup_failed">Klarte ikke å sikkerhetskopiere programdata til nedlastingsmappe som \'%1$s\'. Sjekk \"Programmer → baresip → Tilganger → Lagring</string>
|
||||
<string name="restored">Programdata gjenopprettet. Start baresip på ny nå\?</string>
|
||||
<string name="restore_failed">Klarte ikke å sikkerhetskopiere programdata til nedlastingsmappe. Sjekk \"Programmer → baresip → Tilganger → Lagring og at sikkerhetskopifilen \"baresip.bs\" finnes i mappen, og om det er tilfelle, at du har oppgitt rett dekrypteringspassord.</string>
|
||||
<string name="restore_failed">Klarte ikke å sikkerhetskopiere programdata til nedlastingsmappe. Sjekk \"Programmer → baresip → Tilganger → Lagring og at sikkerhetskopifilen \"%1$s\" finnes i mappen, og om det er tilfelle, at du har oppgitt rett dekrypteringspassord.</string>
|
||||
<string name="audio_modules_title">Lydmoduler</string>
|
||||
<string name="audio_modules_help">Lydkodeker tilbudt av de avkryssede modulene er tilgjengelig for bruk av kontoene.</string>
|
||||
<string name="help">Hjelp</string>
|
||||
@ -198,4 +198,4 @@
|
||||
<string name="accounts_help">Det er mulig å sette kontoportnummer og transportprotokoll som username@domain[:port][;transport=udp|tcp|tls] ved opprettelse av en ny konto. UDP brukes hvis kun port angis. Port 5060 eller 5061 (TLS) brukes hvis kun transportprotokoll angis. Kontoens registrar (hvis noen) angis kun basert på info fra domenets DNS hvis hverken port, transportprotokoll, og heller ikke utgående mellomtjener angis.</string>
|
||||
<string name="prefer_ipv6_media">Foretrekk IPv6-media</string>
|
||||
<string name="prefer_ipv6_media_help">Tilby bruk av IPv6-mediaprotokoll (hvis tilgjengelig) når likemanns mediaprotokoll ikke kan bestemmes.</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
<string name="show_password">Mostrar Senha</string>
|
||||
<string name="account_password">Senha de Autenticação da Conta %1$s</string>
|
||||
<string name="no_calls">Você não pode fazer ou atender chamadas sem a permissão do Microfone.</string>
|
||||
<string name="restore_failed">Falha ao restaurar os dados do aplicativo da pasta Download. Verifique Aplicativos → baresip → Permissões → Armazenamento e se o arquivo de backup \'baresip.bs\' existe na pasta e, se houver, se você forneceu a Senha de Descriptografia correta.</string>
|
||||
<string name="restore_failed">Falha ao restaurar os dados do aplicativo da pasta Download. Verifique Aplicativos → baresip → Permissões → Armazenamento e se o arquivo de backup \'%1$s\' existe na pasta e, se houver, se você forneceu a Senha de Descriptografia correta.</string>
|
||||
<string name="restored">Dados do aplicativo restaurados. O baresip precisa ser reiniciado. Reiniciar agora\?</string>
|
||||
<string name="backup_failed">Falha ao fazer backup dos dados do aplicativo no arquivo \'baresip.bs\' na pasta Download. Verifique Aplicativos → baresip → Permissões → Armazenamento.</string>
|
||||
<string name="backed_up">Dados do aplicativo armazenados em backup no arquivo \'baresip.bs\' na Download.</string>
|
||||
<string name="backup_failed">Falha ao fazer backup dos dados do aplicativo no arquivo \'%1$s\' na pasta Download. Verifique Aplicativos → baresip → Permissões → Armazenamento.</string>
|
||||
<string name="backed_up">Dados do aplicativo armazenados em backup no arquivo \'%1$s\' na Download.</string>
|
||||
<string name="unverify">Desverificar</string>
|
||||
<string name="call_is_secure">A chamada é SEGURA e o par é VERIFICADO! Deseja desverificar o par\?</string>
|
||||
<string name="peer_not_verified">A chama é SEGURA, porém o par NÃO é verificado!</string>
|
||||
@ -203,4 +203,4 @@
|
||||
<string name="account">Conta</string>
|
||||
<string name="about_text"><h1>Biblioteca Baresip baseado em agente de usuário SIP</h1> <p>Juha Heinanen &lt;jh@tutpro.com&gt;</p> <p>Version %1$s</p> <h2>Dicas de Uso</h2> <ul> <li>Verifique se os ajustes padrões atendem suas necessidades (clique nos títulos para ajuda).</li> <li>Então crie uma ou mais contas (novamente clique nos títulos para ajuda).</li> <li>O estado de uma conta é mostrado com um ponto colorido: verde (registro bem sucedido), amarelo (registro em progresso), vermelho (registro falhou), branco (registro não foi ativado).</li> <li>Peers de chamada e mensagens podem ser adicionadas aos contatos com toque longo.</li> <li>Toques longos também podem ser usados para remover chamadas, chats, mensagens e contatos.</li> <li>Toque/toque longo em ícones de contato podem ser usados para adicionar/remover avatar.</li> <li>Você pode selecionar novamente a chamada anterior clicando no ícone de ligação quando Destino estiver vazio.</li> <li>Se você não puder ouvir a outra parte durante a ligação, tente aumentar o volume de Mídia do dispositivo ou ajuste o Volume de Ligação Padrão nos Ajustes.</li> </ul> <h2>Problemas Conhecidos</h2> <ul> <li>Devido a limitações em bibliotecas subjacentes, baresip atualmente não suporta múltiplas interfaces de rede ativas simultaneamente.</li> </ul> <h2>Código Fonte</h2> Código fonte disponível em <a href=https://github.com/juha-h/baresip-studio>GitHub</a>, onde também falhas podem ser reportadas.</string>
|
||||
<string name="about_title">Sobre o baresip</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
<string name="and">и</string>
|
||||
<string name="answer_mode">Режим ответа</string>
|
||||
<string name="answer_mode_help">Выберите как отвечать на входящие вызовы.</string>
|
||||
<string name="backed_up">Данные приложения сохранены с папку Downloads , файл \'baresip.bs\'.</string>
|
||||
<string name="backed_up">Данные приложения сохранены с папку Downloads , файл \'%1$s\'.</string>
|
||||
<string name="call_not_secure">Вызов не безопасен!</string>
|
||||
<string name="listen_address">Прослушивать адрес</string>
|
||||
<string name="outbound_proxies">Исходящие прокси</string>
|
||||
|
||||
@ -301,14 +301,14 @@
|
||||
Do you want to unverify the peer?
|
||||
</string>
|
||||
<string name="unverify">Unverify</string>
|
||||
<string name="backed_up">Application data backed up to Download folder file \'baresip.bs\'.</string>
|
||||
<string name="backed_up">Application data backed up to Download folder file \'%1$s\'.</string>
|
||||
<string name="backup_failed">Failed to back up application data to Download folder file
|
||||
\'baresip.bs\'. Check Apps → baresip → Permissions → Storage.</string>
|
||||
\'%1$s\'. Check Apps → baresip → Permissions → Storage.</string>
|
||||
<string name="restored">Application data restored. baresip needs to be restarted.
|
||||
Restart now?
|
||||
</string>
|
||||
<string name="restore_failed">Failed to restore application data from Download folder. Check Apps →
|
||||
baresip → Permissions → Storage and that backup file \'baresip.bs\' exists in the folder
|
||||
baresip → Permissions → Storage and that backup file \'%1$s\' exists in the folder
|
||||
and, if so, you gave correct Decrypt Password.
|
||||
</string>
|
||||
<string name="no_calls">You are not able to place or answer calls without Microphone permission.</string>
|
||||
|
||||
Reference in New Issue
Block a user