sensorKWrite = new SensorKey(sensor, factoryClassName, SensorKey.DataMode.WRITE);
sensorStateKey = new SensorStateKey(sensor, factoryClassName);
try {
report = SensorDeviceApi.getSensorReport(sensor.getName());
DimensionType dimensionType = report.getDimensionType();
if (allowScalar || report == null
|| report.getDimensionType() != DimensionType.SCALAR) {
// Resume the DAO if they were suspended.