[fenix] No issue: null check context on permission granted (https://github.com/mozilla-mobile/fenix/pull/2104)

pull/600/head
Emily Kager 6 years ago committed by Colin Lee
parent bba86e65e0
commit 9099260411

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

Loading…
Cancel
Save