Merge cdb534d9cdd5e3893f4e00c5a13ed745a3c9b5be on remote branch
Change-Id: I5fb2bb976cbdd4fd0e04a08b71828c6bcbb3b730
diff --git a/services/config/src/device_impl.cpp b/services/config/src/device_impl.cpp
index 7c36729..8d036cd 100644
--- a/services/config/src/device_impl.cpp
+++ b/services/config/src/device_impl.cpp
@@ -390,10 +390,9 @@
}
void DeviceImpl::DeviceClientContext::ParseGetWritebackCapabilities(perform_cb _hidl_cb) {
- bool is_wb_ubwc_supported;
- ByteStream output_params;
-
+ bool is_wb_ubwc_supported = false;
int32_t error = intf_->GetWriteBackCapabilities(&is_wb_ubwc_supported);
+ ByteStream output_params;
output_params.setToExternal(reinterpret_cast<uint8_t*>(&is_wb_ubwc_supported),
sizeof(bool));
@@ -439,13 +438,11 @@
void DeviceImpl::DeviceClientContext::ParseIsPowerModeOverrideSupported(
const ByteStream &input_params,
perform_cb _hidl_cb) {
- const uint32_t *disp_id;
- bool supported = false;
- ByteStream output_params;
-
const uint8_t *data = input_params.data();
- disp_id = reinterpret_cast<const uint32_t*>(data);
+ const uint32_t *disp_id = reinterpret_cast<const uint32_t*>(data);
+ bool supported = false;
int32_t error = intf_->IsPowerModeOverrideSupported(*disp_id, &supported);
+ ByteStream output_params;
output_params.setToExternal(reinterpret_cast<uint8_t*>(&supported),
sizeof(bool));
@@ -454,13 +451,11 @@
void DeviceImpl::DeviceClientContext::ParseIsHdrSupported(const ByteStream &input_params,
perform_cb _hidl_cb) {
- const uint32_t *disp_id;
- bool supported;
- ByteStream output_params;
-
const uint8_t *data = input_params.data();
- disp_id = reinterpret_cast<const uint32_t*>(data);
+ const uint32_t *disp_id = reinterpret_cast<const uint32_t*>(data);
+ bool supported = false;
int32_t error = intf_->IsHDRSupported(*disp_id, &supported);
+ ByteStream output_params;
output_params.setToExternal(reinterpret_cast<uint8_t*>(&supported),
sizeof(bool));
@@ -469,13 +464,11 @@
void DeviceImpl::DeviceClientContext::ParseIsWcgSupported(const ByteStream &input_params,
perform_cb _hidl_cb) {
- const int32_t *disp_id;
- bool supported = false;
- ByteStream output_params;
-
const uint8_t *data = input_params.data();
- disp_id = reinterpret_cast<const int32_t*>(data);
+ const int32_t *disp_id = reinterpret_cast<const int32_t*>(data);
+ bool supported = false;
int32_t error = intf_->IsWCGSupported(*disp_id, &supported);
+ ByteStream output_params;
output_params.setToExternal(reinterpret_cast<uint8_t*>(&supported),
sizeof(bool));
@@ -642,10 +635,9 @@
}
void DeviceImpl::DeviceClientContext::ParseIsAsyncVdsSupported(perform_cb _hidl_cb) {
- bool is_supported;
- ByteStream output_params;
-
+ bool is_supported = false;
int32_t error = intf_->IsAsyncVDSCreationSupported(&is_supported);
+ ByteStream output_params;
output_params.setToExternal(reinterpret_cast<uint8_t*>(&is_supported),
sizeof(bool));