diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 21:05:46 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 21:05:46 +0000 |
commit | 9627870ef4d995c5f2dc491cdddffdb71c4c3fe9 (patch) | |
tree | e6abc08851c027058b0050f65741a12c16e83ad4 | |
parent | c142f2613ef9982d59dca254d7a625bdf595f70c (diff) | |
parent | 53c0de9f238ac553b212b7d3c03f660257b04086 (diff) | |
download | libhardware-android-platform-12.1.0_r22.tar.gz |
Snap for 8589293 from 53c0de9f238ac553b212b7d3c03f660257b04086 to sc-v2-platform-releaseandroid-platform-12.1.0_r9android-platform-12.1.0_r8android-platform-12.1.0_r7android-platform-12.1.0_r6android-platform-12.1.0_r5android-platform-12.1.0_r4android-platform-12.1.0_r27android-platform-12.1.0_r26android-platform-12.1.0_r25android-platform-12.1.0_r24android-platform-12.1.0_r23android-platform-12.1.0_r22android-platform-12.1.0_r21android-platform-12.1.0_r20android-platform-12.1.0_r19android-platform-12.1.0_r18android-platform-12.1.0_r17android-platform-12.1.0_r16android-platform-12.1.0_r15android-platform-12.1.0_r14android-platform-12.1.0_r13android-platform-12.1.0_r12android-platform-12.1.0_r11android-platform-12.1.0_r10android12L-platform-release
Change-Id: I676ed4e35562ce11021293fc9f136e76f99fdcaa
-rw-r--r-- | modules/sensors/dynamic_sensor/ConnectionDetector.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/sensors/dynamic_sensor/ConnectionDetector.cpp b/modules/sensors/dynamic_sensor/ConnectionDetector.cpp index c009a707..85b99017 100644 --- a/modules/sensors/dynamic_sensor/ConnectionDetector.cpp +++ b/modules/sensors/dynamic_sensor/ConnectionDetector.cpp @@ -156,6 +156,10 @@ std::string FileConnectionDetector::getFullName(const std::string name) const { void FileConnectionDetector::processExistingFiles() const { auto dirp = ::opendir(mPath.c_str()); + if(dirp == NULL) { + ALOGE("Problem open dir %s, errno: %s", mPath.c_str(), ::strerror(errno)); + return; + } struct dirent *dp; while ((dp = ::readdir(dirp)) != NULL) { const std::string name(dp->d_name); |