@Implements(value=android.hardware.camera2.CameraManager.class, minSdk=21) public class ShadowCameraManager extends Object
Constructor and Description |
---|
ShadowCameraManager() |
Modifier and Type | Method and Description |
---|---|
void |
addCamera(String cameraId,
CameraCharacteristics characteristics)
Adds the given cameraId and characteristics to this shadow.
|
protected CameraCharacteristics |
getCameraCharacteristics(String cameraId) |
protected String[] |
getCameraIdList() |
boolean |
getTorchMode(String cameraId)
Returns what the supplied camera’s torch is set to.
|
protected void |
setTorchMode(String cameraId,
boolean enabled) |
@Implementation protected String[] getCameraIdList() throws CameraAccessException
CameraAccessException
@Implementation protected CameraCharacteristics getCameraCharacteristics(String cameraId)
@Implementation(minSdk=23) protected void setTorchMode(String cameraId, boolean enabled)
public void addCamera(String cameraId, CameraCharacteristics characteristics)
Adds the given cameraId and characteristics to this shadow.
The result from getCameraIdList()
will be in the order in which cameras were added.
IllegalArgumentException
- if there’s already an existing camera with the given id.public boolean getTorchMode(String cameraId)
Returns what the supplied camera’s torch is set to.