Merge "Add 11az secure ranging hal implementation" into main
diff --git a/audio/aidl/android/hardware/audio/core/IStreamOut.aidl b/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
index f26dc1c..111969f 100644
--- a/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
+++ b/audio/aidl/android/hardware/audio/core/IStreamOut.aidl
@@ -214,7 +214,8 @@
*
* The range of supported values for speed and pitch factors is provided by
* the 'IModule.getSupportedPlaybackRateFactors' method. Out of range speed
- * and pitch values must not be rejected if the fallback mode is 'MUTE'.
+ * and pitch values may result in silent playback instead of returning an
+ * error in the case when the fallback mode is 'MUTE'.
*
* @param playbackRate Playback parameters to set.
* @throws EX_ILLEGAL_ARGUMENT If provided parameters are out of acceptable range.
diff --git a/audio/aidl/common/tests/utils_tests.cpp b/audio/aidl/common/tests/utils_tests.cpp
index 1b8b8df..1522d7e 100644
--- a/audio/aidl/common/tests/utils_tests.cpp
+++ b/audio/aidl/common/tests/utils_tests.cpp
@@ -86,7 +86,7 @@
std::make_pair(6UL, AudioChannelLayout::LAYOUT_5POINT1),
std::make_pair(8UL, AudioChannelLayout::LAYOUT_7POINT1),
std::make_pair(16UL, AudioChannelLayout::LAYOUT_9POINT1POINT6),
- std::make_pair(13UL, AudioChannelLayout::LAYOUT_13POINT_360RA),
+ std::make_pair(13UL, AudioChannelLayout::LAYOUT_13POINT0),
std::make_pair(24UL, AudioChannelLayout::LAYOUT_22POINT2),
std::make_pair(3UL, AudioChannelLayout::LAYOUT_STEREO_HAPTIC_A),
std::make_pair(4UL, AudioChannelLayout::LAYOUT_STEREO_HAPTIC_AB)};
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 967d0b9..687d8fc 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -121,6 +121,52 @@
],
}
+cc_library {
+ name: "libeffectconfig",
+ srcs: [
+ "EffectConfig.cpp",
+ ],
+ defaults: [
+ "latest_android_hardware_audio_effect_ndk_shared",
+ "latest_android_media_audio_common_types_ndk_shared",
+ ],
+ shared_libs: [
+ "libaudioutils",
+ "libaudio_aidl_conversion_common_ndk",
+ "libbase",
+ "libbinder_ndk",
+ "liblog",
+ "libmedia_helper",
+ "libtinyxml2",
+ "libutils",
+ ],
+ header_libs: [
+ "libaudio_system_headers",
+ "libaudioaidl_headers",
+ ],
+ export_shared_lib_headers: [
+ "libtinyxml2",
+ ],
+ export_include_dirs: [
+ "include",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-DBACKEND_NDK",
+ ],
+ vendor: true,
+ host_supported: true,
+ target: {
+ android: {
+ shared_libs: [
+ "libapexsupport",
+ ],
+ },
+ },
+}
+
cc_binary {
name: "android.hardware.audio.service-aidl.example",
relative_install_path: "hw",
@@ -290,10 +336,9 @@
defaults: ["aidlaudioeffectservice_defaults"],
shared_libs: [
"libapexsupport",
- "libtinyxml2",
+ "libeffectconfig",
],
srcs: [
- "EffectConfig.cpp",
"EffectFactory.cpp",
"EffectMain.cpp",
],
diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp
index 9c335ba..fa12056 100644
--- a/audio/aidl/default/EffectConfig.cpp
+++ b/audio/aidl/default/EffectConfig.cpp
@@ -106,6 +106,7 @@
}
bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) {
+#ifdef __ANDROID_APEX__
if constexpr (__ANDROID_VENDOR_API__ >= 202404) {
AApexInfo *apexInfo;
if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) {
@@ -122,6 +123,7 @@
} else {
LOG(DEBUG) << __func__ << " libapexsupport is not supported";
}
+#endif
// If audio effects libs are not in vendor apex, locate them in kEffectLibPath
for (auto* libraryDirectory : kEffectLibPath) {
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index e96cf81..f9fa799 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -184,8 +184,12 @@
const int32_t nominalLatencyMs = getNominalLatencyMs(*portConfigIt);
// Since this is a private method, it is assumed that
// validity of the portConfigId has already been checked.
- const int32_t minimumStreamBufferSizeFrames =
- calculateBufferSizeFrames(nominalLatencyMs, portConfigIt->sampleRate.value().value);
+ int32_t minimumStreamBufferSizeFrames = 0;
+ if (!calculateBufferSizeFrames(
+ portConfigIt->format.value(), nominalLatencyMs,
+ portConfigIt->sampleRate.value().value, &minimumStreamBufferSizeFrames).isOk()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
if (in_bufferSizeFrames < minimumStreamBufferSizeFrames) {
LOG(ERROR) << __func__ << ": " << mType << ": insufficient buffer size "
<< in_bufferSizeFrames << ", must be at least " << minimumStreamBufferSizeFrames;
@@ -378,6 +382,18 @@
return kLatencyMs;
}
+ndk::ScopedAStatus Module::calculateBufferSizeFrames(
+ const ::aidl::android::media::audio::common::AudioFormatDescription &format,
+ int32_t latencyMs, int32_t sampleRateHz, int32_t *bufferSizeFrames) {
+ if (format.type == AudioFormatType::PCM) {
+ *bufferSizeFrames = calculateBufferSizeFramesForPcm(latencyMs, sampleRateHz);
+ return ndk::ScopedAStatus::ok();
+ }
+ LOG(ERROR) << __func__ << ": " << mType << ": format " << format.toString()
+ << " is not supported";
+ 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) {
@@ -1123,8 +1139,14 @@
*_aidl_return = in_requested;
auto maxSampleRateIt = std::max_element(sampleRates.begin(), sampleRates.end());
const int32_t latencyMs = getNominalLatencyMs(*(maxSampleRateIt->second));
- _aidl_return->minimumStreamBufferSizeFrames =
- calculateBufferSizeFrames(latencyMs, maxSampleRateIt->first);
+ if (!calculateBufferSizeFrames(
+ maxSampleRateIt->second->format.value(), latencyMs, maxSampleRateIt->first,
+ &_aidl_return->minimumStreamBufferSizeFrames).isOk()) {
+ if (patchesBackup.has_value()) {
+ mPatches = std::move(*patchesBackup);
+ }
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
_aidl_return->latenciesMs.clear();
_aidl_return->latenciesMs.insert(_aidl_return->latenciesMs.end(),
_aidl_return->sinkPortConfigIds.size(), latencyMs);
diff --git a/audio/aidl/default/config/audioPolicy/api/current.txt b/audio/aidl/default/config/audioPolicy/api/current.txt
index 1249a09..c675820 100644
--- a/audio/aidl/default/config/audioPolicy/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/api/current.txt
@@ -50,7 +50,7 @@
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_NONE;
- enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_13POINT_360RA;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_13POINT0;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_22POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_2POINT0POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_2POINT1;
diff --git a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
index 8adac8c..94856a5 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -476,7 +476,7 @@
<xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_9POINT1POINT4"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_9POINT1POINT6"/>
- <xs:enumeration value="AUDIO_CHANNEL_OUT_13POINT_360RA"/>
+ <xs:enumeration value="AUDIO_CHANNEL_OUT_13POINT0"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_22POINT2"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index d03598a..cbc13d1 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -207,12 +207,15 @@
virtual std::unique_ptr<Configuration> initializeConfig();
virtual int32_t getNominalLatencyMs(
const ::aidl::android::media::audio::common::AudioPortConfig& portConfig);
+ virtual ndk::ScopedAStatus calculateBufferSizeFrames(
+ 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);
// Utility and helper functions accessible to subclasses.
- static int32_t calculateBufferSizeFrames(int32_t latencyMs, int32_t sampleRateHz) {
+ static int32_t calculateBufferSizeFramesForPcm(int32_t latencyMs, int32_t sampleRateHz) {
const int32_t rawSizeFrames =
aidl::android::hardware::audio::common::frameCountFromDurationMs(latencyMs,
sampleRateHz);
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 6bce107..93c2a61 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -376,7 +376,8 @@
template <typename PropType, class Instance, typename Getter, typename Setter>
void TestAccessors(Instance* inst, Getter getter, Setter setter,
const std::vector<PropType>& validValues,
- const std::vector<PropType>& invalidValues, bool* isSupported) {
+ const std::vector<PropType>& invalidValues, bool* isSupported,
+ const std::vector<PropType>* ambivalentValues = nullptr) {
PropType initialValue{};
ScopedAStatus status = (inst->*getter)(&initialValue);
if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
@@ -395,6 +396,15 @@
EXPECT_STATUS(EX_ILLEGAL_ARGUMENT, (inst->*setter)(v))
<< "for an invalid value: " << ::testing::PrintToString(v);
}
+ if (ambivalentValues != nullptr) {
+ for (const auto v : *ambivalentValues) {
+ const auto status = (inst->*setter)(v);
+ if (!status.isOk()) {
+ EXPECT_STATUS(EX_ILLEGAL_ARGUMENT, status)
+ << "for an ambivalent value: " << ::testing::PrintToString(v);
+ }
+ }
+ }
EXPECT_IS_OK((inst->*setter)(initialValue)) << "Failed to restore the initial value";
}
@@ -3936,11 +3946,6 @@
AudioPlaybackRate{1.0f, 1.0f, tsVoice, fbFail},
AudioPlaybackRate{factors.maxSpeed, factors.maxPitch, tsVoice, fbMute},
AudioPlaybackRate{factors.minSpeed, factors.minPitch, tsVoice, fbMute},
- // Out of range speed / pitch values must not be rejected if the fallback mode is "mute"
- AudioPlaybackRate{factors.maxSpeed * 2, factors.maxPitch * 2, tsDefault, fbMute},
- AudioPlaybackRate{factors.minSpeed / 2, factors.minPitch / 2, tsDefault, fbMute},
- AudioPlaybackRate{factors.maxSpeed * 2, factors.maxPitch * 2, tsVoice, fbMute},
- AudioPlaybackRate{factors.minSpeed / 2, factors.minPitch / 2, tsVoice, fbMute},
};
const std::vector<AudioPlaybackRate> invalidValues = {
AudioPlaybackRate{factors.maxSpeed, factors.maxPitch * 2, tsDefault, fbFail},
@@ -3956,6 +3961,14 @@
AudioPlaybackRate{1.0f, 1.0f, tsDefault,
AudioPlaybackRate::TimestretchFallbackMode::SYS_RESERVED_DEFAULT},
};
+ const std::vector<AudioPlaybackRate> ambivalentValues = {
+ // Out of range speed / pitch values may optionally be rejected if the fallback mode
+ // is "mute".
+ AudioPlaybackRate{factors.maxSpeed * 2, factors.maxPitch * 2, tsDefault, fbMute},
+ AudioPlaybackRate{factors.minSpeed / 2, factors.minPitch / 2, tsDefault, fbMute},
+ AudioPlaybackRate{factors.maxSpeed * 2, factors.maxPitch * 2, tsVoice, fbMute},
+ AudioPlaybackRate{factors.minSpeed / 2, factors.minPitch / 2, tsVoice, fbMute},
+ };
bool atLeastOneSupports = false;
for (const auto& port : offloadMixPorts) {
const auto portConfig = moduleConfig->getSingleConfigForMixPort(false, port);
@@ -3965,7 +3978,8 @@
bool isSupported = false;
EXPECT_NO_FATAL_FAILURE(TestAccessors<AudioPlaybackRate>(
stream.get(), &IStreamOut::getPlaybackRateParameters,
- &IStreamOut::setPlaybackRateParameters, validValues, invalidValues, &isSupported));
+ &IStreamOut::setPlaybackRateParameters, validValues, invalidValues, &isSupported,
+ &ambivalentValues));
if (isSupported) atLeastOneSupports = true;
}
if (!atLeastOneSupports) {
diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
index bf22839..322fdc0 100644
--- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
@@ -52,7 +52,7 @@
AudioChannelLayout::LAYOUT_5POINT1POINT4, AudioChannelLayout::LAYOUT_6POINT1,
AudioChannelLayout::LAYOUT_7POINT1, AudioChannelLayout::LAYOUT_7POINT1POINT2,
AudioChannelLayout::LAYOUT_7POINT1POINT4, AudioChannelLayout::LAYOUT_9POINT1POINT4,
- AudioChannelLayout::LAYOUT_9POINT1POINT6, AudioChannelLayout::LAYOUT_13POINT_360RA,
+ AudioChannelLayout::LAYOUT_9POINT1POINT6, AudioChannelLayout::LAYOUT_13POINT0,
AudioChannelLayout::LAYOUT_22POINT2};
static const std::vector<int32_t> kChannels = {
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 6e8d410..3b1f3d9 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -116,6 +116,10 @@
bool isAllParamsValid();
+ void setParamsAndProcess(std::vector<float>& input, std::vector<float>& output);
+
+ float calculateDb(const std::vector<float>& input, size_t startSamplePos);
+
// enqueue test parameters
void addEngineConfig(const DynamicsProcessing::EngineArchitecture& cfg);
void addPreEqChannelConfig(const std::vector<DynamicsProcessing::ChannelConfig>& cfg);
@@ -131,6 +135,9 @@
static constexpr int kBandCount = 5;
static constexpr int kSamplingFrequency = 44100;
static constexpr int kFrameCount = 2048;
+ static constexpr int kInputFrequency = 1000;
+ static constexpr size_t kStartIndex = 15 * kSamplingFrequency / 1000; // skip 15ms
+ static constexpr float kToleranceDb = 0.05;
std::shared_ptr<IFactory> mFactory;
std::shared_ptr<IEffect> mEffect;
Descriptor mDescriptor;
@@ -390,6 +397,22 @@
return true;
}
+float DynamicsProcessingTestHelper::calculateDb(const std::vector<float>& input,
+ size_t startSamplePos = 0) {
+ return audio_utils_compute_power_mono(input.data() + startSamplePos, AUDIO_FORMAT_PCM_FLOAT,
+ input.size() - startSamplePos);
+}
+
+void DynamicsProcessingTestHelper::setParamsAndProcess(std::vector<float>& input,
+ std::vector<float>& output) {
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
+ if (isAllParamsValid()) {
+ ASSERT_NO_FATAL_FAILURE(
+ processAndWriteToOutput(input, output, mEffect, &mOpenEffectReturn));
+ ASSERT_GT(output.size(), kStartIndex);
+ }
+}
+
void DynamicsProcessingTestHelper::addEngineConfig(
const DynamicsProcessing::EngineArchitecture& cfg) {
DynamicsProcessing dp;
@@ -593,6 +616,66 @@
});
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingTestInputGain);
+class DynamicsProcessingInputGainDataTest
+ : public ::testing::TestWithParam<std::pair<std::shared_ptr<IFactory>, Descriptor>>,
+ public DynamicsProcessingTestHelper {
+ public:
+ DynamicsProcessingInputGainDataTest()
+ : DynamicsProcessingTestHelper((GetParam()), AudioChannelLayout::LAYOUT_MONO) {
+ mInput.resize(kFrameCount * mChannelCount);
+ generateSineWave(kInputFrequency /*Input Frequency*/, mInput);
+ mInputDb = calculateDb(mInput);
+ }
+
+ void SetUp() override {
+ SetUpDynamicsProcessingEffect();
+ SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+ }
+
+ void TearDown() override { TearDownDynamicsProcessingEffect(); }
+
+ void cleanUpInputGainConfig() {
+ CleanUp();
+ mInputGain.clear();
+ }
+
+ std::vector<DynamicsProcessing::InputGain> mInputGain;
+ std::vector<float> mInput;
+ float mInputDb;
+};
+
+TEST_P(DynamicsProcessingInputGainDataTest, SetAndGetInputGain) {
+ std::vector<float> gainDbValues = {-85, -40, 0, 40, 85};
+ for (float gainDb : gainDbValues) {
+ cleanUpInputGainConfig();
+ for (int i = 0; i < mChannelCount; i++) {
+ mInputGain.push_back(DynamicsProcessing::InputGain(i, gainDb));
+ }
+ std::vector<float> output(mInput.size());
+ EXPECT_NO_FATAL_FAILURE(addInputGain(mInputGain));
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(mInput, output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+ EXPECT_NEAR(outputDb, mInputDb + gainDb, kToleranceDb)
+ << "InputGain: " << gainDb << ", OutputDb: " << outputDb;
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(DynamicsProcessingTest, DynamicsProcessingInputGainDataTest,
+ 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(DynamicsProcessingInputGainDataTest);
+
/**
* Test DynamicsProcessing Limiter Config
*/
@@ -686,11 +769,6 @@
void TearDown() override { TearDownDynamicsProcessingEffect(); }
- float calculateDb(std::vector<float> input, size_t start = 0) {
- return audio_utils_compute_power_mono(input.data() + start, AUDIO_FORMAT_PCM_FLOAT,
- input.size() - start);
- }
-
void computeThreshold(float ratio, float outputDb, float& threshold) {
EXPECT_NE(ratio, 0);
threshold = (mInputDb - (ratio * outputDb)) / (1 - ratio);
@@ -703,16 +781,10 @@
ratio = inputOverThreshold / outputOverThreshold;
}
- void setParamsAndProcess(std::vector<float>& output) {
+ void setLimiterParamsAndProcess(std::vector<float>& input, std::vector<float>& output) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addLimiterConfig(mLimiterConfigList));
- ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
- if (isAllParamsValid()) {
- ASSERT_NO_FATAL_FAILURE(
- processAndWriteToOutput(mInput, output, mEffect, &mOpenEffectReturn));
- EXPECT_GT(output.size(), kStartIndex);
- }
- cleanUpLimiterConfig();
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(input, output));
}
void cleanUpLimiterConfig() {
@@ -723,10 +795,8 @@
static constexpr float kDefaultAttackTime = 0;
static constexpr float kDefaultReleaseTime = 0;
static constexpr float kDefaultRatio = 4;
- static constexpr float kDefaultThreshold = 0;
+ static constexpr float kDefaultThreshold = -10;
static constexpr float kDefaultPostGain = 0;
- static constexpr int kInputFrequency = 1000;
- static constexpr size_t kStartIndex = 15 * kSamplingFrequency / 1000; // skip 15ms
std::vector<DynamicsProcessing::LimiterConfig> mLimiterConfigList;
std::vector<float> mInput;
float mInputDb;
@@ -738,17 +808,18 @@
std::vector<float> output(mInput.size());
float previousThreshold = -FLT_MAX;
for (float threshold : thresholdValues) {
+ cleanUpLimiterConfig();
for (int i = 0; i < mChannelCount; i++) {
fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
kDefaultReleaseTime, kDefaultRatio, threshold, kDefaultPostGain);
}
- EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ EXPECT_NO_FATAL_FAILURE(setLimiterParamsAndProcess(mInput, output));
if (!isAllParamsValid()) {
continue;
}
float outputDb = calculateDb(output, kStartIndex);
if (threshold >= mInputDb || kDefaultRatio == 1) {
- EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ EXPECT_NEAR(mInputDb, outputDb, kToleranceDb);
} else {
float calculatedThreshold = 0;
EXPECT_NO_FATAL_FAILURE(computeThreshold(kDefaultRatio, outputDb, calculatedThreshold));
@@ -761,48 +832,68 @@
TEST_P(DynamicsProcessingLimiterConfigDataTest, IncreasingRatio) {
std::vector<float> ratioValues = {1, 10, 20, 30, 40, 50};
std::vector<float> output(mInput.size());
- float threshold = -10;
float previousRatio = 0;
for (float ratio : ratioValues) {
+ cleanUpLimiterConfig();
for (int i = 0; i < mChannelCount; i++) {
fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
- kDefaultReleaseTime, ratio, threshold, kDefaultPostGain);
+ kDefaultReleaseTime, ratio, kDefaultThreshold, kDefaultPostGain);
}
- EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ EXPECT_NO_FATAL_FAILURE(setLimiterParamsAndProcess(mInput, output));
if (!isAllParamsValid()) {
continue;
}
float outputDb = calculateDb(output, kStartIndex);
- if (threshold >= mInputDb) {
- EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ if (kDefaultThreshold >= mInputDb) {
+ EXPECT_NEAR(mInputDb, outputDb, kToleranceDb);
} else {
float calculatedRatio = 0;
- EXPECT_NO_FATAL_FAILURE(computeRatio(threshold, outputDb, calculatedRatio));
+ EXPECT_NO_FATAL_FAILURE(computeRatio(kDefaultThreshold, outputDb, calculatedRatio));
ASSERT_GT(calculatedRatio, previousRatio);
previousRatio = calculatedRatio;
}
}
}
+TEST_P(DynamicsProcessingLimiterConfigDataTest, IncreasingPostGain) {
+ std::vector<float> postGainDbValues = {-85, -40, 0, 40, 85};
+ std::vector<float> output(mInput.size());
+ for (float postGainDb : postGainDbValues) {
+ cleanUpLimiterConfig();
+ for (int i = 0; i < mChannelCount; i++) {
+ fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, kDefaultRatio, -1, postGainDb);
+ }
+ EXPECT_NO_FATAL_FAILURE(setLimiterParamsAndProcess(mInput, output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+ EXPECT_NEAR(outputDb, mInputDb + postGainDb, kToleranceDb)
+ << "PostGain: " << postGainDb << ", OutputDb: " << outputDb;
+ }
+}
+
TEST_P(DynamicsProcessingLimiterConfigDataTest, LimiterEnableDisable) {
std::vector<bool> limiterEnableValues = {false, true};
std::vector<float> output(mInput.size());
for (bool isEnabled : limiterEnableValues) {
+ cleanUpLimiterConfig();
for (int i = 0; i < mChannelCount; i++) {
// Set non-default values
fillLimiterConfig(mLimiterConfigList, i, isEnabled, kDefaultLinkerGroup,
5 /*attack time*/, 5 /*release time*/, 10 /*ratio*/,
-10 /*threshold*/, 5 /*postgain*/);
}
- EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ EXPECT_NO_FATAL_FAILURE(setLimiterParamsAndProcess(mInput, output));
if (!isAllParamsValid()) {
continue;
}
if (isEnabled) {
EXPECT_NE(mInputDb, calculateDb(output, kStartIndex));
} else {
- EXPECT_NEAR(mInputDb, calculateDb(output, kStartIndex), 0.05);
+ EXPECT_NEAR(mInputDb, calculateDb(output, kStartIndex), kToleranceDb);
}
}
}
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index a29920e..bf48a87 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -43,13 +43,13 @@
static const std::vector<TagVectorPair> kParamsIncreasingVector = {
{EnvironmentalReverb::roomLevelMb, {-3500, -2800, -2100, -1400, -700, 0}},
{EnvironmentalReverb::roomHfLevelMb, {-4000, -3200, -2400, -1600, -800, 0}},
- {EnvironmentalReverb::decayTimeMs, {800, 1600, 2400, 3200, 4000}},
- {EnvironmentalReverb::decayHfRatioPm, {100, 600, 1100, 1600, 2000}},
+ {EnvironmentalReverb::decayTimeMs, {400, 800, 1200, 1600, 2000}},
+ {EnvironmentalReverb::decayHfRatioPm, {1000, 900, 800, 700}},
{EnvironmentalReverb::levelMb, {-3500, -2800, -2100, -1400, -700, 0}},
};
static const TagVectorPair kDiffusionParam = {EnvironmentalReverb::diffusionPm,
- {200, 400, 600, 800, 1000}};
+ {100, 300, 500, 700, 900}};
static const TagVectorPair kDensityParam = {EnvironmentalReverb::densityPm,
{0, 200, 400, 600, 800, 1000}};
@@ -281,7 +281,7 @@
static constexpr int kDurationMilliSec = 500;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
- static constexpr int kInputFrequency = 1000;
+ static constexpr int kInputFrequency = 2000;
int mStereoChannelCount =
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
diff --git a/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
index bed0405..dc11af6 100644
--- a/biometrics/face/aidl/default/Android.bp
+++ b/biometrics/face/aidl/default/Android.bp
@@ -78,7 +78,7 @@
vendor: true,
relative_install_path: "hw",
init_rc: ["face-default.rc"],
- vintf_fragments: ["face-default.xml"],
+ vintf_fragment_modules: ["android.hardware.biometrics.face-service.default.vintf"],
shared_libs: [
"libbinder_ndk",
"liblog",
@@ -89,6 +89,12 @@
],
}
+vintf_fragment {
+ name: "android.hardware.biometrics.face-service.default.vintf",
+ src: "face-default.xml",
+ vendor: true,
+}
+
sysprop_library {
name: "android.hardware.biometrics.face.VirtualProps",
srcs: ["face.sysprop"],
diff --git a/biometrics/fingerprint/aidl/default/Android.bp b/biometrics/fingerprint/aidl/default/Android.bp
index faaa9c6..c6ffc51 100644
--- a/biometrics/fingerprint/aidl/default/Android.bp
+++ b/biometrics/fingerprint/aidl/default/Android.bp
@@ -83,7 +83,7 @@
vendor: true,
relative_install_path: "hw",
init_rc: ["fingerprint-default.rc"],
- vintf_fragments: ["fingerprint-default.xml"],
+ vintf_fragment_modules: ["android.hardware.biometrics.fingerprint-service.default.vintf"],
local_include_dirs: ["include"],
srcs: [
],
@@ -105,6 +105,12 @@
],
}
+vintf_fragment {
+ name: "android.hardware.biometrics.fingerprint-service.default.vintf",
+ src: "fingerprint-default.xml",
+ vendor: true,
+}
+
cc_test {
name: "android.hardware.biometrics.fingerprint.FakeFingerprintEngineTest",
local_include_dirs: ["include"],
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index 3055da1..143e231 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -50,6 +50,9 @@
} else if (sensorTypeProp == "udfps") {
mSensorType = FingerprintSensorType::UNDER_DISPLAY_OPTICAL;
mEngine = std::make_unique<FakeFingerprintEngineUdfps>();
+ } else if (sensorTypeProp == "udfps-us") {
+ mSensorType = FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC;
+ mEngine = std::make_unique<FakeFingerprintEngineUdfps>();
} else if (sensorTypeProp == "side") {
mSensorType = FingerprintSensorType::POWER_BUTTON;
mEngine = std::make_unique<FakeFingerprintEngineSide>();
@@ -220,7 +223,7 @@
case FingerprintSensorType::UNDER_DISPLAY_OPTICAL:
return "udfps";
case FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC:
- return "udfps";
+ return "udfps-us";
default:
return "unknown";
}
diff --git a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
index 8c02a68..ad6f9e0 100644
--- a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
+++ b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
@@ -173,6 +173,6 @@
type: String
access: ReadWrite
prop_name: "persist.vendor.fingerprint.virtual.type"
- enum_values: "default|rear|udfps|side"
+ enum_values: "default|rear|udfps|udfps-us|side"
}
}
diff --git a/biometrics/fingerprint/aidl/default/fingerprint.sysprop b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
index eb33432..1d64c48 100644
--- a/biometrics/fingerprint/aidl/default/fingerprint.sysprop
+++ b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
@@ -9,7 +9,7 @@
type: String
scope: Public
access: ReadWrite
- enum_values: "default|rear|udfps|side"
+ enum_values: "default|rear|udfps|udfps-us|side"
api_name: "type"
}
diff --git a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
index 8ffc96b..25abffe 100644
--- a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
@@ -152,7 +152,7 @@
} typeMap[] = {{FingerprintSensorType::REAR, "rear"},
{FingerprintSensorType::POWER_BUTTON, "side"},
{FingerprintSensorType::UNDER_DISPLAY_OPTICAL, "udfps"},
- {FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC, "udfps"},
+ {FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC, "udfps-us"},
{FingerprintSensorType::UNKNOWN, "unknown"}};
for (auto const& x : typeMap) {
mVhal->setType(x.type);
diff --git a/bluetooth/aidl/Android.bp b/bluetooth/aidl/Android.bp
index c6a592f..721be73 100644
--- a/bluetooth/aidl/Android.bp
+++ b/bluetooth/aidl/Android.bp
@@ -23,6 +23,9 @@
// translate code.
enabled: true,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
},
diff --git a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
index 4d90058..51931e7 100644
--- a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
+++ b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
@@ -397,12 +397,18 @@
while (!event_queue.empty()) {
std::vector<uint8_t> event;
event_queue.front(event);
- auto complete_view = ::bluetooth::hci::CommandCompleteView::Create(
+
+ auto event_view =
::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
- std::make_shared<std::vector<uint8_t>>(event))));
- auto status_view = ::bluetooth::hci::CommandCompleteView::Create(
- ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
- std::make_shared<std::vector<uint8_t>>(event))));
+ std::make_shared<std::vector<uint8_t>>(event)));
+ if (!event_view.IsValid()) {
+ break;
+ }
+
+ auto status_view = ::bluetooth::hci::CommandStatusView::Create(event_view);
+ auto complete_view =
+ ::bluetooth::hci::CommandCompleteView::Create(event_view);
+
bool is_complete_no_op =
complete_view.IsValid() &&
complete_view.GetCommandOpCode() == ::bluetooth::hci::OpCode::NONE;
diff --git a/bluetooth/audio/aidl/Android.bp b/bluetooth/audio/aidl/Android.bp
index ae55fa9..dbff368 100644
--- a/bluetooth/audio/aidl/Android.bp
+++ b/bluetooth/audio/aidl/Android.bp
@@ -38,6 +38,9 @@
cpp: {
enabled: false,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
enabled: false,
@@ -86,7 +89,6 @@
],
frozen: false,
-
}
// Note: This should always be one version ahead of the last frozen version
diff --git a/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp b/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
index 1427744..508d8f1 100644
--- a/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
+++ b/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
@@ -814,12 +814,13 @@
}
ProgramSelector sel = {};
- uint64_t freq = 0;
+ uint64_t dabSidExt = 0;
bool dabStationPresent = false;
for (auto&& programInfo : *programList) {
if (!utils::hasId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ)) {
continue;
}
+ uint64_t freq = 0;
for (auto&& config_entry : config) {
if (config_entry.frequencyKhz ==
utils::getId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ, 0)) {
@@ -832,7 +833,7 @@
if (freq == 0) {
continue;
}
- int64_t dabSidExt = utils::getId(programInfo.selector, IdentifierType::DAB_SID_EXT, 0);
+ dabSidExt = utils::getId(programInfo.selector, IdentifierType::DAB_SID_EXT, 0);
int64_t dabEns = utils::getId(programInfo.selector, IdentifierType::DAB_ENSEMBLE, 0);
sel = makeSelectorDab(dabSidExt, (int32_t)dabEns, freq);
dabStationPresent = true;
@@ -861,9 +862,9 @@
LOG(DEBUG) << "Current program info: " << infoCb.toString();
// it should tune exactly to what was requested
- vector<int64_t> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_FREQUENCY_KHZ);
- EXPECT_NE(freqs.end(), find(freqs.begin(), freqs.end(), freq))
- << "DAB freq " << freq << " kHz is not sent back by callback.";
+ vector<int64_t> sidExts = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_SID_EXT);
+ EXPECT_NE(sidExts.end(), find(sidExts.begin(), sidExts.end(), dabSidExt))
+ << "DAB SID ext " << std::hex << dabSidExt << " is not sent back by callback.";
}
/**
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 825c931..19f4839 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -147,6 +147,6 @@
stem: "compatibility_matrix.202504.xml",
srcs: ["compatibility_matrix.202504.xml"],
kernel_configs: [
- "kernel_config_w_6.12",
+ "kernel_config_b_6.12",
],
}
diff --git a/compatibility_matrices/bump.py b/compatibility_matrices/bump.py
index ee2fa88..bcb0fa6 100755
--- a/compatibility_matrices/bump.py
+++ b/compatibility_matrices/bump.py
@@ -181,14 +181,14 @@
help="VINTF level of the next version (e.g. 202504)")
parser.add_argument("current_letter",
type=str,
- help="Letter of the API level of the current version (e.g. v)")
+ help="Letter of the API level of the current version (e.g. b)")
parser.add_argument("next_letter",
type=str,
- help="Letter of the API level of the next version (e.g. w)")
+ help="Letter of the API level of the next version (e.g. c)")
parser.add_argument("platform_version",
type=str,
nargs="?",
- help="Android release version number number (e.g. 15)")
+ help="Android release version number number (e.g. 16)")
cmdline_args = parser.parse_args()
Bump(cmdline_args).run()
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl
new file mode 100644
index 0000000..a0351f8
--- /dev/null
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.gnss.gnss_assistance;
+/* @hide */
+@VintfStability
+parcelable AuxiliaryInformation {
+ int svid;
+ android.hardware.gnss.GnssSignalType[] availableSignalTypes;
+ int frequencyChannelNumber;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation.BeidouB1CSatelliteOrbitType satType;
+ @Backing(type="int") @VintfStability
+ enum BeidouB1CSatelliteOrbitType {
+ UNDEFINED = 0,
+ GEO = 1,
+ IGSO = 2,
+ MEO = 3,
+ }
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
index ec517e6..f7b16f9 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2024 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.
+ */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
@@ -20,7 +35,7 @@
/* @hide */
@VintfStability
parcelable BeidouSatelliteEphemeris {
- int prn;
+ int svid;
android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris.BeidouSatelliteClockModel satelliteClockModel;
android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel;
android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris.BeidouSatelliteHealth satelliteHealth;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
index 1bac08e..e5a3630 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
@@ -35,7 +35,7 @@
/* @hide */
@VintfStability
parcelable GalileoSatelliteEphemeris {
- int satelliteCodeNumber;
+ int svid;
android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSatelliteClockModel[] satelliteClockModel;
android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel;
android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth svHealth;
@@ -58,11 +58,23 @@
}
@VintfStability
parcelable GalileoSvHealth {
- int dataValidityStatusE1b;
- int signalHealthStatusE1b;
- int dataValidityStatusE5a;
- int signalHealthStatusE5a;
- int dataValidityStatusE5b;
- int signalHealthStatusE5b;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthDataVaidityType dataValidityStatusE1b;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthStatusType signalHealthStatusE1b;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthDataVaidityType dataValidityStatusE5a;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthStatusType signalHealthStatusE5a;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthDataVaidityType dataValidityStatusE5b;
+ android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth.GalileoHealthStatusType signalHealthStatusE5b;
+ @Backing(type="int") @VintfStability
+ enum GalileoHealthDataVaidityType {
+ DATA_VALID = 0,
+ WORKING_WITHOUT_GUARANTEE = 1,
+ }
+ @Backing(type="int") @VintfStability
+ enum GalileoHealthStatusType {
+ OK = 0,
+ OUT_OF_SERVICE = 1,
+ EXTENDED_OPERATION_MODE = 2,
+ IN_TEST = 3,
+ }
}
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
index 55621ab..1d2b30a 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2024 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.
+ */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
@@ -21,12 +36,14 @@
@VintfStability
parcelable GlonassAlmanac {
long issueDateMs;
- android.hardware.gnss.gnss_assistance.GlonassAlmanac.GlonassSatelliteAlmanac[] satelliteAlmanac;
+ android.hardware.gnss.gnss_assistance.GlonassAlmanac.GlonassSatelliteAlmanac[] satelliteAlmanacs;
@VintfStability
parcelable GlonassSatelliteAlmanac {
int slotNumber;
int svHealth;
- int frequencyChannel;
+ int frequencyChannelNumber;
+ int calendarDayNumber;
+ boolean isGlonassM;
double tau;
double tLambda;
double lambda;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
index bbcb3af..a08268b 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
@@ -39,14 +39,20 @@
int svHealth;
double frameTimeSeconds;
int ageInDays;
+ int updateIntervalMinutes;
+ boolean isOddUpdateInterval;
+ boolean isGlonassM;
android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris.GlonassSatelliteClockModel satelliteClockModel;
android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris.GlonassSatelliteOrbitModel satelliteOrbitModel;
+ const int GLONASS_HEALTH_STATUS_HEALTHY = 0;
+ const int GLONASS_HEALTH_STATUS_UNHEALTHY = 1;
@VintfStability
parcelable GlonassSatelliteClockModel {
long timeOfClockSeconds;
double clockBias;
- double freqBias;
- int freqNumber;
+ double frequencyBias;
+ int frequencyChannelNumber;
+ double groupDelayDiffSeconds;
}
@VintfStability
parcelable GlonassSatelliteOrbitModel {
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
index b986be4..a7f3f5c 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -36,10 +36,11 @@
@VintfStability
parcelable GnssAlmanac {
long issueDateMs;
- int iod;
+ int ioda;
int weekNumber;
int toaSeconds;
- android.hardware.gnss.gnss_assistance.GnssAlmanac.GnssSatelliteAlmanac[] satelliteAlmanac;
+ boolean isCompleteAlmanacProvided;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac.GnssSatelliteAlmanac[] satelliteAlmanacs;
@VintfStability
parcelable GnssSatelliteAlmanac {
int svid;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index 1df2123..5f7b886 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -55,6 +55,7 @@
android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris[] satelliteEphemeris;
android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels;
android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation auxiliaryInformation;
}
@VintfStability
parcelable GalileoAssistance {
@@ -66,6 +67,7 @@
android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris[] satelliteEphemeris;
android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels;
android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation auxiliaryInformation;
}
@VintfStability
parcelable GlonassAssistance {
@@ -74,6 +76,7 @@
android.hardware.gnss.gnss_assistance.TimeModel[] timeModels;
android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris[] satelliteEphemeris;
android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation auxiliaryInformation;
}
@VintfStability
parcelable QzssAssistance {
@@ -85,6 +88,7 @@
android.hardware.gnss.gnss_assistance.QzssSatelliteEphemeris[] satelliteEphemeris;
android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels;
android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation auxiliaryInformation;
}
@VintfStability
parcelable BeidouAssistance {
@@ -96,5 +100,6 @@
android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris[] satelliteEphemeris;
android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels;
android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections;
+ android.hardware.gnss.gnss_assistance.AuxiliaryInformation auxiliaryInformation;
}
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
index 721edb4..8a2ab77 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
@@ -35,7 +35,7 @@
/* @hide */
@VintfStability
parcelable GpsSatelliteEphemeris {
- int prn;
+ int svid;
android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsL2Params gpsL2Params;
android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteClockModel satelliteClockModel;
android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
index 5bb1c97..5f13167 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
@@ -35,7 +35,7 @@
/* @hide */
@VintfStability
parcelable QzssSatelliteEphemeris {
- int prn;
+ int svid;
android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsL2Params gpsL2Params;
android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteClockModel satelliteClockModel;
android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
index c7379e1..21ba2ef 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
@@ -35,8 +35,8 @@
/* @hide */
@VintfStability
parcelable RealTimeIntegrityModel {
- int svid;
- boolean usable;
+ int badSvid;
+ android.hardware.gnss.GnssSignalType[] badSignalTypes;
long publishDateSeconds;
long startDateSeconds;
long endDateSeconds;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl
new file mode 100644
index 0000000..f6c6cb9
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/AuxiliaryInformation.aidl
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.gnss.gnss_assistance;
+
+import android.hardware.gnss.GnssSignalType;
+
+/**
+ * Contains parameters to provide additional information dependent on the GNSS constellation.
+ *
+ * @hide
+ */
+@VintfStability
+parcelable AuxiliaryInformation {
+ /**
+ * BDS B1C Satellite orbit type.
+ *
+ * This is defined in BDS-SIS-ICD-B1I-3.0, section 3.1.
+ */
+ @VintfStability
+ @Backing(type="int")
+ enum BeidouB1CSatelliteOrbitType {
+ UNDEFINED = 0,
+ GEO = 1,
+ IGSO = 2,
+ MEO = 3
+ }
+
+ /**
+ * Pseudo-random or satellite ID number for the satellite, a.k.a. Space Vehicle (SV), or
+ * OSN number for Glonass. The distinction is made by looking at the constellation field.
+ * Values must be in the range of:
+ *
+ * - GPS: 1-32
+ * - Glonass: 1-25
+ * - QZSS: 183-206
+ * - Galileo: 1-36
+ * - Beidou: 1-63
+ */
+ int svid;
+
+ /** The list of available signal types for the satellite. */
+ GnssSignalType[] availableSignalTypes;
+
+ /**
+ * Glonass carrier frequency number of the satellite. This is required for Glonass.
+ *
+ * This is defined in Glonass ICD v5.1 section 3.3.1.1.
+ */
+ int frequencyChannelNumber;
+
+ /** BDS B1C satellite orbit type. This is required for Beidou. */
+ BeidouB1CSatelliteOrbitType satType;
+}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
index bb1f7d9..4c5a05b 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
package android.hardware.gnss.gnss_assistance;
import android.hardware.gnss.gnss_assistance.KeplerianOrbitModel;
@@ -81,8 +97,8 @@
int toeSeconds;
}
- /** The PRN number of the Beidou satellite. */
- int prn;
+ /** PRN or satellite ID number for the Beidou satellite. */
+ int svid;
/** Satellite clock model. */
BeidouSatelliteClockModel satelliteClockModel;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
index e3160ef..1af07e5 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl
@@ -82,27 +82,45 @@
*/
@VintfStability
parcelable GalileoSvHealth {
+ /** Galileo health data validity type. */
+ @VintfStability
+ @Backing(type="int")
+ enum GalileoHealthDataVaidityType {
+ DATA_VALID = 0,
+ WORKING_WITHOUT_GUARANTEE = 1
+ }
+
+ /** Galileo health status type. */
+ @VintfStability
+ @Backing(type="int")
+ enum GalileoHealthStatusType {
+ OK = 0,
+ OUT_OF_SERVICE = 1,
+ EXTENDED_OPERATION_MODE = 2,
+ IN_TEST = 3
+ }
+
/** E1-B data validity status. */
- int dataValidityStatusE1b;
+ GalileoHealthDataVaidityType dataValidityStatusE1b;
/** E1-B/C signal health status. */
- int signalHealthStatusE1b;
+ GalileoHealthStatusType signalHealthStatusE1b;
/** E5a data validity status. */
- int dataValidityStatusE5a;
+ GalileoHealthDataVaidityType dataValidityStatusE5a;
/** E5a signal health status. */
- int signalHealthStatusE5a;
+ GalileoHealthStatusType signalHealthStatusE5a;
/** E5b data validity status. */
- int dataValidityStatusE5b;
+ GalileoHealthDataVaidityType dataValidityStatusE5b;
/** E5b signal health status. */
- int signalHealthStatusE5b;
+ GalileoHealthStatusType signalHealthStatusE5b;
}
- /** Satellite code number. */
- int satelliteCodeNumber;
+ /** PRN or satellite ID number for the Galileo satellite. */
+ int svid;
/** Array of satellite clock model. */
GalileoSatelliteClockModel[] satelliteClockModel;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
index d4f149d..ebf6c05 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl
@@ -1,8 +1,24 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
package android.hardware.gnss.gnss_assistance;
/**
* Contains Glonass almanac data.
- * This is defined in Glonass ICD v5.1, Section 4.5.
+ * This is defined in Glonass ICD v5.1, section 4.5.
*
* @hide
*/
@@ -10,18 +26,31 @@
parcelable GlonassAlmanac {
/**
* Contains Glonass satellite almanac data.
- * This is defined in Glonass ICD v5.1, Section 4.5.
+ * This is defined in Glonass ICD v5.1, section 4.5.
*/
@VintfStability
parcelable GlonassSatelliteAlmanac {
/** Slot number. */
int slotNumber;
- /** Satellite health (0=healthy, 1=unhealthy). */
+ /**
+ * Satellite health which is set with the GLONASS_HEALTH_STATUS_*
+ * constants in GlonassSatelliteEphemeris.
+ */
int svHealth;
- /** Frequency channel number. */
- int frequencyChannel;
+ /**
+ * Frequency channel number.
+ *
+ * This is defined in Glonass ICD v5.1 section 3.3.1.1.
+ */
+ int frequencyChannelNumber;
+
+ /** Calendar day number within the four-year period beginning since the leap year. */
+ int calendarDayNumber;
+
+ /** Flag to indicates if the satellite is a GLONASS-M satellitee. */
+ boolean isGlonassM;
/** Coarse value of satellite time correction to GLONASS time in seconds. */
double tau;
@@ -44,7 +73,7 @@
/** Eccentricity. */
double eccentricity;
- /** Argument of perigee in radians. */
+ /** Argument of perigee in semi-circles. */
double omega;
}
@@ -52,5 +81,5 @@
long issueDateMs;
/** Array of GlonassSatelliteAlmanac. */
- GlonassSatelliteAlmanac[] satelliteAlmanac;
+ GlonassSatelliteAlmanac[] satelliteAlmanacs;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
index bebde51..e17de59 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl
@@ -16,8 +16,6 @@
package android.hardware.gnss.gnss_assistance;
-import android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime;
-
/**
* Contains ephemeris parameters specific to Glonass satellites.
* This is defined in RINEX 3.05 APPENDIX 10 and Glonass ICD v5.1, section 4.4.
@@ -41,10 +39,21 @@
double clockBias;
/** Frequency bias (+GammaN). */
- double freqBias;
+ double frequencyBias;
- /** Frequency number. */
- int freqNumber;
+ /**
+ * Frequency channel number.
+ *
+ * This is defined in Glonass ICD v5.1 section 3.3.1.1.
+ */
+ int frequencyChannelNumber;
+
+ /**
+ * L1/L2 group delay difference in seconds (DeltaTau).
+ *
+ * It is set to 0.999999999999E+09 if the value is not available.
+ */
+ double groupDelayDiffSeconds;
}
/** Contains Glonass orbit model parameters in PZ-90 coordinate system. */
@@ -78,13 +87,16 @@
double zAccel;
}
- /**
- * L1/Satellite system (R), satellite number (slot number in sat.
- * constellation).
- */
+ /** Glonass health status healthy. */
+ const int GLONASS_HEALTH_STATUS_HEALTHY = 0;
+
+ /** Glonass health status unhealthy. */
+ const int GLONASS_HEALTH_STATUS_UNHEALTHY = 1;
+
+ /** Slot number. */
int slotNumber;
- /** Satellite health (0=healthy, 1=unhealthy). */
+ /** Satellite health which is set with the GLONASS_HEALTH_STATUS_* constants */
int svHealth;
/** Message frame time in seconds of the UTC week (tk+nd*86400). */
@@ -93,6 +105,15 @@
/** Age of current information in days (E). */
int ageInDays;
+ /** Update and validity interval in minutes (P1) **/
+ int updateIntervalMinutes;
+
+ /** Flag to indicate oddness(1) or evenness(0) of update interval (P2). */
+ boolean isOddUpdateInterval;
+
+ /** Flag to indicates if the satellite is a Glonass-M satellitee (M). */
+ boolean isGlonassM;
+
/** Satellite clock model. */
GlonassSatelliteClockModel satelliteClockModel;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
index 08f3373..f12378b 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -40,7 +40,7 @@
* This is defined Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
* This is unused for GPS/QZSS/Baidou.
*/
- int iod;
+ int ioda;
/**
* Almanac reference week number.
@@ -55,6 +55,12 @@
int toaSeconds;
/**
+ * Flag to indicate if the satelliteAlmanacs contains complete GNSS
+ * constellation indicated by svid.
+ **/
+ boolean isCompleteAlmanacProvided;
+
+ /**
* Contains almanac parameters for GPS, QZSS, Galileo, Beidou.
*
* For Beidou, this is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.15.
@@ -64,7 +70,7 @@
*/
@VintfStability
parcelable GnssSatelliteAlmanac {
- /** The PRN number of the GNSS satellite. */
+ /** PRN or satellite ID number for the satellite. */
int svid;
/**
@@ -124,5 +130,5 @@
}
/** Array of GnssSatelliteAlmanac. */
- GnssSatelliteAlmanac[] satelliteAlmanac;
+ GnssSatelliteAlmanac[] satelliteAlmanacs;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index 4bf6154..21555cb 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -16,6 +16,7 @@
package android.hardware.gnss.gnss_assistance;
+import android.hardware.gnss.gnss_assistance.AuxiliaryInformation;
import android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.GalileoIonosphericModel;
import android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris;
@@ -84,6 +85,9 @@
/** The array of GPS satellite corrections. */
GnssSatelliteCorrections[] satelliteCorrections;
+
+ /** The auxiliary information. */
+ AuxiliaryInformation auxiliaryInformation;
}
/** Contains Galileo assistance. */
@@ -112,6 +116,9 @@
/** The array of Galileo satellite corrections. */
GnssSatelliteCorrections[] satelliteCorrections;
+
+ /** The auxiliary information. */
+ AuxiliaryInformation auxiliaryInformation;
}
/** Contains Glonass assistance. */
@@ -131,6 +138,9 @@
/** The array of Glonass satellite corrections. */
GnssSatelliteCorrections[] satelliteCorrections;
+
+ /** The auxiliary information. */
+ AuxiliaryInformation auxiliaryInformation;
}
/** Contains QZSS assistance. */
@@ -159,6 +169,9 @@
/** The array of QZSS satellite corrections. */
GnssSatelliteCorrections[] satelliteCorrections;
+
+ /** The auxiliary information. */
+ AuxiliaryInformation auxiliaryInformation;
}
/** Contains Beidou assistance. */
@@ -187,6 +200,9 @@
/** The array of Beidou satellite corrections. */
GnssSatelliteCorrections[] satelliteCorrections;
+
+ /** The auxiliary information. */
+ AuxiliaryInformation auxiliaryInformation;
}
/** GPS assistance. */
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
index ab38030..4be2fcc 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl
@@ -27,8 +27,8 @@
*/
@VintfStability
parcelable GpsSatelliteEphemeris {
- /** Satellite PRN */
- int prn;
+ /** PRN or satellite ID number for the GPS satellite. */
+ int svid;
/* Contains information about L2 params. */
@VintfStability
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
index a5a22d0..6768daf 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl
@@ -30,8 +30,8 @@
*/
@VintfStability
parcelable QzssSatelliteEphemeris {
- /** Satellite PRN. */
- int prn;
+ /** PRN or satellite ID number for the Qzss satellite. */
+ int svid;
/** L2 parameters. */
GpsL2Params gpsL2Params;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
index 10a511f..b05176b 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl
@@ -16,6 +16,8 @@
package android.hardware.gnss.gnss_assistance;
+import android.hardware.gnss.GnssSignalType;
+
/**
* Contains the real time integrity status of a GNSS satellite based on
* notice advisory.
@@ -25,8 +27,8 @@
@VintfStability
parcelable RealTimeIntegrityModel {
/**
- * Pseudo-random or satellite ID number for the satellite, a.k.a. Space Vehicle (SV), or
- * OSN number for Glonass. The distinction is made by looking at the constellation field.
+ * The bad signal ID number or OSN number for Glonass.
+ * The distinction is made by looking at the constellation field.
* Values must be in the range of:
*
* - GPS: 1-32
@@ -35,10 +37,13 @@
* - Galileo: 1-36
* - Beidou: 1-63
*/
- int svid;
+ int badSvid;
- /** Indicates whether the satellite is currently usable for navigation. */
- boolean usable;
+ /**
+ * The signal type of the badSvid, it's set to null array if
+ * all signals on the specific SV are not healthy.
+ */
+ GnssSignalType[] badSignalTypes;
/** UTC timestamp (in seconds) when the advisory was published. */
long publishDateSeconds;
diff --git a/neuralnetworks/aidl/Android.bp b/neuralnetworks/aidl/Android.bp
index 45b34e6..e7583aa 100644
--- a/neuralnetworks/aidl/Android.bp
+++ b/neuralnetworks/aidl/Android.bp
@@ -33,7 +33,6 @@
apex_available: [
"//apex_available:platform",
"com.android.neuralnetworks",
- "test_com.android.neuralnetworks",
],
min_sdk_version: "30",
},
diff --git a/power/OWNERS b/power/OWNERS
index 13895bd..9576e14 100644
--- a/power/OWNERS
+++ b/power/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 826709
file:platform/frameworks/base:/ADPF_OWNERS
-wvw@google.com
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index e89f4ee..38cb33b 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -16,7 +16,6 @@
#include <android-base/logging.h>
#include <android/hardware/radio/1.2/IRadio.h>
-#include <gtest/gtest.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -73,16 +72,11 @@
CellIdentityTdscdma cit = cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.mcc;
hidl_mnc = cit.mnc;
- } else if (cellInfoType == CellInfoType::CDMA) {
+ } else {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
- } else {
- // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
- // supported in this version is added to the response from a modem that supports a new
- // version of this interface.
- GTEST_SKIP() << "Exempt from 1.0 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index 51ca967..2bce2f9 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -807,16 +807,11 @@
cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.base.mcc;
hidl_mnc = cit.base.mnc;
- } else if (cellInfoType == CellInfoType::CDMA) {
+ } else {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
- } else {
- // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
- // supported in this version is added to the response from a modem that supports a new
- // version of this interface.
- GTEST_SKIP() << "Exempt from 1.2 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 9f530b3..f909676 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -239,18 +239,13 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
- if (getRadioHalCapabilities()) {
- ASSERT_TRUE(CheckAnyOfErrors(
- radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
- } else {
- ASSERT_TRUE(
- CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::NONE,
- ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
- ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
- ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
- }
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::NONE,
+ ::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED,
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
+ ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
}
/*
diff --git a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
index 62215f3..a799ab1 100644
--- a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
+++ b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
@@ -99,7 +99,7 @@
// Check that the attested Verified Boot key is 32 bytes of zeroes since the bootloader is unlocked.
TEST_P(BootloaderStateTest, VerifiedBootKeyAllZeroes) {
// Gate this test to avoid waiver issues.
- if (get_vsr_api_level() <= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ if (get_vendor_api_level() <= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
return;
}
@@ -142,13 +142,13 @@
avb_slot_verify_data_calculate_vbmeta_digest(avbSlotData, AVB_DIGEST_TYPE_SHA256,
sha256Digest.data());
- if (get_vsr_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ if (get_vendor_api_level() >= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
ASSERT_TRUE(attestedVbmetaDigest_ == sha256Digest)
<< "Attested VBMeta digest (" << bin2hex(attestedVbmetaDigest_)
<< ") does not match the expected SHA-256 digest (" << bin2hex(sha256Digest)
<< ").";
} else {
- // Prior to VSR-V, there was no MUST requirement for the algorithm used by the bootloader
+ // Prior to VSR-15, there was no MUST requirement for the algorithm used by the bootloader
// to calculate the VBMeta digest. However, the only two supported options are SHA-256 and
// SHA-512, so we expect the attested VBMeta digest to match one of these.
vector<uint8_t> sha512Digest(AVB_SHA512_DIGEST_SIZE);
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 4429816..06e0f58 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1435,12 +1435,11 @@
}
bool KeyMintAidlTestBase::IsRkpSupportRequired() const {
- // This is technically not a match to the requirements for S chipsets,
- // however when S shipped there was a bug in the test that skipped the
- // tests if KeyMint 2 was not on the system. So we allowed many chipests
- // to ship without RKP support. In T we hardened the requirements around
- // support for RKP, so relax the test to match.
- return get_vsr_api_level() >= __ANDROID_API_T__;
+ // This is technically weaker than the VSR-12 requirements, but when
+ // Android 12 shipped, there was a bug that skipped the tests if KeyMint
+ // 2 was not present. As a result, many chipsets were allowed to ship
+ // without RKP support. The RKP requirements were hardened in VSR-13.
+ return get_vendor_api_level() >= __ANDROID_API_T__;
}
vector<uint32_t> KeyMintAidlTestBase::ValidKeySizes(Algorithm algorithm) {
@@ -1691,11 +1690,11 @@
vector<uint8_t>* key_blob,
vector<KeyCharacteristics>* key_characteristics,
vector<Certificate>* cert_chain) {
- // The original specification for KeyMint v1 required ATTEST_KEY not be combined
- // with any other key purpose, but the original VTS tests incorrectly did exactly that.
- // This means that a device that launched prior to Android T (API level 33) may
- // accept or even require KeyPurpose::SIGN too.
- if (get_vsr_api_level() < __ANDROID_API_T__) {
+ // The original specification for KeyMint v1 (introduced in Android 12) required ATTEST_KEY not
+ // be combined with any other key purpose, but the original VTS-12 tests incorrectly did exactly
+ // that. The tests were fixed in VTS-13 (vendor API level 33). This means that devices with
+ // vendor API level < 33 may accept or even require KeyPurpose::SIGN too.
+ if (get_vendor_api_level() < __ANDROID_API_T__) {
AuthorizationSet key_desc_plus_sign = key_desc;
key_desc_plus_sign.push_back(TAG_PURPOSE, KeyPurpose::SIGN);
@@ -1820,13 +1819,19 @@
OPENSSL_free(cert_issuer);
}
-int get_vsr_api_level() {
+int get_vendor_api_level() {
+ // Android 13+ builds have the `ro.vendor.api_level` system property. See
+ // https://source.android.com/docs/core/architecture/api-flags#determine_vendor_api_level_android_13.
int vendor_api_level = ::android::base::GetIntProperty("ro.vendor.api_level", -1);
if (vendor_api_level != -1) {
return vendor_api_level;
}
- // Android S and older devices do not define ro.vendor.api_level
+ // Android 12 builds have the `ro.board.api_level` and `ro.board.first_api_level` system
+ // properties, which are only expected to be populated for GRF SoCs on Android 12 builds. Note
+ // that they are populated automatically by the build system starting in Android 15, but we use
+ // `ro.vendor.api_level` on such builds (see above). For details, see
+ // https://docs.partner.android.com/gms/building/integrating/extending-os-upgrade-support-windows#new-system-properties.
vendor_api_level = ::android::base::GetIntProperty("ro.board.api_level", -1);
if (vendor_api_level == -1) {
vendor_api_level = ::android::base::GetIntProperty("ro.board.first_api_level", -1);
@@ -1838,11 +1843,12 @@
EXPECT_NE(product_api_level, -1) << "Could not find ro.build.version.sdk";
}
- // VSR API level is the minimum of vendor_api_level and product_api_level.
- if (vendor_api_level == -1 || vendor_api_level > product_api_level) {
+ // If the `ro.board.api_level` and `ro.board.first_api_level` properties aren't populated, it
+ // means the build doesn't have a GRF SoC, so the product API level should be used.
+ if (vendor_api_level == -1) {
return product_api_level;
}
- return vendor_api_level;
+ return std::min(product_api_level, vendor_api_level);
}
bool is_gsi_image() {
@@ -1909,13 +1915,13 @@
}
}
- if (get_vsr_api_level() > AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ if (get_vendor_api_level() > AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
// The Verified Boot key field should be exactly 32 bytes since it
// contains the SHA-256 hash of the key on locked devices or 32 bytes
// of zeroes on unlocked devices. This wasn't checked for earlier
- // versions of the KeyMint HAL, so only only be strict for VSR-16+.
+ // versions of the KeyMint HAL, so we version-gate the strict check.
EXPECT_EQ(verified_boot_key.size(), 32);
- } else if (get_vsr_api_level() == AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ } else if (get_vendor_api_level() == AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
// The Verified Boot key field should be:
// - Exactly 32 bytes on locked devices since it should contain
// the SHA-256 hash of the key, or
@@ -1924,7 +1930,7 @@
// specification).
// Thus, we can't check for strict equality in case unlocked devices
// report values with less than 32 bytes. This wasn't checked for
- // earlier versions of the KeyMint HAL, so only check on VSR-15.
+ // earlier versions of the KeyMint HAL, so we version-gate the check.
EXPECT_LE(verified_boot_key.size(), 32);
}
@@ -2416,7 +2422,7 @@
} else if (result == ErrorCode::INVALID_TAG) {
// Depending on the situation, other error codes may be acceptable. First, allow older
// implementations to use INVALID_TAG.
- ASSERT_FALSE(get_vsr_api_level() > __ANDROID_API_T__)
+ ASSERT_FALSE(get_vendor_api_level() > __ANDROID_API_T__)
<< "It is a specification violation for INVALID_TAG to be returned due to ID "
<< "mismatch in a Device ID Attestation call. INVALID_TAG is only intended to "
<< "be used for a case where updateAad() is called after update(). As of "
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 1c12136..6c327bb 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -406,8 +406,8 @@
add_tag(tags, ttag, ::android::base::GetProperty(prop, /* default= */ ""));
}
-// Return the VSR API level for this device.
-int get_vsr_api_level();
+// Return the vendor API level for this device.
+int get_vendor_api_level();
// Indicate whether the test is running on a GSI image.
bool is_gsi_image();
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index e8a767b..743928e 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -4158,13 +4158,15 @@
* when the EC_CURVE is not explicitly specified.
*/
TEST_P(ImportKeyTest, EcdsaSuccessCurveNotSpecified) {
- if (get_vsr_api_level() < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
/*
* The KeyMint spec was previously not clear as to whether EC_CURVE was optional on import
- * of EC keys. However, this was not checked at the time so we can only be strict about
- * checking this for implementations at VSR-V or later.
+ * of EC keys. However, this was not checked at the time, so we version-gate the strict
+ * check.
*/
- GTEST_SKIP() << "Skipping EC_CURVE on import only strict >= VSR-V";
+ GTEST_SKIP() << "Applies only to vendor API level >= 202404, but this device is: "
+ << vendor_api_level;
}
ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
@@ -5316,15 +5318,15 @@
"8564");
TEST_P(ImportWrappedKeyTest, RsaKey) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
/*
* The Keymaster v4 spec introduced `importWrappedKey()` and did not restrict it to
* just symmetric keys. However, the import of asymmetric wrapped keys was not tested
- * at the time, so we can only be strict about checking this for implementations claiming
- * support for VSR API level 35 and above.
+ * at the time, so we version-gate the strict check.
*/
- GTEST_SKIP() << "Applies only to VSR API level 35, this device is: " << vsr_api_level;
+ GTEST_SKIP() << "Applies only to vendor API level >= 202404, but this device is: "
+ << vendor_api_level;
}
auto wrapping_key_desc = AuthorizationSetBuilder()
@@ -5347,15 +5349,15 @@
}
TEST_P(ImportWrappedKeyTest, EcKey) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
/*
* The Keymaster v4 spec introduced `importWrappedKey()` and did not restrict it to
* just symmetric keys. However, the import of asymmetric wrapped keys was not tested
- * at the time, so we can only be strict about checking this for implementations claiming
- * support for VSR API level 35 and above.
+ * at the time, so we version-gate the strict check.
*/
- GTEST_SKIP() << "Applies only to VSR API level 35, this device is: " << vsr_api_level;
+ GTEST_SKIP() << "Applies only to vendor API level >= 202404, but this device is: "
+ << vendor_api_level;
}
auto wrapping_key_desc = AuthorizationSetBuilder()
@@ -8945,27 +8947,30 @@
// @VsrTest = VSR-3.10-008
TEST_P(VsrRequirementTest, Vsr13Test) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < __ANDROID_API_T__) {
- GTEST_SKIP() << "Applies only to VSR API level 33, this device is: " << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < __ANDROID_API_T__) {
+ GTEST_SKIP() << "Applies only to vendor API level >= 33, but this device is: "
+ << vendor_api_level;
}
EXPECT_GE(AidlVersion(), 2) << "VSR 13+ requires KeyMint version 2";
}
// @VsrTest = VSR-3.10-013.001
TEST_P(VsrRequirementTest, Vsr14Test) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < __ANDROID_API_U__) {
- GTEST_SKIP() << "Applies only to VSR API level 34, this device is: " << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < __ANDROID_API_U__) {
+ GTEST_SKIP() << "Applies only to vendor API level >= 34, but this device is: "
+ << vendor_api_level;
}
EXPECT_GE(AidlVersion(), 3) << "VSR 14+ requires KeyMint version 3";
}
// @VsrTest = GMS-VSR-3.10-019
TEST_P(VsrRequirementTest, Vsr16Test) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level <= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
- GTEST_SKIP() << "Applies only to VSR API level > 35, this device is: " << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level <= AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ GTEST_SKIP() << "Applies only to vendor API level > 202404, but this device is: "
+ << vendor_api_level;
}
if (SecLevel() == SecurityLevel::STRONGBOX) {
GTEST_SKIP() << "Applies only to TEE KeyMint, not StrongBox KeyMint";
diff --git a/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp b/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
index 1f09328..5888644 100644
--- a/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
+++ b/security/keymint/aidl/vts/functional/SecureElementProvisioningTest.cpp
@@ -115,13 +115,14 @@
const auto& vbKey = rot->asArray()->get(pos++);
ASSERT_TRUE(vbKey);
ASSERT_TRUE(vbKey->asBstr());
- if (get_vsr_api_level() > AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ if (get_vendor_api_level() > AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
// The Verified Boot key field should be exactly 32 bytes since it
// contains the SHA-256 hash of the key on locked devices or 32 bytes
// of zeroes on unlocked devices. This wasn't checked for earlier
- // versions of the KeyMint HAL, so only only be strict for VSR-16+.
+ // versions of the KeyMint HAL, so we version-gate the strict check.
ASSERT_EQ(vbKey->asBstr()->value().size(), 32);
- } else if (get_vsr_api_level() == AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
+ } else if (get_vendor_api_level() ==
+ AVendorSupport_getVendorApiLevelOf(__ANDROID_API_V__)) {
// The Verified Boot key field should be:
// - Exactly 32 bytes on locked devices since it should contain
// the SHA-256 hash of the key, or
@@ -130,7 +131,7 @@
// specification).
// Thus, we can't check for strict equality in case unlocked devices
// report values with less than 32 bytes. This wasn't checked for
- // earlier versions of the KeyMint HAL, so only check on VSR-15.
+ // earlier versions of the KeyMint HAL, so we version-gate the check.
ASSERT_LE(vbKey->asBstr()->value().size(), 32);
}
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index d86a678..e3c1e58 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -99,7 +99,7 @@
0x02, 0xb4, 0x8a, 0xd2, 0x4c, 0xc4, 0x70, 0x6b, 0x88, 0x98, 0x23, 0x9e, 0xb3, 0x52, 0xb1};
inline const std::vector<uint8_t> kCsrWithDegenerateDiceChain{
- 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xf2,
+ 0x84, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xf2,
0xc6, 0x50, 0xd2, 0x42, 0x59, 0xe0, 0x4e, 0x7b, 0xc0, 0x75, 0x41, 0xa2, 0xe9, 0xd0, 0xe8,
0x18, 0xd7, 0xd7, 0x63, 0x7e, 0x41, 0x04, 0x7e, 0x52, 0x1a, 0xb1, 0xb7, 0xdc, 0x13, 0xb3,
0x0f, 0x22, 0x58, 0x20, 0x1a, 0xf3, 0x8b, 0x0f, 0x7a, 0xc6, 0xf2, 0xb8, 0x31, 0x0b, 0x40,
@@ -157,12 +157,7 @@
0xe2, 0xfe, 0x7c, 0x0d, 0x2c, 0x88, 0x3b, 0x23, 0x66, 0x93, 0x7b, 0x94, 0x59, 0xc4, 0x87,
0x16, 0xc4, 0x3a, 0x85, 0x60, 0xe3, 0x62, 0x45, 0x53, 0xa8, 0x1d, 0x4e, 0xa4, 0x2b, 0x61,
0x33, 0x17, 0x71, 0xb6, 0x40, 0x11, 0x7d, 0x23, 0x64, 0xe6, 0x49, 0xbe, 0xa6, 0x85, 0x32,
- 0x1a, 0x89, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74,
- 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
- 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69,
- 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75,
- 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79,
- 0x73};
+ 0x1a, 0x89};
// The challenge that is in kKeysToSignForCsrWithUdsCerts and kCsrWithUdsCerts
inline const std::vector<uint8_t> kChallenge{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
@@ -189,7 +184,7 @@
0xc9, 0x0a};
inline const std::vector<uint8_t> kCsrWithUdsCerts{
- 0x85, 0x01, 0xa1, 0x70, 0x74, 0x65, 0x73, 0x74, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
+ 0x84, 0x01, 0xa1, 0x70, 0x74, 0x65, 0x73, 0x74, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0x59, 0x01, 0x6c, 0x30, 0x82, 0x01, 0x68, 0x30, 0x82,
0x01, 0x1a, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x7b, 0x30, 0x05, 0x06, 0x03, 0x2b,
0x65, 0x70, 0x30, 0x2b, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0c,
@@ -310,12 +305,7 @@
0x48, 0x3c, 0xab, 0xd3, 0x74, 0xf8, 0x41, 0x88, 0x9b, 0x48, 0xf3, 0x93, 0x06, 0x40, 0x1b,
0x5f, 0x60, 0x7b, 0xbe, 0xd8, 0xa6, 0x65, 0xff, 0x6a, 0x89, 0x24, 0x12, 0x1b, 0xac, 0xa3,
0xd5, 0x37, 0x85, 0x6e, 0x53, 0x8d, 0xa5, 0x07, 0xe7, 0xe7, 0x44, 0x2c, 0xba, 0xa0, 0xbe,
- 0x1a, 0x43, 0xde, 0x28, 0x59, 0x65, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
- 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72,
- 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a,
- 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e,
- 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
- 0x2d, 0x6b, 0x65, 0x79, 0x73};
+ 0x1a, 0x43, 0xde, 0x28, 0x59, 0x65};
inline const std::vector<uint8_t> kKeysToSignForCsrWithoutUdsCerts = {
0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x11, 0x29, 0x11, 0x96,
@@ -409,7 +399,7 @@
0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
inline const std::vector<uint8_t> kCsrWithKeyMintInComponentName{
- 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x44,
+ 0x84, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x44,
0xfd, 0xdd, 0xf1, 0x8a, 0x78, 0xa0, 0xbe, 0x37, 0x49, 0x51, 0x85, 0xfb, 0x7a, 0x16, 0xca,
0xc1, 0x00, 0xb3, 0x78, 0x13, 0x4a, 0x90, 0x4c, 0x5a, 0xa1, 0x3b, 0xfc, 0xea, 0xb6, 0xf3,
0x16, 0x22, 0x58, 0x20, 0x12, 0x7f, 0xf5, 0xe2, 0x14, 0xbd, 0x5d, 0x51, 0xd3, 0x7f, 0x2f,
@@ -477,15 +467,10 @@
0x90, 0x73, 0x0f, 0x8c, 0x10, 0x0f, 0x99, 0xd2, 0x85, 0x6e, 0x03, 0x45, 0x55, 0x28, 0xf7,
0x64, 0x0b, 0xbd, 0x7c, 0x3a, 0x69, 0xf1, 0x80, 0x1a, 0xf3, 0x93, 0x7e, 0x82, 0xfc, 0xa5,
0x3b, 0x69, 0x98, 0xf1, 0xde, 0x06, 0xb6, 0x72, 0x78, 0x0b, 0xdb, 0xbb, 0x97, 0x20, 0x04,
- 0x98, 0xb0, 0xd4, 0x07, 0x83, 0x65, 0xfb, 0xf8, 0x9c, 0xa1, 0x6b, 0x66, 0x69, 0x6e, 0x67,
- 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x31,
- 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63,
- 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30, 0x32, 0x31, 0x30, 0x38,
- 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6c, 0x65,
- 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+ 0x98, 0xb0, 0xd4, 0x07, 0x83, 0x65, 0xfb, 0xf8, 0x9c};
inline std::vector<uint8_t> kCsrWithDebugMode{
- 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x03,
+ 0x84, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x03,
0x09, 0xad, 0x0d, 0x07, 0xec, 0x59, 0xfc, 0x14, 0x31, 0x21, 0x1f, 0xbc, 0x8e, 0x44, 0xe7,
0x0f, 0xa9, 0xb7, 0x5a, 0x57, 0x38, 0x5f, 0x76, 0x8a, 0xa3, 0x38, 0x2c, 0xf0, 0x1b, 0x37,
0x15, 0x22, 0x58, 0x20, 0x82, 0xae, 0x09, 0x76, 0x9c, 0x1d, 0x18, 0x39, 0x5d, 0x09, 0xf8,
@@ -552,15 +537,10 @@
0x26, 0x7f, 0xdd, 0x9c, 0xac, 0xe2, 0xbf, 0xe2, 0xfb, 0x3c, 0x3f, 0xd6, 0x6f, 0x9a, 0x97,
0xc3, 0x2a, 0x60, 0xfe, 0x0e, 0x9f, 0x11, 0xc9, 0x04, 0xa7, 0xdf, 0xe1, 0x21, 0x1e, 0xc1,
0x10, 0x10, 0x64, 0xf7, 0xeb, 0xcc, 0x3a, 0x4c, 0xa6, 0xdf, 0xd8, 0xf5, 0xcc, 0x0d, 0x34,
- 0xa4, 0x32, 0xf4, 0x0a, 0xd7, 0x83, 0x1e, 0x30, 0x0d, 0x68, 0x6a, 0xb4, 0xc1, 0xa1, 0x6b,
- 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72,
- 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64,
- 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30,
- 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f,
- 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+ 0xa4, 0x32, 0xf4, 0x0a, 0xd7, 0x83, 0x1e, 0x30, 0x0d, 0x68, 0x6a, 0xb4, 0xc1};
inline const std::vector<uint8_t> kCsrWithSharedUdsRoot1{
- 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
+ 0x84, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
0xf9, 0xf7, 0x16, 0xa7, 0xe2, 0x20, 0xe3, 0x6e, 0x19, 0x8e, 0xc0, 0xc4, 0x82, 0xc5, 0xca,
0x8d, 0x1d, 0xb4, 0xda, 0x94, 0x6d, 0xf8, 0xbc, 0x0b, 0x0e, 0xc7, 0x90, 0x83, 0x5b, 0xc3,
0x4b, 0x22, 0x58, 0x20, 0xed, 0xe0, 0xa1, 0x56, 0x46, 0x5b, 0xe0, 0x67, 0x2d, 0xbc, 0x08,
@@ -627,15 +607,10 @@
0x08, 0x8a, 0x5b, 0xb9, 0xef, 0x28, 0x5a, 0xe0, 0x02, 0x40, 0xf5, 0x68, 0x49, 0x8b, 0xa7,
0xf7, 0x9d, 0xa3, 0xb3, 0x37, 0x72, 0x79, 0xa9, 0x32, 0x47, 0xf6, 0x8d, 0x5d, 0x08, 0xe7,
0xec, 0x00, 0x19, 0x09, 0x6f, 0x0a, 0x4d, 0x7c, 0x62, 0x6c, 0x2b, 0xaa, 0x33, 0x61, 0xe5,
- 0xa5, 0x3f, 0x2a, 0xfe, 0xcc, 0xdf, 0x8e, 0x62, 0x1c, 0x31, 0xe1, 0x56, 0x6b, 0xa1, 0x6b,
- 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72,
- 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64,
- 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30,
- 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f,
- 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+ 0xa5, 0x3f, 0x2a, 0xfe, 0xcc, 0xdf, 0x8e, 0x62, 0x1c, 0x31, 0xe1, 0x56, 0x6b};
inline const std::vector<uint8_t> kCsrWithSharedUdsRoot2{
- 0x85, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
+ 0x84, 0x01, 0xa0, 0x82, 0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x96,
0xf9, 0xf7, 0x16, 0xa7, 0xe2, 0x20, 0xe3, 0x6e, 0x19, 0x8e, 0xc0, 0xc4, 0x82, 0xc5, 0xca,
0x8d, 0x1d, 0xb4, 0xda, 0x94, 0x6d, 0xf8, 0xbc, 0x0b, 0x0e, 0xc7, 0x90, 0x83, 0x5b, 0xc3,
0x4b, 0x22, 0x58, 0x20, 0xed, 0xe0, 0xa1, 0x56, 0x46, 0x5b, 0xe0, 0x67, 0x2d, 0xbc, 0x08,
@@ -702,12 +677,7 @@
0xbf, 0xd5, 0x06, 0x2c, 0xac, 0x18, 0x3c, 0xbb, 0xc6, 0x77, 0x99, 0x2f, 0x4e, 0x71, 0xcd,
0x7a, 0x9b, 0x93, 0xc7, 0x08, 0xa3, 0x71, 0x89, 0xb5, 0xb2, 0x04, 0xbe, 0x69, 0x22, 0xf3,
0x66, 0xb8, 0xa9, 0xc6, 0x5e, 0x7c, 0x45, 0xf6, 0x2f, 0x8a, 0xa9, 0x3e, 0xee, 0x6f, 0x92,
- 0x2a, 0x9c, 0x91, 0xe2, 0x1d, 0x4a, 0x4e, 0x4a, 0xb4, 0xcc, 0x87, 0xd2, 0x85, 0x5f, 0xa1,
- 0x6b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62,
- 0x72, 0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32,
- 0x30, 0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72,
- 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+ 0x2a, 0x9c, 0x91, 0xe2, 0x1d, 0x4a, 0x4e, 0x4a, 0xb4, 0xcc, 0x87, 0xd2, 0x85, 0x5f};
const RpcHardwareInfo kRpcHardwareInfo = {.versionNumber = 3};
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index f40a752..810cc38 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -186,10 +186,10 @@
if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "The RKP VM is not supported on this system.";
}
- int apiLevel = get_vsr_api_level();
- if (apiLevel < __ANDROID_API_V__) {
- GTEST_SKIP() << "The RKP VM is supported only on V+ devices. Vendor API level: "
- << apiLevel;
+ int vendorApiLevel = get_vendor_api_level();
+ if (vendorApiLevel < __ANDROID_API_V__) {
+ GTEST_SKIP() << "The RKP VM is supported only on vendor API level >= 202404. This "
+ << "device has vendor API level: " << vendorApiLevel;
}
}
ASSERT_TRUE(status.isOk());
@@ -240,10 +240,10 @@
// @VsrTest = 3.10-015
// @VsrTest = 3.10-018.001
TEST(NonParameterizedTests, requireDiceOnDefaultInstanceIfStrongboxPresent) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < 35) {
- GTEST_SKIP() << "Applies only to VSR API level 35 or newer, this device is: "
- << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < __ANDROID_API_V__) {
+ GTEST_SKIP() << "Applies only to vendor API level >= 202404, but this device is: "
+ << vendor_api_level;
}
if (!AServiceManager_isDeclared(KEYMINT_STRONGBOX_INSTANCE_NAME.c_str())) {
@@ -270,11 +270,11 @@
*/
// @VsrTest = 7.1-003.001
TEST(NonParameterizedTests, equalUdsPubInDiceCertChainForRkpVmAndPrimaryKeyMintInstances) {
- int apiLevel = get_vsr_api_level();
- if (apiLevel < 202504 && !AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str())) {
+ int vendorApiLevel = get_vendor_api_level();
+ if (vendorApiLevel < 202504 && !AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str())) {
GTEST_SKIP() << "The RKP VM (" << RKPVM_INSTANCE_NAME << ") is not present on this device.";
}
- if (apiLevel >= 202504) {
+ if (vendorApiLevel >= 202504) {
ASSERT_TRUE(AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str()));
}
@@ -319,10 +319,10 @@
*/
// @VsrTest = 3.10-018.003
TEST(NonParameterizedTests, componentNameInConfigurationDescriptorForPrimaryKeyMintInstance) {
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < 202504) {
- GTEST_SKIP() << "Applies only to VSR API level 202504 or newer, this device is: "
- << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < 202504) {
+ GTEST_SKIP() << "Applies only to vendor API level >= 202504, but this device is: "
+ << vendor_api_level;
}
if (!AServiceManager_isDeclared(KEYMINT_STRONGBOX_INSTANCE_NAME.c_str())) {
@@ -1155,10 +1155,10 @@
TEST_P(VsrRequirementTest, VsrEnforcementTest) {
RpcHardwareInfo hwInfo;
ASSERT_TRUE(provisionable_->getHardwareInfo(&hwInfo).isOk());
- int vsr_api_level = get_vsr_api_level();
- if (vsr_api_level < 34) {
- GTEST_SKIP() << "Applies only to VSR API level 34 or newer, this device is: "
- << vsr_api_level;
+ int vendor_api_level = get_vendor_api_level();
+ if (vendor_api_level < __ANDROID_API_U__) {
+ GTEST_SKIP() << "Applies only to vendor API level >= 34, but this device is: "
+ << vendor_api_level;
}
EXPECT_GE(hwInfo.versionNumber, 3)
<< "VSR 14+ requires IRemotelyProvisionedComponent v3 or newer.";
diff --git a/security/secretkeeper/aidl/vts/dice_sample.rs b/security/secretkeeper/aidl/vts/dice_sample.rs
index 4ef396a..d6379e5 100644
--- a/security/secretkeeper/aidl/vts/dice_sample.rs
+++ b/security/secretkeeper/aidl/vts/dice_sample.rs
@@ -283,7 +283,7 @@
SUBCOMPONENT_AUTHORITY_HASH => hex::decode("ed255ae9ea98826f3f3a966849f0aaaf356d140c766a869048016e0ba10141af039fec5c53658ddebdad9c2339587c5ef5487bde89237ca79802238d91aebba8").unwrap(),
},
{
- SUBCOMPONENT_NAME => "apex:com.android.btservices",
+ SUBCOMPONENT_NAME => "apex:com.android.bt",
SUBCOMPONENT_SECURITY_VERSION => 990090000,
SUBCOMPONENT_CODE_HASH => hex::decode("d7aa86dfdf92e662d2210cd2b3ad4e4522c917e9e287268363aa90e20f9ae16c").unwrap(),
SUBCOMPONENT_AUTHORITY_HASH => hex::decode("a0d577d4a56cfad09aaa7abcd2355cd78872df85672f2faf9ac2fdf15c06147394e704c7473f28bed737803581a3d097275cc26d8095a4a896ee76167f9ee40e").unwrap(),
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
new file mode 100644
index 0000000..9ee9dcc
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+union AmbientBacklightColorFormat {
+ int RGB888;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
index bbdfd62..2ea3198 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -36,5 +36,5 @@
parcelable AmbientBacklightMetadata {
android.hardware.tv.mediaquality.AmbientBacklightSettings settings;
android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm compressAlgorithm;
- int[] zonesColors;
+ android.hardware.tv.mediaquality.AmbientBacklightColorFormat[] zonesColors;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
index ffbae26..7770e18 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
@@ -34,12 +34,12 @@
package android.hardware.tv.mediaquality;
@VintfStability
parcelable AmbientBacklightSettings {
- String packageName;
+ int uid;
android.hardware.tv.mediaquality.AmbientBacklightSource source;
int maxFramerate;
android.hardware.graphics.common.PixelFormat colorFormat;
int hZonesNumber;
int vZonesNumber;
boolean hasLetterbox;
- int threshold;
+ int colorThreshold;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
index a6e8b91..dad0e96 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
@@ -37,4 +37,7 @@
AUTO,
BYPASS,
PCM,
+ DolbyDigitalPlus,
+ DolbyDigital,
+ DolbyMat,
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index c29ae18..f21243c 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -37,11 +37,14 @@
android.hardware.tv.mediaquality.DolbyAudioProcessing.SoundMode soundMode;
boolean volumeLeveler;
boolean surroundVirtualizer;
- boolean doblyAtmos;
+ boolean dolbyAtmos;
enum SoundMode {
GAME,
MOVIE,
MUSIC,
NEWS,
+ STADIUM,
+ STANDARD,
+ USER,
}
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
index b569baa..26df461 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -34,7 +34,7 @@
package android.hardware.tv.mediaquality;
@VintfStability
interface IMediaQuality {
- void setCallback(in android.hardware.tv.mediaquality.IMediaQualityCallback callback);
+ void setAmbientBacklightCallback(in android.hardware.tv.mediaquality.IMediaQualityCallback callback);
void setAmbientBacklightDetector(in android.hardware.tv.mediaquality.AmbientBacklightSettings settings);
void setAmbientBacklightDetectionEnabled(in boolean enabled);
boolean getAmbientBacklightDetectionEnabled();
@@ -55,6 +55,4 @@
void sendDefaultSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
void getParamCaps(in android.hardware.tv.mediaquality.ParameterName[] paramNames, out android.hardware.tv.mediaquality.ParamCapability[] caps);
void getVendorParamCaps(in android.hardware.tv.mediaquality.VendorParameterIdentifier[] names, out android.hardware.tv.mediaquality.VendorParamCapability[] caps);
- void sendPictureParameters(in android.hardware.tv.mediaquality.PictureParameters pictureParameters);
- void sendSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index e1a882e..1923043 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -37,5 +37,6 @@
oneway void onPictureProfileAdjusted(in android.hardware.tv.mediaquality.PictureProfile pictureProfile);
oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
- oneway void onRequestPictureParameters(long pictureProfileId);
+ oneway void requestPictureParameters(long pictureProfileId);
+ oneway void onStreamStatusChanged(long pictureProfileId, android.hardware.tv.mediaquality.StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index e162601..d976cf7 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -37,5 +37,5 @@
oneway void onSoundProfileAdjusted(in android.hardware.tv.mediaquality.SoundProfile soundProfile);
oneway void onParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
- oneway void onRequestSoundParameters(long SoundProfileId);
+ oneway void requestSoundParameters(long SoundProfileId);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
index 711e270..522b8e6 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -61,6 +61,58 @@
GLOBE_DIMMING,
AUTO_PICTUREQUALITY_ENABLED,
AUTO_SUPER_RESOLUTION_ENABLED,
+ LEVEL_RANGE,
+ GAMUT_MAPPING,
+ PC_MODE,
+ LOW_LATENCY,
+ VRR,
+ CVRR,
+ HDMI_RGB_RANGE,
+ COLOR_SPACE,
+ PANEL_INIT_MAX_LUMINCE_VALID,
+ GAMMA,
+ COLOR_TEMPERATURE_RED_GAIN,
+ COLOR_TEMPERATURE_GREEN_GAIN,
+ COLOR_TEMPERATURE_BLUE_GAIN,
+ COLOR_TEMPERATURE_RED_OFFSET,
+ COLOR_TEMPERATURE_GREEN_OFFSET,
+ COLOR_TEMPERATURE_BLUE_OFFSET,
+ ELEVEN_POINT_RED,
+ ELEVEN_POINT_GREEN,
+ ELEVEN_POINT_BLUE,
+ LOW_BLUE_LIGHT,
+ LD_MODE,
+ OSD_RED_GAIN,
+ OSD_GREEN_GAIN,
+ OSD_BLUE_GAIN,
+ OSD_RED_OFFSET,
+ OSD_GREEN_OFFSET,
+ OSD_BLUE_OFFSET,
+ OSD_HUE,
+ OSD_SATURATION,
+ OSD_CONTRAST,
+ COLOR_TUNER_SWITCH,
+ COLOR_TUNER_HUE_RED,
+ COLOR_TUNER_HUE_GREEN,
+ COLOR_TUNER_HUE_BLUE,
+ COLOR_TUNER_HUE_CYAN,
+ COLOR_TUNER_HUE_MAGENTA,
+ COLOR_TUNER_HUE_YELLOW,
+ COLOR_TUNER_HUE_FLESH,
+ COLOR_TUNER_SATURATION_RED,
+ COLOR_TUNER_SATURATION_GREEN,
+ COLOR_TUNER_SATURATION_BLUE,
+ COLOR_TUNER_SATURATION_CYAN,
+ COLOR_TUNER_SATURATION_MAGENTA,
+ COLOR_TUNER_SATURATION_YELLOW,
+ COLOR_TUNER_SATURATION_FLESH,
+ COLOR_TUNER_LUMINANCE_RED,
+ COLOR_TUNER_LUMINANCE_GREEN,
+ COLOR_TUNER_LUMINANCE_BLUE,
+ COLOR_TUNER_LUMINANCE_CYAN,
+ COLOR_TUNER_LUMINANCE_MAGENTA,
+ COLOR_TUNER_LUMINANCE_YELLOW,
+ COLOR_TUNER_LUMINANCE_FLESH,
BALANCE,
BASS,
TREBLE,
@@ -77,4 +129,5 @@
DTS_VIRTUAL_X,
DIGITAL_OUTPUT,
DIGITAL_OUTPUT_DELAY_MS,
+ SOUND_STYLE,
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
index c38e96f..3a9e4e4 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -71,4 +71,48 @@
int panelInitMaxLuminceNits;
boolean panelInitMaxLuminceValid;
android.hardware.tv.mediaquality.Gamma gamma;
+ int colorTemperatureRedGain;
+ int colorTemperatureGreenGain;
+ int colorTemperatureBlueGain;
+ int colorTemperatureRedOffset;
+ int colorTemperatureGreenOffset;
+ int colorTemperatureBlueOffset;
+ int[11] elevenPointRed;
+ int[11] elevenPointGreen;
+ int[11] elevenPointBlue;
+ android.hardware.tv.mediaquality.QualityLevel lowBlueLight;
+ android.hardware.tv.mediaquality.QualityLevel LdMode;
+ int osdRedGain;
+ int osdGreenGain;
+ int osdBlueGain;
+ int osdRedOffset;
+ int osdGreenOffset;
+ int osdBlueOffset;
+ int osdHue;
+ int osdSaturation;
+ int osdContrast;
+ boolean colorTunerSwitch;
+ int colorTunerHueRed;
+ int colorTunerHueGreen;
+ int colorTunerHueBlue;
+ int colorTunerHueCyan;
+ int colorTunerHueMagenta;
+ int colorTunerHueYellow;
+ int colorTunerHueFlesh;
+ int colorTunerSaturationRed;
+ int colorTunerSaturationGreen;
+ int colorTunerSaturationBlue;
+ int colorTunerSaturationCyan;
+ int colorTunerSaturationMagenta;
+ int colorTunerSaturationYellow;
+ int colorTunerSaturationFlesh;
+ int colorTunerLuminanceRed;
+ int colorTunerLuminanceGreen;
+ int colorTunerLuminanceBlue;
+ int colorTunerLuminanceCyan;
+ int colorTunerLuminanceMagenta;
+ int colorTunerLuminanceYellow;
+ int colorTunerLuminanceFlesh;
+ boolean activeProfile;
+ android.hardware.tv.mediaquality.PictureQualityEventType pictureQualityEventType;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
new file mode 100644
index 0000000..11001f6
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum PictureQualityEventType {
+ NONE,
+ BBD_RESULT,
+ VIDEO_DELAY_CHANGE,
+ CAPTUREPOINT_INFO_CHANGE,
+ VIDEOPATH_CHANGE,
+ EXTRA_FRAME_CHANGE,
+ DOLBY_IQ_CHANGE,
+ DOLBY_APO_CHANGE,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
index 63eb55f..8c0eaaf 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -50,4 +50,6 @@
@nullable android.hardware.tv.mediaquality.DtsVirtualX dtsVirtualX;
android.hardware.tv.mediaquality.DigitalOutput digitalOutput;
int digitalOutputDelayMs;
+ boolean activeProfile;
+ android.hardware.tv.mediaquality.SoundStyle soundStyle;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl
new file mode 100644
index 0000000..1dbaf2c
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum SoundStyle {
+ USER,
+ STANDARD,
+ VIVID,
+ SPORTS,
+ MOVIE,
+ MUSIC,
+ NEWS,
+ AUTO,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..23e584b
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
new file mode 100644
index 0000000..f29de45
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.tv.mediaquality;
+
+@VintfStability
+union AmbientBacklightColorFormat {
+ /**
+ * The color format is RGB888.
+ */
+ int RGB888;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
index 49b3a28..d2599bd 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -16,6 +16,7 @@
package android.hardware.tv.mediaquality;
+import android.hardware.tv.mediaquality.AmbientBacklightColorFormat;
import android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm;
import android.hardware.tv.mediaquality.AmbientBacklightSettings;
@@ -32,8 +33,7 @@
AmbientBacklightCompressAlgorithm compressAlgorithm;
/**
- * The colors for the zones. Format of the color will be indicated in the
- * AmbientBacklightSettings::colorFormat.
+ * The colors for the zones. Formats of the color will be AmbientBacklightColorFormat.
*/
- int[] zonesColors;
+ AmbientBacklightColorFormat[] zonesColors;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
index b6a26ee..79bf02b 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
@@ -24,7 +24,7 @@
/**
* The package name of the ambient backlight control application.
*/
- String packageName;
+ int uid;
/**
* The source of the ambient backlight.
@@ -42,12 +42,12 @@
PixelFormat colorFormat;
/**
- * The number of zones in horizontal direction.
+ * The number of logical zones in horizontal direction desire by the package.
*/
int hZonesNumber;
/**
- * The number of zones in vertical direction.
+ * The number of logical zones in vertical direction desire by the package.
*/
int vZonesNumber;
@@ -66,5 +66,5 @@
* the colorFormat. For example, RGB888, where the values of R/G/B range from 0 to 255,
* and the threshold is a positive number within the same range.
*/
- int threshold;
+ int colorThreshold;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
index 1a46ae6..a58ad79 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
@@ -22,6 +22,8 @@
* Automatically selects the best audio format to send to the connected audio device
* based on the incoming audio stream. This mode prioritizes high-quality formats
* like Dolby Digital or DTS if supported by the device, otherwise falls back to PCM.
+ *
+ * This is the default value for digital output.
*/
AUTO,
@@ -38,4 +40,23 @@
* range of devices but sacrifices surround sound capabilities.
*/
PCM,
+
+ /**
+ * Dolby Digital Plus (E-AC-3) output. An enhanced version of Dolby Digital
+ * supporting more channels (up to 7.1 surround sound) and higher bitrates.
+ * Commonly used for streaming and online content.
+ */
+ DolbyDigitalPlus,
+
+ /**
+ * Dolby Digital (AC-3) output. Provides up to 5.1 channels
+ * of surround sound, a standard for DVDs, Blu-rays, and TV broadcasts.
+ */
+ DolbyDigital,
+
+ /**
+ * Dolby Multistream Audio (MAT) output. Carries multiple audio streams
+ * (e.g., different languages, audio descriptions) within a Dolby Digital Plus bitstream.
+ */
+ DolbyMat,
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index d56848c..3454556 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -18,11 +18,15 @@
@VintfStability
parcelable DolbyAudioProcessing {
+ /* The default value for sound mode is standard. */
enum SoundMode {
GAME,
MOVIE,
MUSIC,
NEWS,
+ STADIUM,
+ STANDARD,
+ USER,
}
/**
@@ -60,5 +64,5 @@
* mixed in Dolby Atmos and a compatible sound system with upward-firing speakers
* or a Dolby Atmos soundbar.
*/
- boolean doblyAtmos;
+ boolean dolbyAtmos;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
index 373a977..3da1495 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -39,7 +39,7 @@
*
* @param callback Callback object to pass events.
*/
- void setCallback(in IMediaQualityCallback callback);
+ void setAmbientBacklightCallback(in IMediaQualityCallback callback);
/**
* Sets the ambient backlight detector settings.
@@ -55,6 +55,9 @@
* device as configured before.
*
* @param enabled True to enable the ambient backlight detection, false to disable.
+ *
+ * @return Status::ok on success
+ * UNSUPPORTED_OPERATION if this functionality is unsupported.
*/
void setAmbientBacklightDetectionEnabled(in boolean enabled);
@@ -88,6 +91,9 @@
* parameters depends on the current content playing.
*
* @param enable True to enable, false to disable.
+ *
+ * @return Status::ok on success
+ * UNSUPPORTED_OPERATION if this functionality is unsupported.
*/
void setAutoPqEnabled(boolean enable);
@@ -112,6 +118,9 @@
* lower resolution image and invent the missing pixel to make the image looks sharper.
*
* @param enable True to enable, false to disable.
+ *
+ * @return Status::ok on success
+ * UNSUPPORTED_OPERATION if this functionality is unsupported.
*/
void setAutoSrEnabled(boolean enable);
@@ -136,6 +145,9 @@
* adjust the sound parameters depends on the current content playing.
*
* @param enable True to enable, false to disable.
+ *
+ * @return Status::ok on success
+ * UNSUPPORTED_OPERATION if this functionality is unsupported.
*/
void setAutoAqEnabled(boolean enable);
@@ -207,20 +219,4 @@
* Gets vendor capability information of the given parameters.
*/
void getVendorParamCaps(in VendorParameterIdentifier[] names, out VendorParamCapability[] caps);
-
- /**
- * When HAL request picture parameters by picture profile id, the framework will use this to
- * send the picture parameters associate with the profile id.
- *
- * @param pictureParameters pictureParameters that associate with the profile id HAL provided.
- */
- void sendPictureParameters(in PictureParameters pictureParameters);
-
- /**
- * When HAL request sound parameters by sound profile id, the framework will use this to
- * send the sound parameters associate with the profile id.
- *
- * @param soundParameters soundParameters that associate with the profile id HAL provided.
- */
- void sendSoundParameters(in SoundParameters soundParameters);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 06651e4..0e11fb0 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -18,6 +18,7 @@
import android.hardware.tv.mediaquality.ParamCapability;
import android.hardware.tv.mediaquality.PictureProfile;
+import android.hardware.tv.mediaquality.StreamStatus;
import android.hardware.tv.mediaquality.VendorParamCapability;
@VintfStability
@@ -59,5 +60,14 @@
*
* @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
*/
- void onRequestPictureParameters(long pictureProfileId);
+ void requestPictureParameters(long pictureProfileId);
+
+ /**
+ * Notifies Media Quality Manager when stream status changed.
+ *
+ * @param pictureProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param status the status of the current stream.
+ */
+ void onStreamStatusChanged(long pictureProfileId, StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
index 35112e1..7fc7ab2 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
@@ -21,10 +21,9 @@
@VintfStability
oneway interface IPictureProfileChangedListener {
/**
- * Notifies the composer HAL that the picture profile has changed. For picture profile details,
- * check PictureProfile.
+ * Notifies the service that the picture profile has changed.
*
- * @param pictureProfile Picture profile passed to the composer HAL.
+ * @param pictureProfile Picture profile that should be cached by the service.
*/
void onPictureProfileChanged(in PictureProfile pictureProfile);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index 2ab9c6c..3f96762 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -59,5 +59,5 @@
*
* @param SoundProfileId The SoundProfile id that associate with the SoundProfile.
*/
- void onRequestSoundParameters(long SoundProfileId);
+ void requestSoundParameters(long SoundProfileId);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
index 0a3c97b..d451590 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -51,6 +51,58 @@
GLOBE_DIMMING,
AUTO_PICTUREQUALITY_ENABLED,
AUTO_SUPER_RESOLUTION_ENABLED,
+ LEVEL_RANGE,
+ GAMUT_MAPPING,
+ PC_MODE,
+ LOW_LATENCY,
+ VRR,
+ CVRR,
+ HDMI_RGB_RANGE,
+ COLOR_SPACE,
+ PANEL_INIT_MAX_LUMINCE_VALID,
+ GAMMA,
+ COLOR_TEMPERATURE_RED_GAIN,
+ COLOR_TEMPERATURE_GREEN_GAIN,
+ COLOR_TEMPERATURE_BLUE_GAIN,
+ COLOR_TEMPERATURE_RED_OFFSET,
+ COLOR_TEMPERATURE_GREEN_OFFSET,
+ COLOR_TEMPERATURE_BLUE_OFFSET,
+ ELEVEN_POINT_RED,
+ ELEVEN_POINT_GREEN,
+ ELEVEN_POINT_BLUE,
+ LOW_BLUE_LIGHT,
+ LD_MODE,
+ OSD_RED_GAIN,
+ OSD_GREEN_GAIN,
+ OSD_BLUE_GAIN,
+ OSD_RED_OFFSET,
+ OSD_GREEN_OFFSET,
+ OSD_BLUE_OFFSET,
+ OSD_HUE,
+ OSD_SATURATION,
+ OSD_CONTRAST,
+ COLOR_TUNER_SWITCH,
+ COLOR_TUNER_HUE_RED,
+ COLOR_TUNER_HUE_GREEN,
+ COLOR_TUNER_HUE_BLUE,
+ COLOR_TUNER_HUE_CYAN,
+ COLOR_TUNER_HUE_MAGENTA,
+ COLOR_TUNER_HUE_YELLOW,
+ COLOR_TUNER_HUE_FLESH,
+ COLOR_TUNER_SATURATION_RED,
+ COLOR_TUNER_SATURATION_GREEN,
+ COLOR_TUNER_SATURATION_BLUE,
+ COLOR_TUNER_SATURATION_CYAN,
+ COLOR_TUNER_SATURATION_MAGENTA,
+ COLOR_TUNER_SATURATION_YELLOW,
+ COLOR_TUNER_SATURATION_FLESH,
+ COLOR_TUNER_LUMINANCE_RED,
+ COLOR_TUNER_LUMINANCE_GREEN,
+ COLOR_TUNER_LUMINANCE_BLUE,
+ COLOR_TUNER_LUMINANCE_CYAN,
+ COLOR_TUNER_LUMINANCE_MAGENTA,
+ COLOR_TUNER_LUMINANCE_YELLOW,
+ COLOR_TUNER_LUMINANCE_FLESH,
BALANCE,
BASS,
@@ -68,4 +120,5 @@
DTS_VIRTUAL_X,
DIGITAL_OUTPUT,
DIGITAL_OUTPUT_DELAY_MS,
+ SOUND_STYLE,
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
index b7f2a11..2443d65 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -20,6 +20,7 @@
import android.hardware.tv.mediaquality.ColorSpace;
import android.hardware.tv.mediaquality.ColorTemperature;
import android.hardware.tv.mediaquality.Gamma;
+import android.hardware.tv.mediaquality.PictureQualityEventType;
import android.hardware.tv.mediaquality.QualityLevel;
/**
@@ -253,4 +254,198 @@
/* The gamma curve used for the display. */
Gamma gamma;
+
+ /**
+ * The color gain value for color temperature adjustment.
+ * The value adjusts the intensity of color in the bright areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedGain;
+
+ int colorTemperatureGreenGain;
+
+ int colorTemperatureBlueGain;
+
+ /**
+ * The color offset value for color temperature adjustment.
+ * This value adjusts the intensity of color in the dark areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedOffset;
+
+ int colorTemperatureGreenOffset;
+
+ int colorTemperatureBlueOffset;
+
+ /**
+ * The parameters in this section is for 11-point white balance in advanced TV picture setting.
+ * 11-Point White Balance allows for very precise adjustment of the color temperature of the
+ * TV. It aims to make sure white looks truly white, without any unwanted color tints, across
+ * the entire range of brightness levels.
+ *
+ * The "11 points" refer to 11 different brightness levels from 0 (black) to 10 (white).
+ * At each of these points, we can fine-tune the mixture of red, green and blue to achieve
+ * neutral white.
+ *
+ * These parameters specifically control the amount of red, blue or green at each of the 11
+ * brightness points. The parameter type is an int array with a fix size of 11. The indexes
+ * 0 - 10 are the 11 different points. For example, elevenPointRed[0] adjusts the red level
+ * at the darkest black level. elevenPointRed[1] adjusts red at the next brightness level up,
+ * and so on.
+ *
+ * The value range is from 0 - 100 for each indexes, where 0 is the minimum intensity of
+ * that color(red, green, blue) at a specific brightness point and 100 is the maximum intensity
+ * of that color at that point.
+ *
+ * The default/unmodified value is 50. It can be other values depends on different TVs.
+ */
+ int[11] elevenPointRed;
+
+ int[11] elevenPointGreen;
+
+ int[11] elevenPointBlue;
+
+ /**
+ * Adjust gamma blue gain/offset.
+ *
+ * The default value is middle. Can be different depends on different TVs.
+ */
+ QualityLevel lowBlueLight;
+
+ /**
+ * Advance setting for local dimming level.
+ *
+ * The default value is off. Can be different depends on different TVs.
+ */
+ QualityLevel LdMode;
+
+ /**
+ * The parameter in this section is for on-screen display color gain and offset.
+ *
+ * Color gain is to adjust the intensity of that color (red, blue, green) in the brighter
+ * part of the image.
+ * Color offset is to adjust the intensity of that color in the darker part of the image.
+ *
+ * For example, increase OSD (on-screen display) red gain will make brighter reds even more
+ * intense, while decreasing it will make them less vibrant. Increase OSD red offset will add
+ * more red to the darker areas, while decreasing it will reduce the red in the shadows.
+ *
+ * The value range is from 0 to 2047. (11-bit resolution for the adjustment)
+ * The default value depends on different TVs.
+ */
+ int osdRedGain;
+
+ int osdGreenGain;
+
+ int osdBlueGain;
+
+ int osdRedOffset;
+
+ int osdGreenOffset;
+
+ int osdBlueOffset;
+
+ /* The value range is 0-100 */
+ int osdHue;
+
+ /* The value range is 0-255 */
+ int osdSaturation;
+
+ int osdContrast;
+
+ /**
+ * Enable/disable color tuner.
+ *
+ * The color tuner can adjust color temperature and picture color.
+ * The default is enabled.
+ */
+ boolean colorTunerSwitch;
+
+ /**
+ * The parameters in this section adjust the hue of each color.
+ *
+ * For example, increase colorTunerHueRed will make the image more purplish-red or more
+ * orange-red. increase colorTunerHueGreen will make the image more yellowish-green or
+ * more bluish-green. Flesh is a special one, it can make skin tones appear warmer (reddish)
+ * or cooler (more yellowish).
+ *
+ * The value range is from 0 - 100, and the default value is 50.
+ */
+ int colorTunerHueRed;
+
+ int colorTunerHueGreen;
+
+ int colorTunerHueBlue;
+
+ int colorTunerHueCyan;
+
+ int colorTunerHueMagenta;
+
+ int colorTunerHueYellow;
+
+ int colorTunerHueFlesh;
+
+ /**
+ * The parameters in this section adjust the saturation of each color.
+ *
+ * For example, increase colorTunerSaturationBlue will make the color blue more deeper
+ * and richer. Decrease will make the color blue more washed-out blues.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerSaturationRed;
+
+ int colorTunerSaturationGreen;
+
+ int colorTunerSaturationBlue;
+
+ int colorTunerSaturationCyan;
+
+ int colorTunerSaturationMagenta;
+
+ int colorTunerSaturationYellow;
+
+ int colorTunerSaturationFlesh;
+
+ /**
+ * The parameters in this section adjust the luminance (brightness) of each color.
+ *
+ * For example, increase colorTunerLuminanceRed will makes red appear brighter. Decrease
+ * will makes red appear darker.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerLuminanceRed;
+
+ int colorTunerLuminanceGreen;
+
+ int colorTunerLuminanceBlue;
+
+ int colorTunerLuminanceCyan;
+
+ int colorTunerLuminanceMagenta;
+
+ int colorTunerLuminanceYellow;
+
+ int colorTunerLuminanceFlesh;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
+
+ /**
+ * This indicates non picture parameter status change about a profile.
+ *
+ * Those status can be found in PictureQualityEventType.
+ */
+ PictureQualityEventType pictureQualityEventType;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
new file mode 100644
index 0000000..4985707
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.tv.mediaquality;
+
+@VintfStability
+enum PictureQualityEventType {
+ /* No status change */
+ NONE,
+
+ /**
+ * Black bar detection Event.
+ *
+ * TV has detected or lost track of black bars, potentially triggering a change in aspect
+ * ratio.
+ */
+ BBD_RESULT,
+
+ /**
+ * Video delay change event.
+ *
+ * This signifies a change in the video processing delay, might due to enabling or disabling
+ * certain picture quality features.
+ */
+ VIDEO_DELAY_CHANGE,
+
+ /**
+ * Capture point change event.
+ *
+ * A change in video processing pipeline the image is being captured for display. Changes here
+ * relates to switching between different video sources.
+ */
+ CAPTUREPOINT_INFO_CHANGE,
+
+ /**
+ * Video path change event.
+ *
+ * Indicates a change in the video signal path. This could involve switching between
+ * different input sources.
+ */
+ VIDEOPATH_CHANGE,
+
+ /**
+ * Extra frame change event.
+ *
+ * Some TVs use techniques like frame interpolation (inserting extra frames) to smooth motion.
+ * Change means the function is turned on or off.
+ */
+ EXTRA_FRAME_CHANGE,
+
+ /**
+ * Dolby Vision IQ change event.
+ *
+ * Dolby Vision IQ is a technology that adjusts HDR video based on the ambient light in the
+ * room. A change means the function is turned on or off.
+ */
+ DOLBY_IQ_CHANGE,
+
+ /**
+ * Dolby Vision audio processing object change event.
+ *
+ * This event might be triggered by changes in audio settings that affect the picture quality,
+ * such as enabling or disabling a feature that synchronizes audio and video processing.
+ */
+ DOLBY_APO_CHANGE,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
index 4714ad2..7a8a031 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -22,6 +22,7 @@
import android.hardware.tv.mediaquality.DtsVirtualX;
import android.hardware.tv.mediaquality.EqualizerDetail;
import android.hardware.tv.mediaquality.QualityLevel;
+import android.hardware.tv.mediaquality.SoundStyle;
/**
* The parameters for Sound Profile.
@@ -92,4 +93,16 @@
/* Digital output delay in ms. */
int digitalOutputDelayMs;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
+
+ /*
+ * Sound style of the profile.
+ *
+ * The default value is user customized profile.
+ */
+ SoundStyle soundStyle;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl
new file mode 100644
index 0000000..b8650d2
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.tv.mediaquality;
+
+@VintfStability
+enum SoundStyle {
+ /* User custom style is the default value for sound style */
+ USER,
+ STANDARD,
+ VIVID,
+ SPORTS,
+ MOVIE,
+ MUSIC,
+ NEWS,
+ AUTO,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..ec3b995
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2024 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.
+ */
+
+package android.hardware.tv.mediaquality;
+
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
index 1946cec..087730f 100644
--- a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -32,12 +32,14 @@
VendorParameterIdentifier::VendorParameterIdentifier,
};
use binder::{Interface, Strong};
+use binder::ExceptionCode;
use std::sync::{Arc, Mutex};
use std::thread;
/// Defined so we can implement the IMediaQuality AIDL interface.
pub struct MediaQualityService {
callback: Arc<Mutex<Option<Strong<dyn IMediaQualityCallback>>>>,
+ ambient_backlight_supported: Arc<Mutex<bool>>,
ambient_backlight_enabled: Arc<Mutex<bool>>,
ambient_backlight_detector_settings: Arc<Mutex<AmbientBacklightSettings>>,
auto_pq_supported: Arc<Mutex<bool>>,
@@ -60,6 +62,7 @@
pub fn new() -> Self {
Self {
callback: Arc::new(Mutex::new(None)),
+ ambient_backlight_supported: Arc::new(Mutex::new(false)),
ambient_backlight_enabled: Arc::new(Mutex::new(true)),
ambient_backlight_detector_settings:
Arc::new(Mutex::new(AmbientBacklightSettings::default())),
@@ -81,7 +84,7 @@
impl IMediaQuality for MediaQualityService {
- fn setCallback(
+ fn setAmbientBacklightCallback(
&self,
callback: &Strong<dyn IMediaQualityCallback>
) -> binder::Result<()> {
@@ -97,45 +100,51 @@
) -> binder::Result<()> {
println!("Received settings: {:?}", settings);
let mut ambient_backlight_detector_settings = self.ambient_backlight_detector_settings.lock().unwrap();
- ambient_backlight_detector_settings.packageName = settings.packageName.clone();
+ ambient_backlight_detector_settings.uid = settings.uid.clone();
ambient_backlight_detector_settings.source = settings.source;
ambient_backlight_detector_settings.maxFramerate = settings.maxFramerate;
ambient_backlight_detector_settings.colorFormat = settings.colorFormat;
ambient_backlight_detector_settings.hZonesNumber = settings.hZonesNumber;
ambient_backlight_detector_settings.vZonesNumber = settings.vZonesNumber;
ambient_backlight_detector_settings.hasLetterbox = settings.hasLetterbox;
- ambient_backlight_detector_settings.threshold = settings.threshold;
+ ambient_backlight_detector_settings.colorThreshold = settings.colorThreshold;
Ok(())
}
fn setAmbientBacklightDetectionEnabled(&self, enabled: bool) -> binder::Result<()> {
println!("Received enabled: {}", enabled);
let mut ambient_backlight_enabled = self.ambient_backlight_enabled.lock().unwrap();
+ let ambient_backlight_supported = self.ambient_backlight_supported.lock().unwrap();
*ambient_backlight_enabled = enabled;
- if enabled {
- println!("Enable Ambient Backlight detection");
- thread::scope(|s| {
- s.spawn(|| {
- let cb = self.callback.lock().unwrap();
- if let Some(cb) = &*cb {
- let enabled_event = AmbientBacklightEvent::Enabled(true);
- cb.notifyAmbientBacklightEvent(&enabled_event).unwrap();
- }
+
+ if *ambient_backlight_supported {
+ if enabled {
+ println!("Enable Ambient Backlight detection");
+ thread::scope(|s| {
+ s.spawn(|| {
+ let cb = self.callback.lock().unwrap();
+ if let Some(cb) = &*cb {
+ let enabled_event = AmbientBacklightEvent::Enabled(true);
+ cb.notifyAmbientBacklightEvent(&enabled_event).unwrap();
+ }
+ });
});
- });
+ } else {
+ println!("Disable Ambient Backlight detection");
+ thread::scope(|s| {
+ s.spawn(|| {
+ let cb = self.callback.lock().unwrap();
+ if let Some(cb) = &*cb {
+ let disabled_event = AmbientBacklightEvent::Enabled(false);
+ cb.notifyAmbientBacklightEvent(&disabled_event).unwrap();
+ }
+ });
+ });
+ }
+ return Ok(());
} else {
- println!("Disable Ambient Backlight detection");
- thread::scope(|s| {
- s.spawn(|| {
- let cb = self.callback.lock().unwrap();
- if let Some(cb) = &*cb {
- let disabled_event = AmbientBacklightEvent::Enabled(false);
- cb.notifyAmbientBacklightEvent(&disabled_event).unwrap();
- }
- });
- });
+ return Err(ExceptionCode::UNSUPPORTED_OPERATION.into());
}
- Ok(())
}
fn getAmbientBacklightDetectionEnabled(&self) -> binder::Result<bool> {
@@ -155,13 +164,19 @@
fn setAutoPqEnabled(&self, enabled: bool) -> binder::Result<()> {
let mut auto_pq_enabled = self.auto_pq_enabled.lock().unwrap();
+ let auto_pq_supported = self.auto_pq_supported.lock().unwrap();
*auto_pq_enabled = enabled;
- if enabled {
- println!("Enable auto picture quality");
+
+ if *auto_pq_supported {
+ if enabled {
+ println!("Enable auto picture quality");
+ } else {
+ println!("Disable auto picture quality");
+ }
+ return Ok(());
} else {
- println!("Disable auto picture quality");
+ return Err(ExceptionCode::UNSUPPORTED_OPERATION.into());
}
- Ok(())
}
fn isAutoSrSupported(&self) -> binder::Result<bool> {
@@ -176,13 +191,19 @@
fn setAutoSrEnabled(&self, enabled: bool) -> binder::Result<()> {
let mut auto_sr_enabled = self.auto_sr_enabled.lock().unwrap();
+ let auto_sr_supported = self.auto_sr_supported.lock().unwrap();
*auto_sr_enabled = enabled;
- if enabled {
- println!("Enable auto super resolution");
+
+ if *auto_sr_supported {
+ if enabled {
+ println!("Enable auto super resolution");
+ } else {
+ println!("Disable auto super resolution");
+ }
+ return Ok(());
} else {
- println!("Disable auto super resolution");
+ return Err(ExceptionCode::UNSUPPORTED_OPERATION.into());
}
- Ok(())
}
fn isAutoAqSupported(&self) -> binder::Result<bool> {
@@ -197,13 +218,19 @@
fn setAutoAqEnabled(&self, enabled: bool) -> binder::Result<()> {
let mut auto_aq_enabled = self.auto_aq_enabled.lock().unwrap();
+ let auto_aq_supported = self.auto_aq_supported.lock().unwrap();
*auto_aq_enabled = enabled;
- if enabled {
- println!("Enable auto audio quality");
+
+ if *auto_aq_supported {
+ if enabled {
+ println!("Enable auto audio quality");
+ } else {
+ println!("Disable auto audio quality");
+ }
+ return Ok(());
} else {
- println!("Disable auto audio quality");
+ return Err(ExceptionCode::UNSUPPORTED_OPERATION.into());
}
- Ok(())
}
fn getPictureProfileListener(&self) -> binder::Result<binder::Strong<dyn IPictureProfileChangedListener>> {
@@ -265,14 +292,4 @@
println!("getVendorParamCaps. len= {}", param_names.len());
Ok(())
}
-
- fn sendPictureParameters(&self, _picture_parameters: &PictureParameters) -> binder::Result<()>{
- println!("Received picture parameters");
- Ok(())
- }
-
- fn sendSoundParameters(&self, _sound_parameters: &SoundParameters) -> binder::Result<()>{
- println!("Received sound parameters");
- Ok(())
- }
}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index 84f798b..f785cad 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -29,6 +29,7 @@
#include <aidl/android/hardware/tv/mediaquality/SoundParameter.h>
#include <aidl/android/hardware/tv/mediaquality/SoundParameters.h>
#include <aidl/android/hardware/tv/mediaquality/SoundProfile.h>
+#include <aidl/android/hardware/tv/mediaquality/StreamStatus.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
@@ -51,6 +52,7 @@
using aidl::android::hardware::tv::mediaquality::SoundParameter;
using aidl::android::hardware::tv::mediaquality::SoundParameters;
using aidl::android::hardware::tv::mediaquality::SoundProfile;
+using aidl::android::hardware::tv::mediaquality::StreamStatus;
using aidl::android::hardware::tv::mediaquality::VendorParamCapability;
using aidl::android::hardware::tv::mediaquality::VendorParameterIdentifier;
using android::ProcessState;
@@ -95,7 +97,9 @@
return ScopedAStatus::ok();
}
- ScopedAStatus onRequestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+ ScopedAStatus requestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+
+ ScopedAStatus onStreamStatusChanged(int64_t, StreamStatus) { return ScopedAStatus::ok(); }
private:
std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
@@ -121,7 +125,7 @@
return ScopedAStatus::ok();
}
- ScopedAStatus onRequestSoundParameters(int64_t) { return ScopedAStatus::ok(); }
+ ScopedAStatus requestSoundParameters(int64_t) { return ScopedAStatus::ok(); }
private:
std::function<void(const SoundProfile& soundProfile)> on_hal_sound_profile_adjust_;
@@ -147,7 +151,7 @@
open_cb_promise.set_value();
return ScopedAStatus::ok();
});
- ASSERT_OK(mediaquality->setCallback(callback));
+ ASSERT_OK(mediaquality->setAmbientBacklightCallback(callback));
ASSERT_OK(mediaquality->setAmbientBacklightDetectionEnabled(true));
std::chrono::milliseconds timeout{10000};
EXPECT_EQ(open_cb_future.wait_for(timeout), std::future_status::ready);
@@ -161,7 +165,7 @@
TEST_P(MediaQualityAidl, TestSetMediaQualityCallback) {
std::shared_ptr<MediaQualityCallback> callback = ndk::SharedRefBase::make<MediaQualityCallback>(
[](auto /* event */) { return ScopedAStatus::ok(); });
- ASSERT_OK(mediaquality->setCallback(callback));
+ ASSERT_OK(mediaquality->setAmbientBacklightCallback(callback));
}
TEST_P(MediaQualityAidl, TestSetPictureProfileAdjustmentListener) {
@@ -212,13 +216,13 @@
TEST_P(MediaQualityAidl, TestSetAmbientBacklightDetector) {
AmbientBacklightSettings in_settings = {
- .packageName = "com.android.mediaquality",
+ .uid = 1,
.source = AmbientBacklightSource::VIDEO,
.colorFormat = PixelFormat::RGB_888,
.hZonesNumber = 32,
.vZonesNumber = 20,
.hasLetterbox = true,
- .threshold = 0,
+ .colorThreshold = 0,
};
ASSERT_OK(mediaquality->setAmbientBacklightDetector(in_settings));
}
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
index 2b39bc6..158e4f1 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
@@ -100,7 +100,9 @@
ASSERT_TRUE(mFilterTests.configFilter(filterReconf.settings, filterId));
ASSERT_TRUE(mFilterTests.startFilter(filterId));
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(mFilterTests.startIdTest(filterId));
+ if (!isPassthroughFilter(filterReconf)) {
+ ASSERT_TRUE(mFilterTests.startIdTest(filterId));
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.closeFilter(filterId));
@@ -152,7 +154,9 @@
ASSERT_TRUE(mFilterTests.startFilter(filterId));
// tune test
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(filterDataOutputTest());
+ if (!isPassthroughFilter(filterConf)) {
+ ASSERT_TRUE(filterDataOutputTest());
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.closeFilter(filterId));
@@ -210,7 +214,9 @@
ASSERT_TRUE(mFilterTests.startFilter(filterId));
// tune test
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(filterDataOutputTest());
+ if (!isPassthroughFilter(filterConf)) {
+ ASSERT_TRUE(filterDataOutputTest());
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.releaseShareAvHandle(filterId));
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
index be9b996..5fdc3dc 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
@@ -89,6 +89,28 @@
sectionFilterIds.clear();
}
+bool isPassthroughFilter(FilterConfig filterConfig) {
+ auto type = filterConfig.type;
+ if (type.mainType == DemuxFilterMainType::TS) {
+ auto subType = type.subType.get<DemuxFilterSubType::Tag::tsFilterType>();
+ if (subType == DemuxTsFilterType::AUDIO || subType == DemuxTsFilterType::VIDEO) {
+ auto tsFilterSettings = filterConfig.settings.get<DemuxFilterSettings::Tag::ts>();
+ auto avSettings = tsFilterSettings.filterSettings
+ .get<DemuxTsFilterSettingsFilterSettings::Tag::av>();
+ return avSettings.isPassthrough;
+ }
+ } else if (filterConfig.type.mainType != DemuxFilterMainType::MMTP) {
+ auto subType = type.subType.get<DemuxFilterSubType::Tag::mmtpFilterType>();
+ if (subType == DemuxMmtpFilterType::AUDIO || subType == DemuxMmtpFilterType::VIDEO) {
+ auto mmtpFilterSettings = filterConfig.settings.get<DemuxFilterSettings::Tag::mmtp>();
+ auto avSettings = mmtpFilterSettings.filterSettings
+ .get<DemuxMmtpFilterSettingsFilterSettings::Tag::av>();
+ return avSettings.isPassthrough;
+ }
+ }
+ return false;
+}
+
enum class Dataflow_Context { LNBRECORD, RECORD, DESCRAMBLING, LNBDESCRAMBLING };
class TunerLnbAidlTest : public testing::TestWithParam<std::string> {
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
index 791de52..99ac16d 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
@@ -39,6 +39,7 @@
boolean isFsd;
int announcementPeriodMillis;
android.hardware.wifi.supplicant.UsdPublishTransmissionType transmissionType;
+ boolean eventsEnabled;
enum PublishType {
SOLICITED_ONLY = 0,
UNSOLICITED_ONLY = 1,
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
index e04974b..222edce 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
@@ -68,4 +68,11 @@
* Type of the publish transmission (ex. unicast, multicast).
*/
UsdPublishTransmissionType transmissionType;
+
+ /**
+ * Whether to enable publish replied events. If disabled, then
+ * |ISupplicantStaIfaceCallback.onUsdPublishReplied| will not be
+ * called for this session.
+ */
+ boolean eventsEnabled;
}