summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-06-24 15:56:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-24 15:56:29 +0000
commite6045537bbce4c4f98e6a1149187bbcdaff57bcd (patch)
tree858ecfa2f20adc32af638235ca933a90c25bb84e /services
parentc8c0992ace7733c983e87e8e7154d844a54e5741 (diff)
parent7a1b5d5dec10f05ec29e7251ada440b47a34c6aa (diff)
downloadframeworks_native-e6045537bbce4c4f98e6a1149187bbcdaff57bcd.zip
frameworks_native-e6045537bbce4c4f98e6a1149187bbcdaff57bcd.tar.gz
frameworks_native-e6045537bbce4c4f98e6a1149187bbcdaff57bcd.tar.bz2
am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit '7a1b5d5dec10f05ec29e7251ada440b47a34c6aa': Fix crash in SensorService. Ignore devices with no sensors.
Diffstat (limited to 'services')
-rw-r--r--services/sensorservice/SensorService.cpp2
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");