summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorYin-Chia Yeh <yinchiayeh@google.com>2015-10-15 20:57:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-15 20:57:56 +0000
commitceb10ea795d92d889201cd40f5ac6290edf4ded7 (patch)
treebb6ef8b2f18c832bcb9d4ec777e025918ac351b1 /services
parent0926aab4b8d5d307c95788086090e8d2b2763f1f (diff)
parentd4a653a15767d4de37dbfdee22c2170951c93299 (diff)
downloadframeworks_av-ceb10ea795d92d889201cd40f5ac6290edf4ded7.zip
frameworks_av-ceb10ea795d92d889201cd40f5ac6290edf4ded7.tar.gz
frameworks_av-ceb10ea795d92d889201cd40f5ac6290edf4ded7.tar.bz2
Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/CameraService.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 19f588a..f2d6ad6 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -173,6 +173,13 @@ void CameraService::onFirstRef()
mNumberOfCameras = mModule->getNumberOfCameras();
mNumberOfNormalCameras = mNumberOfCameras;
+ // Setup vendor tags before we call get_camera_info the first time
+ // because HAL might need to setup static vendor keys in get_camera_info
+ VendorTagDescriptor::clearGlobalVendorTagDescriptor();
+ if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_2) {
+ setUpVendorTags();
+ }
+
mFlashlight = new CameraFlashlight(*mModule, *this);
status_t res = mFlashlight->findFlashUnits();
if (res) {
@@ -239,12 +246,6 @@ void CameraService::onFirstRef()
mModule->setCallbacks(this);
}
- VendorTagDescriptor::clearGlobalVendorTagDescriptor();
-
- if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_2) {
- setUpVendorTags();
- }
-
CameraDeviceFactory::registerService(this);
CameraService::pingCameraServiceProxy();