Skip to content
Merged

refactor #16896

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import javax.inject.Inject
import androidx.activity.OnBackPressedCallback

@Suppress("TooManyFunctions", "MagicNumber")
class PassCodeActivity :
Expand Down Expand Up @@ -90,6 +91,20 @@ class PassCodeActivity :
setSoftInputMode()
setupUI(savedInstanceState)
setTextListeners()
handleOnBackPressed()
}

private fun handleOnBackPressed() {
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (intent.action == ACTION_CHECK) return
isEnabled = false
onBackPressedDispatcher.onBackPressed()
}
}
)
}

private fun applyTint() {
Expand Down
Loading