* The preview size requested from the camera device will depend on this as
* well as the requested photo/video aspect ratio.
*/
- public void setViewFinderSize(int width, int height);
+ public void setViewfinderSize(int width, int height);
/**
* @return Whether this camera supports flash.
* @return The aspect ratio of the full size capture (usually the native
* resolution of the camera).
*/
- public double getFullSizeAspectRatio();
+ public float getFullSizeAspectRatio();
/**
* @return Whether this camera is facing to the back.
* The aspect ratio (width/height) of the full resolution for this camera.
* Usually the native aspect ratio of this camera.
*/
- private final double mFullSizeAspectRatio;
+ private final float mFullSizeAspectRatio;
/** The Camera2 API capture session currently active. */
private CameraCaptureSession mCaptureSession;
/** The surface onto which to render the preview. */
}
@Override
- public void setViewFinderSize(int width, int height) {
+ public void setViewfinderSize(int width, int height) {
throw new RuntimeException("Not implemented yet.");
}
}
@Override
- public double getFullSizeAspectRatio() {
+ public float getFullSizeAspectRatio() {
return mFullSizeAspectRatio;
}
* @return The aspect ration, in terms of width/height of the full capture
* size.
*/
- private static double calculateFullSizeAspectRatio(CameraCharacteristics characteristics) {
+ private static float calculateFullSizeAspectRatio(CameraCharacteristics characteristics) {
Rect activeArraySize =
characteristics.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE);
- return (double) activeArraySize.width() / activeArraySize.height();
+ return ((float)(activeArraySize.width())) / activeArraySize.height();
}
/**
* continuous AF.
*/
private static final String FOCUS_RESUME_CALLBACK_TOKEN = "RESUME_CONTINUOUS_AF";
+
/** Zero weight 3A region, to reset regions per API. */
- MeteringRectangle[] ZERO_WEIGHT_3A_REGION = AutoFocusHelper.getZeroWeightRegion();
+ /*package*/ MeteringRectangle[] ZERO_WEIGHT_3A_REGION = AutoFocusHelper.getZeroWeightRegion();
/**
* Thread on which high-priority camera operations, such as grabbing preview
* The aspect ratio (width/height) of the full resolution for this camera.
* Usually the native aspect ratio of this camera.
*/
- private final double mFullSizeAspectRatio;
+ private final float mFullSizeAspectRatio;
/** The Camera2 API capture session currently active. */
private CameraCaptureSession mCaptureSession;
/** The surface onto which to render the preview. */
largestSupportedSize.getHeight());
}
-
private void onShutterInvokeUI(final PhotoCaptureParameters params) {
// Tell CaptureModule shutter has occurred so it can flash the screen.
params.callback.onQuickExpose();
}
@Override
- public void setViewFinderSize(int width, int height) {
+ public void setViewfinderSize(int width, int height) {
throw new RuntimeException("Not implemented yet.");
}
}
@Override
- public double getFullSizeAspectRatio() {
+ public float getFullSizeAspectRatio() {
return mFullSizeAspectRatio;
}
* @return The aspect ration, in terms of width/height of the full capture
* size.
*/
- private static double calculateFullSizeAspectRatio(CameraCharacteristics characteristics) {
+ private static float calculateFullSizeAspectRatio(CameraCharacteristics characteristics) {
Rect activeArraySize =
characteristics.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE);
- return (double) activeArraySize.width() / activeArraySize.height();
+ return ((float) activeArraySize.width()) / activeArraySize.height();
}
/**