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

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

This commit is contained in:
Colin Lee 2019-04-21 19:00:16 -05:00 committed by Emily Kager
parent cb8fafa685
commit e0bd5a33c3

View File

@ -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 { companion object {
private const val REQUEST_CODE_CAMERA_PERMISSIONS = 1 private const val REQUEST_CODE_CAMERA_PERMISSIONS = 1
} }