Add option to disable auto lock and add manual locking

This commit is contained in:
NerdNumber9
2018-03-14 18:39:01 -04:00
parent 0dd9e9e015
commit c48bebe0b2
11 changed files with 102 additions and 26 deletions

View File

@ -41,12 +41,12 @@ class LockController : NucleusController<LockPresenter>() {
//Setup pin lock
pin_lock_view.attachIndicatorDots(indicator_dots)
pin_lock_view.pinLength = prefs.lockLength().getOrDefault()
pin_lock_view.pinLength = prefs.eh_lockLength().getOrDefault()
pin_lock_view.setPinLockListener(object : PinLockListener {
override fun onEmpty() {}
override fun onComplete(pin: String) {
if (sha512(pin, prefs.lockSalt().get()!!) == prefs.lockHash().get()) {
if (sha512(pin, prefs.eh_lockSalt().get()!!) == prefs.eh_lockHash().get()) {
//Yay!
closeLock()
} else {
@ -120,7 +120,7 @@ class LockController : NucleusController<LockPresenter>() {
private fun resolvColor(color: Int): Int {
val typedVal = TypedValue()
activity!!.theme!!.resolveAttribute(android.R.attr.windowBackground, typedVal, true)
activity!!.theme!!.resolveAttribute(color, typedVal, true)
return typedVal.data
}