From f7561c488861204e5e7fdb1b770cbe2dad038611 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sun, 29 Mar 2020 15:22:34 +0200 Subject: [PATCH] Upgrade to version 2.5beta31 --- app/build.gradle | 4 ++-- .../kunzisoft/keepass/autofill/StructureParser.kt | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4ed1e26eb..c7dc9de22 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.kunzisoft.keepass" minSdkVersion 14 targetSdkVersion 29 - versionCode = 30 - versionName = "2.5beta30" + versionCode = 31 + versionName = "2.5beta31" multiDexEnabled true testApplicationId = "com.kunzisoft.keepass.tests" diff --git a/app/src/main/java/com/kunzisoft/keepass/autofill/StructureParser.kt b/app/src/main/java/com/kunzisoft/keepass/autofill/StructureParser.kt index c22fe810a..c74455abb 100644 --- a/app/src/main/java/com/kunzisoft/keepass/autofill/StructureParser.kt +++ b/app/src/main/java/com/kunzisoft/keepass/autofill/StructureParser.kt @@ -85,22 +85,22 @@ internal class StructureParser(private val structure: AssistStructure) { val autofillId = node.autofillId node.autofillHints?.forEach { when { - it.toLowerCase(Locale.ENGLISH) == View.AUTOFILL_HINT_USERNAME - || it.toLowerCase(Locale.ENGLISH) == View.AUTOFILL_HINT_EMAIL_ADDRESS - || it.toLowerCase(Locale.ENGLISH) == View.AUTOFILL_HINT_PHONE -> { + it.equals(View.AUTOFILL_HINT_USERNAME, true) + || it.equals(View.AUTOFILL_HINT_EMAIL_ADDRESS, true) + || it.equals(View.AUTOFILL_HINT_PHONE, true) -> { result?.usernameId = autofillId Log.d(TAG, "Autofill username hint") } - it.toLowerCase(Locale.ENGLISH) == View.AUTOFILL_HINT_PASSWORD - || it.toLowerCase(Locale.ENGLISH).contains("password") -> { + it.equals(View.AUTOFILL_HINT_PASSWORD, true) + || it.contains("password", true) -> { result?.passwordId = autofillId Log.d(TAG, "Autofill password hint") return true } // Ignore autocomplete="off" // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion - it.toLowerCase(Locale.ENGLISH) == "off" || - it.toLowerCase(Locale.ENGLISH) == "on" -> { + it.equals("off", true) || + it.equals("on", true) -> { Log.d(TAG, "Autofill web hint") return parseNodeByHtmlAttributes(node) }