com.android.sdklib.devices
Class Camera
java.lang.Object
com.android.sdklib.devices.Camera
public class Camera
- extends java.lang.Object
Constructor Summary |
Camera()
Creates a Camera with reasonable defaults. |
Camera(CameraLocation location,
boolean autofocus,
boolean flash)
Creates a new Camera which describes an on device camera and it's features. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Camera
public Camera()
- Creates a
Camera
with reasonable defaults.
The resulting Camera
with be on the CameraLocation.BACK
with both autofocus
and flash.
Camera
public Camera(@NonNull
CameraLocation location,
boolean autofocus,
boolean flash)
- Creates a new
Camera
which describes an on device camera and it's features.
- Parameters:
location
- The location of the Camera
on the device. Either
CameraLocation.FRONT
or CameraLocation.BACK
.autofocus
- Whether the Camera
can auto-focus.flash
- Whether the Camera
has flash.
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:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object