summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authoririi <iriijo@googlemail.com>2016-09-11 16:51:37 +0200
committeririi <iriijo@googlemail.com>2016-09-11 23:12:04 +0200
commit3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14 (patch)
tree8e5b82a922de26357a3c71a215b7bee875df33e6 /services/camera
parentd9a8909b45b516f54460c2bb13af31a9639fe703 (diff)
downloadframeworks_av-3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14.zip
frameworks_av-3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14.tar.gz
frameworks_av-3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14.tar.bz2
libcameraservice: Don't pass NULL args on setCallbacks call
*This fixes the torch light for cameras with hal 1 *This fix works on the htc m7ul *Fixed line length *Fixed unused parameter names Change-Id: I89c6112546e36dbcca099f4d5cd70371b2c5340a
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/CameraFlashlight.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/CameraFlashlight.cpp b/services/camera/libcameraservice/CameraFlashlight.cpp
index 406c1c4..62ce610 100644
--- a/services/camera/libcameraservice/CameraFlashlight.cpp
+++ b/services/camera/libcameraservice/CameraFlashlight.cpp
@@ -828,6 +828,18 @@ status_t CameraHardwareInterfaceFlashControl::initializePreviewWindow(
return device->setPreviewWindow(mSurface);
}
+static void notifyCallback(int32_t, int32_t, int32_t, void*) {
+ /* Empty */
+}
+
+static void dataCallback(int32_t, const sp<IMemory>&, camera_frame_metadata_t*, void*) {
+ /* Empty */
+}
+
+static void dataCallbackTimestamp(nsecs_t, int32_t, const sp<IMemory>&, void*) {
+ /* Empty */
+}
+
status_t CameraHardwareInterfaceFlashControl::connectCameraDevice(
const String8& cameraId) {
sp<CameraHardwareInterface> device =
@@ -841,7 +853,7 @@ status_t CameraHardwareInterfaceFlashControl::connectCameraDevice(
}
// need to set __get_memory in set_callbacks().
- device->setCallbacks(NULL, NULL, NULL, NULL);
+ device->setCallbacks(notifyCallback, dataCallback, dataCallbackTimestamp, this);
mParameters = device->getParameters();