diff options
author | Aravind Akella <aakella@google.com> | 2015-06-24 15:34:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-24 15:34:59 +0000 |
commit | 7a1b5d5dec10f05ec29e7251ada440b47a34c6aa (patch) | |
tree | e6fdf860770ce882b904473106b8c9f90e9ba492 /services/sensorservice | |
parent | 0638a4fac7250e260c0102c770090cb7eefca936 (diff) | |
parent | ee155cadb23e84542cbf445c2aac89ae63df4cc7 (diff) | |
download | frameworks_native-7a1b5d5dec10f05ec29e7251ada440b47a34c6aa.zip frameworks_native-7a1b5d5dec10f05ec29e7251ada440b47a34c6aa.tar.gz frameworks_native-7a1b5d5dec10f05ec29e7251ada440b47a34c6aa.tar.bz2 |
Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
Diffstat (limited to 'services/sensorservice')
-rw-r--r-- | services/sensorservice/SensorService.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 45d467d..550107c 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -276,6 +276,8 @@ status_t SensorService::dump(int fd, const Vector<String16>& args) dev.enableAllSensors(); } return status_t(NO_ERROR); + } else if (mSensorList.size() == 0) { + result.append("No Sensors on the device\n"); } else { // Default dump the sensor list and debugging information. result.append("Sensor List:\n"); |