@Implements(value=android.hardware.camera2.CameraManager.class, minSdk=21) public class ShadowCameraManager extends java.lang.Object
Shadow for CameraManager
.
Constructor and Description |
---|
ShadowCameraManager() |
Modifier and Type | Method and Description |
---|---|
void |
addCamera(java.lang.String cameraId,
android.hardware.camera2.CameraCharacteristics characteristics)
Adds the given cameraId and characteristics to this shadow.
|
protected android.hardware.camera2.CameraCharacteristics |
getCameraCharacteristics(java.lang.String cameraId) |
protected java.lang.String[] |
getCameraIdList() |
@Implementation protected java.lang.String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException
android.hardware.camera2.CameraAccessException
@Implementation protected android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(java.lang.String cameraId)
public void addCamera(java.lang.String cameraId, android.hardware.camera2.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.
java.lang.IllegalArgumentException
- if there’s already an existing camera with the given id.