mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
fix: use UI context for more Toast
s
Fixes: a3b88c1dee
("fix: use activity context for Toast")
This commit is contained in:
@@ -192,7 +192,7 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
|
|||||||
// users though, who might deduce that the screen lock
|
// users though, who might deduce that the screen lock
|
||||||
// protection is not effective. Hence, we fail with an error.
|
// protection is not effective. Hence, we fail with an error.
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
callingActivity.applicationContext,
|
callingActivity,
|
||||||
R.string.biometric_auth_generic_failure,
|
R.string.biometric_auth_generic_failure,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
)
|
)
|
||||||
|
@@ -88,7 +88,7 @@ internal val AssistStructure.ViewNode.webOrigin: String?
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@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
|
private val applicationContext = context.applicationContext
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ public class FixedSaveCallback(context: Context, private val callback: SaveCallb
|
|||||||
// See
|
// See
|
||||||
// https://developer.android.com/reference/android/service/autofill/SaveCallback#onFailure(java.lang.CharSequence)
|
// https://developer.android.com/reference/android/service/autofill/SaveCallback#onFailure(java.lang.CharSequence)
|
||||||
if (applicationContext.applicationInfo.targetSdkVersion >= 29) {
|
if (applicationContext.applicationInfo.targetSdkVersion >= 29) {
|
||||||
Toast.makeText(applicationContext, message, Toast.LENGTH_LONG).show()
|
Toast.makeText(context, message, Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user