Loading libs/gui/SensorManager.cpp +17 −3 Original line number Original line Diff line number Diff line Loading @@ -78,9 +78,23 @@ Sensor const* SensorManager::getDefaultSensor(int type) sp<SensorEventQueue> SensorManager::createEventQueue() sp<SensorEventQueue> SensorManager::createEventQueue() { { sp<SensorEventQueue> result = new SensorEventQueue( sp<SensorEventQueue> queue; mSensorServer->createSensorEventConnection()); return result; if (mSensorServer == NULL) { LOGE("createEventQueue: mSensorSever is NULL"); return queue; } sp<ISensorEventConnection> connection = mSensorServer->createSensorEventConnection(); if (connection == NULL) { LOGE("createEventQueue: connection is NULL"); return queue; } queue = new SensorEventQueue(connection); return queue; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading Loading
libs/gui/SensorManager.cpp +17 −3 Original line number Original line Diff line number Diff line Loading @@ -78,9 +78,23 @@ Sensor const* SensorManager::getDefaultSensor(int type) sp<SensorEventQueue> SensorManager::createEventQueue() sp<SensorEventQueue> SensorManager::createEventQueue() { { sp<SensorEventQueue> result = new SensorEventQueue( sp<SensorEventQueue> queue; mSensorServer->createSensorEventConnection()); return result; if (mSensorServer == NULL) { LOGE("createEventQueue: mSensorSever is NULL"); return queue; } sp<ISensorEventConnection> connection = mSensorServer->createSensorEventConnection(); if (connection == NULL) { LOGE("createEventQueue: connection is NULL"); return queue; } queue = new SensorEventQueue(connection); return queue; } } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading