Skip to content

Commit

Permalink
Merge pull request #3365 from owncloud/fix/select_passcode_fields
Browse files Browse the repository at this point in the history
[FIX] Passcode input misbehaving
  • Loading branch information
abelgardep authored Sep 3, 2021
2 parents 7edd4b9 + 73f22f3 commit 29b669e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ ownCloud admins and users.
Summary
-------

* Bugfix - Passcode input misbehaving: [#3342](https://github.com/owncloud/android/issues/3342)
* Enhancement - Delete old user directories in order to free memory: [#3336](https://github.com/owncloud/android/pull/3336)
* Enhancement - Delete old logs every week: [#3328](https://github.com/owncloud/android/issues/3328)

Details
-------

* Bugfix - Passcode input misbehaving: [#3342](https://github.com/owncloud/android/issues/3342)

Passcode text fields have been made not selectable once a number is written on them, so that we
avoid bugs with the digits of the passcode and the way of entering them.

https://github.com/owncloud/android/issues/3342
https://github.com/owncloud/android/pull/3365

* Enhancement - Delete old user directories in order to free memory: [#3336](https://github.com/owncloud/android/pull/3336)

Previously, when users deleted an account the synchronized files of this account stayed on the
Expand Down
8 changes: 8 additions & 0 deletions changelog/unreleased/3365
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Passcode input misbehaving

Passcode text fields have been made not selectable once a number is written on
them, so that we avoid bugs with the digits of the passcode and the way of
entering them.

https://github.com/owncloud/android/issues/3342
https://github.com/owncloud/android/pull/3365
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class PassCodeActivity : BaseActivity() {
if (i > 0) {
passCodeEditTexts[i]?.setOnKeyListener { v: View, keyCode: Int, _: KeyEvent? ->
if (keyCode == KeyEvent.KEYCODE_DEL && bChange) { // TODO WIP: event should be used to control what's exactly happening with DEL, not any custom field...
passCodeEditTexts[i - 1]?.isEnabled = true
passCodeEditTexts[i - 1]?.setText("")
passCodeEditTexts[i - 1]?.requestFocus()
if (!confirmingPassCode) {
Expand Down Expand Up @@ -286,6 +287,7 @@ class PassCodeActivity : BaseActivity() {
*/
protected fun clearBoxes() {
for (passCodeEditText in passCodeEditTexts) {
passCodeEditText?.isEnabled = true
passCodeEditText?.setText("")
}
passCodeEditTexts[0]?.requestFocus()
Expand Down Expand Up @@ -358,6 +360,7 @@ class PassCodeActivity : BaseActivity() {
passCodeDigits[index] = passCodeEditTexts[index]?.text.toString()
}
passCodeEditTexts[next()]?.requestFocus()
passCodeEditTexts[index]?.isEnabled = false
if (lastOne) {
processFullPassCode()
}
Expand Down

0 comments on commit 29b669e

Please sign in to comment.