[fenix] For https://github.com/mozilla-mobile/fenix/issues/1851: QR code scanner doesn't load right after permission grant

pull/600/head
Colin Lee 6 years ago committed by Emily Kager
parent cb8fafa685
commit e0bd5a33c3

@ -229,6 +229,15 @@ class SearchFragment : Fragment() {
}
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
when (requestCode) {
REQUEST_CODE_CAMERA_PERMISSIONS -> qrFeature.withFeature {
it.onPermissionsResult(permissions, grantResults)
}
else -> super.onRequestPermissionsResult(requestCode, permissions, grantResults)
}
}
companion object {
private const val REQUEST_CODE_CAMERA_PERMISSIONS = 1
}

Loading…
Cancel
Save