fix: use UI context for more Toast
s
Fixes: a3b88c1dee
("fix: use activity context for Toast")
This commit is contained in:
parent
fe921a58b9
commit
16d6b1e853
2 changed files with 3 additions and 3 deletions
|
@ -192,7 +192,7 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
|
|||
// users though, who might deduce that the screen lock
|
||||
// protection is not effective. Hence, we fail with an error.
|
||||
Toast.makeText(
|
||||
callingActivity.applicationContext,
|
||||
callingActivity,
|
||||
R.string.biometric_auth_generic_failure,
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue