Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb3e63fc authored by Sean Wan's avatar Sean Wan Committed by Android Git Automerger
Browse files

am 7869e224: CW on L: Fix a SIGSEGV crash in sensor service.

* commit '7869e224':
  CW on L: Fix a SIGSEGV crash in sensor service.
parents 2f15fa66 7869e224
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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()