Merge branch 'develop' into feature/Templates

This commit is contained in:
J-Jamet
2021-05-07 10:44:40 +02:00
6 changed files with 17 additions and 21 deletions

View File

@@ -1,3 +1,7 @@
KeePassDX(3.0.0)
* Fix show button consistency #980
* Fix persistent notification #979
KeePassDX(2.9.20)
* Fix search with non-latin chars #971
* Fix action mode with search #972 (rollback ignore accents #945)

View File

@@ -11,8 +11,8 @@ android {
applicationId "com.kunzisoft.keepass"
minSdkVersion 15
targetSdkVersion 30
versionCode = 75
versionName = "2.9.20"
versionCode = 76
versionName = "3.0.0"
multiDexEnabled true
testApplicationId = "com.kunzisoft.keepass.tests"

View File

@@ -26,8 +26,9 @@ import com.kunzisoft.keepass.utils.unregisterLockReceiver
abstract class LockNotificationService : NotificationService() {
private var onStart: Boolean = false
private var mLockReceiver: LockReceiver? = null
private var mLockReceiver: LockReceiver = LockReceiver {
actionOnLock()
}
protected open fun actionOnLock() {
// Stop the service in all cases
@@ -36,30 +37,17 @@ abstract class LockNotificationService : NotificationService() {
override fun onCreate() {
super.onCreate()
// Register a lock receiver to stop notification service when lock on keyboard is performed
mLockReceiver = LockReceiver {
if (onStart)
actionOnLock()
}
registerLockReceiver(mLockReceiver)
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
onStart = true
return super.onStartCommand(intent, flags, startId)
}
override fun onTaskRemoved(rootIntent: Intent?) {
notificationManager?.cancel(notificationId)
stopSelf()
super.onTaskRemoved(rootIntent)
}
override fun onDestroy() {
unregisterLockReceiver(mLockReceiver)
mLockReceiver = null
super.onDestroy()
}
}

View File

@@ -46,10 +46,10 @@ class EntryField @JvmOverloads constructor(context: Context,
var hiddenProtectedValue: Boolean
get() {
return showButtonView.isSelected
return !showButtonView.isSelected
}
set(value) {
showButtonView.isSelected = !value
showButtonView.isSelected = value
changeProtectedValueParameters()
}
@@ -101,7 +101,7 @@ class EntryField @JvmOverloads constructor(context: Context,
} else {
setTextIsSelectable(true)
}
applyHiddenStyle(isProtected && !showButtonView.isSelected)
applyHiddenStyle(isProtected && showButtonView.isSelected)
if (!isProtected) linkify()
}
}

View File

@@ -0,0 +1,2 @@
* Fix show button consistency #980
* Fix persistent notification #979

View File

@@ -0,0 +1,2 @@
* Correction de la consistance du bouton de visibilité #980
* Correction de la notification persistante #979