CW on L: Fix a SIGSEGV crash in sensor service.
This is to fix b/16189080. BUG: 16189080 Change-Id: I78d44e82f797c0808891acde609040c46745a0bb
This commit is contained in:
parent
2a0e40945b
commit
7869e224aa
@ -490,8 +490,12 @@ bool SensorService::isVirtualSensor(int handle) const {
|
||||
}
|
||||
|
||||
bool SensorService::isWakeUpSensorEvent(const sensors_event_t& event) const {
|
||||
SensorInterface* sensor = mSensorMap.valueFor(event.sensor);
|
||||
return sensor->getSensor().isWakeUpSensor();
|
||||
int handle = event.sensor;
|
||||
if (event.type == SENSOR_TYPE_META_DATA) {
|
||||
handle = event.meta_data.sensor;
|
||||
}
|
||||
SensorInterface* sensor = mSensorMap.valueFor(handle);
|
||||
return sensor != NULL && sensor->getSensor().isWakeUpSensor();
|
||||
}
|
||||
|
||||
Vector<Sensor> SensorService::getSensorList()
|
||||
|
Loading…
Reference in New Issue
Block a user