summaryrefslogtreecommitdiffstats
path: root/camera/libcameraservice/CameraService.h
diff options
context:
space:
mode:
authorDave Sparks <davidsparks@android.com>2009-10-15 10:02:22 -0700
committerDave Sparks <davidsparks@android.com>2009-10-15 15:18:08 -0700
commitdd158c9a9059ae01de0f1f914617d6e21e7c54c3 (patch)
treecbf5bb06a8cccb39bcefaf1c189c460e21ff14a1 /camera/libcameraservice/CameraService.h
parent9e58e6427c8e5fefb65432ea4b56c6cb31e80bbd (diff)
downloadframeworks_base-dd158c9a9059ae01de0f1f914617d6e21e7c54c3.zip
frameworks_base-dd158c9a9059ae01de0f1f914617d6e21e7c54c3.tar.gz
frameworks_base-dd158c9a9059ae01de0f1f914617d6e21e7c54c3.tar.bz2
Don't callback on NULL client. Bug 2180510.
We weren't checking to see if there was a valid camera client when calling the notify callback function. Now we grab a strong pointer before the callback to guarantee that the client is not destroyed before we complete the callback. This change also fixes other places in the code where we weren't holding a local strong pointer.
Diffstat (limited to 'camera/libcameraservice/CameraService.h')
-rw-r--r--camera/libcameraservice/CameraService.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h
index 2e3597f..2fcf839 100644
--- a/camera/libcameraservice/CameraService.h
+++ b/camera/libcameraservice/CameraService.h
@@ -23,10 +23,9 @@
#include <ui/CameraHardwareInterface.h>
#include <ui/Camera.h>
-class android::MemoryHeapBase;
-
namespace android {
+class MemoryHeapBase;
class MediaPlayer;
// ----------------------------------------------------------------------------
@@ -151,7 +150,8 @@ private:
void handleRawPicture(const sp<IMemory>&);
void handleCompressedPicture(const sp<IMemory>&);
- void copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size);
+ void copyFrameAndPostCopiedFrame(const sp<ICameraClient>& client,
+ const sp<IMemoryHeap>& heap, size_t offset, size_t size);
// camera operation mode
enum camera_mode {