* commit 'fb3e63fcc76df5ce47dfaa8d1543a97e55dd39a5': CW on L: Fix a SIGSEGV crash in sensor service.
This commit is contained in:
commit
134a6a2594
@ -490,8 +490,12 @@ bool SensorService::isVirtualSensor(int handle) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SensorService::isWakeUpSensorEvent(const sensors_event_t& event) const {
|
bool SensorService::isWakeUpSensorEvent(const sensors_event_t& event) const {
|
||||||
SensorInterface* sensor = mSensorMap.valueFor(event.sensor);
|
int handle = event.sensor;
|
||||||
return sensor->getSensor().isWakeUpSensor();
|
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()
|
Vector<Sensor> SensorService::getSensorList()
|
||||||
|
Loading…
Reference in New Issue
Block a user