From bfc9915f482520eb9676c6d2dbf7f1ac078d937d Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Wed, 27 Feb 2013 12:55:20 -0800 Subject: Camera: Drop ProCamera connections when a Camera connection happens * Also adds an ICameraServiceListener with available/not available statuses Bug: 8291653 Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84 --- camera/CameraBase.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'camera/CameraBase.cpp') diff --git a/camera/CameraBase.cpp b/camera/CameraBase.cpp index 9b0e6bf..29096da 100644 --- a/camera/CameraBase.cpp +++ b/camera/CameraBase.cpp @@ -231,6 +231,22 @@ status_t CameraBase::getCameraInfo(int cameraId, return cs->getCameraInfo(cameraId, cameraInfo); } +template +status_t CameraBase::addServiceListener( + const sp& listener) { + const sp& cs = getCameraService(); + if (cs == 0) return UNKNOWN_ERROR; + return cs->addListener(listener); +} + +template +status_t CameraBase::removeServiceListener( + const sp& listener) { + const sp& cs = getCameraService(); + if (cs == 0) return UNKNOWN_ERROR; + return cs->removeListener(listener); +} + template class CameraBase; template class CameraBase; -- cgit v1.1