-Sensor::Sensor()
- : mHandle(0), mType(0),
- mMinValue(0), mMaxValue(0), mResolution(0),
- mPower(0), mMinDelay(0), mFifoReservedEventCount(0), mFifoMaxEventCount(0),
- mMaxDelay(0), mFlags(0)
-{
-}
-
-Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
-{
- mName = hwSensor->name;
- mVendor = hwSensor->vendor;
- mVersion = hwSensor->version;
- mHandle = hwSensor->handle;
- mType = hwSensor->type;
+Sensor::Sensor(const char * name) :
+ mName(name), mHandle(0), mType(0),
+ mMinValue(0), mMaxValue(0), mResolution(0),
+ mPower(0), mMinDelay(0), mVersion(0), mFifoReservedEventCount(0),
+ mFifoMaxEventCount(0), mRequiredAppOp(0),
+ mMaxDelay(0), mFlags(0) {
+}
+
+Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) :
+ Sensor(*hwSensor, uuid_t(), halVersion) {
+}
+
+Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersion) {
+ mName = hwSensor.name;
+ mVendor = hwSensor.vendor;
+ mVersion = hwSensor.version;
+ mHandle = hwSensor.handle;
+ mType = hwSensor.type;