From bad4358c83c7daaf9eeb8542c15eea4f473c884c Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Fri, 14 Aug 2015 13:12:32 -0700 Subject: Camera: Add camera type to ICameraService.getNumberOfCameras. Also determine the number of 'normal' cameras present on camera service startup, and ensure that all normal cameras have IDs lower than the 'strange' cameras. Bug: 23194168 Change-Id: I1f7b14825cb52707de698a955f85da1eaa932663 --- include/camera/ICameraService.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/camera') diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h index 5f85635..1b68b5f 100644 --- a/include/camera/ICameraService.h +++ b/include/camera/ICameraService.h @@ -64,6 +64,11 @@ public: }; enum { + CAMERA_TYPE_BACKWARD_COMPATIBLE = 0, + CAMERA_TYPE_ALL = 1, + }; + + enum { CAMERA_HAL_API_VERSION_UNSPECIFIED = -1 }; @@ -81,7 +86,12 @@ public: public: DECLARE_META_INTERFACE(CameraService); + // Get the number of cameras that support basic color camera operation + // (type CAMERA_TYPE_BACKWARD_COMPATIBLE) virtual int32_t getNumberOfCameras() = 0; + // Get the number of cameras of the specified type, one of CAMERA_TYPE_* + // enums + virtual int32_t getNumberOfCameras(int cameraType) = 0; virtual status_t getCameraInfo(int cameraId, /*out*/ struct CameraInfo* cameraInfo) = 0; -- cgit v1.1