Package com.android.sdklib.devices
Class Camera
- java.lang.Object
-
- com.android.sdklib.devices.Camera
-
public class Camera extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Camera()Creates aCamerawith reasonable defaults.Camera(CameraLocation location, boolean autofocus, boolean flash)Creates a newCamerawhich describes an on device camera and it's features.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CameradeepCopy()Returns a copy of the object that shares no state with it, but is initialized to equivalent values.booleanequals(java.lang.Object o)CameraLocationgetLocation()booleanhasAutofocus()booleanhasFlash()inthashCode()voidsetAutofocus(boolean hasAutofocus)voidsetFlash(boolean flash)voidsetLocation(CameraLocation location)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Camera
public Camera()
Creates aCamerawith reasonable defaults. The resultingCamerawith be on theCameraLocation.BACKwith both autofocus and flash.
-
Camera
public Camera(@NonNull CameraLocation location, boolean autofocus, boolean flash)Creates a newCamerawhich describes an on device camera and it's features.- Parameters:
location- The location of theCameraon the device. EitherCameraLocation.FRONTorCameraLocation.BACK.autofocus- Whether theCameracan auto-focus.flash- Whether theCamerahas flash.
-
-
Method Detail
-
getLocation
@NonNull public CameraLocation getLocation()
-
setLocation
public void setLocation(@NonNull CameraLocation location)
-
hasAutofocus
public boolean hasAutofocus()
-
setAutofocus
public void setAutofocus(boolean hasAutofocus)
-
hasFlash
public boolean hasFlash()
-
setFlash
public void setFlash(boolean flash)
-
deepCopy
@NonNull public Camera deepCopy()
Returns a copy of the object that shares no state with it, but is initialized to equivalent values.- Returns:
- A copy of the object.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-