Loading app/src/main/java/net/sourceforge/opencamera/MainActivity.java +0 −4 Original line number Diff line number Diff line Loading @@ -2992,10 +2992,6 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen int best_qrcode_camera = -1; if( MyDebug.LOG ) Log.d(TAG, "getBetterQRCodeCameraID"); if( !isMultiCamEnabled() ) { Log.e(TAG, "getBetterQRCodeCameraID switch multi camera icon shouldn't have been visible"); return best_qrcode_camera; } if( preview.isOpeningCamera() ) { if( MyDebug.LOG ) Log.d(TAG, "getBetterQRCodeCameraID already opening camera in background thread"); Loading app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +11 −3 Original line number Diff line number Diff line Loading @@ -9150,9 +9150,17 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu if (enabled) { this.functionalMode = FunctionalMode.QRCODE; rootLayout.addView(overlayQRCodeView); int qrcodeCamId = ((MainActivity)getContext()).getBetterQRCodeCameraID(); MainActivity mainActivity = (MainActivity) this.getContext(); int qrcodeCamId = 0; if (mainActivity.isMultiCamEnabled()) { int betterQrcodeCamId = mainActivity.getBetterQRCodeCameraID(); if (qrcodeCamId >= 0) { qrcodeCamId = betterQrcodeCamId; } } applicationInterface.setCameraIdPref(qrcodeCamId); if (MyDebug.LOG) { Log.d(TAG, "Using qrcodeCamId: " + qrcodeCamId); } } else if (overlayQRCodeView.getParent() != null) { rootLayout.removeView(overlayQRCodeView); Loading Loading
app/src/main/java/net/sourceforge/opencamera/MainActivity.java +0 −4 Original line number Diff line number Diff line Loading @@ -2992,10 +2992,6 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen int best_qrcode_camera = -1; if( MyDebug.LOG ) Log.d(TAG, "getBetterQRCodeCameraID"); if( !isMultiCamEnabled() ) { Log.e(TAG, "getBetterQRCodeCameraID switch multi camera icon shouldn't have been visible"); return best_qrcode_camera; } if( preview.isOpeningCamera() ) { if( MyDebug.LOG ) Log.d(TAG, "getBetterQRCodeCameraID already opening camera in background thread"); Loading
app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +11 −3 Original line number Diff line number Diff line Loading @@ -9150,9 +9150,17 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu if (enabled) { this.functionalMode = FunctionalMode.QRCODE; rootLayout.addView(overlayQRCodeView); int qrcodeCamId = ((MainActivity)getContext()).getBetterQRCodeCameraID(); MainActivity mainActivity = (MainActivity) this.getContext(); int qrcodeCamId = 0; if (mainActivity.isMultiCamEnabled()) { int betterQrcodeCamId = mainActivity.getBetterQRCodeCameraID(); if (qrcodeCamId >= 0) { qrcodeCamId = betterQrcodeCamId; } } applicationInterface.setCameraIdPref(qrcodeCamId); if (MyDebug.LOG) { Log.d(TAG, "Using qrcodeCamId: " + qrcodeCamId); } } else if (overlayQRCodeView.getParent() != null) { rootLayout.removeView(overlayQRCodeView); Loading