From 3e6d40e8da7d2dd656f869900fdc5ee9511f7ef4 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Mon, 11 Jan 2021 21:33:25 +0100 Subject: [PATCH] Better autofill suggestion toast --- .../java/com/kunzisoft/keepass/autofill/AutofillHelper.kt | 5 ++--- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt b/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt index 482b42a85..f169c2655 100644 --- a/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt +++ b/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt @@ -176,8 +176,7 @@ object AutofillHelper { // Add inline suggestion for new IME and dataset entriesInfo.forEachIndexed { index, entryInfo -> val inlinePresentation = inlineSuggestionsRequest?.let { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R - && PreferencesUtil.isAutofillInlineSuggestionsEnable(context)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { buildInlinePresentationForEntry(context, inlineSuggestionsRequest, index, entryInfo) } else { null @@ -209,7 +208,7 @@ object AutofillHelper { val inlineSuggestionsRequest = activity.intent?.getParcelableExtra(EXTRA_INLINE_SUGGESTIONS_REQUEST) val response = buildResponse(activity, entriesInfo, result, inlineSuggestionsRequest) if (inlineSuggestionsRequest != null) { - Toast.makeText(activity.applicationContext, R.string.autofill_inline_suggestions_keyboard, Toast.LENGTH_LONG).show() + Toast.makeText(activity.applicationContext, R.string.autofill_inline_suggestions_keyboard, Toast.LENGTH_SHORT).show() } val mReplyIntent = Intent() Log.d(activity.javaClass.name, "Successed Autofill auth.") diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d0934118a..9dd03860d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -445,7 +445,7 @@ Block autofill Restart the app containing the form to activate the blocking. Data save is not allowed for a database opened as read-only. - Inline autofill suggestions has been added to your keyboard. + Autofill suggestions added. Allow no master key Allows tapping the \"Open\" button if no credentials are selected Delete password