Merge Android 14
Bug: 298295554 Merged-In: I086eec8d1726b9f0c42a7b1a26dfcc93f394106e Change-Id: I3bf6625359bfe9fe0c6dfa5e0cc37691e1ef9037
This commit is contained in:
@@ -224,7 +224,11 @@ static int gralloc_alloc(alloc_device_t* dev,
|
|||||||
case HAL_PIXEL_FORMAT_RAW16:
|
case HAL_PIXEL_FORMAT_RAW16:
|
||||||
bytesPerPixel = 2;
|
bytesPerPixel = 2;
|
||||||
break;
|
break;
|
||||||
|
case HAL_PIXEL_FORMAT_BLOB:
|
||||||
|
bytesPerPixel = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
ALOGE("gralloc_alloc bad format %d", format);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ bool HidRawDevice::getFeature(uint8_t id, std::vector<uint8_t> *out) {
|
|||||||
int res = ::ioctl(mDevFd, HIDIOCGFEATURE(size), mIoBuffer.data());
|
int res = ::ioctl(mDevFd, HIDIOCGFEATURE(size), mIoBuffer.data());
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOG_E << "HidRawDevice::getFeature: feature " << static_cast<int>(id)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,8 +249,8 @@ bool HidRawDevice::setFeature(uint8_t id, const std::vector<uint8_t> &in) {
|
|||||||
std::copy(in.begin(), in.end(), &mIoBuffer[1]);
|
std::copy(in.begin(), in.end(), &mIoBuffer[1]);
|
||||||
int res = ::ioctl(mDevFd, HIDIOCSFEATURE(size), mIoBuffer.data());
|
int res = ::ioctl(mDevFd, HIDIOCSFEATURE(size), mIoBuffer.data());
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOG_E << "HidRawDevice::setFeature: feature " << id << " ioctl returns " << res
|
LOG_E << "HidRawDevice::setFeature: feature " << id << " ioctl returned " << res
|
||||||
<< " (" << ::strerror(res) << ")" << LOG_ENDL;
|
<< ", errno: " << ::strerror(errno) << LOG_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -287,8 +287,8 @@ bool HidRawDevice::sendReport(uint8_t id, std::vector<uint8_t> &data) {
|
|||||||
res = ::write(mDevFd, data.data(), size);
|
res = ::write(mDevFd, data.data(), size);
|
||||||
}
|
}
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOG_E << "HidRawDevice::sendReport: output " << id << " write returns " << res
|
LOG_E << "HidRawDevice::sendReport: output " << id << " write returned "
|
||||||
<< " (" << ::strerror(res) << ")" << LOG_ENDL;
|
<< res << ", errno: " << ::strerror(errno) << LOG_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -302,8 +302,8 @@ bool HidRawDevice::receiveReport(uint8_t *id, std::vector<uint8_t> *data) {
|
|||||||
uint8_t buffer[256];
|
uint8_t buffer[256];
|
||||||
int res = ::read(mDevFd, buffer, 256);
|
int res = ::read(mDevFd, buffer, 256);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOG_E << "HidRawDevice::receiveReport: read returns " << res
|
LOG_E << "HidRawDevice::receiveReport: read returned " << res
|
||||||
<< " (" << ::strerror(res) << ")" << LOG_ENDL;
|
<< ", errno: " << ::strerror(errno) << LOG_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user