1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
| zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android/frameworks/base$ git diff core/ diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java old mode 100644 new mode 100755 index 974913b290b..37f515b8112 --- a/core/java/android/hardware/SystemSensorManager.java +++ b/core/java/android/hardware/SystemSensorManager.java @@ -144,6 +144,10 @@ public class SystemSensorManager extends SensorManager { @Override protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxBatchReportLatencyUs, int reservedFlags) { + + Log.e(TAG, "registerListenerImpl listener start : delayUs " + delayUs); + Log.i(TAG, "registerListenerImpl listener start", new RuntimeException("here").fillInStackTrace()); + if (listener == null || sensor == null) { Log.e(TAG, "sensor or listener is null"); return false; @@ -175,6 +179,7 @@ public class SystemSensorManager extends SensorManager { listener.getClass().getEnclosingClass() != null ? listener.getClass().getEnclosingClass().getName() : listener.getClass().getName(); + Log.e(TAG, "registerListenerImpl listener: " + fullClassName); queue = new SensorEventQueue(listener, looper, this, fullClassName); if (!queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs)) { queue.dispose(); @@ -195,6 +200,7 @@ public class SystemSensorManager extends SensorManager { if (sensor != null && sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { return; } + Log.i(TAG, "unregisterListenerImpl removed event listener" + sensor);
synchronized (mSensorListeners) { SensorEventQueue queue = mSensorListeners.get(listener); @@ -807,6 +813,7 @@ public class SystemSensorManager extends SensorManager { protected void dispatchSensorEvent(int handle, float[] values, int inAccuracy, long timestamp) { final Sensor sensor = mManager.mHandleToSensor.get(handle); + Log.e(TAG, "dispatchSensorEvent start handle:" + handle); if (sensor == null) { return; @@ -834,6 +841,7 @@ public class SystemSensorManager extends SensorManager { mSensorAccuracies.put(handle, t.accuracy); mListener.onAccuracyChanged(t.sensor, t.accuracy); } + Log.e(TAG, "dispatchSensorEvent onSensorChanged."); mListener.onSensorChanged(t); }
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp index 777471202fd..263155b367f 100755 --- a/core/jni/android_hardware_SensorManager.cpp +++ b/core/jni/android_hardware_SensorManager.cpp @@ -319,12 +319,14 @@ public: }
void destroy() { + ALOGD("debug4sensor_jni Receiver destroy"); mMessageQueue->getLooper()->removeFd( mSensorQueue->getFd() ); }
private: virtual void onFirstRef() { LooperCallback::onFirstRef(); + ALOGD("debug4sensor_jni Receiver onFirstRef fd:%d", mSensorQueue->getFd()); mMessageQueue->getLooper()->addFd(mSensorQueue->getFd(), 0, ALOOPER_EVENT_INPUT, this, mSensorQueue.get()); } @@ -339,10 +341,10 @@ private: while ((n = q->read(buffer, 16)) > 0) { for (int i=0 ; i<n ; i++) { - - - - + ALOGD("debug4sensor_jni handleEvent GyroSensor: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + buffer[i].data[0], buffer[i].data[1], buffer[i].data[2], + buffer[i].data[3], buffer[i].data[4], buffer[i].data[5], + buffer[i].data[6]); if (buffer[i].type == SENSOR_TYPE_STEP_COUNTER) { float value = float(buffer[i].u64.step_counter); @@ -403,7 +405,7 @@ private: } if (receiverObj.get()) { - + ALOGE("debug4sensor_jni handleEvent GyroSensor dispatchSensorEvent."); env->CallVoidMethod(receiverObj.get(), gBaseEventQueueClassInfo.dispatchSensorEvent, buffer[i].sensor, @@ -440,7 +442,7 @@ static jlong nativeInitSensorEventQueue(JNIEnv *env, jclass clazz, jlong sensorM }
- + ALOGE("debug4sensor_jni nativeInitSensorEventQueue mode: %d" , mode);
sp<MessageQueue> messageQueue = android_os_MessageQueue_getMessageQueue(env, msgQ); if (messageQueue == NULL) { @@ -448,6 +450,8 @@ static jlong nativeInitSensorEventQueue(JNIEnv *env, jclass clazz, jlong sensorM return 0; }
+ ALOGE("debug4sensor_jni nativeInitSensorEventQueue mode: %d" , mode); + sp<Receiver> receiver = new Receiver(queue, messageQueue, eventQWeak); receiver->incStrong((void*)nativeInitSensorEventQueue); return jlong(receiver.get());
zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android$ cd frameworks/native/services/ zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android/frameworks/native/services$ git diff . diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp index 682e3b07d..1f6a14b4e 100755 --- a/services/sensorservice/SensorDevice.cpp +++ b/services/sensorservice/SensorDevice.cpp @@ -535,10 +535,10 @@ ssize_t SensorDevice::pollHal(sensors_event_t* buffer, size_t count) { const auto &events, const auto &dynamicSensorsAdded) { if (result == Result::OK) { - - - - + ALOGE("debug4sensor_dev pollHal gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + buffer[0].data[0], buffer[0].data[1], buffer[0].data[2], + buffer[0].data[3], buffer[0].data[4], buffer[0].data[5], + buffer[0].data[6]);
convertToSensorEventsAndQuantize(convertToNewEvents(events), convertToNewSensorInfos(dynamicSensorsAdded), buffer); @@ -1188,7 +1188,7 @@ void SensorDevice::convertToSensorEventsAndQuantize( android::SensorDeviceUtils::quantizeSensorEventValues(&dst[i], getResolutionForSensor(dst[i].sensor)); } - + ALOGD("debug4sensor_dev convertToSensorEventsAndQuantize... end"); }
float SensorDevice::getResolutionForSensor(int sensorHandle) { diff --git a/services/sensorservice/SensorEventConnection.cpp b/services/sensorservice/SensorEventConnection.cpp index 244b4bd90..9c7169ae1 100755 --- a/services/sensorservice/SensorEventConnection.cpp +++ b/services/sensorservice/SensorEventConnection.cpp @@ -298,10 +298,10 @@ status_t SensorService::SensorEventConnection::sendEvents( if (scratch) { size_t i=0; while (i<numEvents) { - - - - + ALOGE("debug4sensor_svc SensorEventConnection::sendEvents gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + buffer[i].data[0], buffer[i].data[1], buffer[i].data[2], + buffer[i].data[3], buffer[i].data[4], buffer[i].data[5], + buffer[i].data[6]); int32_t sensor_handle = buffer[i].sensor; if (buffer[i].type == SENSOR_TYPE_META_DATA) { ALOGD_IF(DEBUG_CONNECTIONS, "flush complete event sensor==%d ", @@ -327,6 +327,8 @@ status_t SensorService::SensorEventConnection::sendEvents( ALOGD_IF(DEBUG_CONNECTIONS, "First flush event for sensor==%d ", buffer[i].meta_data.sensor); ++i; + + ALOGE("debug4sensor_svc SensorEventConnection:: 11111 count == 0 %d", count); continue; }
@@ -334,6 +336,8 @@ status_t SensorService::SensorEventConnection::sendEvents( if (flushInfo.mFirstFlushPending) { ++i; + + ALOGE("debug4sensor_svc SensorEventConnection:: 22222 count == 0 %d", count); continue; }
@@ -353,6 +357,7 @@ status_t SensorService::SensorEventConnection::sendEvents( scratch[count++] = buffer[i]; } } + ALOGE("debug4sensor_svc SensorEventConnection:: 33333 do-while count == 0 %d", count); i++; } while ((i<numEvents) && ((buffer[i].sensor == sensor_handle && buffer[i].type != SENSOR_TYPE_META_DATA) || @@ -377,6 +382,8 @@ status_t SensorService::SensorEventConnection::sendEvents( sendPendingFlushEventsLocked(); if (count == 0) { + + ALOGE("debug4sensor_svc SensorEventConnection::count == 0 %d", count); return status_t(NO_ERROR); }
@@ -386,6 +393,7 @@ status_t SensorService::SensorEventConnection::sendEvents( if (mCacheSize != 0) { + ALOGE("debug4sensor_svc SensorEventConnection::mCacheSize != 0 %d", mCacheSize); appendEventsToCacheLocked(scratch, count); return status_t(NO_ERROR); } @@ -403,6 +411,7 @@ status_t SensorService::SensorEventConnection::sendEvents( }
+ ALOGE("debug4sensor_svc SensorEventConnection::write %d", count); ssize_t size = SensorEventQueue::write(mChannel, reinterpret_cast<ASensorEvent const*>(scratch), count); if (size < 0) { @@ -441,8 +450,9 @@ status_t SensorService::SensorEventConnection::sendEvents( }
bool SensorService::SensorEventConnection::hasSensorAccess() { - return mService->isUidActive(mUid) - && !mService->mSensorPrivacyPolicy->isSensorPrivacyEnabled(); + return true; + + }
bool SensorService::SensorEventConnection::noteOpIfRequired(const sensors_event_t& event) { @@ -756,10 +766,10 @@ int SensorService::SensorEventConnection::handleEvent(int fd, int events, void* sensors_event_t sensor_event; memcpy(&sensor_event, buf, sizeof(sensors_event_t));
- - - - + ALOGE("debug4sensor_svc SensorEventConnection::handleEvent gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + sensor_event.data[0], sensor_event.data[1], sensor_event.data[2], + sensor_event.data[3], sensor_event.data[4], sensor_event.data[5], + sensor_event.data[6]);
sp<SensorInterface> si = mService->getSensorInterfaceFromHandle(sensor_event.sensor); diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 2ae6ac6f5..29e65388c 100755 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -865,7 +865,7 @@ bool SensorService::threadLoop() { break; } } - + ALOGD("debug4sensor_svc nuSensorService threadLoop count... %zd", count);
for (int i = 0; i < count; i++) { @@ -1013,7 +1013,7 @@ bool SensorService::threadLoop() { bool needsWakeLock = false;
for (const sp<SensorEventConnection>& connection : activeConnections) { - + ALOGD("debug4sensor_svc nuSensorService sendEvents..."); connection->sendEvents(mSensorEventBuffer, count, mSensorEventScratch, mMapFlushEventsToConnections); needsWakeLock |= connection->needsWakeLock(); @@ -1265,12 +1265,14 @@ sp<ISensorEventConnection> SensorService::createSensorEventConnection(const Stri sp<SensorEventConnection> result(new SensorEventConnection(this, uid, connPackageName, requestedMode == DATA_INJECTION, connOpPackageName)); if (requestedMode == DATA_INJECTION) { + ALOGD("debug4sensor_svc nuSensorService addEventConnectionIfNotPresent..."); + mConnectionHolder.addEventConnectionIfNotPresent(result); result->updateLooperRegistration(mLooper); } - + ALOGD("debug4sensor_svc nuSensorService createSensorEventConnection...requestedMode:%d", requestedMode);
return result; } @@ -1662,6 +1664,8 @@ status_t SensorService::enable(const sp<SensorEventConnection>& connection, } else { connection->setFirstFlushPending(handle, false); } + + connection->setFirstFlushPending(handle, false); }
if (err == NO_ERROR) { diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h old mode 100644 new mode 100755 index 052cbfe29..10226ea79 --- a/services/sensorservice/SensorService.h +++ b/services/sensorservice/SensorService.h @@ -53,7 +53,7 @@
#define IGNORE_HARDWARE_FUSION false -#define DEBUG_CONNECTIONS false +#define DEBUG_CONNECTIONS true #define MAX_SOCKET_BUFFER_SIZE_BATCHED (100 * 1024)
zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android/frameworks/native/libs/sensor$ git diff . diff --git a/libs/sensor/Android.bp b/libs/sensor/Android.bp old mode 100644 new mode 100755 index e8154a693..cf46444c2 --- a/libs/sensor/Android.bp +++ b/libs/sensor/Android.bp @@ -38,6 +38,7 @@ cc_library_shared { "libcutils", "libutils", "liblog", + "libutilscallstack", "libhardware", ],
diff --git a/libs/sensor/BitTube.cpp b/libs/sensor/BitTube.cpp old mode 100644 new mode 100755 index 93555c8a3..988d656ed --- a/libs/sensor/BitTube.cpp +++ b/libs/sensor/BitTube.cpp @@ -24,6 +24,15 @@ #include <unistd.h>
#include <binder/Parcel.h> +#include <utils/CallStack.h> + +#define ALOGD_CALLSTACK(...) \ + do { \ + ALOGD(__VA_ARGS__); \ + android::CallStack callstack; \ + callstack.update(); \ + callstack.log(LOG_TAG, ANDROID_LOG_DEBUG, " "); \ + }while (false)
namespace android { @@ -105,6 +114,8 @@ int BitTube::getSendFd() const ssize_t BitTube::write(void const* vaddr, size_t size) { ssize_t err, len; + + do { len = ::send(mSendFd, vaddr, size, MSG_DONTWAIT | MSG_NOSIGNAL); @@ -115,6 +126,8 @@ ssize_t BitTube::write(void const* vaddr, size_t size)
ssize_t BitTube::read(void* vaddr, size_t size) { + + ssize_t err, len; do { len = ::recv(mReceiveFd, vaddr, size, MSG_DONTWAIT); diff --git a/libs/sensor/SensorEventQueue.cpp b/libs/sensor/SensorEventQueue.cpp index 7c587389f..34a61baad 100755 --- a/libs/sensor/SensorEventQueue.cpp +++ b/libs/sensor/SensorEventQueue.cpp @@ -49,11 +49,13 @@ SensorEventQueue::~SensorEventQueue() {
void SensorEventQueue::onFirstRef() { + mSensorChannel = mSensorEventConnection->getSensorChannel(); }
int SensorEventQueue::getFd() const { + ALOGE("debug4sensor_lib SensorEventQueue::getFd %d", mSensorChannel->getFd()); return mSensorChannel->getFd(); }
@@ -61,20 +63,20 @@ int SensorEventQueue::getFd() const ssize_t SensorEventQueue::write(const sp<BitTube>& tube, ASensorEvent const* events, size_t numEvents) { - - - - + ALOGE("debug4sensor_lib SensorEventQueue::write gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + events[0].data[0], events[0].data[1], events[0].data[2], + events[0].data[3], events[0].data[4], events[0].data[5], + events[0].data[6]);
return BitTube::sendObjects(tube, events, numEvents); }
ssize_t SensorEventQueue::read(ASensorEvent* events, size_t numEvents) { - - - - + ALOGE("debug4sensor_lib SensorEventQueue::read gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + events[0].data[0], events[0].data[1], events[0].data[2], + events[0].data[3], events[0].data[4], events[0].data[5], + events[0].data[6]);
if (mAvailable == 0) { ssize_t err = BitTube::recvObjects(mSensorChannel, diff --git a/libs/sensor/SensorManager.cpp b/libs/sensor/SensorManager.cpp old mode 100644 new mode 100755 index a4a5d135c..1886c6775 --- a/libs/sensor/SensorManager.cpp +++ b/libs/sensor/SensorManager.cpp @@ -227,6 +227,7 @@ Sensor const* SensorManager::getDefaultSensor(int type)
sp<SensorEventQueue> SensorManager::createEventQueue(String8 packageName, int mode) { sp<SensorEventQueue> queue; + ALOGE("createEventQueue: connection is NULL. mode:%d", mode);
Mutex::Autolock _l(mLock); while (assertStateLocked() == NO_ERROR) {
[16]+ Stopped git diff .
zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android/hardware/libhardware$ git diff . diff --git a/modules/sensors/multihal.cpp b/modules/sensors/multihal.cpp index df219ff7..4a26add7 100755 --- a/modules/sensors/multihal.cpp +++ b/modules/sensors/multihal.cpp @@ -17,9 +17,9 @@ #include "SensorEventQueue.h" #include "multihal.h"
-#define LOG_NDEBUG 1 + - +#define LOG_NDEBUG 0 #include <log/log.h> #include <cutils/atomic.h> #include <hardware/sensors.h> @@ -155,10 +155,10 @@ void *writerTask(void* ptr) { ALOGV("writerTask before poll() - bufferSize = %d", bufferSize); eventsPolled = device->poll(device, buffer, bufferSize); ALOGV("writerTask poll() got %d events.", eventsPolled); - - - - + ALOGE("debug4sensor_hal writerTask poll() got gyroX: %.6f gyroY: %.6f gyroZ: %.6f accX: %.6f accY: %.6f accZ: %.6f temperature: %.6f ", + buffer[0].data[0], buffer[0].data[1], buffer[0].data[2], + buffer[0].data[3], buffer[0].data[4], buffer[0].data[5], + buffer[0].data[6]);
if (eventsPolled <= 0) { if (eventsPolled < 0) { zhoujinjian@localhost:~/newcc/lagvm/lagvm/LINUX/android/hardware/omosoft/sensor$ git diff . diff --git a/sensors_omo/Android.mk b/sensors_omo/Android.mk index 876638f..fc1b618 100755 --- a/sensors_omo/Android.mk +++ b/sensors_omo/Android.mk @@ -39,6 +39,7 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES := \ liblog \ libcutils \ + libutilscallstack \ libutils
include $(BUILD_SHARED_LIBRARY) diff --git a/sensors_omo/GyroSensor.cpp b/sensors_omo/GyroSensor.cpp index b69f80f..abe7518 100755 --- a/sensors_omo/GyroSensor.cpp +++ b/sensors_omo/GyroSensor.cpp @@ -44,6 +44,16 @@ #include <cutils/properties.h>
#include "GyroSensor.h" +#include <utils/CallStack.h> + +#define ALOGD_CALLSTACK(...) \ + do { \ + ALOGD(__VA_ARGS__); \ + android::CallStack callstack; \ + callstack.update(); \ + callstack.log(LOG_TAG, ANDROID_LOG_DEBUG, " "); \ + }while (false) +
static int epoll_nmeafd; @@ -518,6 +528,7 @@ int GyroSensor::readEvents(sensors_event_t* data, int count) if(DEBUG_GYRO_SENSOR) { D("GyroSensor readEvents need count ==> %d \r\n", count); } + ALOGD_CALLSTACK("GyroSensor::readEvents");
int nn; diff --git a/sensors_omo/nusensors.cpp b/sensors_omo/nusensors.cpp index b62eef5..40060b8 100755 --- a/sensors_omo/nusensors.cpp +++ b/sensors_omo/nusensors.cpp @@ -32,6 +32,17 @@ #include "nusensors.h" #include "LightSensor.h" #include "GyroSensor.h" +#include <utils/CallStack.h> + +#define ALOGD_CALLSTACK(...) \ + do { \ + ALOGD(__VA_ARGS__); \ + android::CallStack callstack; \ + callstack.update(); \ + callstack.log(LOG_TAG, ANDROID_LOG_DEBUG, " "); \ + }while (false) + +
@@ -261,6 +272,7 @@ static int poll__close(struct hw_device_t *dev) static int poll__activate(struct sensors_poll_device_t *dev, int handle, int enabled) { sensors_poll_context_t *ctx = (sensors_poll_context_t *)dev; + ALOGD_CALLSTACK("poll__activate");
LOGI("set active: handle = %d, enable = %d\n", handle, enabled);
@@ -278,6 +290,7 @@ static int poll__activate(struct sensors_poll_device_t *dev, static int poll__setDelay(struct sensors_poll_device_t *dev, int handle, int64_t ns) { sensors_poll_context_t *ctx = (sensors_poll_context_t *)dev; + ALOGD_CALLSTACK("poll__setDelay");
LOGI("set delay: handle = %d, delay = %dns\n", handle, (int)ns);
@@ -286,6 +299,8 @@ static int poll__setDelay(struct sensors_poll_device_t *dev,
static int poll__poll(struct sensors_poll_device_t *dev, sensors_event_t* data, int count) { + ALOGD_CALLSTACK("poll__poll"); + sensors_poll_context_t *ctx = (sensors_poll_context_t *)dev; return ctx->pollEvents(data, count); } @@ -294,6 +309,7 @@ static int poll__batch(struct sensors_poll_device_1 *dev, int handle, int flags, int64_t period_ns, int64_t timeout) { LOGI("set batch: handle = %d, period_ns = %dns, timeout = %dns\n", handle, (int)period_ns, (int)timeout); + ALOGD_CALLSTACK("poll__batch");
sensors_poll_context_t *ctx = (sensors_poll_context_t *)dev; return ctx->setDelay(handle, period_ns); @@ -303,6 +319,7 @@ static int poll__flush(struct sensors_poll_device_1 *dev, int handle) { LOGI("set flush: handle = %d\n", handle); + ALOGD_CALLSTACK("poll__flush"); sensors_poll_context_t *ctx = (sensors_poll_context_t *)dev; return ctx->flush(handle); } @@ -313,6 +330,7 @@ int init_nusensors(hw_module_t const* module, hw_device_t** device) { LOGD("%s\n",SENSOR_VERSION_AND_TIME); int status = -EINVAL; + ALOGD_CALLSTACK("init_nusensors");
sensors_poll_context_t *dev = new sensors_poll_context_t(); if (!dev->getInitialized()) {
[17]+ Stopped git diff .
|