summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-06-24 16:08:13 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-24 16:08:13 +0000
commit12b26278dfa582b77c657d1d2bdf75e9443d4062 (patch)
tree37d9e4baeb62b97373e99a14a02116b13aa2f4c5 /services
parente2bfdfafae7b0e80f319a6be55dd0914ce3c53ff (diff)
parente6045537bbce4c4f98e6a1149187bbcdaff57bcd (diff)
downloadframeworks_native-12b26278dfa582b77c657d1d2bdf75e9443d4062.zip
frameworks_native-12b26278dfa582b77c657d1d2bdf75e9443d4062.tar.gz
frameworks_native-12b26278dfa582b77c657d1d2bdf75e9443d4062.tar.bz2
am e6045537: am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit 'e6045537bbce4c4f98e6a1149187bbcdaff57bcd': 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");