1
0
Fork 0

For #1851: QR code scanner doesn't load right after permission grant

master
Colin Lee 2019-04-21 19:00:16 -05:00 committed by Emily Kager
parent 5b4effa96a
commit 6199d31924
1 changed files with 9 additions and 0 deletions

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