Merge "Update AIDL files accidentally diverged from HIDL / libcamera_metadata." into tm-dev
diff --git a/camera/common/aidl/aidl_api/android.hardware.camera.common/current/android/hardware/camera/common/TagBoundaryId.aidl b/camera/common/aidl/aidl_api/android.hardware.camera.common/current/android/hardware/camera/common/TagBoundaryId.aidl
index 2c6b500..cd50483 100644
--- a/camera/common/aidl/aidl_api/android.hardware.camera.common/current/android/hardware/camera/common/TagBoundaryId.aidl
+++ b/camera/common/aidl/aidl_api/android.hardware.camera.common/current/android/hardware/camera/common/TagBoundaryId.aidl
@@ -35,5 +35,5 @@
@Backing(type="long") @VintfStability
enum TagBoundaryId {
AOSP = 0,
- VENDOR = -2147483648,
+ VENDOR = 2147483648,
}
diff --git a/camera/common/aidl/android/hardware/camera/common/TagBoundaryId.aidl b/camera/common/aidl/android/hardware/camera/common/TagBoundaryId.aidl
index f81e5b6..6c4ef3c 100644
--- a/camera/common/aidl/android/hardware/camera/common/TagBoundaryId.aidl
+++ b/camera/common/aidl/android/hardware/camera/common/TagBoundaryId.aidl
@@ -20,5 +20,5 @@
@Backing(type="long")
enum TagBoundaryId {
AOSP = 0x0,
- VENDOR = 0x80000000,
+ VENDOR = 0x80000000L,
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl
index 9c49583..b89f7d5 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl
@@ -39,4 +39,5 @@
SKIP_CLIENT_COLOR_TRANSFORM = 2,
PRESENT_FENCE_IS_NOT_RELIABLE = 3,
SKIP_VALIDATE = 4,
+ BOOT_DISPLAY_CONFIG = 5,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl
index ea619ae..2f9eab9 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl
@@ -57,4 +57,13 @@
* validateDisplay step is needed.
*/
SKIP_VALIDATE = 4,
+
+ /**
+ * Specifies that the device supports setting a display configuration that
+ * the device should boot at.
+ * @see IComposerClient.setBootDisplayConfig
+ * @see IComposerClient.clearBootDisplayConfig
+ * @see IComposerClient.getPreferredBootDisplayConfig
+ */
+ BOOT_DISPLAY_CONFIG = 5,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index bbc9c46..a4ea64f 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -590,6 +590,7 @@
*
* @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
* @exception EX_BAD_CONFIG when an invalid config id was passed in.
+ * @exception EX_UNSUPPORTED when not supported by the underlying HAL
*
* @see getDisplayConfigs
* @see clearBootDisplayConfig
@@ -605,6 +606,7 @@
* @param display is the display for which the cached boot config is cleared.
*
* @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+ * @exception EX_UNSUPPORTED when not supported by the underlying HAL
*
* @see getDisplayConfigs
* @see setBootDisplayConfig
@@ -622,6 +624,7 @@
* @return the implementation's preferred display config.
*
* @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+ * @exception EX_UNSUPPORTED when not supported by the underlying HAL
*
* @see getDisplayConfigs
* @see setBootDisplayConfig
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index bfb6b85..2d08ac6 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -495,6 +495,10 @@
}
TEST_P(GraphicsComposerAidlTest, SetBootDisplayConfig_BadDisplay) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
const auto& status = mComposerClient->setBootDisplayConfig(getInvalidDisplayId(), /*config*/ 0);
EXPECT_FALSE(status.isOk());
@@ -502,6 +506,10 @@
}
TEST_P(GraphicsComposerAidlTest, SetBootDisplayConfig_BadConfig) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
for (VtsDisplay& display : mDisplays) {
int32_t constexpr kInvalidConfigId = IComposerClient::INVALID_CONFIGURATION;
const auto& status =
@@ -513,6 +521,10 @@
}
TEST_P(GraphicsComposerAidlTest, SetBootDisplayConfig) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
const auto& [status, configs] = mComposerClient->getDisplayConfigs(getPrimaryDisplayId());
EXPECT_TRUE(status.isOk());
for (const auto& config : configs) {
@@ -521,6 +533,10 @@
}
TEST_P(GraphicsComposerAidlTest, ClearBootDisplayConfig_BadDisplay) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
const auto& status = mComposerClient->clearBootDisplayConfig(getInvalidDisplayId());
EXPECT_FALSE(status.isOk());
@@ -528,10 +544,18 @@
}
TEST_P(GraphicsComposerAidlTest, ClearBootDisplayConfig) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
EXPECT_TRUE(mComposerClient->clearBootDisplayConfig(getPrimaryDisplayId()).isOk());
}
TEST_P(GraphicsComposerAidlTest, GetPreferredBootDisplayConfig_BadDisplay) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
const auto& [status, _] = mComposerClient->getPreferredBootDisplayConfig(getInvalidDisplayId());
EXPECT_FALSE(status.isOk());
@@ -539,6 +563,10 @@
}
TEST_P(GraphicsComposerAidlTest, GetPreferredBootDisplayConfig) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ GTEST_SUCCEED() << "Boot Display Config not supported";
+ return;
+ }
const auto& [status, preferredDisplayConfig] =
mComposerClient->getPreferredBootDisplayConfig(getPrimaryDisplayId());
EXPECT_TRUE(status.isOk());
@@ -549,6 +577,26 @@
EXPECT_NE(configs.end(), std::find(configs.begin(), configs.end(), preferredDisplayConfig));
}
+TEST_P(GraphicsComposerAidlTest, BootDisplayConfig_Unsupported) {
+ if (!hasCapability(Capability::BOOT_DISPLAY_CONFIG)) {
+ const auto& [configStatus, config] =
+ mComposerClient->getActiveConfig(getPrimaryDisplayId());
+ EXPECT_TRUE(configStatus.isOk());
+
+ auto status = mComposerClient->setBootDisplayConfig(getPrimaryDisplayId(), config);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, status.getServiceSpecificError());
+
+ status = mComposerClient->getPreferredBootDisplayConfig(getPrimaryDisplayId()).first;
+ EXPECT_FALSE(status.isOk());
+ EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, status.getServiceSpecificError());
+
+ status = mComposerClient->clearBootDisplayConfig(getPrimaryDisplayId());
+ EXPECT_FALSE(status.isOk());
+ EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, status.getServiceSpecificError());
+ }
+}
+
TEST_P(GraphicsComposerAidlTest, SetAutoLowLatencyMode_BadDisplay) {
auto status = mComposerClient->setAutoLowLatencyMode(getInvalidDisplayId(), /*isEnabled*/ true);
EXPECT_FALSE(status.isOk());
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index c174c02..4ab989b 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1619,7 +1619,7 @@
EXPECT_EQ(verified_boot_state, VerifiedBoot::FAILED);
} else {
EXPECT_EQ(verified_boot_state, VerifiedBoot::UNVERIFIED);
- EXPECT_NE(0, memcmp(verified_boot_key.data(), empty_boot_key.data(),
+ EXPECT_EQ(0, memcmp(verified_boot_key.data(), empty_boot_key.data(),
verified_boot_key.size()));
}
diff --git a/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
index 46a1314..7bcc6d3 100644
--- a/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.6/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -26,6 +26,7 @@
#include <chrono>
#include <condition_variable>
#include <mutex>
+#include <vector>
#include "wifi_hidl_call_util.h"
#include "wifi_hidl_test_utils.h"
@@ -616,6 +617,7 @@
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_CAPABILITIES_RESPONSE_1_6));
ASSERT_EQ(NOTIFY_CAPABILITIES_RESPONSE_1_6, callbackType);
ASSERT_EQ(id, inputCmdId);
+ ASSERT_EQ(status.status, NanStatusType::SUCCESS);
// check for reasonable capability values
EXPECT_GT(capabilities_1_6.maxConcurrentClusters, (unsigned int)0);
@@ -637,23 +639,119 @@
}
/*
- * startPublishRequest_1_6InvalidArgs: validate that fails with invalid arguments
+ * startPublishRequest_1_6: validate that success with valid arguments
*/
-TEST_P(WifiNanIfaceHidlTest, startPublishRequest_1_6InvalidArgs) {
+TEST_P(WifiNanIfaceHidlTest, startPublishRequest_1_6) {
uint16_t inputCmdId = 10;
- callbackType = INVALID;
- ::android::hardware::wifi::V1_6::NanPublishRequest nanPublishRequest = {};
- const auto& halStatus =
- HIDL_INVOKE(iwifiNanIface, startPublishRequest_1_6, inputCmdId, nanPublishRequest);
+ ::android::hardware::wifi::V1_0::NanBandSpecificConfig config24 = {};
+ config24.rssiClose = 60;
+ config24.rssiMiddle = 70;
+ config24.rssiCloseProximity = 60;
+ config24.dwellTimeMs = 200;
+ config24.scanPeriodSec = 20;
+ config24.validDiscoveryWindowIntervalVal = false;
+ config24.discoveryWindowIntervalVal = 0;
+ ::android::hardware::wifi::V1_0::NanBandSpecificConfig config5 = {};
+ config5.rssiClose = 60;
+ config5.rssiMiddle = 75;
+ config5.rssiCloseProximity = 60;
+ config5.dwellTimeMs = 200;
+ config5.scanPeriodSec = 20;
+ config5.validDiscoveryWindowIntervalVal = false;
+ config5.discoveryWindowIntervalVal = 0;
+ ::android::hardware::wifi::V1_4::NanEnableRequest req = {};
+ req.operateInBand[(size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_24GHZ] = true;
+ req.operateInBand[(size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_5GHZ] = false;
+ req.hopCountMax = 2;
+ req.configParams.masterPref = 0;
+ req.configParams.disableDiscoveryAddressChangeIndication = true;
+ req.configParams.disableStartedClusterIndication = true;
+ req.configParams.disableJoinedClusterIndication = true;
+ req.configParams.includePublishServiceIdsInBeacon = true;
+ req.configParams.numberOfPublishServiceIdsInBeacon = 0;
+ req.configParams.includeSubscribeServiceIdsInBeacon = true;
+ req.configParams.numberOfSubscribeServiceIdsInBeacon = 0;
+ req.configParams.rssiWindowSize = 8;
+ req.configParams.macAddressRandomizationIntervalSec = 1800;
+ req.configParams.bandSpecificConfig[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_24GHZ] = config24;
+ req.configParams.bandSpecificConfig[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_5GHZ] = config5;
+
+ req.debugConfigs.validClusterIdVals = true;
+ req.debugConfigs.clusterIdTopRangeVal = 65535;
+ req.debugConfigs.clusterIdBottomRangeVal = 0;
+ req.debugConfigs.validIntfAddrVal = false;
+ req.debugConfigs.validOuiVal = false;
+ req.debugConfigs.ouiVal = 0;
+ req.debugConfigs.validRandomFactorForceVal = false;
+ req.debugConfigs.randomFactorForceVal = 0;
+ req.debugConfigs.validHopCountForceVal = false;
+ req.debugConfigs.hopCountForceVal = 0;
+ req.debugConfigs.validDiscoveryChannelVal = false;
+ req.debugConfigs.discoveryChannelMhzVal[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_24GHZ] = 0;
+ req.debugConfigs.discoveryChannelMhzVal[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_5GHZ] = 0;
+ req.debugConfigs.validUseBeaconsInBandVal = false;
+ req.debugConfigs.useBeaconsInBandVal[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_24GHZ] = true;
+ req.debugConfigs.useBeaconsInBandVal[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_5GHZ] = true;
+ req.debugConfigs.validUseSdfInBandVal = false;
+ req.debugConfigs.useSdfInBandVal[(
+ size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_24GHZ] = true;
+ req.debugConfigs
+ .useSdfInBandVal[(size_t)::android::hardware::wifi::V1_4::NanBandIndex::NAN_BAND_5GHZ] =
+ true;
+
+ ::android::hardware::wifi::V1_6::NanConfigRequestSupplemental nanConfigRequestSupp = {};
+ nanConfigRequestSupp.V1_5.V1_2.discoveryBeaconIntervalMs = 20;
+ nanConfigRequestSupp.V1_5.V1_2.numberOfSpatialStreamsInDiscovery = 0;
+ nanConfigRequestSupp.V1_5.V1_2.enableDiscoveryWindowEarlyTermination = false;
+
+ callbackType = INVALID;
+
+ const auto& halStatus =
+ HIDL_INVOKE(iwifiNanIface, enableRequest_1_6, inputCmdId, req, nanConfigRequestSupp);
if (halStatus.code != WifiStatusCode::ERROR_NOT_SUPPORTED) {
ASSERT_EQ(WifiStatusCode::SUCCESS, halStatus.code);
// wait for a callback
+ ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_ENABLE_RESPONSE));
+ ASSERT_EQ(NOTIFY_ENABLE_RESPONSE, callbackType);
+ ASSERT_EQ(id, inputCmdId);
+ ASSERT_EQ(status.status, NanStatusType::SUCCESS);
+ }
+ ::android::hardware::wifi::V1_6::NanPublishRequest nanPublishRequest = {};
+ nanPublishRequest.baseConfigs.sessionId = 0;
+ nanPublishRequest.baseConfigs.ttlSec = 0;
+ nanPublishRequest.baseConfigs.discoveryWindowPeriod = 1;
+ nanPublishRequest.baseConfigs.discoveryCount = 0;
+ nanPublishRequest.baseConfigs.serviceName = {97};
+
+ nanPublishRequest.baseConfigs.discoveryMatchIndicator = NanMatchAlg::MATCH_NEVER;
+ nanPublishRequest.baseConfigs.useRssiThreshold = false;
+ nanPublishRequest.baseConfigs.disableDiscoveryTerminationIndication = false;
+ nanPublishRequest.baseConfigs.disableMatchExpirationIndication = true;
+ nanPublishRequest.baseConfigs.disableFollowupReceivedIndication = false;
+ nanPublishRequest.baseConfigs.securityConfig.securityType = NanDataPathSecurityType::OPEN;
+ nanPublishRequest.autoAcceptDataPathRequests = false;
+ nanPublishRequest.publishType = NanPublishType::UNSOLICITED;
+ nanPublishRequest.txType = NanTxType::BROADCAST;
+
+ const auto& halStatus1 =
+ HIDL_INVOKE(iwifiNanIface, startPublishRequest_1_6, inputCmdId + 1, nanPublishRequest);
+
+ if (halStatus1.code != WifiStatusCode::ERROR_NOT_SUPPORTED) {
+ ASSERT_EQ(WifiStatusCode::SUCCESS, halStatus1.code);
+
+ // wait for a callback
ASSERT_EQ(std::cv_status::no_timeout, wait(NOTIFY_START_PUBLISH_RESPONSE));
ASSERT_EQ(NOTIFY_START_PUBLISH_RESPONSE, callbackType);
- ASSERT_EQ(id, inputCmdId);
- ASSERT_EQ(status.status, NanStatusType::INTERNAL_FAILURE);
+ ASSERT_EQ(id, inputCmdId + 1);
+ ASSERT_EQ(status.status, NanStatusType::SUCCESS);
}
}