From 4d88786fb647dc102634794aaec7453666f502dd Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 20 Mar 2020 16:22:38 +0100 Subject: [PATCH] Force TOTP --- .../info/nightscout/androidaps/utils/OneTimePasswords.kt | 2 +- app/src/main/res/values/strings.xml | 2 +- app/src/main/res/xml/pref_smscommunicator.xml | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/utils/OneTimePasswords.kt b/app/src/main/java/info/nightscout/androidaps/utils/OneTimePasswords.kt index 8da54d49b7..16b0241ea4 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/OneTimePasswords.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/OneTimePasswords.kt @@ -74,7 +74,7 @@ class OneTimePassword @Inject constructor( private fun configure() { ensureKey() - pin = sp.getString(R.string.key_smscommunicator_otp_pin, "").trim() + pin = sp.getString(R.string.key_smscommunicator_otp_password, "").trim() } private fun generateOneTimePassword(counter: Long): String { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d61ab58114..d468293d79 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1707,7 +1707,7 @@ smscommunicator_otp_enabled smscommunicator_otp_name - smscommunicator_otp_pin + smscommunicator_otp_password smscommunicator_otp_secret User diff --git a/app/src/main/res/xml/pref_smscommunicator.xml b/app/src/main/res/xml/pref_smscommunicator.xml index 8b9f6f429c..42d778c333 100644 --- a/app/src/main/res/xml/pref_smscommunicator.xml +++ b/app/src/main/res/xml/pref_smscommunicator.xml @@ -28,13 +28,14 @@ validate:testType="numericRange" /> + android:summary="@string/smscommunicator_otp_enabled_summary" + android:title="@string/smscommunicator_otp_enabled" />