Merge pull request #15163 from lihanchen/AndroidTVUSBCamera
Fix problem with camera on Android TV
This commit is contained in:
commit
18c864cdae
@ -333,7 +333,11 @@ public abstract class CameraActivity extends Activity
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
useCamera2API = isHardwareLevelSupported(characteristics,
|
// Fallback to camera1 API for internal cameras that don't have full support.
|
||||||
|
// This should help with legacy situations where using the camera2 API causes
|
||||||
|
// distorted or otherwise broken previews.
|
||||||
|
useCamera2API = (facing == CameraCharacteristics.LENS_FACING_EXTERNAL)
|
||||||
|
|| isHardwareLevelSupported(characteristics,
|
||||||
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL);
|
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL);
|
||||||
LOGGER.i("Camera API lv2?: %s", useCamera2API);
|
LOGGER.i("Camera API lv2?: %s", useCamera2API);
|
||||||
return cameraId;
|
return cameraId;
|
||||||
|
Loading…
Reference in New Issue
Block a user