diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-14 23:16:13 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-14 23:16:13 +0000 |
commit | 79c8693b61da4934dbf7cb45e3c9872b717ed62e (patch) | |
tree | 05085877a581af994a4b7006d71d2b3410eb19af | |
parent | 1f55e13b8219eeeb52ba0f4b5ad4fc355975332c (diff) | |
parent | 92745f7aebcb25584b97d3c29bc94148d03ad5db (diff) | |
download | native-79c8693b61da4934dbf7cb45e3c9872b717ed62e.tar.gz |
Snap for 10322758 from 92745f7aebcb25584b97d3c29bc94148d03ad5db to udc-release
Change-Id: I15162ace6165bf6c5d79e40337c9291106337e69
-rw-r--r-- | services/sensorservice/SensorService.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 398d60242b..90d75414d6 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -1055,7 +1055,12 @@ bool SensorService::threadLoop() { if (count < 0) { if(count == DEAD_OBJECT && device.isReconnecting()) { device.reconnect(); - continue; + // There are no "real" events at this point, but do not skip the rest of the loop + // if there are pending runtime events. + Mutex::Autolock _l(&mLock); + if (mRuntimeSensorEventQueue.empty()) { + continue; + } } else { ALOGE("sensor poll failed (%s)", strerror(-count)); break; |