Merge "libminradio: drop RadioModemResponseTracker" into main
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 123a5ec..aa624ff 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -214,24 +214,33 @@
StreamContext::DebugParameters params{mDebug.streamTransientStateDelayMs,
mVendorDebug.forceTransientBurst,
mVendorDebug.forceSynchronousDrain};
- std::unique_ptr<StreamContext::DataMQ> dataMQ = nullptr;
- std::shared_ptr<IStreamCallback> streamAsyncCallback = nullptr;
std::shared_ptr<ISoundDose> soundDose;
if (!getSoundDose(&soundDose).isOk()) {
LOG(ERROR) << __func__ << ": could not create sound dose instance";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
- if (!hasMmapFlag(flags)) {
- dataMQ = std::make_unique<StreamContext::DataMQ>(frameSize * in_bufferSizeFrames);
- streamAsyncCallback = asyncCallback;
+ StreamContext temp;
+ if (hasMmapFlag(flags)) {
+ MmapBufferDescriptor mmapDesc;
+ RETURN_STATUS_IF_ERROR(
+ createMmapBuffer(*portConfigIt, in_bufferSizeFrames, frameSize, &mmapDesc));
+ temp = StreamContext(
+ std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
+ std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
+ portConfigIt->format.value(), portConfigIt->channelMask.value(),
+ portConfigIt->sampleRate.value().value, flags, nominalLatencyMs,
+ portConfigIt->ext.get<AudioPortExt::mix>().handle, std::move(mmapDesc),
+ outEventCallback, mSoundDose.getInstance(), params);
+ } else {
+ temp = StreamContext(
+ std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
+ std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
+ portConfigIt->format.value(), portConfigIt->channelMask.value(),
+ portConfigIt->sampleRate.value().value, flags, nominalLatencyMs,
+ portConfigIt->ext.get<AudioPortExt::mix>().handle,
+ std::make_unique<StreamContext::DataMQ>(frameSize * in_bufferSizeFrames),
+ asyncCallback, outEventCallback, mSoundDose.getInstance(), params);
}
- StreamContext temp(
- std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
- std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
- portConfigIt->format.value(), portConfigIt->channelMask.value(),
- portConfigIt->sampleRate.value().value, flags, nominalLatencyMs,
- portConfigIt->ext.get<AudioPortExt::mix>().handle, std::move(dataMQ),
- streamAsyncCallback, outEventCallback, mSoundDose.getInstance(), params);
if (temp.isValid()) {
*out_context = std::move(temp);
} else {
@@ -394,9 +403,10 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-ndk::ScopedAStatus Module::createMmapBuffer(
- const ::aidl::android::hardware::audio::core::StreamContext& context __unused,
- ::aidl::android::hardware::audio::core::StreamDescriptor* desc __unused) {
+ndk::ScopedAStatus Module::createMmapBuffer(const AudioPortConfig& portConfig __unused,
+ int32_t bufferSizeFrames __unused,
+ int32_t frameSizeBytes __unused,
+ MmapBufferDescriptor* desc __unused) {
LOG(ERROR) << __func__ << ": " << mType << ": is not implemented";
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
@@ -977,9 +987,6 @@
RETURN_STATUS_IF_ERROR(createStreamContext(in_args.portConfigId, in_args.bufferSizeFrames,
nullptr, nullptr, &context));
context.fillDescriptor(&_aidl_return->desc);
- if (hasMmapFlag(context.getFlags())) {
- RETURN_STATUS_IF_ERROR(createMmapBuffer(context, &_aidl_return->desc));
- }
std::shared_ptr<StreamIn> stream;
RETURN_STATUS_IF_ERROR(createInputStream(std::move(context), in_args.sinkMetadata,
getMicrophoneInfos(), &stream));
@@ -1027,9 +1034,6 @@
isNonBlocking ? in_args.callback : nullptr,
in_args.eventCallback, &context));
context.fillDescriptor(&_aidl_return->desc);
- if (hasMmapFlag(context.getFlags())) {
- RETURN_STATUS_IF_ERROR(createMmapBuffer(context, &_aidl_return->desc));
- }
std::shared_ptr<StreamOut> stream;
RETURN_STATUS_IF_ERROR(createOutputStream(std::move(context), in_args.sourceMetadata,
in_args.offloadInfo, &stream));
diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index 2800bed..873fc48 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -65,18 +65,26 @@
if (mReplyMQ) {
desc->reply = mReplyMQ->dupeDesc();
}
+ desc->frameSizeBytes = getFrameSize();
+ desc->bufferSizeFrames = getBufferSizeInFrames();
if (mDataMQ) {
- desc->frameSizeBytes = getFrameSize();
- desc->bufferSizeFrames = getBufferSizeInFrames();
desc->audio.set<StreamDescriptor::AudioBuffer::Tag::fmq>(mDataMQ->dupeDesc());
+ } else {
+ MmapBufferDescriptor mmapDesc; // Move-only due to `fd`.
+ mmapDesc.sharedMemory.fd = mMmapBufferDesc.sharedMemory.fd.dup();
+ mmapDesc.sharedMemory.size = mMmapBufferDesc.sharedMemory.size;
+ mmapDesc.burstSizeFrames = mMmapBufferDesc.burstSizeFrames;
+ mmapDesc.flags = mMmapBufferDesc.flags;
+ desc->audio.set<StreamDescriptor::AudioBuffer::Tag::mmap>(std::move(mmapDesc));
}
}
size_t StreamContext::getBufferSizeInFrames() const {
if (mDataMQ) {
return mDataMQ->getQuantumCount() * mDataMQ->getQuantumSize() / getFrameSize();
+ } else {
+ return mMmapBufferDesc.sharedMemory.size / getFrameSize();
}
- return 0;
}
size_t StreamContext::getFrameSize() const {
@@ -96,9 +104,13 @@
LOG(ERROR) << "frame size is invalid";
return false;
}
- if (!hasMmapFlag(mFlags) && mDataMQ && !mDataMQ->isValid()) {
+ if (!isMmap() && mDataMQ && !mDataMQ->isValid()) {
LOG(ERROR) << "data FMQ is invalid";
return false;
+ } else if (isMmap() &&
+ (mMmapBufferDesc.sharedMemory.fd.get() == -1 ||
+ mMmapBufferDesc.sharedMemory.size == 0 || mMmapBufferDesc.burstSizeFrames == 0)) {
+ LOG(ERROR) << "mmap info is invalid" << mMmapBufferDesc.toString();
}
return true;
}
@@ -115,6 +127,7 @@
mCommandMQ.reset();
mReplyMQ.reset();
mDataMQ.reset();
+ mMmapBufferDesc.sharedMemory.fd.set(-1);
}
pid_t StreamWorkerCommonLogic::getTid() const {
@@ -128,7 +141,7 @@
std::string StreamWorkerCommonLogic::init() {
if (mContext->getCommandMQ() == nullptr) return "Command MQ is null";
if (mContext->getReplyMQ() == nullptr) return "Reply MQ is null";
- if (!hasMmapFlag(mContext->getFlags())) {
+ if (!mContext->isMmap()) {
StreamContext::DataMQ* const dataMQ = mContext->getDataMQ();
if (dataMQ == nullptr) return "Data MQ is null";
if (sizeof(DataBufferElement) != dataMQ->getQuantumSize()) {
@@ -167,7 +180,7 @@
} else {
reply->observable = reply->hardware = kUnknownPosition;
}
- if (hasMmapFlag(mContext->getFlags())) {
+ if (mContext->isMmap()) {
if (auto status = mDriver->getMmapPositionAndLatency(&reply->hardware, &reply->latencyMs);
status != ::android::OK) {
reply->hardware = kUnknownPosition;
@@ -252,9 +265,8 @@
mState == StreamDescriptor::State::ACTIVE ||
mState == StreamDescriptor::State::PAUSED ||
mState == StreamDescriptor::State::DRAINING) {
- if (bool success = hasMmapFlag(mContext->getFlags())
- ? readMmap(&reply)
- : read(fmqByteCount, &reply);
+ if (bool success =
+ mContext->isMmap() ? readMmap(&reply) : read(fmqByteCount, &reply);
!success) {
mState = StreamDescriptor::State::ERROR;
}
@@ -548,9 +560,8 @@
if (mState != StreamDescriptor::State::ERROR &&
mState != StreamDescriptor::State::TRANSFERRING &&
mState != StreamDescriptor::State::TRANSFER_PAUSED) {
- if (bool success = hasMmapFlag(mContext->getFlags())
- ? writeMmap(&reply)
- : write(fmqByteCount, &reply);
+ if (bool success = mContext->isMmap() ? writeMmap(&reply)
+ : write(fmqByteCount, &reply);
!success) {
mState = StreamDescriptor::State::ERROR;
}
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 0661015..379264d 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -212,8 +212,8 @@
const ::aidl::android::media::audio::common::AudioFormatDescription &format,
int32_t latencyMs, int32_t sampleRateHz, int32_t *bufferSizeFrames);
virtual ndk::ScopedAStatus createMmapBuffer(
- const ::aidl::android::hardware::audio::core::StreamContext& context,
- ::aidl::android::hardware::audio::core::StreamDescriptor* desc);
+ const ::aidl::android::media::audio::common::AudioPortConfig& portConfig,
+ int32_t bufferSizeFrames, int32_t frameSizeBytes, MmapBufferDescriptor* desc);
// Utility and helper functions accessible to subclasses.
static int32_t calculateBufferSizeFramesForPcm(int32_t latencyMs, int32_t sampleRateHz) {
diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index 376c684..bb790e9 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -104,6 +104,27 @@
mOutEventCallback(outEventCallback),
mStreamDataProcessor(streamDataProcessor),
mDebugParameters(debugParameters) {}
+ StreamContext(std::unique_ptr<CommandMQ> commandMQ, std::unique_ptr<ReplyMQ> replyMQ,
+ const ::aidl::android::media::audio::common::AudioFormatDescription& format,
+ const ::aidl::android::media::audio::common::AudioChannelLayout& channelLayout,
+ int sampleRate, const ::aidl::android::media::audio::common::AudioIoFlags& flags,
+ int32_t nominalLatencyMs, int32_t mixPortHandle, MmapBufferDescriptor&& mmapDesc,
+ std::shared_ptr<IStreamOutEventCallback> outEventCallback,
+ std::weak_ptr<sounddose::StreamDataProcessorInterface> streamDataProcessor,
+ DebugParameters debugParameters)
+ : mCommandMQ(std::move(commandMQ)),
+ mInternalCommandCookie(std::rand() | 1 /* make sure it's not 0 */),
+ mReplyMQ(std::move(replyMQ)),
+ mFormat(format),
+ mChannelLayout(channelLayout),
+ mSampleRate(sampleRate),
+ mFlags(flags),
+ mNominalLatencyMs(nominalLatencyMs),
+ mMixPortHandle(mixPortHandle),
+ mMmapBufferDesc(std::move(mmapDesc)),
+ mOutEventCallback(outEventCallback),
+ mStreamDataProcessor(streamDataProcessor),
+ mDebugParameters(debugParameters) {}
void fillDescriptor(StreamDescriptor* desc);
std::shared_ptr<IStreamCallback> getAsyncCallback() const { return mAsyncCallback; }
@@ -136,6 +157,7 @@
bool isInput() const {
return mFlags.getTag() == ::aidl::android::media::audio::common::AudioIoFlags::input;
}
+ bool isMmap() const { return ::aidl::android::hardware::audio::common::hasMmapFlag(mFlags); }
bool isValid() const;
// 'reset' is called on a Binder thread when closing the stream. Does not use
// locking because it only cleans MQ pointers which were also set on the Binder thread.
@@ -155,7 +177,9 @@
::aidl::android::media::audio::common::AudioIoFlags mFlags;
int32_t mNominalLatencyMs;
int32_t mMixPortHandle;
+ // Only one of `mDataMQ` or `mMapBufferDesc` can be active, depending on `isMmap`
std::unique_ptr<DataMQ> mDataMQ;
+ MmapBufferDescriptor mMmapBufferDesc;
std::shared_ptr<IStreamCallback> mAsyncCallback;
std::shared_ptr<IStreamOutEventCallback> mOutEventCallback; // Only used by output streams
std::weak_ptr<sounddose::StreamDataProcessorInterface> mStreamDataProcessor;
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 2ce7b51..ddb920d 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -465,6 +465,7 @@
float fullScaleSineDb) {
ASSERT_NO_FATAL_FAILURE(SetUpDynamicsProcessingEffect());
SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+ mInput.resize(kFrameCount * mChannelCount);
ASSERT_NO_FATAL_FAILURE(
generateSineWave(testFrequencies, mInput, 1.0, kSamplingFrequency, mChannelLayout));
mInputDb = calculateDb(mInput);
@@ -722,13 +723,10 @@
public DynamicsProcessingTestHelper {
public:
DynamicsProcessingInputGainDataTest()
- : DynamicsProcessingTestHelper((GetParam()), AudioChannelLayout::LAYOUT_MONO) {
- mInput.resize(kFrameCount * mChannelCount);
- }
+ : DynamicsProcessingTestHelper((GetParam()), AudioChannelLayout::LAYOUT_MONO) {}
void SetUp() override {
- ASSERT_NO_FATAL_FAILURE(
- setUpDataTest({static_cast<int>(kInputFrequency)}, kSineFullScaleDb));
+ ASSERT_NO_FATAL_FAILURE(setUpDataTest({kInputFrequency}, kSineFullScaleDb));
}
void TearDown() override { TearDownDynamicsProcessingEffect(); }
@@ -851,15 +849,12 @@
: public ::testing::TestWithParam<LimiterConfigDataTestParams>,
public DynamicsProcessingTestHelper {
public:
- DynamicsProcessingLimiterConfigDataTest()
- : DynamicsProcessingTestHelper(GetParam(), AudioChannelLayout::LAYOUT_MONO) {
- mBufferSize = kFrameCount * mChannelCount;
- mInput.resize(mBufferSize);
- }
+ DynamicsProcessingLimiterConfigDataTest(LimiterConfigDataTestParams param = GetParam(),
+ int32_t layout = AudioChannelLayout::LAYOUT_MONO)
+ : DynamicsProcessingTestHelper(param, layout) {}
void SetUp() override {
- ASSERT_NO_FATAL_FAILURE(
- setUpDataTest({static_cast<int>(kInputFrequency)}, kSineFullScaleDb));
+ ASSERT_NO_FATAL_FAILURE(setUpDataTest({kInputFrequency}, kSineFullScaleDb));
}
void TearDown() override { TearDownDynamicsProcessingEffect(); }
@@ -892,7 +887,6 @@
static constexpr float kDefaultRatio = 4;
static constexpr float kDefaultThreshold = -10;
static constexpr float kDefaultPostGain = 0;
- static constexpr float kInputFrequency = 1000;
static constexpr float kLimiterTestToleranceDb = 0.05;
std::vector<DynamicsProcessing::LimiterConfig> mLimiterConfigList;
int mBufferSize;
@@ -1010,6 +1004,104 @@
});
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingLimiterConfigDataTest);
+class DynamicsProcessingLimiterLinkerDataTest : public DynamicsProcessingLimiterConfigDataTest {
+ public:
+ DynamicsProcessingLimiterLinkerDataTest()
+ : DynamicsProcessingLimiterConfigDataTest(GetParam(), AudioChannelLayout::LAYOUT_STEREO) {}
+
+ void calculateExpectedOutputDb(std::vector<float>& expectedOutputDb) {
+ std::vector<float> inputDbValues = calculateStereoDb(mInput, kStartIndex);
+ ASSERT_EQ(inputDbValues.size(), kRatioThresholdPairValues.size());
+ EXPECT_NEAR(inputDbValues[0], inputDbValues[1], kToleranceDb);
+ for (size_t i = 0; i < kRatioThresholdPairValues.size(); i++) {
+ const auto& [ratio, threshold] = kRatioThresholdPairValues[i];
+ expectedOutputDb.push_back((inputDbValues[i] - threshold) / ratio + threshold);
+ }
+ }
+
+ std::vector<float> calculateStereoDb(const std::vector<float>& input,
+ size_t startSamplePos = 0) {
+ std::vector<float> leftChannel;
+ std::vector<float> rightChannel;
+ for (size_t i = 0; i < input.size(); i += 2) {
+ leftChannel.push_back(input[i]);
+ if (i + 1 < input.size()) {
+ rightChannel.push_back(input[i + 1]);
+ }
+ }
+ return {calculateDb(leftChannel, startSamplePos),
+ calculateDb(rightChannel, startSamplePos)};
+ }
+
+ void setLinkGroupAndProcess(std::vector<float>& output, bool hasSameLinkGroup) {
+ for (int i = 0; i < mChannelCount; i++) {
+ const auto& [ratio, threshold] = kRatioThresholdPairValues[i];
+ ASSERT_NE(ratio, 0);
+ int linkGroup = hasSameLinkGroup ? kDefaultLinkerGroup : i;
+ fillLimiterConfig(mLimiterConfigList, i, true, linkGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, ratio, threshold, kDefaultPostGain);
+ }
+
+ ASSERT_NO_FATAL_FAILURE(setLimiterParamsAndProcess(mInput, output));
+
+ if (!isAllParamsValid()) {
+ GTEST_SKIP() << "Invalid parameters. Skipping the test\n";
+ }
+ }
+
+ static constexpr float kMinDifferenceDb = 5;
+ const std::vector<std::pair<float, float>> kRatioThresholdPairValues = {{2, -10}, {5, -20}};
+};
+
+TEST_P(DynamicsProcessingLimiterLinkerDataTest, SameLinkGroupDifferentConfigs) {
+ std::vector<float> output(mInput.size());
+
+ ASSERT_NO_FATAL_FAILURE(setLinkGroupAndProcess(output, true));
+
+ std::vector<float> outputDbValues = calculateStereoDb(output, kStartIndex);
+
+ std::vector<float> expectedOutputDbValues;
+ ASSERT_NO_FATAL_FAILURE(calculateExpectedOutputDb(expectedOutputDbValues));
+
+ // Verify that the actual output dB is same as the calculated maximum attenuation.
+ float expectedOutputDb = std::min(expectedOutputDbValues[0], expectedOutputDbValues[1]);
+ EXPECT_NEAR(outputDbValues[0], expectedOutputDb, kToleranceDb);
+ EXPECT_NEAR(outputDbValues[1], expectedOutputDb, kToleranceDb);
+}
+
+TEST_P(DynamicsProcessingLimiterLinkerDataTest, DifferentLinkGroupDifferentConfigs) {
+ std::vector<float> output(mInput.size());
+
+ ASSERT_NO_FATAL_FAILURE(setLinkGroupAndProcess(output, false));
+
+ std::vector<float> outputDbValues = calculateStereoDb(output, kStartIndex);
+
+ std::vector<float> expectedOutputDbValues;
+ ASSERT_NO_FATAL_FAILURE(calculateExpectedOutputDb(expectedOutputDbValues));
+
+ // Verify that both channels have different compression levels
+ EXPECT_GT(abs(expectedOutputDbValues[0] - expectedOutputDbValues[1]), kMinDifferenceDb)
+ << "Left channel level: " << expectedOutputDbValues[0]
+ << " Right channel level: " << expectedOutputDbValues[1];
+
+ // Verify that the actual output and the calculated dB values are same
+ EXPECT_NEAR(outputDbValues[0], expectedOutputDbValues[0], kToleranceDb);
+ EXPECT_NEAR(outputDbValues[1], expectedOutputDbValues[1], kToleranceDb);
+}
+
+INSTANTIATE_TEST_SUITE_P(DynamicsProcessingTest, DynamicsProcessingLimiterLinkerDataTest,
+ testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
+ [](const auto& info) {
+ auto descriptor = info.param;
+ std::string name = getPrefix(descriptor.second);
+ std::replace_if(
+ name.begin(), name.end(),
+ [](const char c) { return !std::isalnum(c); }, '_');
+ return name;
+ });
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingLimiterLinkerDataTest);
+
/**
* Test DynamicsProcessing ChannelConfig
*/
@@ -1215,7 +1307,6 @@
public:
DynamicsProcessingEqBandConfigDataTest()
: DynamicsProcessingTestHelper(GetParam(), AudioChannelLayout::LAYOUT_MONO) {
- mInput.resize(kFrameCount * mChannelCount);
mBinOffsets.resize(mMultitoneTestFrequencies.size());
}
@@ -1444,7 +1535,6 @@
public:
DynamicsProcessingMbcBandConfigDataTest()
: DynamicsProcessingTestHelper(GetParam(), AudioChannelLayout::LAYOUT_MONO) {
- mInput.resize(kFrameCount * mChannelCount);
mBinOffsets.resize(mMultitoneTestFrequencies.size());
}
diff --git a/automotive/TEST_MAPPING b/automotive/TEST_MAPPING
index f041ca6..4a4c3e2 100644
--- a/automotive/TEST_MAPPING
+++ b/automotive/TEST_MAPPING
@@ -1,9 +1,6 @@
{
"auto-presubmit": [
{
- "name": "AndroidCarApiTest"
- },
- {
"name": "CarHiddenApiTest"
},
{
diff --git a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 4eb84dd..be909c5 100644
--- a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -2091,7 +2091,7 @@
}
triggerSupportedValueChange(propId, areaId);
- return StringPrintf("Min/Max supported value for propId: %s, areaId: %s set",
+ return StringPrintf("Min/Max supported value for propId: %s, areaId: %s set\n",
maybeInfo->propIdStr.c_str(), maybeInfo->propIdStr.c_str());
}
@@ -2135,7 +2135,7 @@
*maybeSupportedValues;
}
triggerSupportedValueChange(maybeInfo->propId, maybeInfo->areaId);
- return StringPrintf("Supported values list for propId: %s, areaId: %s set",
+ return StringPrintf("Supported values list for propId: %s, areaId: %s set\n",
maybeInfo->propIdStr.c_str(), maybeInfo->propIdStr.c_str());
}
diff --git a/bluetooth/audio/flags/btaudiohal.aconfig b/bluetooth/audio/flags/btaudiohal.aconfig
index 13e2116..35e84de 100644
--- a/bluetooth/audio/flags/btaudiohal.aconfig
+++ b/bluetooth/audio/flags/btaudiohal.aconfig
@@ -13,4 +13,11 @@
namespace: "pixel_bluetooth"
description: "Flag for reporting lea broadcast audio config to HAL"
bug: "321168976"
-}
\ No newline at end of file
+}
+
+flag {
+ name: "leaudio_sw_offload"
+ namespace: "pixel_bluetooth"
+ description: "Flag for using sw offload path to send premium audio"
+ bug: "398885696"
+}
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
index c7bfdbc..daebb4e 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
@@ -17,7 +17,7 @@
package android.hardware.broadcastradio;
/**
- * The severity of the subject event of the emergency alert message.
+ * The urgency of the subject event of the emergency alert message.
*
* <p>(see ITU-T X.1303 bis for more info).
*/
diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
index 92f69bd..e2c7208 100644
--- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
+++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
@@ -1628,10 +1628,10 @@
Stream previewStream;
std::shared_ptr<DeviceCb> cb;
- configurePreviewStreams(
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStreams(
name, mProvider, &previewThreshold, physicalIds, &mSession, &previewStream,
&halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &halBufManagedStreamIds /*out*/, &cb /*out*/, 0 /*streamConfigCounter*/, true);
+ &halBufManagedStreamIds /*out*/, &cb /*out*/, 0 /*streamConfigCounter*/, true));
if (mSession == nullptr) {
// stream combination not supported by HAL, skip test for device
continue;
@@ -2244,10 +2244,10 @@
Stream previewStream;
std::vector<HalStream> halStreams;
std::shared_ptr<DeviceCb> cb;
- configurePreviewStream(name, mProvider, &previewThreshold, &mSession /*out*/,
- &previewStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStream(
+ name, mProvider, &previewThreshold, &mSession /*out*/, &previewStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
::aidl::android::hardware::common::fmq::MQDescriptor<
int8_t, aidl::android::hardware::common::fmq::SynchronizedReadWrite>
@@ -2373,10 +2373,10 @@
bool supportsPartialResults = false;
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configurePreviewStream(name, mProvider, &previewThreshold, &mSession /*out*/,
- &previewStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStream(
+ name, mProvider, &previewThreshold, &mSession /*out*/, &previewStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
ASSERT_NE(mSession, nullptr);
ASSERT_FALSE(halStreams.empty());
@@ -2637,10 +2637,10 @@
bool supportsPartialResults = false;
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configurePreviewStream(name, mProvider, &previewThreshold, &mSession /*out*/,
- &previewStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStream(
+ name, mProvider, &previewThreshold, &mSession /*out*/, &previewStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
RequestTemplate reqTemplate = RequestTemplate::PREVIEW;
ndk::ScopedAStatus ret = mSession->constructDefaultRequestSettings(reqTemplate, &settings);
@@ -2692,10 +2692,10 @@
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configurePreviewStream(name, mProvider, &previewThreshold, &mSession /*out*/,
- &previewStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStream(
+ name, mProvider, &previewThreshold, &mSession /*out*/, &previewStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
ASSERT_NE(mSession, nullptr);
ASSERT_NE(cb, nullptr);
@@ -2817,10 +2817,10 @@
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configurePreviewStream(name, mProvider, &previewThreshold, &mSession /*out*/,
- &previewStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configurePreviewStream(
+ name, mProvider, &previewThreshold, &mSession /*out*/, &previewStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
ndk::ScopedAStatus returnStatus = mSession->flush();
ASSERT_TRUE(returnStatus.isOk());
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index 75ad532..2bdd5e8 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -2296,14 +2296,10 @@
bool supportsPartialResults = false;
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configureSingleStream(name, mProvider, &streamThreshold, bufferUsage, reqTemplate,
- &session /*out*/, &testStream /*out*/, &halStreams /*out*/,
- &supportsPartialResults /*out*/, &partialResultCount /*out*/,
- &useHalBufManager /*out*/, &cb /*out*/);
-
- ASSERT_NE(session, nullptr);
- ASSERT_NE(cb, nullptr);
- ASSERT_FALSE(halStreams.empty());
+ ASSERT_NO_FATAL_FAILURE(configureSingleStream(
+ name, mProvider, &streamThreshold, bufferUsage, reqTemplate, &session /*out*/,
+ &testStream /*out*/, &halStreams /*out*/, &supportsPartialResults /*out*/,
+ &partialResultCount /*out*/, &useHalBufManager /*out*/, &cb /*out*/));
std::shared_ptr<ResultMetadataQueue> resultQueue;
::aidl::android::hardware::common::fmq::MQDescriptor<
@@ -2718,37 +2714,37 @@
config.streams = streams;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE, &config,
jpegBufferSize);
- if (*session != nullptr) {
- CameraMetadata sessionParams;
- ret = (*session)->constructDefaultRequestSettings(reqTemplate, &sessionParams);
- ASSERT_TRUE(ret.isOk());
- config.sessionParams = sessionParams;
- config.streamConfigCounter = (int32_t)streamConfigCounter;
- bool supported = false;
- ret = device->isStreamCombinationSupported(config, &supported);
- ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(supported, true);
+ CameraMetadata sessionParams;
+ ret = (*session)->constructDefaultRequestSettings(reqTemplate, &sessionParams);
+ ASSERT_TRUE(ret.isOk());
+ config.sessionParams = sessionParams;
+ config.streamConfigCounter = (int32_t)streamConfigCounter;
- std::vector<HalStream> halConfigs;
- std::set<int32_t> halBufManagedStreamIds;
- ret = configureStreams(*session, config, bufferManagerType, &halBufManagedStreamIds,
- &halConfigs);
- ALOGI("configureStreams returns status: %d:%d", ret.getExceptionCode(),
- ret.getServiceSpecificError());
- ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(1u, halConfigs.size());
- halStreams->clear();
- halStreams->push_back(halConfigs[0]);
- *useHalBufManager = halBufManagedStreamIds.size() != 0;
- if (*useHalBufManager) {
- std::vector<Stream> ss(1);
- std::vector<HalStream> hs(1);
- ss[0] = config.streams[0];
- hs[0] = halConfigs[0];
- (*cb)->setCurrentStreamConfig(ss, hs);
- }
+ bool supported = false;
+ ret = device->isStreamCombinationSupported(config, &supported);
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(supported, true);
+
+ std::vector<HalStream> halConfigs;
+ std::set<int32_t> halBufManagedStreamIds;
+ ret = configureStreams(*session, config, bufferManagerType, &halBufManagedStreamIds,
+ &halConfigs);
+ ALOGI("configureStreams returns status: %d:%d", ret.getExceptionCode(),
+ ret.getServiceSpecificError());
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(1u, halConfigs.size());
+ halStreams->clear();
+ halStreams->push_back(halConfigs[0]);
+ *useHalBufManager = halBufManagedStreamIds.size() != 0;
+ if (*useHalBufManager) {
+ std::vector<Stream> ss(1);
+ std::vector<HalStream> hs(1);
+ ss[0] = config.streams[0];
+ hs[0] = halConfigs[0];
+ (*cb)->setCurrentStreamConfig(ss, hs);
}
+
*previewStream = config.streams[0];
ASSERT_TRUE(ret.isOk());
}
@@ -2808,10 +2804,11 @@
bool supportsPartialResults = false;
bool useHalBufManager = false;
int32_t partialResultCount = 0;
- configureSingleStream(name, mProvider, &streamThreshold, GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
- RequestTemplate::PREVIEW, &session /*out*/, &testStream /*out*/,
- &halStreams /*out*/, &supportsPartialResults /*out*/,
- &partialResultCount /*out*/, &useHalBufManager /*out*/, &cb /*out*/);
+ ASSERT_NO_FATAL_FAILURE(configureSingleStream(
+ name, mProvider, &streamThreshold, GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
+ RequestTemplate::PREVIEW, &session /*out*/, &testStream /*out*/,
+ &halStreams /*out*/, &supportsPartialResults /*out*/, &partialResultCount /*out*/,
+ &useHalBufManager /*out*/, &cb /*out*/));
::aidl::android::hardware::common::fmq::MQDescriptor<
int8_t, aidl::android::hardware::common::fmq::SynchronizedReadWrite>
@@ -3570,10 +3567,10 @@
Stream* previewStream, std::vector<HalStream>* halStreams, bool* supportsPartialResults,
int32_t* partialResultCount, bool* useHalBufManager, std::shared_ptr<DeviceCb>* cb,
uint32_t streamConfigCounter) {
- configureSingleStream(name, provider, previewThreshold, GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
- RequestTemplate::PREVIEW, session, previewStream, halStreams,
- supportsPartialResults, partialResultCount, useHalBufManager, cb,
- streamConfigCounter);
+ ASSERT_NO_FATAL_FAILURE(configureSingleStream(
+ name, provider, previewThreshold, GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
+ RequestTemplate::PREVIEW, session, previewStream, halStreams, supportsPartialResults,
+ partialResultCount, useHalBufManager, cb, streamConfigCounter));
}
Status CameraAidlTest::isOfflineSessionSupported(const camera_metadata_t* staticMeta) {
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 8d5a50a..7600594 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -523,6 +523,22 @@
<instance>default</instance>
</interface>
</hal>
+ <hal format="aidl" exclusive-to="virtual-machine">
+ <name>android.hardware.security.see.storage</name>
+ <version>1</version>
+ <interface>
+ <name>ISecureStorage</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="aidl" exclusive-to="virtual-machine">
+ <name>android.hardware.security.see.authmgr</name>
+ <version>1</version>
+ <interface>
+ <name>IAuthMgrAuthorization</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
<hal format="aidl" updatable-via-apex="true">
<name>android.hardware.security.secureclock</name>
<version>1</version>
diff --git a/compatibility_matrices/compatibility_matrix.202604.xml b/compatibility_matrices/compatibility_matrix.202604.xml
index 793b166..ee3ba44 100644
--- a/compatibility_matrices/compatibility_matrix.202604.xml
+++ b/compatibility_matrices/compatibility_matrix.202604.xml
@@ -523,6 +523,22 @@
<instance>default</instance>
</interface>
</hal>
+ <hal format="aidl" exclusive-to="virtual-machine">
+ <name>android.hardware.security.see.storage</name>
+ <version>1</version>
+ <interface>
+ <name>ISecureStorage</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="aidl" exclusive-to="virtual-machine">
+ <name>android.hardware.security.see.authmgr</name>
+ <version>1</version>
+ <interface>
+ <name>IAuthMgrAuthorization</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
<hal format="aidl" updatable-via-apex="true">
<name>android.hardware.security.secureclock</name>
<version>1</version>
diff --git a/gnss/common/utils/default/Utils.cpp b/gnss/common/utils/default/Utils.cpp
index 740bc59..c603ff8 100644
--- a/gnss/common/utils/default/Utils.cpp
+++ b/gnss/common/utils/default/Utils.cpp
@@ -147,10 +147,13 @@
return gnssData;
}
-GnssData Utils::getMockMeasurement(const bool enableCorrVecOutputs, const bool enableFullTracking) {
+namespace {
+GnssMeasurement getMockGnssMeasurement(int svid, GnssConstellationType constellationType,
+ float cN0DbHz, float basebandCN0DbHz,
+ double carrierFrequencyHz, bool enableCorrVecOutputs) {
aidl::android::hardware::gnss::GnssSignalType signalType = {
- .constellation = GnssConstellationType::GLONASS,
- .carrierFrequencyHz = 1.59975e+09,
+ .constellation = constellationType,
+ .carrierFrequencyHz = carrierFrequencyHz,
.codeType = aidl::android::hardware::gnss::GnssSignalType::CODE_TYPE_C,
};
GnssMeasurement measurement = {
@@ -161,23 +164,23 @@
GnssMeasurement::HAS_SATELLITE_ISB |
GnssMeasurement::HAS_SATELLITE_ISB_UNCERTAINTY |
GnssMeasurement::HAS_SATELLITE_PVT,
- .svid = 13,
+ .svid = svid,
.signalType = signalType,
+ .state = GnssMeasurement::STATE_CODE_LOCK | GnssMeasurement::STATE_BIT_SYNC |
+ GnssMeasurement::STATE_SUBFRAME_SYNC | GnssMeasurement::STATE_TOW_DECODED |
+ GnssMeasurement::STATE_GLO_STRING_SYNC |
+ GnssMeasurement::STATE_GLO_TOD_DECODED,
.receivedSvTimeInNs = 8195997131077,
.receivedSvTimeUncertaintyInNs = 15,
- .antennaCN0DbHz = 30.0,
- .basebandCN0DbHz = 26.5,
- .agcLevelDb = 2.3,
+ .antennaCN0DbHz = cN0DbHz,
+ .basebandCN0DbHz = basebandCN0DbHz,
.pseudorangeRateMps = -484.13739013671875,
.pseudorangeRateUncertaintyMps = 0.1037999987602233,
.accumulatedDeltaRangeState = GnssMeasurement::ADR_STATE_VALID,
.accumulatedDeltaRangeM = 1.52,
.accumulatedDeltaRangeUncertaintyM = 2.43,
.multipathIndicator = aidl::android::hardware::gnss::GnssMultipathIndicator::UNKNOWN,
- .state = GnssMeasurement::STATE_CODE_LOCK | GnssMeasurement::STATE_BIT_SYNC |
- GnssMeasurement::STATE_SUBFRAME_SYNC | GnssMeasurement::STATE_TOW_DECODED |
- GnssMeasurement::STATE_GLO_STRING_SYNC |
- GnssMeasurement::STATE_GLO_TOD_DECODED,
+ .agcLevelDb = 2.3,
.fullInterSignalBiasNs = 21.5,
.fullInterSignalBiasUncertaintyNs = 792.0,
.satelliteInterSignalBiasNs = 233.9,
@@ -199,35 +202,15 @@
.satClkDriftMps = 0},
.ionoDelayMeters = 3.069949602639317e-08,
.tropoDelayMeters = 3.882265204404031,
- .ephemerisSource =
- SatellitePvt::SatelliteEphemerisSource::SERVER_LONG_TERM,
.timeOfClockSeconds = 12345,
.issueOfDataClock = 143,
.timeOfEphemerisSeconds = 9876,
.issueOfDataEphemeris = 48,
+ .ephemerisSource =
+ SatellitePvt::SatelliteEphemerisSource::SERVER_LONG_TERM,
},
.correlationVectors = {}};
- GnssClock clock = {.gnssClockFlags = GnssClock::HAS_FULL_BIAS | GnssClock::HAS_BIAS |
- GnssClock::HAS_BIAS_UNCERTAINTY | GnssClock::HAS_DRIFT |
- GnssClock::HAS_DRIFT_UNCERTAINTY,
- .timeNs = 2713545000000,
- .fullBiasNs = -1226701900521857520,
- .biasNs = 0.59689998626708984,
- .biasUncertaintyNs = 47514.989972114563,
- .driftNsps = -51.757811607455452,
- .driftUncertaintyNsps = 310.64968328491528,
- .hwClockDiscontinuityCount = 1,
- .referenceSignalTypeForIsb = signalType};
-
- ElapsedRealtime timestamp = {
- .flags = ElapsedRealtime::HAS_TIMESTAMP_NS | ElapsedRealtime::HAS_TIME_UNCERTAINTY_NS,
- .timestampNs = ::android::elapsedRealtimeNano(),
- // This is an hardcoded value indicating a 1ms of uncertainty between the two clocks.
- // In an actual implementation provide an estimate of the synchronization uncertainty
- // or don't set the field.
- .timeUncertaintyNs = 1020400};
-
if (enableCorrVecOutputs) {
aidl::android::hardware::gnss::CorrelationVector correlationVector1 = {
.frequencyOffsetMps = 10,
@@ -242,6 +225,68 @@
measurement.correlationVectors = {correlationVector1, correlationVector2};
measurement.flags |= GnssMeasurement::HAS_CORRELATION_VECTOR;
}
+ return measurement;
+}
+} // namespace
+
+GnssData Utils::getMockMeasurement(const bool enableCorrVecOutputs, const bool enableFullTracking) {
+ std::vector<GnssMeasurement> measurements = {
+ // GPS
+ getMockGnssMeasurement(3, GnssConstellationType::GPS, 32.5, 27.5, kGpsL1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(5, GnssConstellationType::GPS, 27.0, 22.0, kGpsL1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(17, GnssConstellationType::GPS, 30.5, 25.5, kGpsL5FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(26, GnssConstellationType::GPS, 24.1, 19.1, kGpsL5FreqHz,
+ enableCorrVecOutputs),
+ // GAL
+ getMockGnssMeasurement(2, GnssConstellationType::GALILEO, 33.5, 27.5, kGalE1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(4, GnssConstellationType::GALILEO, 28.0, 22.0, kGalE1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(10, GnssConstellationType::GALILEO, 35.5, 25.5, kGalE1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(29, GnssConstellationType::GALILEO, 34.1, 19.1, kGalE1FreqHz,
+ enableCorrVecOutputs),
+ // GLO
+ getMockGnssMeasurement(5, GnssConstellationType::GLONASS, 20.5, 15.5, kGloG1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(17, GnssConstellationType::GLONASS, 21.5, 16.5, kGloG1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(18, GnssConstellationType::GLONASS, 28.3, 25.3, kGloG1FreqHz,
+ enableCorrVecOutputs),
+ getMockGnssMeasurement(10, GnssConstellationType::GLONASS, 25.0, 20.0, kGloG1FreqHz,
+ enableCorrVecOutputs),
+ // IRNSS
+ getMockGnssMeasurement(3, GnssConstellationType::IRNSS, 22.0, 19.7, kIrnssL5FreqHz,
+ enableCorrVecOutputs),
+ };
+
+ GnssClock clock = {
+ .gnssClockFlags = GnssClock::HAS_FULL_BIAS | GnssClock::HAS_BIAS |
+ GnssClock::HAS_BIAS_UNCERTAINTY | GnssClock::HAS_DRIFT |
+ GnssClock::HAS_DRIFT_UNCERTAINTY,
+ .timeNs = 2713545000000,
+ .fullBiasNs = -1226701900521857520,
+ .biasNs = 0.59689998626708984,
+ .biasUncertaintyNs = 47514.989972114563,
+ .driftNsps = -51.757811607455452,
+ .driftUncertaintyNsps = 310.64968328491528,
+ .hwClockDiscontinuityCount = 1,
+ .referenceSignalTypeForIsb = {
+ .constellation = GnssConstellationType::GLONASS,
+ .carrierFrequencyHz = 1.59975e+09,
+ .codeType = aidl::android::hardware::gnss::GnssSignalType::CODE_TYPE_C,
+ }};
+
+ ElapsedRealtime timestamp = {
+ .flags = ElapsedRealtime::HAS_TIMESTAMP_NS | ElapsedRealtime::HAS_TIME_UNCERTAINTY_NS,
+ .timestampNs = ::android::elapsedRealtimeNano(),
+ // This is an hardcoded value indicating a 1ms of uncertainty between the two clocks.
+ // In an actual implementation provide an estimate of the synchronization uncertainty
+ // or don't set the field.
+ .timeUncertaintyNs = 1020400};
GnssAgc gnssAgc1 = {
.agcLevelDb = 3.5,
@@ -255,7 +300,7 @@
.carrierFrequencyHz = (int64_t)kGpsL1FreqHz,
};
- GnssData gnssData = {.measurements = {measurement},
+ GnssData gnssData = {.measurements = measurements,
.clock = clock,
.elapsedRealtime = timestamp,
.gnssAgcs = std::vector({gnssAgc1, gnssAgc2}),
diff --git a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
index 1623960..5df39ed 100644
--- a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
+++ b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
@@ -209,4 +209,15 @@
INSTANTIATE_TEST_SUITE_P(
PerInstance, SecureElementHidlTest,
testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
- android::hardware::PrintInstanceNameToString);
\ No newline at end of file
+ android::hardware::PrintInstanceNameToString);
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ std::system("svc nfc disable"); /* Turn off NFC */
+ sleep(5);
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+ std::system("svc nfc enable"); /* Turn on NFC */
+ sleep(5);
+ return status;
+}
diff --git a/secure_element/1.1/vts/functional/VtsHalSecureElementV1_1TargetTest.cpp b/secure_element/1.1/vts/functional/VtsHalSecureElementV1_1TargetTest.cpp
index d7e4546..106ee29 100644
--- a/secure_element/1.1/vts/functional/VtsHalSecureElementV1_1TargetTest.cpp
+++ b/secure_element/1.1/vts/functional/VtsHalSecureElementV1_1TargetTest.cpp
@@ -94,3 +94,14 @@
PerInstance, SecureElementHidlTest,
testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
android::hardware::PrintInstanceNameToString);
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ std::system("svc nfc disable"); /* Turn off NFC */
+ sleep(5);
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+ std::system("svc nfc enable"); /* Turn on NFC */
+ sleep(5);
+ return status;
+}
diff --git a/secure_element/1.2/vts/functional/VtsHalSecureElementV1_2TargetTest.cpp b/secure_element/1.2/vts/functional/VtsHalSecureElementV1_2TargetTest.cpp
index 26b2ded..98c8a9c 100644
--- a/secure_element/1.2/vts/functional/VtsHalSecureElementV1_2TargetTest.cpp
+++ b/secure_element/1.2/vts/functional/VtsHalSecureElementV1_2TargetTest.cpp
@@ -108,3 +108,14 @@
PerInstance, SecureElementHidlTest,
testing::ValuesIn(android::hardware::getAllHalInstanceNames(ISecureElement::descriptor)),
android::hardware::PrintInstanceNameToString);
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ std::system("svc nfc disable"); /* Turn off NFC */
+ sleep(5);
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+ std::system("svc nfc enable"); /* Turn on NFC */
+ sleep(5);
+ return status;
+}
diff --git a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
index 9678da4..da69b37 100644
--- a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
+++ b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
@@ -320,5 +320,10 @@
::testing::InitGoogleTest(&argc, argv);
ABinderProcess_setThreadPoolMaxThreadCount(1);
ABinderProcess_startThreadPool();
- return RUN_ALL_TESTS();
+ std::system("/system/bin/svc nfc disable"); /* Turn off NFC */
+ sleep(5);
+ int status = RUN_ALL_TESTS();
+ std::system("/system/bin/svc nfc enable"); /* Turn on NFC */
+ sleep(5);
+ return status;
}
diff --git a/security/see/authmgr/aidl/default/Android.bp b/security/see/authmgr/aidl/default/Android.bp
new file mode 100644
index 0000000..35fce32
--- /dev/null
+++ b/security/see/authmgr/aidl/default/Android.bp
@@ -0,0 +1,20 @@
+//
+// Copyright (C) 2025 The Android Open-Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+vintf_fragment {
+ name: "android.hardware.security.see.authmgr.xml",
+ src: "android.hardware.security.see.authmgr.xml",
+ vendor: true,
+}
diff --git a/security/see/authmgr/aidl/default/android.hardware.security.see.authmgr.xml b/security/see/authmgr/aidl/default/android.hardware.security.see.authmgr.xml
new file mode 100644
index 0000000..17fcc21
--- /dev/null
+++ b/security/see/authmgr/aidl/default/android.hardware.security.see.authmgr.xml
@@ -0,0 +1,10 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl" exclusive-to="virtual-machine">
+ <name>android.hardware.security.see.authmgr</name>
+ <version>1</version>
+ <interface>
+ <name>IAuthMgrAuthorization</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/security/see/hwcrypto/aidl/vts/functional/Android.bp b/security/see/hwcrypto/aidl/vts/functional/Android.bp
index eb2eba1..fc63878 100644
--- a/security/see/hwcrypto/aidl/vts/functional/Android.bp
+++ b/security/see/hwcrypto/aidl/vts/functional/Android.bp
@@ -53,9 +53,11 @@
rust_test {
name: "VtsAidlHwCryptoTests",
srcs: ["hwcryptokey_tests.rs"],
+ test_config: "AndroidKeyOperations.xml",
require_root: true,
defaults: [
"hw_crypto_hal_aidl_rust_defaults",
+ "rdroidtest.defaults",
],
rustlibs: [
"libhwcryptohal_vts_test",
@@ -69,9 +71,11 @@
rust_test {
name: "VtsAidlHwCryptoOperationsTests",
srcs: ["hwcrypto_operations_tests.rs"],
+ test_config: "AndroidTestOperations.xml",
require_root: true,
defaults: [
"hw_crypto_hal_aidl_rust_defaults",
+ "rdroidtest.defaults",
],
rustlibs: [
"libhwcryptohal_vts_test",
diff --git a/security/see/hwcrypto/aidl/vts/functional/AndroidKeyOperations.xml b/security/see/hwcrypto/aidl/vts/functional/AndroidKeyOperations.xml
new file mode 100644
index 0000000..57229d7
--- /dev/null
+++ b/security/see/hwcrypto/aidl/vts/functional/AndroidKeyOperations.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2025 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Config for HwCrypto HAL operations VTS tests.">
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+
+ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+ <option name="push-file" key="VtsAidlHwCryptoTests" value="/data/local/tmp/VtsAidlHwCryptoTests" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
+ <option name="test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="VtsAidlHwCryptoTests" />
+ <!-- Rust tests are run in parallel by default. Run these ones
+ single-threaded. -->
+ <option name="native-test-flag" value="--test-threads=1" />
+ </test>
+</configuration>
\ No newline at end of file
diff --git a/security/see/hwcrypto/aidl/vts/functional/AndroidTestOperations.xml b/security/see/hwcrypto/aidl/vts/functional/AndroidTestOperations.xml
new file mode 100644
index 0000000..f069b3b
--- /dev/null
+++ b/security/see/hwcrypto/aidl/vts/functional/AndroidTestOperations.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2025 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Config for HwCrypto HAL device key VTS tests.">
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+
+ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+ <option name="push-file" key="VtsAidlHwCryptoOperationsTests" value="/data/local/tmp/VtsAidlHwCryptoOperationsTests" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
+ <option name="test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="VtsAidlHwCryptoOperationsTests" />
+ <!-- Rust tests are run in parallel by default. Run these ones
+ single-threaded. -->
+ <option name="native-test-flag" value="--test-threads=1" />
+ </test>
+</configuration>
\ No newline at end of file
diff --git a/security/see/hwcrypto/aidl/vts/functional/hwcrypto_operations_tests.rs b/security/see/hwcrypto/aidl/vts/functional/hwcrypto_operations_tests.rs
index 521fb73..69a34e3 100644
--- a/security/see/hwcrypto/aidl/vts/functional/hwcrypto_operations_tests.rs
+++ b/security/see/hwcrypto/aidl/vts/functional/hwcrypto_operations_tests.rs
@@ -27,8 +27,10 @@
KeyPolicy::KeyPolicy,CryptoOperation::CryptoOperation,CryptoOperationSet::CryptoOperationSet,
OperationParameters::OperationParameters, PatternParameters::PatternParameters,
};
+use rdroidtest::{ignore_if, rdroidtest};
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_operations_connection() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -36,7 +38,8 @@
assert!(hw_crypto_operations.is_ok(), "Couldn't get back a hwcrypto operations binder object");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_operations_simple_aes_test() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -123,7 +126,8 @@
assert_eq!(decrypted_msg, "string to be encrypted", "couldn't retrieve original message");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_operations_simple_hmac_test() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -183,7 +187,8 @@
assert_eq!(mac, mac2, "got a different mac");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_operations_aes_simple_cbcs_test_non_block_multiple() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -280,7 +285,8 @@
);
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_operations_aes_simple_all_encrypted_cbcs_test() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -402,7 +408,8 @@
);
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn check_cbcs_wrong_key_types() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -473,7 +480,8 @@
assert!(process_result.is_err(), "Should not be able to use cbcs mode with this key type");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn aes_simple_cbcs_test() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -584,3 +592,5 @@
"couldn't retrieve original message"
);
}
+
+rdroidtest::test_main!();
diff --git a/security/see/hwcrypto/aidl/vts/functional/hwcryptokey_tests.rs b/security/see/hwcrypto/aidl/vts/functional/hwcryptokey_tests.rs
index fcce839..8b4d924 100644
--- a/security/see/hwcrypto/aidl/vts/functional/hwcryptokey_tests.rs
+++ b/security/see/hwcrypto/aidl/vts/functional/hwcryptokey_tests.rs
@@ -26,14 +26,17 @@
};
use android_hardware_security_see_hwcrypto::aidl::android::hardware::security::see::hwcrypto::KeyPolicy::KeyPolicy;
use hwcryptohal_common;
+use rdroidtest::{ignore_if, rdroidtest};
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_connection() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey();
assert!(hw_crypto_key.is_ok(), "Couldn't get back a hwcryptokey binder object");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_key_get_current_dice_policy() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -41,7 +44,8 @@
assert!(!dice_policy.is_empty(), "received empty dice policy");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_get_keyslot_data() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -55,7 +59,8 @@
);
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_import_clear_key() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -83,7 +88,8 @@
assert!(key.is_err(), "imported keys should be of type PORTABLE");
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_token_export_import() {
// This test is not representative of the complete flow because here the exporter and importer
// are the same client, which is not something we would usually do
@@ -107,7 +113,8 @@
// TODO: Use operations to verify that the keys match
}
-#[test]
+#[rdroidtest]
+#[ignore_if(hwcryptohal_vts_test::ignore_test())]
fn test_hwcrypto_android_invalid_calls() {
let hw_crypto_key = hwcryptohal_vts_test::get_hwcryptokey()
.expect("Couldn't get back a hwcryptokey binder object");
@@ -163,3 +170,5 @@
"wrong error type received"
);
}
+
+rdroidtest::test_main!();
diff --git a/security/see/hwcrypto/aidl/vts/functional/lib.rs b/security/see/hwcrypto/aidl/vts/functional/lib.rs
index 465dde7..43676f6 100644
--- a/security/see/hwcrypto/aidl/vts/functional/lib.rs
+++ b/security/see/hwcrypto/aidl/vts/functional/lib.rs
@@ -18,11 +18,26 @@
//! It provides the base clases necessaries to write HwCrypto VTS tests
use anyhow::Result;
-use android_hardware_security_see_hwcrypto::aidl::android::hardware::security::see::hwcrypto::IHwCryptoKey::BpHwCryptoKey;
use android_hardware_security_see_hwcrypto::aidl::android::hardware::security::see::hwcrypto::IHwCryptoKey::IHwCryptoKey;
+pub const HWCRYPTO_SERVICE: &str = "android.hardware.security.see.hwcrypto.IHwCryptoKey";
+
/// Get a HwCryptoKey binder service object using the service manager
pub fn get_hwcryptokey() -> Result<binder::Strong<dyn IHwCryptoKey>, binder::Status> {
- let interface_name = <BpHwCryptoKey as IHwCryptoKey>::get_descriptor().to_owned() + "/default";
+ let interface_name = HWCRYPTO_SERVICE.to_owned() + "/default";
Ok(binder::get_interface(&interface_name)?)
}
+
+pub fn get_supported_instances() -> Vec<(String, String)> {
+ // Determine which instances are available.
+ binder::get_declared_instances(HWCRYPTO_SERVICE)
+ .unwrap_or_default()
+ .into_iter()
+ .map(|v| (v.clone(), v))
+ .collect()
+}
+
+pub fn ignore_test() -> bool {
+ let instances = get_supported_instances();
+ instances.len() == 0
+}
diff --git a/security/see/hwcrypto/default/Android.bp b/security/see/hwcrypto/default/Android.bp
index ab23cfd..7a4a7b6 100644
--- a/security/see/hwcrypto/default/Android.bp
+++ b/security/see/hwcrypto/default/Android.bp
@@ -112,6 +112,7 @@
cc_test {
name: "HwCryptoHalDelegatorTests",
enabled: false,
+ require_root: true,
srcs: [
"delegatorTest.cpp",
],
@@ -124,12 +125,14 @@
shared_libs: [
"libbase",
"liblog",
+ "libutils",
"libbinder",
"libbinder_ndk",
],
static_libs: [
"android.hardware.security.see.hwcrypto-V1-ndk",
"android.hardware.security.see.hwcrypto-V1-cpp",
+ "hwcryptohallib",
],
arch: {
diff --git a/security/see/hwcrypto/default/delegatorTest.cpp b/security/see/hwcrypto/default/delegatorTest.cpp
index a80d6fd..28b177d 100644
--- a/security/see/hwcrypto/default/delegatorTest.cpp
+++ b/security/see/hwcrypto/default/delegatorTest.cpp
@@ -1,11 +1,84 @@
+#include <android/binder_manager.h>
#include <gtest/gtest.h>
+#include <linux/dma-heap.h>
+#include <sys/auxv.h>
+#include <sys/mman.h>
#include "hwcryptokeyimpl.h"
+static inline bool align_overflow(size_t size, size_t alignment, size_t* aligned) {
+ if (size % alignment == 0) {
+ *aligned = size;
+ return false;
+ }
+ size_t temp = 0;
+ bool overflow = __builtin_add_overflow(size / alignment, 1, &temp);
+ overflow |= __builtin_mul_overflow(temp, alignment, aligned);
+ return overflow;
+}
+
+static int allocate_buffers(size_t size) {
+ const char* device_name = "/dev/dma_heap/system";
+ int dma_heap_fd = open(device_name, O_RDONLY | O_CLOEXEC);
+ if (dma_heap_fd < 0) {
+ LOG(ERROR) << "Cannot open " << device_name;
+ return -1;
+ }
+ size_t aligned = 0;
+ if (align_overflow(size, getauxval(AT_PAGESZ), &aligned)) {
+ LOG(ERROR) << "Rounding up buffer size oveflowed";
+ return -1;
+ }
+ struct dma_heap_allocation_data allocation_request = {
+ .len = aligned,
+ .fd_flags = O_RDWR | O_CLOEXEC,
+ };
+ int rc = ioctl(dma_heap_fd, DMA_HEAP_IOCTL_ALLOC, &allocation_request);
+ if (rc < 0) {
+ LOG(ERROR) << "Buffer allocation request failed " << rc;
+ return -1;
+ }
+ int fd = allocation_request.fd;
+ if (fd < 0) {
+ LOG(ERROR) << "Allocation request returned bad fd" << fd;
+ return -1;
+ }
+ return fd;
+}
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
+TEST(HwCryptoHalDelegator, FdTest) {
+ const std::string instance =
+ std::string() + ndk_hwcrypto::IHwCryptoKey::descriptor + "/default";
+ ndk::SpAIBinder binder(AServiceManager_waitForService(instance.c_str()));
+ ASSERT_NE(binder, nullptr);
+ auto hwCryptoKey = ndk_hwcrypto::IHwCryptoKey::fromBinder(binder);
+ ASSERT_NE(hwCryptoKey, nullptr);
+ auto fd = allocate_buffers(4096);
+ EXPECT_GE(fd, 0);
+ ndk::ScopedFileDescriptor ndkFd(fd);
+ ndk_hwcrypto::MemoryBufferParameter memBuffParam = ndk_hwcrypto::MemoryBufferParameter();
+ memBuffParam.bufferHandle.set<ndk_hwcrypto::MemoryBufferParameter::MemoryBuffer::input>(
+ std::move(ndkFd));
+ memBuffParam.sizeBytes = 4096;
+ auto operation = ndk_hwcrypto::CryptoOperation();
+ operation.set<ndk_hwcrypto::CryptoOperation::setMemoryBuffer>(std::move(memBuffParam));
+ ndk_hwcrypto::CryptoOperationSet operationSet = ndk_hwcrypto::CryptoOperationSet();
+ operationSet.context = nullptr;
+ operationSet.operations.push_back(std::move(operation));
+ std::vector<ndk_hwcrypto::CryptoOperationSet> operationSets;
+ operationSets.push_back(std::move(operationSet));
+ std::vector<ndk_hwcrypto::CryptoOperationResult> aidl_return;
+ std::shared_ptr<ndk_hwcrypto::IHwCryptoOperations> hwCryptoOperations;
+ auto res = hwCryptoKey->getHwCryptoOperations(&hwCryptoOperations);
+ EXPECT_TRUE(res.isOk());
+ res = hwCryptoOperations->processCommandList(&operationSets, &aidl_return);
+ EXPECT_TRUE(res.isOk());
+}
+
TEST(HwCryptoHalDelegator, keyPolicyCppToNdk) {
cpp_hwcrypto::KeyPolicy cppPolicy = cpp_hwcrypto::KeyPolicy();
cppPolicy.keyType = cpp_hwcrypto::types::KeyType::AES_128_CBC_PKCS7_PADDING;
@@ -46,4 +119,4 @@
cpp_hwcrypto::types::KeyPermissions::ALLOW_EPHEMERAL_KEY_WRAPPING);
EXPECT_EQ(cppPolicy.keyPermissions[1],
cpp_hwcrypto::types::KeyPermissions::ALLOW_HARDWARE_KEY_WRAPPING);
-}
\ No newline at end of file
+}
diff --git a/security/see/storage/default/Android.bp b/security/see/storage/default/Android.bp
index 7ea7739..33d93bb 100644
--- a/security/see/storage/default/Android.bp
+++ b/security/see/storage/default/Android.bp
@@ -13,9 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-prebuilt_etc {
+vintf_fragment {
name: "android.hardware.security.see.storage-service.trusty.xml",
- sub_dir: "vintf",
- vendor: true,
src: "android.hardware.security.see.storage-service.trusty.xml",
+ vendor: true,
}
diff --git a/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc b/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
index 5aecc54..d1acd6f 100644
--- a/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
+++ b/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
@@ -1,3 +1,6 @@
+on boot
+ setprop vendor.sensors.dynamic_sensor_op_timeout_ms 1600
+
service vendor.sensors-hal-multihal /vendor/bin/hw/android.hardware.sensors-service.multihal
class hal
user system
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index 8bc9d1a..87e6d95 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -66,6 +66,8 @@
return IWifiChip::FeatureSetMask::SET_VOIP_MODE;
case WIFI_FEATURE_MLO_SAP:
return IWifiChip::FeatureSetMask::MLO_SAP;
+ case WIFI_FEATURE_MULTIPLE_MLD_ON_SAP:
+ return IWifiChip::FeatureSetMask::MULTIPLE_MLD_ON_SAP;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -122,7 +124,8 @@
WIFI_FEATURE_P2P_RAND_MAC,
WIFI_FEATURE_AFC_CHANNEL,
WIFI_FEATURE_SET_VOIP_MODE,
- WIFI_FEATURE_MLO_SAP};
+ WIFI_FEATURE_MLO_SAP,
+ WIFI_FEATURE_MULTIPLE_MLD_ON_SAP};
for (const auto feature : features) {
if (feature & legacy_feature_set) {
*aidl_feature_set |= static_cast<uint32_t>(convertLegacyChipFeatureToAidl(feature));
diff --git a/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h b/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
index dbcc152..4cabbe4 100644
--- a/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
+++ b/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
@@ -499,6 +499,8 @@
#define WIFI_FEATURE_SET_VOIP_MODE (uint64_t)0x1000000000 // Support Voip mode setting
#define WIFI_FEATURE_CACHED_SCAN_RESULTS (uint64_t)0x2000000000 // Support cached scan result report
#define WIFI_FEATURE_MLO_SAP (uint64_t)0x4000000000 // Support MLO SoftAp
+#define WIFI_FEATURE_MULTIPLE_MLD_ON_SAP \
+ (uint64_t)0x8000000000 // Support Multiple MLD SoftAp (Bridged Dual 11be SoftAp)
// Add more features here
#define IS_MASK_SET(mask, flags) (((flags) & (mask)) == (mask))