Compare commits

...

13 Commits

Author SHA1 Message Date
J-Jamet
8baae8b801 Merge branch 'release/2.9.20' 2021-04-30 11:28:03 +02:00
J-Jamet
9f16f26347 skip unchanged fastlane elements to deploy 2021-04-29 22:23:51 +02:00
J-Jamet
69b4cacab4 Upgrade version code to deploy beta 2021-04-29 22:23:13 +02:00
J-Jamet
b74b5040b1 Better timeout setting integration #974 2021-04-29 21:57:25 +02:00
J-Jamet
a28decc854 Fix timeout with 0s #974 2021-04-29 21:45:39 +02:00
J-Jamet
cb59cef1b8 Remove unused dependency 2021-04-29 12:37:19 +02:00
J-Jamet
d9b600466c Rollback ignore accents #945 2021-04-29 12:09:53 +02:00
J-Jamet
4edf2f8cd1 Upgrade CHANGELOG 2021-04-29 11:04:33 +02:00
J-Jamet
c60dfdf0d7 Fix search during a node action #972 2021-04-29 10:58:16 +02:00
J-Jamet
006afc6841 Fix search with non-latin chars #971 2021-04-29 10:44:12 +02:00
J-Jamet
f70879581d Change version to fix bugs 2021-04-29 10:35:34 +02:00
J-Jamet
db1d71af9f Upgrade version 2021-04-28 12:04:22 +02:00
J-Jamet
6b03ef35a6 Merge tag '2.9.19' into develop
2.9.19
2021-04-28 10:01:22 +02:00
10 changed files with 42 additions and 43 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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)

View File

@@ -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)
}
}
}

View File

@@ -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) {

View File

@@ -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

View File

@@ -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) }
}

View File

@@ -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",
)

View File

@@ -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

View File

@@ -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