mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 06:53:01 +00:00
Ignore any menu clicks before the camera is ready in ScannerActivity
This commit is contained in:
parent
b98a5c55bc
commit
74ecdec637
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,10 @@ public class ScannerActivity extends AegisActivity implements QrCodeAnalyzer.Lis
|
|||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (_cameraProvider == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.getItemId() == R.id.action_camera) {
|
||||
unbindPreview(_cameraProvider);
|
||||
_currentLens = _currentLens == CameraSelector.LENS_FACING_BACK ? CameraSelector.LENS_FACING_FRONT : CameraSelector.LENS_FACING_BACK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue