diff --git a/CHANGELOG b/CHANGELOG index e17546cc7..8ae862fa1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +KeePassDX(3.0.0) + * Fix search with non-latin chars #971 + * Fix action mode with search #972 (rollback ignore accents #945) + * Fix timeout with 0s #974 + KeePassDX(2.9.19) * Fix search slowdown #964 * Fix closing notification after lock request #965 diff --git a/app/build.gradle b/app/build.gradle index 8687ebaea..233c03f38 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.kunzisoft.keepass" minSdkVersion 15 targetSdkVersion 30 - versionCode = 73 - versionName = "2.9.19" + versionCode = 75 + versionName = "2.9.20" multiDexEnabled true testApplicationId = "com.kunzisoft.keepass.tests" diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.kt b/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.kt index 1e3b8f606..db5c0011f 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.kt +++ b/app/src/main/java/com/kunzisoft/keepass/activities/GroupActivity.kt @@ -382,6 +382,7 @@ class GroupActivity : LockingActivity(), Log.d(TAG, "setNewIntent: $intentNotNull") setIntent(intentNotNull) if (Intent.ACTION_SEARCH == intentNotNull.action) { + finishNodeAction() // only one instance of search in backstack deletePreviousSearchGroup() openGroup(retrieveCurrentGroup(intentNotNull, null), true) diff --git a/app/src/main/java/com/kunzisoft/keepass/database/search/SearchHelper.kt b/app/src/main/java/com/kunzisoft/keepass/database/search/SearchHelper.kt index 75b30734f..3e49e3e69 100644 --- a/app/src/main/java/com/kunzisoft/keepass/database/search/SearchHelper.kt +++ b/app/src/main/java/com/kunzisoft/keepass/database/search/SearchHelper.kt @@ -29,7 +29,6 @@ import com.kunzisoft.keepass.model.SearchInfo import com.kunzisoft.keepass.otp.OtpEntryFields.OTP_FIELD import com.kunzisoft.keepass.settings.PreferencesUtil import com.kunzisoft.keepass.timeout.TimeoutHelper -import com.kunzisoft.keepass.utils.StringUtil.flattenToAscii import com.kunzisoft.keepass.utils.UuidUtil class SearchHelper { @@ -177,13 +176,13 @@ class SearchHelper { // TODO Search settings var regularExpression = false var ignoreCase = true - var flattenToASCII = true + var removeAccents = true <- Too much time, to study var excludeExpired = false var searchOnlyInCurrentGroup = false */ return stringToCheck.isNotEmpty() - && stringToCheck.flattenToAscii().contains( - searchParameters.searchQuery.flattenToAscii(), true) + && stringToCheck.contains( + searchParameters.searchQuery, true) } } } diff --git a/app/src/main/java/com/kunzisoft/keepass/services/ClipboardEntryNotificationService.kt b/app/src/main/java/com/kunzisoft/keepass/services/ClipboardEntryNotificationService.kt index 83cb4534d..58a9d0a7d 100644 --- a/app/src/main/java/com/kunzisoft/keepass/services/ClipboardEntryNotificationService.kt +++ b/app/src/main/java/com/kunzisoft/keepass/services/ClipboardEntryNotificationService.kt @@ -37,7 +37,6 @@ class ClipboardEntryNotificationService : LockNotificationService() { override val notificationId = 485 private var mEntryInfo: EntryInfo? = null private var clipboardHelper: ClipboardHelper? = null - private var mNotificationTimeoutMilliSecs: Long = 0 override fun retrieveChannelId(): String { return CHANNEL_CLIPBOARD_ID @@ -68,9 +67,6 @@ class ClipboardEntryNotificationService : LockNotificationService() { // Get entry info from intent mEntryInfo = intent?.getParcelableExtra(EXTRA_ENTRY_INFO) - //Get settings - mNotificationTimeoutMilliSecs = PreferencesUtil.getClipboardTimeout(this) - when { intent == null -> Log.w(TAG, "null intent") ACTION_NEW_NOTIFICATION == intent.action -> { @@ -169,8 +165,10 @@ class ClipboardEntryNotificationService : LockNotificationService() { this, 0, cleanIntent, PendingIntent.FLAG_UPDATE_CURRENT) builder.setDeleteIntent(cleanPendingIntent) - if (mNotificationTimeoutMilliSecs != NEVER) { - defineTimerJob(builder, mNotificationTimeoutMilliSecs, { + //Get settings + val notificationTimeoutMilliSecs = PreferencesUtil.getClipboardTimeout(this) + if (notificationTimeoutMilliSecs != NEVER) { + defineTimerJob(builder, notificationTimeoutMilliSecs, { val newGeneratedValue = fieldToCopy.getGeneratedValue(mEntryInfo) // New auto generated value if (generatedValue != newGeneratedValue) { diff --git a/app/src/main/java/com/kunzisoft/keepass/services/NotificationService.kt b/app/src/main/java/com/kunzisoft/keepass/services/NotificationService.kt index f9faf3c93..8cb27eef0 100644 --- a/app/src/main/java/com/kunzisoft/keepass/services/NotificationService.kt +++ b/app/src/main/java/com/kunzisoft/keepass/services/NotificationService.kt @@ -80,17 +80,22 @@ abstract class NotificationService : Service() { actionEnd: () -> Unit) { mTimerJob?.cancel() mTimerJob = CoroutineScope(Dispatchers.Main).launch { - val timeoutInSeconds = timeoutMilliseconds / 1000L - for (currentTime in timeoutInSeconds downTo 0) { - actionAfterASecond?.invoke() - builder.setProgress(100, - (currentTime * 100 / timeoutInSeconds).toInt(), - false) - startForeground(notificationId, builder.build()) - delay(1000) - if (currentTime <= 0) { - actionEnd() + if (timeoutMilliseconds > 0) { + val timeoutInSeconds = timeoutMilliseconds / 1000L + for (currentTime in timeoutInSeconds downTo 0) { + actionAfterASecond?.invoke() + builder.setProgress(100, + (currentTime * 100 / timeoutInSeconds).toInt(), + false) + startForeground(notificationId, builder.build()) + delay(1000) + if (currentTime <= 0) { + actionEnd() + } } + } else { + // If timeout is 0, run action once + actionEnd() } notificationManager?.cancel(notificationId) mTimerJob = null diff --git a/app/src/main/java/com/kunzisoft/keepass/utils/StringUtil.kt b/app/src/main/java/com/kunzisoft/keepass/utils/StringUtil.kt index 3f9aebce8..5ef84cefc 100644 --- a/app/src/main/java/com/kunzisoft/keepass/utils/StringUtil.kt +++ b/app/src/main/java/com/kunzisoft/keepass/utils/StringUtil.kt @@ -12,20 +12,5 @@ object StringUtil { return this.replace("[\\r|\\n|\\t|\\s|\\u00A0]+".toRegex(), "") } - fun String.flattenToAscii(): String { - var string = this - val out = CharArray(string.length) - string = Normalizer.normalize(string, Normalizer.Form.NFD) - var j = 0 - var i = 0 - val n = string.length - while (i < n) { - val c = string[i] - if (c <= '\u007F') out[j++] = c - ++i - } - return String(out) - } - fun ByteArray.toHexString() = joinToString("") { "%02X".format(it) } } \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6a0bba937..18faaca55 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -49,9 +49,9 @@ platform :android do lane :deploy_beta_free do upload_to_play_store( track: "beta", - skip_upload_metadata: "false", - skip_upload_images: "false", - skip_upload_screenshots: "false", + skip_upload_metadata: "true", + skip_upload_images: "true", + skip_upload_screenshots: "true", apk: "./app/build/outputs/apk/free/release/app-free-release.apk", validate_only: "false", ) @@ -62,9 +62,9 @@ platform :android do sh("cp", "-a", "./pro/.", "./") upload_to_play_store( track: "beta", - skip_upload_metadata: "false", - skip_upload_images: "false", - skip_upload_screenshots: "false", + skip_upload_metadata: "true", + skip_upload_images: "true", + skip_upload_screenshots: "true", apk: "./app/build/outputs/apk/pro/release/app-pro-release.apk", validate_only: "false", ) diff --git a/fastlane/metadata/android/en-US/changelogs/74.txt b/fastlane/metadata/android/en-US/changelogs/74.txt new file mode 100644 index 000000000..f4f0353d0 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/74.txt @@ -0,0 +1,3 @@ + * Fix search with non-latin chars #971 + * Fix action mode with search #972 (rollback ignore accents #945) + * Fix timeout with 0s #974 \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/74.txt b/fastlane/metadata/android/fr-FR/changelogs/74.txt new file mode 100644 index 000000000..a3e72b1a8 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/74.txt @@ -0,0 +1,3 @@ + * Correction de la recherche avec des caractères non latin #971 + * Correction du mode action avec la recherche #972 (retour arrière des accents ignorés #945) + * Correction de l'expiration de temps à 0s #974 \ No newline at end of file