From e3898c2ae45fb96bf16a7b9182fa91c9a0a023be Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Thu, 22 Aug 2024 13:07:06 +0100 Subject: [PATCH] fix: enable type/delete the passcode with physical keyboard and back enable too --- .../security/passcode/PassCodeActivity.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/security/passcode/PassCodeActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/security/passcode/PassCodeActivity.kt index ab7b260f937..01d3a1ce634 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/security/passcode/PassCodeActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/security/passcode/PassCodeActivity.kt @@ -469,6 +469,23 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom true } + in KeyEvent.KEYCODE_0..KeyEvent.KEYCODE_9 -> { + val number = keyCode - KeyEvent.KEYCODE_0 + passCodeViewModel.onNumberClicked(number) + true + } + + KeyEvent.KEYCODE_DEL -> { + passCodeViewModel.onBackspaceClicked() + true + } + + KeyEvent.KEYCODE_ESCAPE -> { + PassCodeManager.onActivityStopped(this) + super.onBackPressed() + true + } + else -> super.onKeyUp(keyCode, event) } }