Merge "Camera: require torch API support for Android Q" into qt-dev
diff --git a/camera/common/1.0/default/CameraMetadata.cpp b/camera/common/1.0/default/CameraMetadata.cpp
index 4c54931..eb1bd1c 100644
--- a/camera/common/1.0/default/CameraMetadata.cpp
+++ b/camera/common/1.0/default/CameraMetadata.cpp
@@ -171,17 +171,16 @@
}
status_t CameraMetadata::checkType(uint32_t tag, uint8_t expectedType) {
- int tagType = get_camera_metadata_tag_type(tag);
+ int tagType = get_local_camera_metadata_tag_type(tag, mBuffer);
if ( CC_UNLIKELY(tagType == -1)) {
ALOGE("Update metadata entry: Unknown tag %d", tag);
return INVALID_OPERATION;
}
if ( CC_UNLIKELY(tagType != expectedType) ) {
ALOGE("Mismatched tag type when updating entry %s (%d) of type %s; "
- "got type %s data instead ",
- get_camera_metadata_tag_name(tag), tag,
- camera_metadata_type_names[tagType],
- camera_metadata_type_names[expectedType]);
+ "got type %s data instead ",
+ get_local_camera_metadata_tag_name(tag, mBuffer), tag,
+ camera_metadata_type_names[tagType], camera_metadata_type_names[expectedType]);
return INVALID_OPERATION;
}
return OK;
@@ -298,7 +297,7 @@
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
return INVALID_OPERATION;
}
- int type = get_camera_metadata_tag_type(tag);
+ int type = get_local_camera_metadata_tag_type(tag, mBuffer);
if (type == -1) {
ALOGE("%s: Tag %d not found", __FUNCTION__, tag);
return BAD_VALUE;
@@ -332,9 +331,9 @@
}
if (res != OK) {
- ALOGE("%s: Unable to update metadata entry %s.%s (%x): %s (%d)",
- __FUNCTION__, get_camera_metadata_section_name(tag),
- get_camera_metadata_tag_name(tag), tag, strerror(-res), res);
+ ALOGE("%s: Unable to update metadata entry %s.%s (%x): %s (%d)", __FUNCTION__,
+ get_local_camera_metadata_section_name(tag, mBuffer),
+ get_local_camera_metadata_tag_name(tag, mBuffer), tag, strerror(-res), res);
}
IF_ALOGV() {
@@ -391,18 +390,16 @@
if (res == NAME_NOT_FOUND) {
return OK;
} else if (res != OK) {
- ALOGE("%s: Error looking for entry %s.%s (%x): %s %d",
- __FUNCTION__,
- get_camera_metadata_section_name(tag),
- get_camera_metadata_tag_name(tag), tag, strerror(-res), res);
+ ALOGE("%s: Error looking for entry %s.%s (%x): %s %d", __FUNCTION__,
+ get_local_camera_metadata_section_name(tag, mBuffer),
+ get_local_camera_metadata_tag_name(tag, mBuffer), tag, strerror(-res), res);
return res;
}
res = delete_camera_metadata_entry(mBuffer, entry.index);
if (res != OK) {
- ALOGE("%s: Error deleting entry %s.%s (%x): %s %d",
- __FUNCTION__,
- get_camera_metadata_section_name(tag),
- get_camera_metadata_tag_name(tag), tag, strerror(-res), res);
+ ALOGE("%s: Error deleting entry %s.%s (%x): %s %d", __FUNCTION__,
+ get_local_camera_metadata_section_name(tag, mBuffer),
+ get_local_camera_metadata_tag_name(tag, mBuffer), tag, strerror(-res), res);
}
return res;
}
diff --git a/camera/common/1.0/default/OWNERS b/camera/common/1.0/default/OWNERS
index f112576..70128c7 100644
--- a/camera/common/1.0/default/OWNERS
+++ b/camera/common/1.0/default/OWNERS
@@ -1 +1 @@
-include platform/frameworks/av/camera:/OWNERS
+include platform/frameworks/av:camera/OWNERS
diff --git a/camera/device/3.4/default/CameraDeviceSession.cpp b/camera/device/3.4/default/CameraDeviceSession.cpp
index e00b3f8..03b6050 100644
--- a/camera/device/3.4/default/CameraDeviceSession.cpp
+++ b/camera/device/3.4/default/CameraDeviceSession.cpp
@@ -187,7 +187,6 @@
mPhysicalCameraIdMap[id] = requestedConfiguration.streams[i].physicalCameraId;
mStreamMap[id].data_space = mapToLegacyDataspace(
mStreamMap[id].data_space);
- mStreamMap[id].physical_camera_id = mPhysicalCameraIdMap[id].c_str();
mCirculatingBuffers.emplace(stream.mId, CirculatingBuffers{});
} else {
// width/height/format must not change, but usage/rotation might need to change
@@ -206,6 +205,11 @@
mStreamMap[id].rotation = (int) requestedConfiguration.streams[i].v3_2.rotation;
mStreamMap[id].usage = (uint32_t) requestedConfiguration.streams[i].v3_2.usage;
}
+ // It is possible for the entry in 'mStreamMap' to get initialized by an older
+ // HIDL API. Make sure that the physical id is always initialized when using
+ // a more recent API call.
+ mStreamMap[id].physical_camera_id = mPhysicalCameraIdMap[id].c_str();
+
(*streams)[i] = &mStreamMap[id];
}
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 797a198..33d23a0 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -1374,19 +1374,20 @@
}
hidl_vec<StreamBuffer> tmpRetBuffers(bufReq.numBuffersRequested);
- for (size_t i = 0; i < bufReq.numBuffersRequested; i++) {
+ for (size_t j = 0; j < bufReq.numBuffersRequested; j++) {
hidl_handle buffer_handle;
mParent->allocateGraphicBuffer(stream.width, stream.height,
android_convertGralloc1To0Usage(
halStream.producerUsage, halStream.consumerUsage),
halStream.overrideFormat, &buffer_handle);
- tmpRetBuffers[i] = {stream.id, mNextBufferId, buffer_handle, BufferStatus::OK,
+ tmpRetBuffers[j] = {stream.id, mNextBufferId, buffer_handle, BufferStatus::OK,
nullptr, nullptr};
mOutstandingBufferIds[idx].insert(std::make_pair(mNextBufferId++, buffer_handle));
}
atLeastOneStreamOk = true;
- bufRets[0].val.buffers(std::move(tmpRetBuffers));
+ bufRets[i].streamId = stream.id;
+ bufRets[i].val.buffers(std::move(tmpRetBuffers));
}
if (allStreamOk) {
diff --git a/compatibility_matrices/compatibility_matrix.3.xml b/compatibility_matrices/compatibility_matrix.3.xml
index 4cb3776..9933b33 100644
--- a/compatibility_matrices/compatibility_matrix.3.xml
+++ b/compatibility_matrices/compatibility_matrix.3.xml
@@ -193,7 +193,7 @@
</hal>
<hal format="hidl" optional="false">
<name>android.hardware.graphics.composer</name>
- <version>2.1-3</version>
+ <version>2.1-2</version>
<interface>
<name>IComposer</name>
<instance>default</instance>
@@ -302,7 +302,8 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio</name>
- <version>1.0-2</version>
+ <!-- ref: b/123249760. 1.3 added here since 1.3 and 1.4 introduced in Q -->
+ <version>1.0-3</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 09cbc20..999c29c 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -112,6 +112,14 @@
</interface>
</hal>
<hal format="hidl" optional="true">
+ <name>android.hardware.broadcastradio</name>
+ <version>2.0</version>
+ <interface>
+ <name>IBroadcastRadio</name>
+ <regex-instance>.*</regex-instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
<name>android.hardware.camera.provider</name>
<version>2.4-5</version>
<interface>
@@ -271,7 +279,16 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
+ <name>android.hardware.media.c2</name>
+ <version>1.0</version>
+ <interface>
+ <name>IComponentStore</name>
+ <regex-instance>default[0-9]*</regex-instance>
+ <regex-instance>vendor[0-9]*_software</regex-instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
<name>android.hardware.media.omx</name>
<version>1.0</version>
<interface>
@@ -333,8 +350,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio</name>
- <!-- Todo<b/123249760> Allow only 1.4 for Q-->
- <version>1.3-4</version>
+ <version>1.4</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
diff --git a/current.txt b/current.txt
index a609f97..875be97 100644
--- a/current.txt
+++ b/current.txt
@@ -470,7 +470,7 @@
4deafcdcffa2d002119e7f58810b767a84666e76475aae68e757ec2845d9756d android.hardware.gnss@2.0::IGnss
db6bdf6dfc5edf6c85d2944976db899227abb51079c893874353c322342c50b6 android.hardware.gnss@2.0::IGnssBatching
1f89392f1ebb693d8fa6f50324b1635fc79fab246d31900e63998e1b0e17511c android.hardware.gnss@2.0::IGnssBatchingCallback
-b11a5e4a1602d3f408716b6fe2c578a79f060d571aad8e828f9a4426d161fbcf android.hardware.gnss@2.0::IGnssCallback
+64232037109a5e5f53ab0377e755ec494ae93fcb5279e6eea71dec2e7ac6fbfc android.hardware.gnss@2.0::IGnssCallback
ecc966c68bddbd95c8dae782b84204cf01c75734675e8769963f3b5106ec128b android.hardware.gnss@2.0::IGnssConfiguration
b670bae2ab8517336290532e364502b4db9120340d75474ccc8442b1b15d6ab7 android.hardware.gnss@2.0::IGnssDebug
c67759f5d6387d273b66729180d03690e827f0b6b8d4e13ce2ff42d31b224065 android.hardware.gnss@2.0::IGnssMeasurement
@@ -488,7 +488,7 @@
7a2d64095252f85781b2d521f4f11d04ce774544feececcec2088c568656e93c android.hardware.graphics.common@1.2::types
3dff04a36b86660b5807414587e530bb0c294ed56fdff06f8915ba0a9b73f974 android.hardware.graphics.composer@2.3::IComposer
54bc1dc874f8bc0781767786075dafd33a0796c1eea7d2317231b8929280e946 android.hardware.graphics.composer@2.3::IComposerClient
-5c8bf8e1af9efe225a4661db8c08ff1b7e13fdc8ed49f35291bd0b6c9436b8f2 android.hardware.graphics.mapper@3.0::IMapper
+033e096cb65e5093ee1d0e473892b9a487911d4611dbb65ebecb5cef18338923 android.hardware.graphics.mapper@3.0::IMapper
7183d9d9acfa41a61a64bdfed548e98299265a7bb1821a3ed204173b5c2cfd4a android.hardware.graphics.mapper@3.0::types
c3f831a66d5815baf74f5b82fe79cf099542ddae4dfab3f388e1d41828e794fc android.hardware.health.storage@1.0::IGarbageCollectCallback
dd1ec219f5d2e2b33c6c0bcb92e63bbedb36f7c716413462848f6b6ae74fc864 android.hardware.health.storage@1.0::IStorage
@@ -515,7 +515,7 @@
92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
36e1064c869965dee533c537cefbe87e54db8bd8cd45be7e0e93e00e8a43863a android.hardware.neuralnetworks@1.2::IPreparedModel
e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-9b3963253e521cca19fd81aeca83aee6dcfe3bdf2805c07cb2d3f64381709b71 android.hardware.neuralnetworks@1.2::types
+b75126d572c1788682a679ab53c2dbdf3fcd75f754b1370dbf09aaad0e19d397 android.hardware.neuralnetworks@1.2::types
cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc
abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types
4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats
diff --git a/gnss/2.0/IGnssCallback.hal b/gnss/2.0/IGnssCallback.hal
index a96fd6c..d6db9cc 100644
--- a/gnss/2.0/IGnssCallback.hal
+++ b/gnss/2.0/IGnssCallback.hal
@@ -30,32 +30,13 @@
/** Flags for the gnssSetCapabilities callback. */
@export(name="", value_prefix="GPS_CAPABILITY_")
- enum Capabilities : uint32_t {
- /**
- * GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
- * If this is not set, then the framework will use 1000ms for
- * minInterval and must call start() and stop() to schedule the GNSS.
- */
- SCHEDULING = 1 << 0,
- /** GNSS supports MS-Based AGNSS mode */
- MSB = 1 << 1,
- /** GNSS supports MS-Assisted AGNSS mode */
- MSA = 1 << 2,
- /** GNSS supports single-shot fixes */
- SINGLE_SHOT = 1 << 3,
- /** GNSS supports on demand time injection */
- ON_DEMAND_TIME = 1 << 4,
- /**
- * Values for the flags removed from IGnssCallback.hal@1.0 Capabilities
- * enum are marked as reserved and not reused here to avoid confusion.
- */
- RESERVED_1 = 1 << 5,
- RESERVED_2 = 1 << 6,
- RESERVED_3 = 1 << 7,
+ enum Capabilities : @1.0::IGnssCallback.Capabilities {
/** GNSS supports low power mode */
- LOW_POWER_MODE = 1 << 8,
+ LOW_POWER_MODE = 1 << 8,
/** GNSS supports blacklisting satellites */
- SATELLITE_BLACKLIST = 1 << 9
+ SATELLITE_BLACKLIST = 1 << 9,
+ /** GNSS supports measurement corrections */
+ MEASUREMENT_CORRECTIONS = 1 << 10
};
/**
diff --git a/gnss/2.0/default/Gnss.cpp b/gnss/2.0/default/Gnss.cpp
index 75c2385..3d64fc3 100644
--- a/gnss/2.0/default/Gnss.cpp
+++ b/gnss/2.0/default/Gnss.cpp
@@ -280,7 +280,8 @@
sGnssCallback_2_0 = callback;
using Capabilities = V2_0::IGnssCallback::Capabilities;
- const auto capabilities = Capabilities::LOW_POWER_MODE | Capabilities::SATELLITE_BLACKLIST;
+ const auto capabilities = Capabilities::MEASUREMENTS | Capabilities::MEASUREMENT_CORRECTIONS |
+ Capabilities::LOW_POWER_MODE | Capabilities::SATELLITE_BLACKLIST;
auto ret = sGnssCallback_2_0->gnssSetCapabilitiesCb_2_0(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
diff --git a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
index 0682f84..be182a9 100644
--- a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
+++ b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
@@ -289,19 +289,21 @@
/*
* TestGnssMeasurementCorrectionsCapabilities:
- * If the GnssMeasurementCorrectionsExtension is not null, verifies that the measurement corrections
+ * If measurement corrections capability is supported, verifies that the measurement corrections
* capabilities are reported and the mandatory LOS_SATS or the EXCESS_PATH_LENGTH
* capability flag is set.
*/
TEST_F(GnssHalTest, TestGnssMeasurementCorrectionsCapabilities) {
- // Setup measurement corrections callback.
- auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections();
- ASSERT_TRUE(measurementCorrections.isOk());
- sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections;
- if (iMeasurementCorrections == nullptr) {
+ if (!(last_capabilities_ & IGnssCallback::Capabilities::MEASUREMENT_CORRECTIONS)) {
return;
}
+ auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections();
+ ASSERT_TRUE(measurementCorrections.isOk());
+ sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections;
+ ASSERT_NE(iMeasurementCorrections, nullptr);
+
+ // Setup measurement corrections callback.
sp<IMeasurementCorrectionsCallback> iMeasurementCorrectionsCallback =
new GnssMeasurementCorrectionsCallback(*this);
iMeasurementCorrections->setCallback(iMeasurementCorrectionsCallback);
@@ -316,17 +318,19 @@
/*
* TestGnssMeasurementCorrections:
- * If the GnssMeasurementCorrectionsExtension is not null, verifies that it supports the
+ * If measurement corrections capability is supported, verifies that it supports the
* gnss.measurement_corrections@1.0::IMeasurementCorrections interface by invoking a method.
*/
TEST_F(GnssHalTest, TestGnssMeasurementCorrections) {
+ if (!(last_capabilities_ & IGnssCallback::Capabilities::MEASUREMENT_CORRECTIONS)) {
+ return;
+ }
+
// Verify IMeasurementCorrections is supported.
auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections();
ASSERT_TRUE(measurementCorrections.isOk());
sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections;
- if (iMeasurementCorrections == nullptr) {
- return;
- }
+ ASSERT_NE(iMeasurementCorrections, nullptr);
sp<IMeasurementCorrectionsCallback> iMeasurementCorrectionsCallback =
new GnssMeasurementCorrectionsCallback(*this);
diff --git a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
index 1df496c..18d184e 100644
--- a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
+++ b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
@@ -44,7 +44,7 @@
if (mMapper3) {
return true;
}
- ALOGW_IF(!mMapper3, "failed to get mapper 3.0 service");
+ ALOGD_IF(!mMapper3, "failed to get mapper 3.0 service, falling back to mapper 2.0");
mMapper2 = mapper::V2_0::IMapper::getService();
ALOGE_IF(!mMapper2, "failed to get mapper 2.0 service");
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
index 1b40795..3792c2e 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
@@ -22,7 +22,6 @@
#include <android/hardware/graphics/composer/2.3/IComposerClient.h>
#include <composer-hal/2.2/ComposerResources.h>
-#include <composer-hal/2.3/ComposerClient.h>
#include <composer-hal/2.3/ComposerCommandEngine.h>
#include <composer-hal/2.3/ComposerHal.h>
diff --git a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
index 9d67e04..4829e24 100644
--- a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
+++ b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
@@ -221,10 +221,6 @@
Error getDisplayCapabilities(
Display display, hidl_vec<IComposerClient::DisplayCapability>* outCapabilities) override {
- if (!mDispatch.getDisplayCapabilities) {
- return Error::UNSUPPORTED;
- }
-
uint32_t count = 0;
int32_t error = mDispatch.getDisplayCapabilities(mDevice, display, &count, nullptr);
if (error != HWC2_ERROR_NONE) {
@@ -328,8 +324,8 @@
if (error != HWC2_ERROR_NONE) {
return error;
}
- mChangedLayersCache[display].reserve(typesCount);
- mCompositionTypesCache[display].reserve(typesCount);
+ mChangedLayersCache[display].resize(typesCount);
+ mCompositionTypesCache[display].resize(typesCount);
error = BaseType2_1::getChangedCompositionTypesInternal(
display, &typesCount, mChangedLayersCache[display].data(),
mCompositionTypesCache[display].data());
diff --git a/graphics/composer/2.3/utils/vts/ComposerVts.cpp b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
index 4de85d6..b763209 100644
--- a/graphics/composer/2.3/utils/vts/ComposerVts.cpp
+++ b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
@@ -177,13 +177,17 @@
return error;
}
-std::vector<IComposerClient::DisplayCapability> ComposerClient::getDisplayCapabilities(
- Display display) {
+Error ComposerClient::getDisplayCapabilities(
+ Display display, std::vector<IComposerClient::DisplayCapability>* outCapabilities) {
std::vector<IComposerClient::DisplayCapability> capabilities;
- mClient->getDisplayCapabilities(
- display, [&](const auto&, const auto& tmpCapabilities) { capabilities = tmpCapabilities; });
+ Error error = Error::NONE;
+ mClient->getDisplayCapabilities(display,
+ [&](const auto& tmpError, const auto& tmpCapabilities) {
+ error = tmpError;
+ *outCapabilities = tmpCapabilities;
+ });
- return capabilities;
+ return error;
}
bool ComposerClient::getDisplayBrightnessSupport(Display display) {
diff --git a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
index a0e764d..0d4e5b8 100644
--- a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
+++ b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
@@ -95,7 +95,9 @@
bool getClientTargetSupport_2_3(Display display, uint32_t width, uint32_t height,
PixelFormat format, Dataspace dataspace);
- std::vector<IComposerClient::DisplayCapability> getDisplayCapabilities(Display display);
+ Error getDisplayCapabilities(
+ Display display,
+ std::vector<IComposerClient::DisplayCapability>* outDisplayCapabilities);
std::vector<IComposerClient::PerFrameMetadataKey> getPerFrameMetadataKeys_2_3(Display display);
diff --git a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
index b983e42..56b2e33 100644
--- a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
+++ b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
@@ -565,16 +565,19 @@
* Test some constraints.
*/
TEST_F(GraphicsComposerHidlTest, getDisplayCapabilitiesBasic) {
- auto capabilities = mComposerClient->getDisplayCapabilities(mPrimaryDisplay);
- bool hasDozeSupport = std::find(capabilities.begin(), capabilities.end(),
- IComposerClient::DisplayCapability::DOZE) != capabilities.end();
+ std::vector<IComposerClient::DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
+ ASSERT_EQ(Error::NONE, error);
+ const bool hasDozeSupport =
+ std::find(capabilities.begin(), capabilities.end(),
+ IComposerClient::DisplayCapability::DOZE) != capabilities.end();
EXPECT_EQ(mComposerClient->getDozeSupport(mPrimaryDisplay), hasDozeSupport);
}
TEST_F(GraphicsComposerHidlTest, getDisplayCapabilitiesBadDisplay) {
- mComposerClient->getRaw()->getDisplayCapabilities(
- mInvalidDisplayId,
- [&](const auto& tmpError, const auto&) { EXPECT_EQ(Error::BAD_DISPLAY, tmpError); });
+ std::vector<IComposerClient::DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mInvalidDisplayId, &capabilities);
+ EXPECT_EQ(Error::BAD_DISPLAY, error);
}
TEST_F(GraphicsComposerHidlTest, SetLayerPerFrameMetadataBlobs) {
@@ -604,7 +607,9 @@
* Test that getDisplayBrightnessSupport works as expected.
*/
TEST_F(GraphicsComposerHidlTest, getDisplayBrightnessSupport) {
- auto capabilities = mComposerClient->getDisplayCapabilities(mPrimaryDisplay);
+ std::vector<IComposerClient::DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
+ ASSERT_EQ(Error::NONE, error);
bool brightnessSupport =
std::find(capabilities.begin(), capabilities.end(),
IComposerClient::DisplayCapability::BRIGHTNESS) != capabilities.end();
@@ -616,9 +621,9 @@
*/
TEST_F(GraphicsComposerHidlTest, setDisplayBrightness) {
if (!mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay)) {
- EXPECT_EQ(mComposerClient->getRaw()->setDisplayBrightness(mPrimaryDisplay, 0.5f),
- Error::UNSUPPORTED);
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.5f), Error::UNSUPPORTED);
GTEST_SUCCEED() << "Brightness operations are not supported";
+ return;
}
EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.0f), Error::NONE);
diff --git a/graphics/mapper/3.0/IMapper.hal b/graphics/mapper/3.0/IMapper.hal
index a0e4d7a..71b56d9 100644
--- a/graphics/mapper/3.0/IMapper.hal
+++ b/graphics/mapper/3.0/IMapper.hal
@@ -16,8 +16,8 @@
package android.hardware.graphics.mapper@3.0;
-import android.hardware.graphics.common@1.1::BufferUsage;
-import android.hardware.graphics.common@1.1::PixelFormat;
+import android.hardware.graphics.common@1.2::BufferUsage;
+import android.hardware.graphics.common@1.2::PixelFormat;
import android.hardware.graphics.common@1.2::Rect;
interface IMapper {
diff --git a/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp b/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
index cfae635..ff73ecf 100644
--- a/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
+++ b/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
@@ -32,8 +32,8 @@
namespace vts {
namespace {
-using android::hardware::graphics::common::V1_0::BufferUsage;
-using android::hardware::graphics::common::V1_1::PixelFormat;
+using android::hardware::graphics::common::V1_2::BufferUsage;
+using android::hardware::graphics::common::V1_2::PixelFormat;
// Test environment for graphics.mapper.
class GraphicsMapperHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index 67a61c1..839114f 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -3516,7 +3516,7 @@
* with input0.
*
* Outputs:
- * * 0: The sum, a tensor of the same {@link OperandType} as input0.
+ * * 0: A tensor of the same {@link OperandType} as input0.
*
* Available since API level 29.
*/
@@ -3537,7 +3537,7 @@
* with input0.
*
* Outputs:
- * * 0: The sum, a tensor of the same {@link OperandType} as input0.
+ * * 0: A tensor of the same {@link OperandType} as input0.
*
* Available since API level 29.
*/
diff --git a/nfc/1.0/default/OWNERS b/nfc/1.0/default/OWNERS
index 984e5f9..5febd1d 100644
--- a/nfc/1.0/default/OWNERS
+++ b/nfc/1.0/default/OWNERS
@@ -1,2 +1,2 @@
-eisenbach@google.com
-kandoiruchi@google.com
+rmojumder@google.com
+zachoverflow@google.com
diff --git a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
index cc2f3df..d0f2e84 100644
--- a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
+++ b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
@@ -192,6 +192,9 @@
} else {
EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
}
+ for (int i = 0; i < temperatures.size(); ++i) {
+ EXPECT_LT(0u, temperatures[i].name.size());
+ }
});
auto types = hidl_enum_range<TemperatureType>();
for (const auto& type : types) {
@@ -204,6 +207,7 @@
}
for (int i = 0; i < temperatures.size(); ++i) {
EXPECT_EQ(type, temperatures[i].type);
+ EXPECT_LT(0u, temperatures[i].name.size());
}
});
}
@@ -246,6 +250,9 @@
} else {
EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
}
+ for (int i = 0; i < cooling_devices.size(); ++i) {
+ EXPECT_LT(0u, cooling_devices[i].name.size());
+ }
});
for (int i = 0; i <= static_cast<int>(CoolingType::COMPONENT); ++i) {
auto type = static_cast<CoolingType>(i);
@@ -258,6 +265,7 @@
}
for (int i = 0; i < cooling_devices.size(); ++i) {
EXPECT_EQ(type, cooling_devices[i].type);
+ EXPECT_LT(0u, cooling_devices[i].name.size());
}
});
}