forked from shihaam/thijooree
new feature: resume last activity after unlocking instead of goind to dashboard everytime
This commit is contained in:
@@ -39,6 +39,7 @@ class LockActivity : AppCompatActivity() {
|
||||
companion object {
|
||||
private const val MAX_ATTEMPTS = 5
|
||||
private const val LOCKOUT_MS = 30_000L
|
||||
const val EXTRA_RESUME = "resume"
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@@ -270,8 +271,12 @@ class LockActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun proceed() {
|
||||
startActivity(Intent(this, HomeActivity::class.java))
|
||||
finish()
|
||||
if (intent.getBooleanExtra(EXTRA_RESUME, false)) {
|
||||
finish()
|
||||
} else {
|
||||
startActivity(Intent(this, HomeActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
// ── Brute-force tracking ──────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user