|
|
@ -159,7 +159,10 @@ public class CameraView extends FrameLayout { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Preview instantiatePreview(Context context, ViewGroup container) { |
|
|
|
protected Preview instantiatePreview(Context context, ViewGroup container) { |
|
|
|
return new TextureViewPreview(context, container, null); |
|
|
|
// TextureView is not supported without hardware acceleration.
|
|
|
|
|
|
|
|
return isHardwareAccelerated() ? |
|
|
|
|
|
|
|
new TextureViewPreview(context, container, null) : |
|
|
|
|
|
|
|
new SurfaceViewPreview(context, container, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|