Fenix: FNX3-16836 ⁃ Disable/Remove QR menu items on devices without camera

Created on 5 Jun 2019  ·  3Comments  ·  Source: mozilla-mobile/fenix

Definitely an edge case, but we have a crash in Sentry where the QR scanner was invoked on a device without a camera (Nova Pro e-Reader?): https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/5874872/

We have added a clearer exception for this in A-C and a utility method to check whether or not a camera is available (context.hasCamera()).

May be best to disable the corresponding menu items in this case, or show some other indication that the feature is not available?

P1 crash engverified sourpatch 🐞 bug

Most helpful comment

That is true. On these virtual devices: Nexus 5 (API 27), Galaxy Nexus (API 23), Nexus 6P (API 24) I was able to see that the Scan option is hidden when there is no camera enabled.

All 3 comments

@csadilek We don't have any devices without a camera around here to test on, is it possible for you to test this?

I suspect our only way forward here is to use a VM with the camera set to disabled.

That is true. On these virtual devices: Nexus 5 (API 27), Galaxy Nexus (API 23), Nexus 6P (API 24) I was able to see that the Scan option is hidden when there is no camera enabled.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreicristianpetcu picture andreicristianpetcu  ·  3Comments

bbinto picture bbinto  ·  3Comments

robsmith11 picture robsmith11  ·  3Comments

vesta0 picture vesta0  ·  3Comments

abodea picture abodea  ·  3Comments