summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-10-16 21:07:37 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-16 21:07:37 -0700
commit749a217a8eea1fc949ad0b7c82f7cbf6b11bc99a (patch)
tree5c65c044a04ddebeb8f5456e91434aaa21899ae3
parentfe265d600bd8d8f17df5f0f0b387dbd4608562e8 (diff)
parent9fc12c6efeca3d78acf387155079a99173c573cf (diff)
downloadhardware_ti_omap4xxx-749a217a8eea1fc949ad0b7c82f7cbf6b11bc99a.zip
hardware_ti_omap4xxx-749a217a8eea1fc949ad0b7c82f7cbf6b11bc99a.tar.gz
hardware_ti_omap4xxx-749a217a8eea1fc949ad0b7c82f7cbf6b11bc99a.tar.bz2
Merge "check sensor manager initialization succeeded" into ics-mr0
-rw-r--r--camera/SensorListener.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/camera/SensorListener.cpp b/camera/SensorListener.cpp
index 86d597a..1974160 100644
--- a/camera/SensorListener.cpp
+++ b/camera/SensorListener.cpp
@@ -137,6 +137,11 @@ status_t SensorListener::initialize() {
LOG_FUNCTION_NAME;
mSensorEventQueue = mgr.createEventQueue();
+ if (mSensorEventQueue == NULL) {
+ CAMHAL_LOGEA("createEventQueue returned NULL");
+ ret = NO_INIT;
+ goto out;
+ }
sp<Looper> mLooper = new Looper(false);
mLooper->addFd(mSensorEventQueue->getFd(), 0, ALOOPER_EVENT_INPUT, sensor_events_listener, this);