Minor code improvement
This commit is contained in:
parent
70e23a72ba
commit
774a81e09f
2 changed files with 4 additions and 3 deletions
|
@ -46,7 +46,7 @@ abstract class BaseSecurityTab(context: Context, attrs: AttributeSet) : Relative
|
|||
} else {
|
||||
updateTitle(context.getString(wrongTextRes), context.getColor(R.color.md_red))
|
||||
titleTextView.blink()
|
||||
handler.postDelayed(1000) {
|
||||
handler.postDelayed(delayInMillis = 1000) {
|
||||
updateTitle(context.getString(defaultTextRes), context.getProperTextColor())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.util.AttributeSet
|
|||
import android.view.MotionEvent
|
||||
import android.widget.TextView
|
||||
import androidx.biometric.auth.AuthPromptHost
|
||||
import androidx.core.os.postDelayed
|
||||
import com.andrognito.patternlockview.PatternLockView
|
||||
import com.andrognito.patternlockview.listener.PatternLockViewListener
|
||||
import com.andrognito.patternlockview.utils.PatternLockUtils
|
||||
|
@ -96,12 +97,12 @@ class PatternTab(context: Context, attrs: AttributeSet) : BaseSecurityTab(contex
|
|||
else -> {
|
||||
onIncorrectPassword()
|
||||
binding.patternLockView.setViewMode(PatternLockView.PatternViewMode.WRONG)
|
||||
Handler().postDelayed({
|
||||
Handler().postDelayed(delayInMillis = 1000) {
|
||||
binding.patternLockView.clearPattern()
|
||||
if (requiredHash.isEmpty()) {
|
||||
computedHash = ""
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue