From 16d6b1e85341c5ffd55e63aed7680e42c7d8d931 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 8 Mar 2023 22:59:12 +0530 Subject: fix: use UI context for more `Toast`s Fixes: a3b88c1dee86 ("fix: use activity context for Toast") --- .../com/github/androidpasswordstore/autofillparser/AutofillHelper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autofill-parser') diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt index 0b4f491d..dbdfad17 100644 --- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt +++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillHelper.kt @@ -88,7 +88,7 @@ internal val AssistStructure.ViewNode.webOrigin: String? } @RequiresApi(Build.VERSION_CODES.O) -public class FixedSaveCallback(context: Context, private val callback: SaveCallback) { +public class FixedSaveCallback(private val context: Context, private val callback: SaveCallback) { private val applicationContext = context.applicationContext @@ -98,7 +98,7 @@ public class FixedSaveCallback(context: Context, private val callback: SaveCallb // See // https://developer.android.com/reference/android/service/autofill/SaveCallback#onFailure(java.lang.CharSequence) if (applicationContext.applicationInfo.targetSdkVersion >= 29) { - Toast.makeText(applicationContext, message, Toast.LENGTH_LONG).show() + Toast.makeText(context, message, Toast.LENGTH_LONG).show() } } -- cgit v1.2.3