|
|
|
@ -159,6 +159,7 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
|
@SuppressWarnings({"FieldCanBeLocal", "unused"}) |
|
|
|
|
private boolean mExperimental; |
|
|
|
|
private boolean mInEditor; |
|
|
|
|
private boolean mChangeModeWithoutRestart; |
|
|
|
|
|
|
|
|
|
// Overlays
|
|
|
|
|
@VisibleForTesting OverlayLayout mOverlayLayout; |
|
|
|
@ -869,6 +870,10 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
|
mExperimental = experimental; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setChangeModeWithoutRestart(boolean changeModeWithoutRestart) { |
|
|
|
|
mChangeModeWithoutRestart = changeModeWithoutRestart; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Shorthand for the appropriate set* method. |
|
|
|
|
* For example, if control is a {@link Grid}, this calls {@link #setGrid(Grid)}. |
|
|
|
@ -1420,7 +1425,7 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
|
* @param mode desired session type. |
|
|
|
|
*/ |
|
|
|
|
public void setMode(@NonNull Mode mode) { |
|
|
|
|
mCameraEngine.setMode(mode); |
|
|
|
|
mCameraEngine.setMode(mode, mChangeModeWithoutRestart); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|