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 8e9a37c4632..eac267db14c 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 @@ -9,8 +9,10 @@ * @author Abel García de Prada * @author Juan Carlos Garrote Gascón * @author David Crespo Ríos + * @author Aitor Ballesteros Pavón + * * Copyright (C) 2011 Bartek Przybylski - * Copyright (C) 2021 ownCloud GmbH. + * Copyright (C) 2024 ownCloud GmbH. *

* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -443,6 +445,22 @@ class PassCodeActivity : AppCompatActivity(), NumberKeyboardListener, EnableBiom } } + override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean { + return when (keyCode) { + KeyEvent.KEYCODE_TAB -> { + findViewById(R.id.lock_time).requestFocus() + true + } + KeyEvent.KEYCODE_DPAD_DOWN -> { + if (!findViewById(R.id.numberKeyboard).hasFocus()){ + findViewById(R.id.numberKeyboard).requestFocus() + } + true + } + else -> super.onKeyUp(keyCode, event) + } + } + companion object { const val ACTION_CREATE = "ACTION_REQUEST_WITH_RESULT" const val ACTION_REMOVE = "ACTION_CHECK_WITH_RESULT"