diff options
author | irii <iriijo@googlemail.com> | 2016-09-11 16:51:37 +0200 |
---|---|---|
committer | Ivan Ivanich <iivanich@gmail.com> | 2016-10-22 13:44:28 -0700 |
commit | a38ed9050af2e4c2a9695b61f801ad0b8a97374e (patch) | |
tree | 9fa08f5584200a79309977c972833fe3f90ed616 | |
parent | 62661dcec73284c2255cc3aa8550d4ed06e1350d (diff) | |
download | frameworks_av-cm-14.0.tar.gz frameworks_av-cm-14.0.tar.bz2 frameworks_av-cm-14.0.zip |
libcameraservice: Don't pass NULL args on setCallbacks callcm-14.0
*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
(cherry picked from commit 3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14)
-rw-r--r-- | services/camera/libcameraservice/CameraFlashlight.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/CameraFlashlight.cpp b/services/camera/libcameraservice/CameraFlashlight.cpp index ad08a682b0..05c8277b90 100644 --- a/services/camera/libcameraservice/CameraFlashlight.cpp +++ b/services/camera/libcameraservice/CameraFlashlight.cpp @@ -846,6 +846,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 = @@ -859,7 +871,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(); |