mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Merge branch 'release/2.8.1'
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
KeePassDX(2.8.1)
|
||||||
|
* Capture exceptions in coroutines
|
||||||
|
|
||||||
KeePassDX(2.8)
|
KeePassDX(2.8)
|
||||||
* Fix TOTP period (> 60s)
|
* Fix TOTP period (> 60s)
|
||||||
* Fix searching in recycle bin
|
* Fix searching in recycle bin
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ android {
|
|||||||
applicationId "com.kunzisoft.keepass"
|
applicationId "com.kunzisoft.keepass"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode = 36
|
versionCode = 37
|
||||||
versionName = "2.8"
|
versionName = "2.8.1"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
testApplicationId = "com.kunzisoft.keepass.tests"
|
testApplicationId = "com.kunzisoft.keepass.tests"
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ open class PasswordActivity : SpecialModeActivity() {
|
|||||||
if (resultMessage != null && resultMessage.isNotEmpty()) {
|
if (resultMessage != null && resultMessage.isNotEmpty()) {
|
||||||
resultError = "$resultError $resultMessage"
|
resultError = "$resultError $resultMessage"
|
||||||
}
|
}
|
||||||
Log.e(TAG, resultError, resultException)
|
Log.e(TAG, resultError)
|
||||||
Snackbar.make(activity_password_coordinator_layout,
|
Snackbar.make(activity_password_coordinator_layout,
|
||||||
resultError,
|
resultError,
|
||||||
Snackbar.LENGTH_LONG).asError().show()
|
Snackbar.LENGTH_LONG).asError().show()
|
||||||
|
|||||||
@@ -380,10 +380,8 @@ class Database {
|
|||||||
loaded = true
|
loaded = true
|
||||||
|
|
||||||
} catch (e: LoadDatabaseException) {
|
} catch (e: LoadDatabaseException) {
|
||||||
Log.e("KPD", "Database::loadData", e)
|
|
||||||
throw e
|
throw e
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("KPD", "Database::loadData", e)
|
|
||||||
throw FileNotFoundDatabaseException()
|
throw FileNotFoundDatabaseException()
|
||||||
} finally {
|
} finally {
|
||||||
keyFileInputStream?.close()
|
keyFileInputStream?.close()
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import android.app.PendingIntent
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
import android.os.IBinder
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.activities.GroupActivity
|
import com.kunzisoft.keepass.activities.GroupActivity
|
||||||
import com.kunzisoft.keepass.database.element.Database
|
import com.kunzisoft.keepass.database.element.Database
|
||||||
@@ -47,11 +48,16 @@ class DatabaseOpenNotificationService: LockNotificationService() {
|
|||||||
super.actionOnLock()
|
super.actionOnLock()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
private fun checkIntent(intent: Intent?) {
|
||||||
super.onStartCommand(intent, flags, startId)
|
val notificationBuilder = buildNewNotification().apply {
|
||||||
|
setSmallIcon(R.drawable.notification_ic_database_open)
|
||||||
|
setContentTitle(getString(R.string.database_opened))
|
||||||
|
setAutoCancel(false)
|
||||||
|
}
|
||||||
|
|
||||||
when(intent?.action) {
|
when(intent?.action) {
|
||||||
ACTION_CLOSE_DATABASE -> {
|
ACTION_CLOSE_DATABASE -> {
|
||||||
|
startForeground(notificationId, notificationBuilder.build())
|
||||||
stopNotificationAndSendLock()
|
stopNotificationAndSendLock()
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
@@ -68,11 +74,8 @@ class DatabaseOpenNotificationService: LockNotificationService() {
|
|||||||
|
|
||||||
val database = Database.getInstance()
|
val database = Database.getInstance()
|
||||||
if (database.loaded) {
|
if (database.loaded) {
|
||||||
startForeground(notificationId, buildNewNotification().apply {
|
startForeground(notificationId, notificationBuilder.apply {
|
||||||
setSmallIcon(R.drawable.notification_ic_database_open)
|
|
||||||
setContentTitle(getString(R.string.database_opened))
|
|
||||||
setContentText(database.name + " (" + database.version + ")")
|
setContentText(database.name + " (" + database.version + ")")
|
||||||
setAutoCancel(false)
|
|
||||||
setContentIntent(pendingDatabaseIntent)
|
setContentIntent(pendingDatabaseIntent)
|
||||||
// Unfortunately swipe is disabled in lollipop+
|
// Unfortunately swipe is disabled in lollipop+
|
||||||
setDeleteIntent(pendingDeleteIntent)
|
setDeleteIntent(pendingDeleteIntent)
|
||||||
@@ -80,11 +83,21 @@ class DatabaseOpenNotificationService: LockNotificationService() {
|
|||||||
pendingDeleteIntent)
|
pendingDeleteIntent)
|
||||||
}.build())
|
}.build())
|
||||||
} else {
|
} else {
|
||||||
|
startForeground(notificationId, notificationBuilder.build())
|
||||||
stopSelf()
|
stopSelf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBind(intent: Intent): IBinder? {
|
||||||
|
checkIntent(intent)
|
||||||
|
return super.onBind(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
|
super.onStartCommand(intent, flags, startId)
|
||||||
|
checkIntent(intent)
|
||||||
return START_STICKY
|
return START_STICKY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,22 +90,13 @@ class DatabaseTaskNotificationService : NotificationService(), ProgressTaskUpdat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent): IBinder? {
|
private fun buildNotification(intent: Intent?) {
|
||||||
return mActionTaskBinder
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
||||||
super.onStartCommand(intent, flags, startId)
|
|
||||||
|
|
||||||
if (intent == null) return START_REDELIVER_INTENT
|
|
||||||
|
|
||||||
val intentAction = intent.action
|
|
||||||
|
|
||||||
var saveAction = true
|
var saveAction = true
|
||||||
if (intent.hasExtra(SAVE_DATABASE_KEY)) {
|
if (intent != null && intent.hasExtra(SAVE_DATABASE_KEY)) {
|
||||||
saveAction = intent.getBooleanExtra(SAVE_DATABASE_KEY, saveAction)
|
saveAction = intent.getBooleanExtra(SAVE_DATABASE_KEY, saveAction)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val intentAction = intent?.action
|
||||||
val titleId: Int = when (intentAction) {
|
val titleId: Int = when (intentAction) {
|
||||||
ACTION_DATABASE_CREATE_TASK -> R.string.creating_database
|
ACTION_DATABASE_CREATE_TASK -> R.string.creating_database
|
||||||
ACTION_DATABASE_LOAD_TASK -> R.string.loading_database
|
ACTION_DATABASE_LOAD_TASK -> R.string.loading_database
|
||||||
@@ -127,6 +118,31 @@ class DatabaseTaskNotificationService : NotificationService(), ProgressTaskUpdat
|
|||||||
else
|
else
|
||||||
R.string.do_not_kill_app
|
R.string.do_not_kill_app
|
||||||
|
|
||||||
|
// Assign elements for updates
|
||||||
|
mTitleId = titleId
|
||||||
|
mMessageId = messageId
|
||||||
|
mWarningId = warningId
|
||||||
|
// Create the notification
|
||||||
|
startForeground(notificationId, buildNewNotification()
|
||||||
|
.setSmallIcon(R.drawable.notification_ic_database_load)
|
||||||
|
.setContentTitle(getString(intent?.getIntExtra(DATABASE_TASK_TITLE_KEY, titleId) ?: titleId))
|
||||||
|
.setAutoCancel(false)
|
||||||
|
.setContentIntent(null).build())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBind(intent: Intent): IBinder? {
|
||||||
|
buildNotification(intent)
|
||||||
|
return mActionTaskBinder
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
|
super.onStartCommand(intent, flags, startId)
|
||||||
|
|
||||||
|
buildNotification(intent)
|
||||||
|
|
||||||
|
if (intent == null) return START_REDELIVER_INTENT
|
||||||
|
|
||||||
|
val intentAction = intent.action
|
||||||
val actionRunnable: ActionRunnable? = when (intentAction) {
|
val actionRunnable: ActionRunnable? = when (intentAction) {
|
||||||
ACTION_DATABASE_CREATE_TASK -> buildDatabaseCreateActionTask(intent)
|
ACTION_DATABASE_CREATE_TASK -> buildDatabaseCreateActionTask(intent)
|
||||||
ACTION_DATABASE_LOAD_TASK -> buildDatabaseLoadActionTask(intent)
|
ACTION_DATABASE_LOAD_TASK -> buildDatabaseLoadActionTask(intent)
|
||||||
@@ -157,26 +173,19 @@ class DatabaseTaskNotificationService : NotificationService(), ProgressTaskUpdat
|
|||||||
}
|
}
|
||||||
|
|
||||||
actionRunnable?.let { actionRunnableNotNull ->
|
actionRunnable?.let { actionRunnableNotNull ->
|
||||||
// Assign elements for updates
|
|
||||||
mTitleId = titleId
|
|
||||||
mMessageId = messageId
|
|
||||||
mWarningId = warningId
|
|
||||||
|
|
||||||
// Create the notification
|
|
||||||
newNotification(intent.getIntExtra(DATABASE_TASK_TITLE_KEY, titleId))
|
|
||||||
|
|
||||||
// Build and launch the action
|
// Build and launch the action
|
||||||
mainScope.launch {
|
mainScope.launch {
|
||||||
executeAction(this@DatabaseTaskNotificationService,
|
executeAction(this@DatabaseTaskNotificationService,
|
||||||
{
|
{
|
||||||
sendBroadcast(Intent(DATABASE_START_TASK_ACTION).apply {
|
sendBroadcast(Intent(DATABASE_START_TASK_ACTION).apply {
|
||||||
putExtra(DATABASE_TASK_TITLE_KEY, titleId)
|
putExtra(DATABASE_TASK_TITLE_KEY, mTitleId)
|
||||||
putExtra(DATABASE_TASK_MESSAGE_KEY, messageId)
|
putExtra(DATABASE_TASK_MESSAGE_KEY, mMessageId)
|
||||||
putExtra(DATABASE_TASK_WARNING_KEY, warningId)
|
putExtra(DATABASE_TASK_WARNING_KEY, mWarningId)
|
||||||
})
|
})
|
||||||
|
|
||||||
mActionTaskListeners.forEach { actionTaskListener ->
|
mActionTaskListeners.forEach { actionTaskListener ->
|
||||||
actionTaskListener.onStartAction(titleId, messageId, warningId)
|
actionTaskListener.onStartAction(mTitleId, mMessageId, mWarningId)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -208,8 +217,6 @@ class DatabaseTaskNotificationService : NotificationService(), ProgressTaskUpdat
|
|||||||
onPostExecute: (result: ActionRunnable.Result) -> Unit) {
|
onPostExecute: (result: ActionRunnable.Result) -> Unit) {
|
||||||
mAllowFinishAction.set(false)
|
mAllowFinishAction.set(false)
|
||||||
|
|
||||||
// Stop the opening notification
|
|
||||||
DatabaseOpenNotificationService.stop(this)
|
|
||||||
TimeoutHelper.temporarilyDisableTimeout()
|
TimeoutHelper.temporarilyDisableTimeout()
|
||||||
onPreExecute.invoke()
|
onPreExecute.invoke()
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
@@ -228,27 +235,20 @@ class DatabaseTaskNotificationService : NotificationService(), ProgressTaskUpdat
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
onPostExecute.invoke(asyncResult.await())
|
try {
|
||||||
TimeoutHelper.releaseTemporarilyDisableTimeout()
|
onPostExecute.invoke(asyncResult.await())
|
||||||
// Start the opening notification
|
} finally {
|
||||||
if (TimeoutHelper.checkTimeAndLockIfTimeout(this@DatabaseTaskNotificationService)) {
|
TimeoutHelper.releaseTemporarilyDisableTimeout()
|
||||||
DatabaseOpenNotificationService.start(this@DatabaseTaskNotificationService)
|
// Start the opening notification
|
||||||
|
if (TimeoutHelper.checkTimeAndLockIfTimeout(this@DatabaseTaskNotificationService)) {
|
||||||
|
DatabaseOpenNotificationService.start(this@DatabaseTaskNotificationService)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun newNotification(title: Int) {
|
|
||||||
|
|
||||||
val builder = buildNewNotification()
|
|
||||||
.setSmallIcon(R.drawable.notification_ic_database_load)
|
|
||||||
.setContentTitle(getString(title))
|
|
||||||
.setAutoCancel(false)
|
|
||||||
.setContentIntent(null)
|
|
||||||
startForeground(notificationId, builder.build())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun updateMessage(resId: Int) {
|
override fun updateMessage(resId: Int) {
|
||||||
mMessageId = resId
|
mMessageId = resId
|
||||||
mActionTaskListeners.forEach { actionTaskListener ->
|
mActionTaskListeners.forEach { actionTaskListener ->
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
package com.kunzisoft.keepass.tasks
|
package com.kunzisoft.keepass.tasks
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import com.kunzisoft.keepass.database.exception.DatabaseException
|
import com.kunzisoft.keepass.database.exception.DatabaseException
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,18 +49,26 @@ abstract class ActionRunnable: Runnable {
|
|||||||
result.isSuccess = false
|
result.isSuccess = false
|
||||||
result.exception = null
|
result.exception = null
|
||||||
result.message = message
|
result.message = message
|
||||||
|
showLog()
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun setError(exception: Exception) {
|
protected fun setError(exception: Exception) {
|
||||||
result.isSuccess = false
|
result.isSuccess = false
|
||||||
result.exception = null
|
result.exception = null
|
||||||
result.message = exception.message
|
result.message = exception.message
|
||||||
|
showLog()
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun setError(exception: DatabaseException) {
|
protected fun setError(exception: DatabaseException) {
|
||||||
result.isSuccess = false
|
result.isSuccess = false
|
||||||
result.exception = exception
|
result.exception = exception
|
||||||
result.message = exception.message
|
result.message = exception.message
|
||||||
|
showLog()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showLog() {
|
||||||
|
val message = if (result.message != null) ", message=${result.message}" else ""
|
||||||
|
Log.e(TAG, "success=${result.isSuccess}$message", result.exception)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,4 +78,8 @@ abstract class ActionRunnable: Runnable {
|
|||||||
var message: String? = null,
|
var message: String? = null,
|
||||||
var exception: DatabaseException? = null,
|
var exception: DatabaseException? = null,
|
||||||
var data: Bundle? = null)
|
var data: Bundle? = null)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val TAG = "ActionRunnable"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,6 +343,11 @@
|
|||||||
<string name="keyboard_keys_category">Touches</string>
|
<string name="keyboard_keys_category">Touches</string>
|
||||||
<string name="keyboard_key_vibrate_title">Touches vibrantes</string>
|
<string name="keyboard_key_vibrate_title">Touches vibrantes</string>
|
||||||
<string name="keyboard_key_sound_title">Appui clavier audible</string>
|
<string name="keyboard_key_sound_title">Appui clavier audible</string>
|
||||||
|
<string name="keyboard_change">Changement de clavier</string>
|
||||||
|
<string name="keyboard_previous_database_credentials_title">Écran des identifications de la base de données</string>
|
||||||
|
<string name="keyboard_previous_database_credentials_summary">Revenir automatiquement au clavier précédent sur l\'écran des identifications de la base de données</string>
|
||||||
|
<string name="keyboard_previous_fill_in_title">Action de touche automatique</string>
|
||||||
|
<string name="keyboard_previous_fill_in_summary">Revenir automatiquement au clavier précédent après avoir exécuté "Action de touche automatique"</string>
|
||||||
<string name="selection_mode">Mode sélection</string>
|
<string name="selection_mode">Mode sélection</string>
|
||||||
<string name="do_not_kill_app">Veuillez ne pas tuer l’application…</string>
|
<string name="do_not_kill_app">Veuillez ne pas tuer l’application…</string>
|
||||||
<string name="lock_database_back_root_title">Appuyer sur « Retour » pour verrouiller</string>
|
<string name="lock_database_back_root_title">Appuyer sur « Retour » pour verrouiller</string>
|
||||||
|
|||||||
@@ -381,11 +381,11 @@
|
|||||||
<string name="keyboard_auto_go_action_summary">\"Go\" key action after pressing a \"Field\" key</string>
|
<string name="keyboard_auto_go_action_summary">\"Go\" key action after pressing a \"Field\" key</string>
|
||||||
<string name="keyboard_key_vibrate_title">Vibratory keypresses</string>
|
<string name="keyboard_key_vibrate_title">Vibratory keypresses</string>
|
||||||
<string name="keyboard_key_sound_title">Audible keypresses</string>
|
<string name="keyboard_key_sound_title">Audible keypresses</string>
|
||||||
<string name="keyboard_change">Keyboard change</string>
|
<string name="keyboard_change">Switch keyboard</string>
|
||||||
<string name="keyboard_previous_database_credentials_title">Previous keyboard during database credentials</string>
|
<string name="keyboard_previous_database_credentials_title">Database credentials screen</string>
|
||||||
<string name="keyboard_previous_database_credentials_summary">Automatically back to the previous keyboard if the database credentials screen is shown</string>
|
<string name="keyboard_previous_database_credentials_summary">Automatically switch back to the previous keyboard on the database credentials screen</string>
|
||||||
<string name="keyboard_previous_fill_in_title">Previous keyboard after form filling</string>
|
<string name="keyboard_previous_fill_in_title">Auto key action</string>
|
||||||
<string name="keyboard_previous_fill_in_summary">Automatically back to the previous keyboard if the form is filling and "Go" key action is auto activated</string>
|
<string name="keyboard_previous_fill_in_summary">Automatically switch back to the previous keyboard after executing "Auto key action"</string>
|
||||||
<string name="autofill_auto_search_title">Auto search</string>
|
<string name="autofill_auto_search_title">Auto search</string>
|
||||||
<string name="autofill_auto_search_summary">Automatically suggest search results from the web domain or application ID</string>
|
<string name="autofill_auto_search_summary">Automatically suggest search results from the web domain or application ID</string>
|
||||||
<string name="autofill_application_id_blocklist_title">Application blocklist</string>
|
<string name="autofill_application_id_blocklist_title">Application blocklist</string>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Install _fastlane_ using
|
|||||||
```
|
```
|
||||||
[sudo] gem install fastlane -NV
|
[sudo] gem install fastlane -NV
|
||||||
```
|
```
|
||||||
or alternatively using `brew cask install fastlane`
|
or alternatively using `brew install fastlane`
|
||||||
|
|
||||||
# Available Actions
|
# Available Actions
|
||||||
## Android
|
## Android
|
||||||
|
|||||||
@@ -1,7 +1,2 @@
|
|||||||
* Fix TOTP period (> 60s)
|
* Capture exceptions in coroutines
|
||||||
* Fix searching in recycle bin
|
|
||||||
* Settings to back to the previous keyboard during database credentials and after form filling
|
|
||||||
* Improving action tasks
|
|
||||||
* Improve recognition to reset app timeout
|
|
||||||
* Fix minor issues
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1 @@
|
|||||||
* Correction de la période pour le TOTP (> 60s)
|
* Capture des exceptions dans les coroutines
|
||||||
* Correction de la recherche dans la corbeille
|
|
||||||
* Paramètres pour revenir automatiquement au clavier précédent durant l'identification de la base et après le remplissage de formulaire
|
|
||||||
* Amélioration des tâches d'action
|
|
||||||
* Amélioration de la reconnaissance pour le temps écoulé
|
|
||||||
* Correction de problèmes mineurs
|
|
||||||
|
|||||||
Reference in New Issue
Block a user