Package org.robolectric.shadows
Class ShadowCamera.ShadowParameters
- java.lang.Object
-
- org.robolectric.shadows.ShadowCamera.ShadowParameters
-
- Enclosing class:
- ShadowCamera
@Implements(android.hardware.Camera.Parameters.class) public static class ShadowCamera.ShadowParameters extends Object
Shadows the AndroidCamera.Parametersclass.
-
-
Constructor Summary
Constructors Constructor Description ShadowParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSupportedPreviewSize(int width, int height)Add custom preview sizes to supportedPreviewSizes.protected Stringget(String key)protected intgetExposureCompensation()protected floatgetExposureCompensationStep()protected StringgetFlashMode()protected List<Camera.Area>getFocusAreas()protected StringgetFocusMode()protected intgetMaxExposureCompensation()protected intgetMaxNumFocusAreas()protected intgetMaxNumMeteringAreas()protected List<Camera.Area>getMeteringAreas()protected intgetMinExposureCompensation()intgetPictureHeight()protected Camera.SizegetPictureSize()intgetPictureWidth()protected intgetPreviewFormat()protected voidgetPreviewFpsRange(int[] range)protected intgetPreviewFrameRate()intgetPreviewHeight()protected Camera.SizegetPreviewSize()intgetPreviewWidth()protected List<String>getSupportedFlashModes()protected List<String>getSupportedFocusModes()protected List<Integer>getSupportedPictureFormats()protected List<Camera.Size>getSupportedPictureSizes()protected List<Integer>getSupportedPreviewFormats()protected List<int[]>getSupportedPreviewFpsRange()protected List<Integer>getSupportedPreviewFrameRates()protected List<Camera.Size>getSupportedPreviewSizes()voidinitSupportedPreviewSizes()Explicitly initialize custom preview sizes array, to switch from default values to individually added.protected voidset(String key, String value)protected voidsetExposureCompensation(int compensation)protected voidsetFlashMode(String flashMode)protected voidsetFocusAreas(List<Camera.Area> focusAreas)protected voidsetFocusMode(String focusMode)voidsetMaxNumFocusAreas(int maxNumFocusAreas)Allows test cases to set the maximum number of focus areas.voidsetMaxNumMeteringAreas(int maxNumMeteringAreas)Allows test cases to set the maximum number of metering areas.protected voidsetMeteringAreas(List<Camera.Area> meteringAreas)protected voidsetPictureSize(int width, int height)protected voidsetPreviewFormat(int pixel_format)protected voidsetPreviewFpsRange(int min, int max)protected voidsetPreviewFrameRate(int fps)protected voidsetPreviewSize(int width, int height)protected voidsetRecordingHint(boolean recordingHint)protected voidsetRotation(int rotation)voidsetSupportedFlashModes(String... flashModes)voidsetSupportedFocusModes(String... focusModes)
-
-
-
Method Detail
-
initSupportedPreviewSizes
public void initSupportedPreviewSizes()
Explicitly initialize custom preview sizes array, to switch from default values to individually added.
-
addSupportedPreviewSize
public void addSupportedPreviewSize(int width, int height)Add custom preview sizes to supportedPreviewSizes.
-
getPictureSize
@Implementation protected Camera.Size getPictureSize()
-
getPreviewFormat
@Implementation protected int getPreviewFormat()
-
getPreviewFpsRange
@Implementation protected void getPreviewFpsRange(int[] range)
-
getPreviewFrameRate
@Implementation protected int getPreviewFrameRate()
-
getPreviewSize
@Implementation protected Camera.Size getPreviewSize()
-
getSupportedPictureSizes
@Implementation protected List<Camera.Size> getSupportedPictureSizes()
-
getSupportedPictureFormats
@Implementation protected List<Integer> getSupportedPictureFormats()
-
getSupportedPreviewFormats
@Implementation protected List<Integer> getSupportedPreviewFormats()
-
getSupportedPreviewFpsRange
@Implementation protected List<int[]> getSupportedPreviewFpsRange()
-
getSupportedPreviewFrameRates
@Implementation protected List<Integer> getSupportedPreviewFrameRates()
-
getSupportedPreviewSizes
@Implementation protected List<Camera.Size> getSupportedPreviewSizes()
-
setSupportedFocusModes
public void setSupportedFocusModes(String... focusModes)
-
getSupportedFocusModes
@Implementation protected List<String> getSupportedFocusModes()
-
getFocusMode
@Implementation protected String getFocusMode()
-
setFocusMode
@Implementation protected void setFocusMode(String focusMode)
-
setMaxNumFocusAreas
public void setMaxNumFocusAreas(int maxNumFocusAreas)
Allows test cases to set the maximum number of focus areas. SeeCamera.Parameters.getMaxNumFocusAreas().
-
getMaxNumFocusAreas
@Implementation protected int getMaxNumFocusAreas()
-
setFocusAreas
@Implementation protected void setFocusAreas(List<Camera.Area> focusAreas)
-
getFocusAreas
@Implementation protected List<Camera.Area> getFocusAreas()
-
setMaxNumMeteringAreas
public void setMaxNumMeteringAreas(int maxNumMeteringAreas)
Allows test cases to set the maximum number of metering areas. SeeCamera.Parameters.getMaxNumMeteringAreas().
-
getMaxNumMeteringAreas
@Implementation protected int getMaxNumMeteringAreas()
-
setMeteringAreas
@Implementation protected void setMeteringAreas(List<Camera.Area> meteringAreas)
-
getMeteringAreas
@Implementation protected List<Camera.Area> getMeteringAreas()
-
setPictureSize
@Implementation protected void setPictureSize(int width, int height)
-
setPreviewFormat
@Implementation protected void setPreviewFormat(int pixel_format)
-
setPreviewFpsRange
@Implementation protected void setPreviewFpsRange(int min, int max)
-
setPreviewFrameRate
@Implementation protected void setPreviewFrameRate(int fps)
-
setPreviewSize
@Implementation protected void setPreviewSize(int width, int height)
-
setRecordingHint
@Implementation protected void setRecordingHint(boolean recordingHint)
-
setRotation
@Implementation protected void setRotation(int rotation)
-
getMinExposureCompensation
@Implementation protected int getMinExposureCompensation()
-
getMaxExposureCompensation
@Implementation protected int getMaxExposureCompensation()
-
getExposureCompensationStep
@Implementation protected float getExposureCompensationStep()
-
getExposureCompensation
@Implementation protected int getExposureCompensation()
-
setExposureCompensation
@Implementation protected void setExposureCompensation(int compensation)
-
setSupportedFlashModes
public void setSupportedFlashModes(String... flashModes)
-
getSupportedFlashModes
@Implementation protected List<String> getSupportedFlashModes()
-
getFlashMode
@Implementation protected String getFlashMode()
-
setFlashMode
@Implementation protected void setFlashMode(String flashMode)
-
set
@Implementation protected void set(String key, String value)
-
get
@Implementation protected String get(String key)
-
getPreviewWidth
public int getPreviewWidth()
-
getPreviewHeight
public int getPreviewHeight()
-
getPictureWidth
public int getPictureWidth()
-
getPictureHeight
public int getPictureHeight()
-
-