diff options
author | Ziyan <jaraidaniel@gmail.com> | 2015-04-11 23:15:11 +0200 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-04-11 23:15:11 +0200 |
commit | 86666cc6ef99fa0a2761dc0c56e30df7cbb8e52c (patch) | |
tree | 8e38fe26d331e175fa4183fc16ea391145c12cd2 /camera/inc/SensorListener.h | |
parent | 05555c23e049a7ef25d7436fdad4e8cde5754642 (diff) | |
download | device_samsung_tuna-86666cc6ef99fa0a2761dc0c56e30df7cbb8e52c.zip device_samsung_tuna-86666cc6ef99fa0a2761dc0c56e30df7cbb8e52c.tar.gz device_samsung_tuna-86666cc6ef99fa0a2761dc0c56e30df7cbb8e52c.tar.bz2 |
Remove common omap4 modules
domx: remove for move to omap4-next
edid/hwc: remove for move to omap4-next
include / kernel-headers: remove for move to omap4-next
libcorkscrew: remove for move to omap4-next
libion_ti: remove for move to omap4-next
libtiutils: remove for move to omap4-next
pvr-source / pvrsrvinit: remove for move to omap4-next
remove gralloc symlink for move to omap4-next
Change-Id: I1ade011fd5e0adedbcb19cbf941fdde5ef4f96b6
symlinks: remove for move to omap4-next
Diffstat (limited to 'camera/inc/SensorListener.h')
-rw-r--r-- | camera/inc/SensorListener.h | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/camera/inc/SensorListener.h b/camera/inc/SensorListener.h deleted file mode 100644 index 44037b7..0000000 --- a/camera/inc/SensorListener.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) Texas Instruments - http://www.ti.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** -* @file SensorListener.h -* -* This defines API for camerahal to get sensor events -* -*/ - -#ifndef ANDROID_CAMERA_HARDWARE_SENSOR_LISTENER_H -#define ANDROID_CAMERA_HARDWARE_SENSOR_LISTENER_H - -#include <android/sensor.h> -#include <gui/Sensor.h> -#include <gui/SensorManager.h> -#include <gui/SensorEventQueue.h> -#include <utils/Looper.h> - -#include "Common.h" - -namespace Ti { -namespace Camera { - -/** - * SensorListner class - Registers with sensor manager to get sensor events - */ - -typedef void (*orientation_callback_t) (uint32_t orientation, uint32_t tilt, void* cookie); - -class SensorLooperThread : public android::Thread { - public: - SensorLooperThread(android::Looper* looper) - : Thread(false) { - mLooper = android::sp<android::Looper>(looper); - } - ~SensorLooperThread() { - mLooper.clear(); - } - - virtual bool threadLoop() { - int32_t ret = mLooper->pollOnce(-1); - return true; - } - - // force looper wake up - void wake() { - mLooper->wake(); - } - private: - android::sp<android::Looper> mLooper; -}; - - -class SensorListener : public android::RefBase -{ -/* public - types */ -public: - typedef enum { - SENSOR_ACCELEROMETER = 1 << 0, - SENSOR_MAGNETIC_FIELD = 1 << 1, - SENSOR_GYROSCOPE = 1 << 2, - SENSOR_LIGHT = 1 << 3, - SENSOR_PROXIMITY = 1 << 4, - SENSOR_ORIENTATION = 1 << 5, - } sensor_type_t; -/* public - functions */ -public: - SensorListener(); - ~SensorListener(); - status_t initialize(); - void setCallbacks(orientation_callback_t orientation_cb, void *cookie); - void enableSensor(sensor_type_t type); - void disableSensor(sensor_type_t type); - void handleOrientation(uint32_t orientation, uint32_t tilt); -/* public - member variables */ -public: - android::sp<android::SensorEventQueue> mSensorEventQueue; -/* private - member variables */ -private: - int sensorsEnabled; - orientation_callback_t mOrientationCb; - void *mCbCookie; - android::sp<android::Looper> mLooper; - android::sp<SensorLooperThread> mSensorLooperThread; - android::Mutex mLock; -}; - -} // namespace Camera -} // namespace Ti - -#endif |