Enum CameraFeatures.LensFacing
-
- All Implemented Interfaces:
public enum CameraFeatures.LensFacing
Helper enum for the lens facing direction to abstract away the differences in camera API 1 and 2
-
-
Method Summary
Modifier and Type Method Description static CameraFeatures.LensFacing
fromBitFlag(int cameraFacingBit)
int
toCamera1()
static CameraFeatures.LensFacing
fromCamera1(int camera1Facing)
static CameraFeatures.LensFacing
fromCamera1(int camera1Facing, Array<float> focalLengths)
int
toCamera2()
static CameraFeatures.LensFacing
fromCamera2(Integer camera2Facing)
static CameraFeatures.LensFacing
fromCamera2(Integer camera2Facing, Array<float> focalLengths)
int
toCameraX()
static CameraFeatures.LensFacing
fromCameraX(CameraInfo cameraInfo, Array<float> focalLengths)
static EnumSet<CameraFeatures.LensFacing>
fromBitFlags(int fallbackCameraBits)
Returns an EnumSet consisting of all LensFacings whos bits set in fallbackCameraBits. static Array<CameraFeatures.LensFacing>
values()
Returns an array containing the constants of this enum type, in the order they're declared. static CameraFeatures.LensFacing
valueOf(String name)
Returns the enum constant of this type with the specified name. -
-
Method Detail
-
fromBitFlag
static CameraFeatures.LensFacing fromBitFlag(int cameraFacingBit)
-
toCamera1
int toCamera1()
-
fromCamera1
static CameraFeatures.LensFacing fromCamera1(int camera1Facing)
- Parameters:
camera1Facing
- the camera 1 facing constant- Returns:
the matching enum for the given camera 1 constant
-
fromCamera1
static CameraFeatures.LensFacing fromCamera1(int camera1Facing, Array<float> focalLengths)
- Parameters:
camera1Facing
- the camera 1 facing constantfocalLengths
- the available focalLengths- Returns:
the matching enum for the given camera 1 constant
-
toCamera2
int toCamera2()
-
fromCamera2
static CameraFeatures.LensFacing fromCamera2(Integer camera2Facing)
- Parameters:
camera2Facing
- the camera 2 facing constant- Returns:
the matching enum for the given camera 2 constant
-
fromCamera2
static CameraFeatures.LensFacing fromCamera2(Integer camera2Facing, Array<float> focalLengths)
- Parameters:
camera2Facing
- the camera 2 facing constantfocalLengths
- the available focalLengths- Returns:
the matching enum for the given camera 2 constant
-
toCameraX
int toCameraX()
-
fromCameraX
static CameraFeatures.LensFacing fromCameraX(CameraInfo cameraInfo, Array<float> focalLengths)
- Parameters:
cameraInfo
- the camera X infofocalLengths
- the available focalLengths- Returns:
the matching enum for the given camera X constant
-
fromBitFlags
static EnumSet<CameraFeatures.LensFacing> fromBitFlags(int fallbackCameraBits)
Returns an EnumSet consisting of all LensFacings whos bits set in fallbackCameraBits. E.g. fallbackCameraBits = 3 -> 011 -> {BACK, FRONT}
-
values
static Array<CameraFeatures.LensFacing> values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.
- Returns:
an array containing the constants of this enum type, in the order they're declared
-
valueOf
static CameraFeatures.LensFacing valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
- Returns:
the enum constant with the specified name
-
-
-
-