mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix biometric view visibility
This commit is contained in:
@@ -446,7 +446,6 @@ open class PasswordActivity : SpecialModeActivity() {
|
||||
var biometricInitialize = false
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (PreferencesUtil.isBiometricUnlockEnable(this)) {
|
||||
|
||||
if (advancedUnlockedManager == null && databaseFileUri != null) {
|
||||
advancedUnlockedManager = AdvancedUnlockedManager(this,
|
||||
databaseFileUri,
|
||||
@@ -478,6 +477,7 @@ open class PasswordActivity : SpecialModeActivity() {
|
||||
biometricInitialize = true
|
||||
} else {
|
||||
advancedUnlockedManager?.destroy()
|
||||
advancedUnlockInfoView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
if (!biometricInitialize) {
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
@@ -334,7 +335,9 @@ class AdvancedUnlockedManager(var context: FragmentActivity,
|
||||
}
|
||||
|
||||
private fun showFingerPrintViews(show: Boolean) {
|
||||
context.runOnUiThread { advancedUnlockInfoView?.hide = !show }
|
||||
context.runOnUiThread {
|
||||
advancedUnlockInfoView?.visibility = if (show) View.VISIBLE else View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun setAdvancedUnlockedTitleView(textId: Int) {
|
||||
|
||||
@@ -113,12 +113,4 @@ class AdvancedUnlockInfoView @JvmOverloads constructor(context: Context,
|
||||
message = context.getString(textId)
|
||||
}
|
||||
|
||||
var hide: Boolean
|
||||
get() {
|
||||
return visibility != VISIBLE
|
||||
}
|
||||
set(value) {
|
||||
visibility = if (value) View.GONE else View.VISIBLE
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user