summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camera/CameraHal.cpp4
-rw-r--r--camera/SensorListener.cpp12
2 files changed, 16 insertions, 0 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp
index ce59c84..ae3120c 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;