Loading services/sensorservice/SensorDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ void SensorDevice::initializeSensorList() { } } // Sanity check and clamp power if it is 0 (or close) // Check and clamp power if it is 0 (or close) constexpr float MIN_POWER_MA = 0.001; // 1 microAmp if (sensor.power < MIN_POWER_MA) { ALOGI("%s's reported power %f invalid, clamped to %f", Loading services/sensorservice/SensorEventConnection.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ int SensorService::SensorEventConnection::handleEvent(int fd, int events, void* } else if (numBytesRead == sizeof(uint32_t)) { uint32_t numAcks = 0; memcpy(&numAcks, buf, numBytesRead); // Sanity check to ensure there are no read errors in recv, numAcks is always // Check to ensure there are no read errors in recv, numAcks is always // within the range and not zero. If any of the above don't hold reset // mWakeLockRefCount to zero. if (numAcks > 0 && numAcks < mWakeLockRefCount) { Loading services/sensorservice/SensorService.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1197,7 +1197,7 @@ int32_t SensorService::getIdFromUuid(const Sensor::uuid_t &uuid) const { // We have a dynamic sensor. if (!sHmacGlobalKeyIsValid) { // Rather than risk exposing UUIDs, we cripple dynamic sensors. // Rather than risk exposing UUIDs, we slow down dynamic sensors. ALOGW("HMAC key failure; dynamic sensor getId() will be wrong."); return 0; } Loading @@ -1223,7 +1223,7 @@ int32_t SensorService::getIdFromUuid(const Sensor::uuid_t &uuid) const { sHmacGlobalKey, sizeof(sHmacGlobalKey), uuidAndApp, sizeof(uuidAndApp), hash, &hashLen) == nullptr) { // Rather than risk exposing UUIDs, we cripple dynamic sensors. // Rather than risk exposing UUIDs, we slow down dynamic sensors. ALOGW("HMAC failure; dynamic sensor getId() will be wrong."); return 0; } Loading Loading
services/sensorservice/SensorDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ void SensorDevice::initializeSensorList() { } } // Sanity check and clamp power if it is 0 (or close) // Check and clamp power if it is 0 (or close) constexpr float MIN_POWER_MA = 0.001; // 1 microAmp if (sensor.power < MIN_POWER_MA) { ALOGI("%s's reported power %f invalid, clamped to %f", Loading
services/sensorservice/SensorEventConnection.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ int SensorService::SensorEventConnection::handleEvent(int fd, int events, void* } else if (numBytesRead == sizeof(uint32_t)) { uint32_t numAcks = 0; memcpy(&numAcks, buf, numBytesRead); // Sanity check to ensure there are no read errors in recv, numAcks is always // Check to ensure there are no read errors in recv, numAcks is always // within the range and not zero. If any of the above don't hold reset // mWakeLockRefCount to zero. if (numAcks > 0 && numAcks < mWakeLockRefCount) { Loading
services/sensorservice/SensorService.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1197,7 +1197,7 @@ int32_t SensorService::getIdFromUuid(const Sensor::uuid_t &uuid) const { // We have a dynamic sensor. if (!sHmacGlobalKeyIsValid) { // Rather than risk exposing UUIDs, we cripple dynamic sensors. // Rather than risk exposing UUIDs, we slow down dynamic sensors. ALOGW("HMAC key failure; dynamic sensor getId() will be wrong."); return 0; } Loading @@ -1223,7 +1223,7 @@ int32_t SensorService::getIdFromUuid(const Sensor::uuid_t &uuid) const { sHmacGlobalKey, sizeof(sHmacGlobalKey), uuidAndApp, sizeof(uuidAndApp), hash, &hashLen) == nullptr) { // Rather than risk exposing UUIDs, we cripple dynamic sensors. // Rather than risk exposing UUIDs, we slow down dynamic sensors. ALOGW("HMAC failure; dynamic sensor getId() will be wrong."); return 0; } Loading