summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2015-10-09 01:55:26 +0200
committerZiyan <jaraidaniel@gmail.com>2016-01-17 22:46:48 +0100
commit1a8bffe6a84bb959ce1b7e9f71f065d032198f5e (patch)
tree84aaba92e33b371d28db2913d9fc393a51e602f0 /camera
parent731f282f33a6f30fc0a2378136100f8cab7c1825 (diff)
downloaddevice_samsung_tuna-1a8bffe6a84bb959ce1b7e9f71f065d032198f5e.zip
device_samsung_tuna-1a8bffe6a84bb959ce1b7e9f71f065d032198f5e.tar.gz
device_samsung_tuna-1a8bffe6a84bb959ce1b7e9f71f065d032198f5e.tar.bz2
camera: fix build for MM
Change-Id: I1bdd4510dc54517e70b2bc196b6e371520665661
Diffstat (limited to 'camera')
-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;