diff options
author | Ziyan <jaraidaniel@gmail.com> | 2015-10-09 01:55:26 +0200 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-10-13 14:00:39 +0200 |
commit | fd72df818db74c65825b8c46ab7dd9b236b95d4e (patch) | |
tree | ff7de0324d7cc2a7127703338f31d53d26b31742 | |
parent | 5cc451f1b5608261be2292554013d5f5facc25aa (diff) | |
download | hardware_ti_omap4-fd72df818db74c65825b8c46ab7dd9b236b95d4e.zip hardware_ti_omap4-fd72df818db74c65825b8c46ab7dd9b236b95d4e.tar.gz hardware_ti_omap4-fd72df818db74c65825b8c46ab7dd9b236b95d4e.tar.bz2 |
camera: fix build for MM
Change-Id: I1bdd4510dc54517e70b2bc196b6e371520665661
-rw-r--r-- | camera/CameraHal.cpp | 4 | ||||
-rw-r--r-- | camera/SensorListener.cpp | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 7e7cf9d..d5c7e43 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -1576,7 +1576,11 @@ status_t CameraHal::allocVideoBufs(uint32_t width, uint32_t height, uint32_t buf } if ( NO_ERROR == ret ){ +#ifdef ANDROID_API_MM_OR_LATER + uint32_t stride; +#else int32_t stride; +#endif CameraBuffer *buffers = new CameraBuffer [bufferCount]; memset (buffers, 0, sizeof(CameraBuffer) * bufferCount); diff --git a/camera/SensorListener.cpp b/camera/SensorListener.cpp index e53fa83..3f288fd 100644 --- a/camera/SensorListener.cpp +++ b/camera/SensorListener.cpp @@ -130,7 +130,11 @@ SensorListener::~SensorListener() { status_t SensorListener::initialize() { status_t ret = NO_ERROR; +#ifdef ANDROID_API_MM_OR_LATER + android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); +#else android::SensorManager& mgr(android::SensorManager::getInstance()); +#endif LOG_FUNCTION_NAME; @@ -193,7 +197,11 @@ void SensorListener::handleOrientation(uint32_t orientation, uint32_t tilt) { void SensorListener::enableSensor(sensor_type_t type) { android::Sensor const* sensor; +#ifdef ANDROID_API_MM_OR_LATER + android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); +#else android::SensorManager& mgr(android::SensorManager::getInstance()); +#endif LOG_FUNCTION_NAME; @@ -216,7 +224,11 @@ void SensorListener::enableSensor(sensor_type_t type) { void SensorListener::disableSensor(sensor_type_t type) { android::Sensor const* sensor; +#ifdef ANDROID_API_MM_OR_LATER + android::SensorManager mgr(android::String16("TI OMAP CameraHal Module")); +#else android::SensorManager& mgr(android::SensorManager::getInstance()); +#endif LOG_FUNCTION_NAME; |