2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-09 19:10:42 +00:00

No issue: null check context on permission granted (#2104)

This commit is contained in:
Emily Kager 2019-04-26 22:02:50 -07:00 committed by Colin Lee
parent e76c618c2a
commit 97e4f43fda

View File

@ -257,8 +257,10 @@ class SearchFragment : Fragment(), BackHandler {
REQUEST_CODE_CAMERA_PERMISSIONS -> qrFeature.withFeature {
it.onPermissionsResult(permissions, grantResults)
if (context!!.isPermissionGranted(Manifest.permission.CAMERA)) {
permissionDidUpdate = true
context?.let { context: Context ->
if (context.isPermissionGranted(Manifest.permission.CAMERA)) {
permissionDidUpdate = true
}
}
}
else -> super.onRequestPermissionsResult(requestCode, permissions, grantResults)