Compare commits
No commits in common. "4bbc9360b472f07d36e79ed8c0993b26fd7e013c" and "e2248220c47915faea5f0c2041a8a30d6b1f1897" have entirely different histories.
4bbc9360b4
...
e2248220c4
|
@ -15,8 +15,8 @@ android {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
//noinspection ExpiredTargetSdkVersion
|
//noinspection ExpiredTargetSdkVersion
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 27
|
versionCode 26
|
||||||
versionName "1.10.1"
|
versionName "1.10.0"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
|
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9e98192442b08362660b45f4e2e50221ba7bc65b
|
Subproject commit 985d8523434814cd9cba61b666a1f888bdcbaded
|
|
@ -141,28 +141,32 @@ class GocryptfsVolume(val applicationContext: Context, var sessionID: Int) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun importFile(inputStream: InputStream, handleID: Int): Boolean {
|
||||||
|
var offset: Long = 0
|
||||||
|
val ioBuffer = ByteArray(DefaultBS)
|
||||||
|
var length: Int
|
||||||
|
while (inputStream.read(ioBuffer).also { length = it } > 0) {
|
||||||
|
val written = writeFile(handleID, offset, ioBuffer, length).toLong()
|
||||||
|
if (written == length.toLong()) {
|
||||||
|
offset += written
|
||||||
|
} else {
|
||||||
|
inputStream.close()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closeFile(handleID)
|
||||||
|
inputStream.close()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
fun importFile(inputStream: InputStream, dst_path: String): Boolean {
|
fun importFile(inputStream: InputStream, dst_path: String): Boolean {
|
||||||
|
var success = false
|
||||||
val dstHandleId = openWriteMode(dst_path)
|
val dstHandleId = openWriteMode(dst_path)
|
||||||
if (dstHandleId != -1) {
|
if (dstHandleId != -1) {
|
||||||
var success = true
|
success = importFile(inputStream, dstHandleId)
|
||||||
var offset: Long = 0
|
|
||||||
val ioBuffer = ByteArray(DefaultBS)
|
|
||||||
var length: Int
|
|
||||||
while (inputStream.read(ioBuffer).also { length = it } > 0) {
|
|
||||||
val written = writeFile(dstHandleId, offset, ioBuffer, length).toLong()
|
|
||||||
if (written == length.toLong()) {
|
|
||||||
offset += written
|
|
||||||
} else {
|
|
||||||
inputStream.close()
|
|
||||||
success = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closeFile(dstHandleId)
|
closeFile(dstHandleId)
|
||||||
inputStream.close()
|
|
||||||
return success
|
|
||||||
}
|
}
|
||||||
return false
|
return success
|
||||||
}
|
}
|
||||||
|
|
||||||
fun importFile(context: Context, src_uri: Uri, dst_path: String): Boolean {
|
fun importFile(context: Context, src_uri: Uri, dst_path: String): Boolean {
|
||||||
|
|
|
@ -594,7 +594,8 @@ class MainActivity : BaseActivity(), VolumeAdapter.Listener {
|
||||||
CustomAlertDialogBuilder(this, themeValue)
|
CustomAlertDialogBuilder(this, themeValue)
|
||||||
.setTitle(R.string.open_volume_failed)
|
.setTitle(R.string.open_volume_failed)
|
||||||
.setMessage(R.string.open_volume_failed_msg)
|
.setMessage(R.string.open_volume_failed_msg)
|
||||||
.setPositiveButton(R.string.ok) { _, _ ->
|
.setPositiveButton(R.string.ok, null)
|
||||||
|
.setOnDismissListener {
|
||||||
askForPassword(volume, position, savePasswordHash)
|
askForPassword(volume, position, savePasswordHash)
|
||||||
}
|
}
|
||||||
.show()
|
.show()
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
<string name="password_confirmation_hint">Contraseña (confirmación)</string>
|
<string name="password_confirmation_hint">Contraseña (confirmación)</string>
|
||||||
<string name="password_hash_saved">hash de la contraseña guardada</string>
|
<string name="password_hash_saved">hash de la contraseña guardada</string>
|
||||||
<string name="read_only">(Sólo lectura)</string>
|
<string name="read_only">(Sólo lectura)</string>
|
||||||
<string name="no_volumes_text">No se ha guardado ningún volumen, añada uno haciendo clic en el botón +</string>
|
<string name="no_volumes_text">No se ha guardado el volumen, añada algo haciendo clic en el botón +.</string>
|
||||||
<string name="fingerprint_error_msg">La autenticación por huella dactilar no puede ser utilizada: %s.</string>
|
<string name="fingerprint_error_msg">La autenticación por huella dactilar no puede ser utilizada: %s.</string>
|
||||||
<string name="keyguard_not_secure">keyguard no seguro</string>
|
<string name="keyguard_not_secure">keyguard no seguro</string>
|
||||||
<string name="no_hardware">no se ha encontrado el hardware adecuado</string>
|
<string name="no_hardware">no se ha encontrado el hardware adecuado</string>
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
<string name="hidden_volume_already_exists">Ya existe un volumen oculto con el mismo nombre.</string>
|
<string name="hidden_volume_already_exists">Ya existe un volumen oculto con el mismo nombre.</string>
|
||||||
<string name="pdf_document">Documento PDF</string>
|
<string name="pdf_document">Documento PDF</string>
|
||||||
<string name="thumbnail_max_size">Tamaño máximo de miniatura</string>
|
<string name="thumbnail_max_size">Tamaño máximo de miniatura</string>
|
||||||
<string name="thumbnail_max_size_summary">Tamaño máximo de archivo en el que se cargarán las miniaturas. Valor actual: %s</string>
|
<string name="thumbnail_max_size_summary">Tamaño máximo de archivo para el que cargar una miniatura. Valor actual: %s</string>
|
||||||
<string name="size_hint">Tamaño (en KB)</string>
|
<string name="size_hint">Tamaño (en KB)</string>
|
||||||
<string name="invalid_number">Número inválido</string>
|
<string name="invalid_number">Número inválido</string>
|
||||||
<string name="new_volume_name">Nuevo nombre del volumen:</string>
|
<string name="new_volume_name">Nuevo nombre del volumen:</string>
|
||||||
|
@ -239,7 +239,4 @@
|
||||||
<string name="multiple_folders">%d carpetas</string>
|
<string name="multiple_folders">%d carpetas</string>
|
||||||
<string name="default_open">Abrir este volumen cuando se inicia la aplicación</string>
|
<string name="default_open">Abrir este volumen cuando se inicia la aplicación</string>
|
||||||
<string name="remove_default_open">No abrir por defecto</string>
|
<string name="remove_default_open">No abrir por defecto</string>
|
||||||
<string name="elements_selected">%d/%d Seleccionados</string>
|
|
||||||
<string name="pin_passwords_title">Diseño de teclado numérico</string>
|
|
||||||
<string name="pin_passwords_summary">Usar el diseño de teclado numérico para ingresar las contraseñas de los volumenes</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue