Fix accidental implicit fallthroughs am: e43fe9ddf2
Change-Id: I9bf99133ea0cf8b5cd4c4e4010d5a8e5a29b2547
This commit is contained in:
commit
876dd34376
1 changed files with 3 additions and 0 deletions
|
@ -676,6 +676,7 @@ bool HidRawSensor::detectAndroidCustomSensor(const std::string &description) {
|
|||
mFeatureInfo.type = SENSOR_TYPE_AMBIENT_TEMPERATURE;
|
||||
mFeatureInfo.typeString = SENSOR_STRING_TYPE_AMBIENT_TEMPERATURE;
|
||||
typeParsed = true;
|
||||
break;
|
||||
case SENSOR_TYPE_LIGHT:
|
||||
mFeatureInfo.type = SENSOR_TYPE_LIGHT;
|
||||
mFeatureInfo.typeString = SENSOR_STRING_TYPE_LIGHT;
|
||||
|
@ -917,12 +918,14 @@ int HidRawSensor::batch(int64_t samplingPeriod, int64_t batchingPeriod) {
|
|||
periodMs = std::min(periodMs, static_cast<int64_t>(UINT16_MAX));
|
||||
buffer[mReportIntervalOffset] = periodMs & 0xFF;
|
||||
buffer[mReportIntervalOffset + 1] = (periodMs >> 8) & 0xFF;
|
||||
break;
|
||||
case sizeof(uint32_t):
|
||||
periodMs = std::min(periodMs, static_cast<int64_t>(UINT32_MAX));
|
||||
buffer[mReportIntervalOffset] = periodMs & 0xFF;
|
||||
buffer[mReportIntervalOffset + 1] = (periodMs >> 8) & 0xFF;
|
||||
buffer[mReportIntervalOffset + 2] = (periodMs >> 16) & 0xFF;
|
||||
buffer[mReportIntervalOffset + 3] = (periodMs >> 24) & 0xFF;
|
||||
break;
|
||||
}
|
||||
ok = device->setFeature(id, buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue