mirror of
https://github.com/beemdevelopment/Aegis
synced 2024-09-06 16:03:30 +00:00
Ignore any menu clicks before the camera is ready in ScannerActivity
This commit is contained in:
parent
b98a5c55bc
commit
74ecdec637
|
@ -109,6 +109,10 @@ public class ScannerActivity extends AegisActivity implements QrCodeAnalyzer.Lis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
if (_cameraProvider == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (item.getItemId() == R.id.action_camera) {
|
if (item.getItemId() == R.id.action_camera) {
|
||||||
unbindPreview(_cameraProvider);
|
unbindPreview(_cameraProvider);
|
||||||
_currentLens = _currentLens == CameraSelector.LENS_FACING_BACK ? CameraSelector.LENS_FACING_FRONT : CameraSelector.LENS_FACING_BACK;
|
_currentLens = _currentLens == CameraSelector.LENS_FACING_BACK ? CameraSelector.LENS_FACING_FRONT : CameraSelector.LENS_FACING_BACK;
|
||||||
|
|
Loading…
Reference in a new issue