From 37b1dd394777f061e75a1c10255c038981569dbe Mon Sep 17 00:00:00 2001 From: nain <126972030+nain-F49FF806@users.noreply.github.com> Date: Sat, 7 Dec 2024 10:52:08 +0000 Subject: [PATCH] Rename TextListener to PasswordTextListener --- .../aer/config/password/ChangePasswordDialog.kt | 4 ++-- .../{TextListener.kt => PasswordTextListener.kt} | 2 +- .../aer/config/password/SetPasswordDialog.kt | 4 ++-- .../java/alt/nainapps/aer/lock/UnlockActivity.kt | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) rename app/src/main/java/alt/nainapps/aer/config/password/{TextListener.kt => PasswordTextListener.kt} (90%) diff --git a/app/src/main/java/alt/nainapps/aer/config/password/ChangePasswordDialog.kt b/app/src/main/java/alt/nainapps/aer/config/password/ChangePasswordDialog.kt index 87b5142..cdbb77f 100644 --- a/app/src/main/java/alt/nainapps/aer/config/password/ChangePasswordDialog.kt +++ b/app/src/main/java/alt/nainapps/aer/config/password/ChangePasswordDialog.kt @@ -57,8 +57,8 @@ class ChangePasswordDialog(activity: Activity, lockStore: LockStore, onSuccess: private fun buildTextListener( passwordField: EditText, repeatField: EditText, positiveBtn: Button - ): TextListener { - return TextListener { + ): PasswordTextListener { + return PasswordTextListener { val passwordValue = passwordField.text.toString() val repeatValue = repeatField.text.toString() if (passwordValue.length < MIN_PASSWORD_LENGTH) { diff --git a/app/src/main/java/alt/nainapps/aer/config/password/TextListener.kt b/app/src/main/java/alt/nainapps/aer/config/password/PasswordTextListener.kt similarity index 90% rename from app/src/main/java/alt/nainapps/aer/config/password/TextListener.kt rename to app/src/main/java/alt/nainapps/aer/config/password/PasswordTextListener.kt index 8e56a4f..6ef56e1 100644 --- a/app/src/main/java/alt/nainapps/aer/config/password/TextListener.kt +++ b/app/src/main/java/alt/nainapps/aer/config/password/PasswordTextListener.kt @@ -7,7 +7,7 @@ package alt.nainapps.aer.config.password import android.text.Editable import android.text.TextWatcher -fun interface TextListener : TextWatcher { +fun interface PasswordTextListener : TextWatcher { override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) { } diff --git a/app/src/main/java/alt/nainapps/aer/config/password/SetPasswordDialog.kt b/app/src/main/java/alt/nainapps/aer/config/password/SetPasswordDialog.kt index 71a5f41..3f8f5fd 100644 --- a/app/src/main/java/alt/nainapps/aer/config/password/SetPasswordDialog.kt +++ b/app/src/main/java/alt/nainapps/aer/config/password/SetPasswordDialog.kt @@ -42,8 +42,8 @@ class SetPasswordDialog(activity: Activity, lockStore: LockStore, onSuccess: Run private fun buildValidator( passwordField: EditText, repeatField: EditText, positiveBtn: Button - ): TextListener { - return TextListener { + ): PasswordTextListener { + return PasswordTextListener { val passwordValue = passwordField.text.toString() val repeatValue = repeatField.text.toString() if (passwordValue.length < MIN_PASSWORD_LENGTH) { diff --git a/app/src/main/java/alt/nainapps/aer/lock/UnlockActivity.kt b/app/src/main/java/alt/nainapps/aer/lock/UnlockActivity.kt index 89e1138..0001a9b 100644 --- a/app/src/main/java/alt/nainapps/aer/lock/UnlockActivity.kt +++ b/app/src/main/java/alt/nainapps/aer/lock/UnlockActivity.kt @@ -4,6 +4,11 @@ */ package alt.nainapps.aer.lock +import alt.nainapps.aer.R +import alt.nainapps.aer.config.ConfigurationActivity +import alt.nainapps.aer.config.password.PasswordTextListener +import alt.nainapps.aer.lock.LockStore.Companion.getInstance +import alt.nainapps.aer.shell.LauncherActivity import android.app.Activity import android.content.DialogInterface import android.content.Intent @@ -15,11 +20,6 @@ import android.widget.Button import android.widget.EditText import android.widget.ImageView import androidx.annotation.RequiresApi -import alt.nainapps.aer.R -import alt.nainapps.aer.config.ConfigurationActivity -import alt.nainapps.aer.config.password.TextListener -import alt.nainapps.aer.lock.LockStore.Companion.getInstance -import alt.nainapps.aer.shell.LauncherActivity class UnlockActivity : Activity() { private var lockStore: LockStore? = null @@ -50,7 +50,7 @@ class UnlockActivity : Activity() { val unlockBtn = findViewById