Skip to content

Commit

Permalink
Use activity context for Toast.makeText
Browse files Browse the repository at this point in the history
  • Loading branch information
g-jiannan committed May 10, 2024
1 parent bcaaf1a commit 155a883
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal class RequestPermissionActivity : Activity() {
grantResults: IntArray
) {
if (!hasTargetPermission()) {
Toast.makeText(application, R.string.leak_canary_permission_not_granted, LENGTH_LONG)
Toast.makeText(this, R.string.leak_canary_permission_not_granted, LENGTH_LONG)
.show()
}
finish()
Expand Down

0 comments on commit 155a883

Please sign in to comment.