From f3b814388da78d95518e6d3966c258dbb3ebaadf Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sat, 9 Jan 2021 15:02:29 +0100 Subject: [PATCH] Add toast to inform the user of inline suggestions in the keyboard --- .../java/com/kunzisoft/keepass/autofill/AutofillHelper.kt | 4 ++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 5 insertions(+) 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 fb50eaf4f..a30a19d40 100644 --- a/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt +++ b/app/src/main/java/com/kunzisoft/keepass/autofill/AutofillHelper.kt @@ -36,6 +36,7 @@ import android.view.autofill.AutofillManager import android.view.autofill.AutofillValue import android.view.inputmethod.InlineSuggestionsRequest import android.widget.RemoteViews +import android.widget.Toast import androidx.annotation.RequiresApi import androidx.autofill.inline.UiVersions import androidx.autofill.inline.v1.InlineSuggestionUi @@ -204,6 +205,9 @@ object AutofillHelper { // New Response 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() + } val mReplyIntent = Intent() Log.d(activity.javaClass.name, "Successed Autofill auth.") mReplyIntent.putExtra( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 295f5dc3d..d0934118a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -445,6 +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. Allow no master key Allows tapping the \"Open\" button if no credentials are selected Delete password