When resetting, restart camera if we've stopped it.

This commit is contained in:
akwizgran
2018-03-20 11:58:40 +00:00
parent 3361922834
commit 701e51dfc8

View File

@@ -208,6 +208,15 @@ public class ShowQrCodeFragment extends BaseEventFragment
@UiThread
private void reset() {
// If we've stopped the camera view, restart it
if (gotRemotePayload) {
try {
cameraView.start(getScreenRotationDegrees());
} catch (CameraException e) {
logCameraExceptionAndFinish(e);
return;
}
}
statusView.setVisibility(INVISIBLE);
cameraView.setVisibility(VISIBLE);
gotRemotePayload = false;