Merge "Add a LINT.IfChange to sensors_event_t" am: 878d3d1c7e am: bc544c7d9a am: 8dc381c5cf
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/2320221
Change-Id: I4a4168b3faf69304def53860d835eae2ce02e7ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/modules/sensors/dynamic_sensor/HidRawDevice.cpp b/modules/sensors/dynamic_sensor/HidRawDevice.cpp
index 2588483..6032ed9 100644
--- a/modules/sensors/dynamic_sensor/HidRawDevice.cpp
+++ b/modules/sensors/dynamic_sensor/HidRawDevice.cpp
@@ -204,7 +204,7 @@
int res = ::ioctl(mDevFd, HIDIOCGFEATURE(size), mIoBuffer.data());
if (res < 0) {
LOG_E << "HidRawDevice::getFeature: feature " << static_cast<int>(id)
- << " ioctl returns " << res << " (" << ::strerror(res) << ")" << LOG_ENDL;
+ << " ioctl returned " << res << ", errno: " << ::strerror(errno) << LOG_ENDL;
return false;
}
@@ -249,8 +249,8 @@
std::copy(in.begin(), in.end(), &mIoBuffer[1]);
int res = ::ioctl(mDevFd, HIDIOCSFEATURE(size), mIoBuffer.data());
if (res < 0) {
- LOG_E << "HidRawDevice::setFeature: feature " << id << " ioctl returns " << res
- << " (" << ::strerror(res) << ")" << LOG_ENDL;
+ LOG_E << "HidRawDevice::setFeature: feature " << id << " ioctl returned " << res
+ << ", errno: " << ::strerror(errno) << LOG_ENDL;
return false;
}
return true;
@@ -287,8 +287,8 @@
res = ::write(mDevFd, data.data(), size);
}
if (res < 0) {
- LOG_E << "HidRawDevice::sendReport: output " << id << " write returns " << res
- << " (" << ::strerror(res) << ")" << LOG_ENDL;
+ LOG_E << "HidRawDevice::sendReport: output " << id << " write returned "
+ << res << ", errno: " << ::strerror(errno) << LOG_ENDL;
return false;
}
return true;
@@ -302,8 +302,8 @@
uint8_t buffer[256];
int res = ::read(mDevFd, buffer, 256);
if (res < 0) {
- LOG_E << "HidRawDevice::receiveReport: read returns " << res
- << " (" << ::strerror(res) << ")" << LOG_ENDL;
+ LOG_E << "HidRawDevice::receiveReport: read returned " << res
+ << ", errno: " << ::strerror(errno) << LOG_ENDL;
return false;
}
diff --git a/modules/usbaudio/audio_hal.c b/modules/usbaudio/audio_hal.c
index fe921d6..616c4a6 100644
--- a/modules/usbaudio/audio_hal.c
+++ b/modules/usbaudio/audio_hal.c
@@ -1723,10 +1723,16 @@
if (!wasStandby) {
device_lock(adev);
if (in != NULL) {
- start_input_stream(in);
+ ret = start_input_stream(in);
+ if (!ret) {
+ in->standby = false;
+ }
}
if (out != NULL) {
- start_output_stream(out);
+ ret = start_output_stream(out);
+ if (!ret) {
+ out->standby = false;
+ }
}
device_unlock(adev);
}