Skip to content

Commit

Permalink
fix: Ktlint reports fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Aug 20, 2024
1 parent 66d991c commit c8693bd
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
binding.explanation.visibility = View.INVISIBLE
supportActionBar?.setDisplayHomeAsUpEnabled(false) //Don´t show the back arrow
}

ACTION_CREATE -> { //Create a new password
if (confirmingPassCode) {
//the app was in the passcode confirmation
Expand All @@ -138,22 +139,26 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
intent.extras?.getBoolean(EXTRAS_MIGRATION) == true -> {
supportActionBar?.setDisplayHomeAsUpEnabled(false)
}

intent.extras?.getBoolean(EXTRAS_LOCK_ENFORCED) == true -> {
supportActionBar?.setDisplayHomeAsUpEnabled(false)
}

else -> {
supportActionBar?.setDisplayHomeAsUpEnabled(true)
}
}
}
}

ACTION_REMOVE -> { // Remove password
// pass code preference has just been disabled in Preferences;
// will confirm user knows pass code, then remove it
binding.header.text = getString(R.string.pass_code_remove_your_pass_code)
binding.explanation.visibility = View.INVISIBLE
supportActionBar?.setDisplayHomeAsUpEnabled(true)
}

else -> {
throw IllegalArgumentException(R.string.illegal_argument_exception_message.toString() + " ")
}
Expand Down Expand Up @@ -233,12 +238,14 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
else -> actionCheckError()
}
}

PasscodeAction.REMOVE -> {
when (status.type) {
PasscodeType.OK -> actionRemoveOk()
else -> actionRemoveError()
}
}

PasscodeAction.CREATE -> {
when (status.type) {
PasscodeType.NO_CONFIRM -> actionCreateNoConfirm()
Expand Down Expand Up @@ -423,6 +430,7 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
BiometricStatus.ENABLED_BY_USER -> {
passCodeViewModel.setBiometricsState(enabled = true)
}

BiometricStatus.DISABLED_BY_USER -> {
passCodeViewModel.setBiometricsState(enabled = false)
}
Expand All @@ -436,9 +444,11 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
ACTION_REMOVE -> {
return PasscodeAction.REMOVE
}

ACTION_CREATE -> {
return PasscodeAction.CREATE
}

else -> {
return PasscodeAction.CHECK
}
Expand All @@ -452,7 +462,7 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom
true
}
KeyEvent.KEYCODE_DPAD_DOWN -> {
if (!findViewById<View>(R.id.numberKeyboard).hasFocus()){
if (!findViewById<View>(R.id.numberKeyboard).hasFocus()) {
findViewById<View>(R.id.numberKeyboard).requestFocus()
}
true
Expand Down

0 comments on commit c8693bd

Please sign in to comment.