Merge "Add channel bandwidth into MloLink" into main
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index e2d4b79..14e70ef 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -117,6 +117,9 @@
defaults: ["VtsHalAudioEffectTargetTestDefaults"],
static_libs: ["libaudioaidlranges"],
srcs: ["VtsHalDynamicsProcessingTest.cpp"],
+ shared_libs: [
+ "libaudioutils",
+ ],
}
cc_test {
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 0c201cc..f106d83 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -20,6 +20,8 @@
#define LOG_TAG "VtsHalDynamicsProcessingTest"
#include <android-base/logging.h>
+#include <audio_utils/power.h>
+#include <audio_utils/primitives.h>
#include <Utils.h>
@@ -44,26 +46,25 @@
class DynamicsProcessingTestHelper : public EffectHelper {
public:
DynamicsProcessingTestHelper(std::pair<std::shared_ptr<IFactory>, Descriptor> pair,
- int32_t channelLayOut = AudioChannelLayout::LAYOUT_STEREO) {
+ int32_t channelLayOut = AudioChannelLayout::LAYOUT_STEREO)
+ : mChannelLayout(channelLayOut),
+ mChannelCount(::aidl::android::hardware::audio::common::getChannelCount(
+ AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout))) {
std::tie(mFactory, mDescriptor) = pair;
- mChannelLayout = channelLayOut;
- mChannelCount = ::aidl::android::hardware::audio::common::getChannelCount(
- AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout));
}
// setup
void SetUpDynamicsProcessingEffect() {
ASSERT_NE(nullptr, mFactory);
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
-
Parameter::Specific specific = getDefaultParamSpecific();
Parameter::Common common = createParamCommon(
- 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */,
- 0x100 /* iFrameCount */, 0x100 /* oFrameCount */,
+ 0 /* session */, 1 /* ioHandle */, kSamplingFrequency /* iSampleRate */,
+ kSamplingFrequency /* oSampleRate */, kFrameCount /* iFrameCount */,
+ kFrameCount /* oFrameCount */,
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout),
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout));
- IEffect::OpenEffectReturn ret;
- ASSERT_NO_FATAL_FAILURE(open(mEffect, common, specific, &ret, EX_NONE));
+ ASSERT_NO_FATAL_FAILURE(open(mEffect, common, specific, &mOpenEffectReturn, EX_NONE));
ASSERT_NE(nullptr, mEffect);
mEngineConfigApplied = mEngineConfigPreset;
}
@@ -113,6 +114,8 @@
// get set params and validate
void SetAndGetDynamicsProcessingParameters();
+ bool isAllParamsValid();
+
// enqueue test parameters
void addEngineConfig(const DynamicsProcessing::EngineArchitecture& cfg);
void addPreEqChannelConfig(const std::vector<DynamicsProcessing::ChannelConfig>& cfg);
@@ -126,9 +129,12 @@
static constexpr float kPreferredProcessingDurationMs = 10.0f;
static constexpr int kBandCount = 5;
+ static constexpr int kSamplingFrequency = 44100;
+ static constexpr int kFrameCount = 2048;
std::shared_ptr<IFactory> mFactory;
std::shared_ptr<IEffect> mEffect;
Descriptor mDescriptor;
+ IEffect::OpenEffectReturn mOpenEffectReturn;
DynamicsProcessing::EngineArchitecture mEngineConfigApplied;
DynamicsProcessing::EngineArchitecture mEngineConfigPreset{
.resolutionPreference =
@@ -148,12 +154,12 @@
static const std::set<DynamicsProcessing::StageEnablement> kStageEnablementTestSet;
static const std::set<std::vector<DynamicsProcessing::InputGain>> kInputGainTestSet;
- protected:
- int mChannelCount;
-
private:
- int32_t mChannelLayout;
+ const int32_t mChannelLayout;
std::vector<std::pair<DynamicsProcessing::Tag, DynamicsProcessing>> mTags;
+
+ protected:
+ const int mChannelCount;
void CleanUp() {
mTags.clear();
mPreEqChannelEnable.clear();
@@ -329,10 +335,7 @@
}
void DynamicsProcessingTestHelper::SetAndGetDynamicsProcessingParameters() {
- for (auto& it : mTags) {
- auto& tag = it.first;
- auto& dp = it.second;
-
+ for (const auto& [tag, dp] : mTags) {
// validate parameter
Descriptor desc;
ASSERT_STATUS(EX_NONE, mEffect->getDescriptor(&desc));
@@ -371,6 +374,22 @@
}
}
+bool DynamicsProcessingTestHelper::isAllParamsValid() {
+ if (mTags.empty()) {
+ return false;
+ }
+ for (const auto& [tag, dp] : mTags) {
+ // validate parameter
+ if (!isParamInRange(dp, mDescriptor.capability.range.get<Range::dynamicsProcessing>())) {
+ return false;
+ }
+ if (!isParamValid(tag, dp)) {
+ return false;
+ }
+ }
+ return true;
+}
+
void DynamicsProcessingTestHelper::addEngineConfig(
const DynamicsProcessing::EngineArchitecture& cfg) {
DynamicsProcessing dp;
@@ -446,6 +465,21 @@
mTags.push_back({DynamicsProcessing::inputGain, dp});
}
+void fillLimiterConfig(std::vector<DynamicsProcessing::LimiterConfig>& limiterConfigList,
+ int channelIndex, bool enable, int linkGroup, float attackTime,
+ float releaseTime, float ratio, float threshold, float postGain) {
+ DynamicsProcessing::LimiterConfig cfg;
+ cfg.channel = channelIndex;
+ cfg.enable = enable;
+ cfg.linkGroup = linkGroup;
+ cfg.attackTimeMs = attackTime;
+ cfg.releaseTimeMs = releaseTime;
+ cfg.ratio = ratio;
+ cfg.thresholdDb = threshold;
+ cfg.postGainDb = postGain;
+ limiterConfigList.push_back(cfg);
+}
+
/**
* Test DynamicsProcessing Engine Configuration
*/
@@ -486,7 +520,7 @@
TEST_P(DynamicsProcessingTestEngineArchitecture, SetAndGetEngineArch) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -527,7 +561,7 @@
public:
DynamicsProcessingTestInputGain()
: DynamicsProcessingTestHelper(std::get<INPUT_GAIN_INSTANCE_NAME>(GetParam())),
- mInputGain(std::get<INPUT_GAIN_PARAM>(GetParam())){};
+ mInputGain(std::get<INPUT_GAIN_PARAM>(GetParam())) {};
void SetUp() override { SetUpDynamicsProcessingEffect(); }
@@ -538,7 +572,7 @@
TEST_P(DynamicsProcessingTestInputGain, SetAndGetInputGain) {
EXPECT_NO_FATAL_FAILURE(addInputGain(mInputGain));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -565,40 +599,23 @@
enum LimiterConfigTestParamName {
LIMITER_INSTANCE_NAME,
LIMITER_CHANNEL,
- LIMITER_ENABLE,
LIMITER_LINK_GROUP,
- LIMITER_ADDITIONAL,
-};
-enum LimiterConfigTestAdditionalParam {
LIMITER_ATTACK_TIME,
LIMITER_RELEASE_TIME,
LIMITER_RATIO,
LIMITER_THRESHOLD,
LIMITER_POST_GAIN,
- LIMITER_MAX_NUM,
};
-using LimiterConfigTestAdditional = std::array<float, LIMITER_MAX_NUM>;
-// attackTime, releaseTime, ratio, thresh, postGain
-static constexpr std::array<LimiterConfigTestAdditional, 4> kLimiterConfigTestAdditionalParam = {
- {{-1, -60, -2.5, -2, -3.14},
- {-1, 60, -2.5, 2, -3.14},
- {1, -60, 2.5, -2, 3.14},
- {1, 60, 2.5, -2, 3.14}}};
using LimiterConfigTestParams = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>,
- int32_t, bool, int32_t, LimiterConfigTestAdditional>;
+ int32_t, int32_t, float, float, float, float, float>;
-void fillLimiterConfig(DynamicsProcessing::LimiterConfig& cfg,
+void fillLimiterConfig(std::vector<DynamicsProcessing::LimiterConfig>& cfg,
const LimiterConfigTestParams& params) {
- const std::array<float, LIMITER_MAX_NUM> additional = std::get<LIMITER_ADDITIONAL>(params);
- cfg.channel = std::get<LIMITER_CHANNEL>(params);
- cfg.enable = std::get<LIMITER_ENABLE>(params);
- cfg.linkGroup = std::get<LIMITER_LINK_GROUP>(params);
- cfg.attackTimeMs = additional[LIMITER_ATTACK_TIME];
- cfg.releaseTimeMs = additional[LIMITER_RELEASE_TIME];
- cfg.ratio = additional[LIMITER_RATIO];
- cfg.thresholdDb = additional[LIMITER_THRESHOLD];
- cfg.postGainDb = additional[LIMITER_POST_GAIN];
+ fillLimiterConfig(cfg, std::get<LIMITER_CHANNEL>(params), true,
+ std::get<LIMITER_LINK_GROUP>(params), std::get<LIMITER_ATTACK_TIME>(params),
+ std::get<LIMITER_RELEASE_TIME>(params), std::get<LIMITER_RATIO>(params),
+ std::get<LIMITER_THRESHOLD>(params), std::get<LIMITER_POST_GAIN>(params));
}
class DynamicsProcessingTestLimiterConfig
@@ -607,7 +624,7 @@
public:
DynamicsProcessingTestLimiterConfig()
: DynamicsProcessingTestHelper(std::get<LIMITER_INSTANCE_NAME>(GetParam())) {
- fillLimiterConfig(mCfg, GetParam());
+ fillLimiterConfig(mLimiterConfigList, GetParam());
}
void SetUp() override { SetUpDynamicsProcessingEffect(); }
@@ -615,36 +632,193 @@
void TearDown() override { TearDownDynamicsProcessingEffect(); }
DynamicsProcessing::LimiterConfig mCfg;
+ std::vector<DynamicsProcessing::LimiterConfig> mLimiterConfigList;
};
TEST_P(DynamicsProcessingTestLimiterConfig, SetAndGetLimiterConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
- EXPECT_NO_FATAL_FAILURE(addLimiterConfig({mCfg}));
- SetAndGetDynamicsProcessingParameters();
+ EXPECT_NO_FATAL_FAILURE(addLimiterConfig(mLimiterConfigList));
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestLimiterConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 1, 2), // channel count
- testing::Bool(), // enable
- testing::Values(3), // link group
- testing::ValuesIn(kLimiterConfigTestAdditionalParam)), // Additional
+ testing::Values(-1, 0, 1, 2), // channel index
+ testing::Values(3), // link group
+ testing::Values(-1, 1), // attackTime
+ testing::Values(-60, 60), // releaseTime
+ testing::Values(-2.5, 2.5), // ratio
+ testing::Values(-2, 2), // thresh
+ testing::Values(-3.14, 3.14) // postGain
+ ),
[](const auto& info) {
auto descriptor = std::get<LIMITER_INSTANCE_NAME>(info.param).second;
- DynamicsProcessing::LimiterConfig cfg;
+ std::vector<DynamicsProcessing::LimiterConfig> cfg;
fillLimiterConfig(cfg, info.param);
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- toString(descriptor.common.id.uuid) + "_limiterConfig_" +
- cfg.toString();
+ std::string name =
+ "Implementer_" + getPrefix(descriptor) + "_limiterConfig_" + cfg[0].toString();
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
});
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingTestLimiterConfig);
+using LimiterConfigDataTestParams = std::pair<std::shared_ptr<IFactory>, Descriptor>;
+
+class DynamicsProcessingLimiterConfigDataTest
+ : public ::testing::TestWithParam<LimiterConfigDataTestParams>,
+ public DynamicsProcessingTestHelper {
+ public:
+ DynamicsProcessingLimiterConfigDataTest()
+ : DynamicsProcessingTestHelper(GetParam(), AudioChannelLayout::LAYOUT_MONO) {
+ mBufferSize = kFrameCount * mChannelCount;
+ mInput.resize(mBufferSize);
+ generateSineWave(1000 /*Input Frequency*/, mInput);
+ mInputDb = calculateDb(mInput);
+ }
+
+ void SetUp() override {
+ SetUpDynamicsProcessingEffect();
+ SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+ }
+
+ 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);
+ }
+
+ void computeRatio(float threshold, float outputDb, float& ratio) {
+ float inputOverThreshold = mInputDb - threshold;
+ float outputOverThreshold = outputDb - threshold;
+ EXPECT_NE(outputOverThreshold, 0);
+ ratio = inputOverThreshold / outputOverThreshold;
+ }
+
+ void setParamsAndProcess(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();
+ }
+
+ void cleanUpLimiterConfig() {
+ CleanUp();
+ mLimiterConfigList.clear();
+ }
+ static constexpr float kDefaultLinkerGroup = 3;
+ static constexpr float kDefaultAttackTime = 0;
+ static constexpr float kDefaultReleaseTime = 0;
+ static constexpr float kDefaultRatio = 4;
+ static constexpr float kDefaultThreshold = 0;
+ 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;
+ int mBufferSize;
+};
+
+TEST_P(DynamicsProcessingLimiterConfigDataTest, IncreasingThresholdDb) {
+ std::vector<float> thresholdValues = {-200, -150, -100, -50, -5, 0};
+ std::vector<float> output(mInput.size());
+ float previousThreshold = -FLT_MAX;
+ for (float threshold : thresholdValues) {
+ for (int i = 0; i < mChannelCount; i++) {
+ fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, kDefaultRatio, threshold, kDefaultPostGain);
+ }
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+ if (threshold >= mInputDb || kDefaultRatio == 1) {
+ EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ } else {
+ float calculatedThreshold = 0;
+ EXPECT_NO_FATAL_FAILURE(computeThreshold(kDefaultRatio, outputDb, calculatedThreshold));
+ ASSERT_GT(calculatedThreshold, previousThreshold);
+ previousThreshold = calculatedThreshold;
+ }
+ }
+}
+
+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) {
+ for (int i = 0; i < mChannelCount; i++) {
+ fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, ratio, threshold, kDefaultPostGain);
+ }
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+
+ if (threshold >= mInputDb) {
+ EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ } else {
+ float calculatedRatio = 0;
+ EXPECT_NO_FATAL_FAILURE(computeRatio(threshold, outputDb, calculatedRatio));
+ ASSERT_GT(calculatedRatio, previousRatio);
+ previousRatio = calculatedRatio;
+ }
+ }
+}
+
+TEST_P(DynamicsProcessingLimiterConfigDataTest, LimiterEnableDisable) {
+ std::vector<bool> limiterEnableValues = {false, true};
+ std::vector<float> output(mInput.size());
+ for (bool isEnabled : limiterEnableValues) {
+ 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));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ if (isEnabled) {
+ EXPECT_NE(mInputDb, calculateDb(output, kStartIndex));
+ } else {
+ EXPECT_NEAR(mInputDb, calculateDb(output, kStartIndex), 0.05);
+ }
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(DynamicsProcessingTest, DynamicsProcessingLimiterConfigDataTest,
+ 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;
+ });
+
/**
* Test DynamicsProcessing ChannelConfig
*/
@@ -673,19 +847,19 @@
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetPreEqChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetPostEqChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetMbcChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -715,12 +889,11 @@
enum EqBandConfigTestParamName {
EQ_BAND_INSTANCE_NAME,
EQ_BAND_CHANNEL,
- EQ_BAND_ENABLE,
EQ_BAND_CUT_OFF_FREQ,
EQ_BAND_GAIN
};
using EqBandConfigTestParams = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
- bool, std::vector<std::pair<int, float>>, float>;
+ std::vector<std::pair<int, float>>, float>;
void fillEqBandConfig(std::vector<DynamicsProcessing::EqBandConfig>& cfgs,
const EqBandConfigTestParams& params) {
@@ -730,7 +903,7 @@
for (int i = 0; i < bandCount; i++) {
cfgs[i].channel = std::get<EQ_BAND_CHANNEL>(params);
cfgs[i].band = cutOffFreqs[i].first;
- cfgs[i].enable = std::get<EQ_BAND_ENABLE>(params);
+ cfgs[i].enable = true /*Eqband Enable*/;
cfgs[i].cutoffFrequencyHz = cutOffFreqs[i].second;
cfgs[i].gainDb = std::get<EQ_BAND_GAIN>(params);
}
@@ -761,7 +934,7 @@
}
EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPreEqBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestEqBandConfig, SetAndGetPostEqBandConfig) {
@@ -774,7 +947,7 @@
}
EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPostEqBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
std::vector<std::vector<std::pair<int, float>>> kBands{
@@ -825,9 +998,8 @@
DynamicsProcessingTest, DynamicsProcessingTestEqBandConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 10), // channel ID
- testing::Bool(), // band enable
- testing::ValuesIn(kBands), // cut off frequencies
+ testing::Values(-1, 0, 10), // channel index
+ testing::ValuesIn(kBands), // band index, cut off frequencies
testing::Values(-3.14f, 3.14f) // gain
),
[](const auto& info) {
@@ -851,7 +1023,6 @@
enum MbcBandConfigParamName {
MBC_BAND_INSTANCE_NAME,
MBC_BAND_CHANNEL,
- MBC_BAND_ENABLE,
MBC_BAND_CUTOFF_FREQ,
MBC_BAND_ADDITIONAL
};
@@ -877,7 +1048,7 @@
{3, 10, 2, -2, -5, 90, 2.5, 2, 2}}};
using TestParamsMbcBandConfig =
- std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t, bool,
+ std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
std::vector<std::pair<int, float>>, TestParamsMbcBandConfigAdditional>;
void fillMbcBandConfig(std::vector<DynamicsProcessing::MbcBandConfig>& cfgs,
@@ -890,7 +1061,7 @@
cfgs[i] = DynamicsProcessing::MbcBandConfig{
.channel = std::get<MBC_BAND_CHANNEL>(params),
.band = cutOffFreqs[i].first,
- .enable = std::get<MBC_BAND_ENABLE>(params),
+ .enable = true /*Mbc Band Enable*/,
.cutoffFrequencyHz = cutOffFreqs[i].second,
.attackTimeMs = additional[MBC_ADD_ATTACK_TIME],
.releaseTimeMs = additional[MBC_ADD_RELEASE_TIME],
@@ -930,16 +1101,15 @@
}
EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addMbcBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestMbcBandConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 10), // channel count
- testing::Bool(), // enable
- testing::ValuesIn(kBands), // cut off frequencies
+ testing::Values(-1, 0, 10), // channel index
+ testing::ValuesIn(kBands), // band index, cut off frequencies
testing::ValuesIn(kMbcBandConfigAdditionalParam)), // Additional
[](const auto& info) {
auto descriptor = std::get<MBC_BAND_INSTANCE_NAME>(info.param).second;
diff --git a/common/aidl/Android.bp b/common/aidl/Android.bp
index 904a3d9..0ce52e7 100644
--- a/common/aidl/Android.bp
+++ b/common/aidl/Android.bp
@@ -26,7 +26,7 @@
],
},
cpp: {
- enabled: false,
+ enabled: true,
},
ndk: {
apex_available: [
diff --git a/common/fmq/aidl/Android.bp b/common/fmq/aidl/Android.bp
index 4a3658e..7fb6368 100644
--- a/common/fmq/aidl/Android.bp
+++ b/common/fmq/aidl/Android.bp
@@ -28,9 +28,8 @@
sdk_version: "module_current",
},
cpp: {
- // FMQ will not be supported in the cpp backend because the parcelables
- // are not stable enough for use in shared memory
- enabled: false,
+ // FMQ is only supported for PODs with the cpp backend
+ enabled: true,
},
ndk: {
apex_available: [
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index b3a3778..879758d 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -249,7 +249,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.health</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IHealth</name>
<instance>default</instance>
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index eabb603..cd8d83b 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -158,6 +158,7 @@
// Fastboot HAL is only used by recovery. Recovery is owned by OEM. Framework
// does not depend on this HAL, hence it is not declared in any manifests or matrices.
"android.hardware.fastboot@",
+ "android.hardware.security.see.storage",
};
static std::vector<std::string> excluded_exact{
@@ -167,6 +168,8 @@
"android.hardware.audio.core.sounddose@1",
"android.hardware.audio.core.sounddose@2",
"android.hardware.audio.core.sounddose@3",
+ // This is only used by a trusty VM
+ "android.hardware.security.see.authmgr@1",
// Deprecated HALs.
"android.hardware.audio.sounddose@3",
diff --git a/drm/aidl/vts/drm_hal_common.cpp b/drm/aidl/vts/drm_hal_common.cpp
index f0445a5..3636250 100644
--- a/drm/aidl/vts/drm_hal_common.cpp
+++ b/drm/aidl/vts/drm_hal_common.cpp
@@ -27,6 +27,7 @@
#include <android/binder_process.h>
#include <android/sharedmem.h>
#include <cutils/native_handle.h>
+#include <cutils/properties.h>
#include "drm_hal_clearkey_module.h"
#include "drm_hal_common.h"
@@ -193,6 +194,13 @@
GTEST_SKIP() << "No vendor module installed";
}
+ char bootloader_state[PROPERTY_VALUE_MAX] = {};
+ if (property_get("ro.boot.vbmeta.device_state", bootloader_state, "") != 0) {
+ if (!strcmp(bootloader_state, "unlocked")) {
+ GTEST_SKIP() << "Skip test because bootloader is unlocked";
+ }
+ }
+
if (drmInstance.find("IDrmFactory") != std::string::npos) {
drmFactory = IDrmFactory::fromBinder(
::ndk::SpAIBinder(AServiceManager_waitForService(drmInstance.c_str())));
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
deleted file mode 100644
index ffe2c3f..0000000
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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 GalileoAlmanac {
- long issueDate;
- int weekNumber;
- int toa;
- int iod;
- android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GalileoSatelliteAlmanac {
- int svId;
- android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoAlmanacSvHealth svHealth;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- int weekNumber;
- int toa;
- int iod;
- }
- @VintfStability
- parcelable GalileoAlmanacSvHealth {
- int fNavE5a;
- int iNavE5b;
- int iNavE1b;
- }
-}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
similarity index 90%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
rename to gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
index 6c645a6..b986be4 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -34,13 +34,15 @@
package android.hardware.gnss.gnss_assistance;
/* @hide */
@VintfStability
-parcelable QzssAlmanac {
- int qzssWeekNumber;
- int secondsOfQzssWeek;
- android.hardware.gnss.gnss_assistance.QzssAlmanac.QzssSatelliteAlmanac[] satelliteAlmanac;
+parcelable GnssAlmanac {
+ long issueDateMs;
+ int iod;
+ int weekNumber;
+ int toaSeconds;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac.GnssSatelliteAlmanac[] satelliteAlmanac;
@VintfStability
- parcelable QzssSatelliteAlmanac {
- int prn;
+ parcelable GnssSatelliteAlmanac {
+ int svid;
int svHealth;
double eccentricity;
double inclination;
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 98383ac..5f8fee7 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
@@ -36,10 +36,10 @@
@VintfStability
parcelable GnssAssistance {
android.hardware.gnss.gnss_assistance.GnssAssistance.GpsAssistance gpsAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.GlonassAssistance gloAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.GalileoAssistance galAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.BeidouAssistance bdsAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.QzssAssistance qzsAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.GlonassAssistance glonassAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.GalileoAssistance galileoAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.BeidouAssistance beidouAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.QzssAssistance qzssAssistance;
@VintfStability
parcelable GnssSatelliteCorrections {
int svid;
@@ -47,7 +47,7 @@
}
@VintfStability
parcelable GpsAssistance {
- android.hardware.gnss.gnss_assistance.GpsAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -58,7 +58,7 @@
}
@VintfStability
parcelable GalileoAssistance {
- android.hardware.gnss.gnss_assistance.GalileoAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.GalileoIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -77,7 +77,7 @@
}
@VintfStability
parcelable QzssAssistance {
- android.hardware.gnss.gnss_assistance.QzssAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -88,7 +88,7 @@
}
@VintfStability
parcelable BeidouAssistance {
- android.hardware.gnss.gnss_assistance.BeidouAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
deleted file mode 100644
index 1df485e..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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 Beidou almanac data.
- * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15.
- *
- * @hide
- */
-@VintfStability
-parcelable BeidouAlmanac {
- /**
- * Contains Beidou satellite almanac data.
- * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15.
- */
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- /** The PRN number of the Beidou satellite. */
- int prn;
-
- /** Satellite health (0=healthy, 1=unhealthy). */
- int svHealth;
-
- /** Almanac reference time in seconds. */
- int toaSeconds;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at reference time
- * in semi-circles.
- */
- double deltaI;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Beidou week number. */
- int beidouWeekNumber;
-
- /** Array of BeidouSatelliteAlmanac. */
- BeidouSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
index 025f402..48398ef 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
@@ -67,7 +67,7 @@
*/
int aode;
- /** Beidou week number. */
+ /** Beidou week number without rollover. */
int weekNumber;
/**
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
deleted file mode 100644
index db5dd04..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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 Galileo almanac data.
- * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10.
- *
- * @hide
- */
-@VintfStability
-parcelable GalileoAlmanac {
- /**
- * Contains Galileo satellite almanac data.
- * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10.
- */
- @VintfStability
- parcelable GalileoSatelliteAlmanac {
- /** Satellite ID. */
- int svId;
-
- /** Satellite health status. */
- GalileoAlmanacSvHealth svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Difference between the inclination angle at reference time and the
- * nominal inclination, in semi-circles.
- */
- double deltaI;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /**
- * Difference with respect to the square root of the nominal semi-major axis
- * in square root of meters.
- */
- double rootA;
-
- /** Satellite mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock correction bias in seconds. */
- double af0;
-
- /** Satellite clock correction linear in seconds per second. */
- double af1;
-
- /**
- * Almanac reference week number.
- * Modulo 4 representation of the Galileo system time week number.
- */
- int weekNumber;
-
- /** Almanac reference time in seconds. */
- int toa;
-
- /** Almanac issue of data. */
- int iod;
- }
-
- /**
- * Contains Galileo satellite health status.
- */
- @VintfStability
- parcelable GalileoAlmanacSvHealth {
- /** Satellite E5a signal health status. */
- int fNavE5a;
-
- /** Satellite E5b signal health status. */
- int iNavE5b;
-
- /** Satellite E1b signal health status. */
- int iNavE1b;
- }
-
- /** Almanac reference UTC time in milliseconds */
- long issueDate;
-
- /**
- * Almanac reference week number.
- * Modulo 4 representation of the Galileo system time week number.
- */
- int weekNumber;
-
- /** Almanac reference time in seconds. */
- int toa;
-
- /** Almanac issue of data. */
- int iod;
-
- /** Array of GalileoSatelliteAlmanac. */
- GalileoSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
new file mode 100644
index 0000000..e4f4bc8
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -0,0 +1,128 @@
+/*
+ * 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 almanac parameters for GPS, QZSS, Galileo, Beidou.
+ *
+ * For Beidou, this is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.15.
+ * For GPS, this is defined in IS-GPS-200 section 20.3.3.5.1.2.
+ * For QZSS, this is defined in IS-QZSS-PNT section 4.1.2.6.
+ * For Galileo, this is defined in Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ *
+ * @hide
+ */
+@VintfStability
+parcelable GnssAlmanac {
+ /**
+ * Almanac issue date in milliseconds since the Unix epoch.
+ *
+ * This is unused for GPS/QZSS/Baidou.
+ */
+ long issueDateMs;
+
+ /**
+ * Almanac issue of data.
+ * This is defined Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ * This is unused for GPS/QZSS/Baidou.
+ */
+ int iod;
+
+ /**
+ * Almanac reference week number.
+ *
+ * For GPS and QZSS, this is GPS week number (modulo 1024).
+ * For Beidou, this is Baidou week number (modulo 8192).
+ * For Galileo, this is modulo 4 representation of the Galileo week number.
+ */
+ int weekNumber;
+
+ /** Almanac reference time in seconds. */
+ int toaSeconds;
+
+ /**
+ * 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.
+ * For GPS, this is defined in IS-GPS-200 section 20.3.3.5.1.2.
+ * For QZSS, this is defined in IS-QZSS-PNT section 4.1.2.6.
+ * For Galileo, this is defined in Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ */
+ @VintfStability
+ parcelable GnssSatelliteAlmanac {
+ /** The PRN number of the GNSS satellite. */
+ int svid;
+
+ /**
+ * Satellite health information.
+ *
+ * For GPS, this is satellite subframe 4 and 5, page 25 6-bit health code as defined in
+ * IS-GPS-200 Table 20-VIII expressed in integer form.
+ *
+ * For QZSS, this is the 5-bit health code as defined in IS-QZSS-PNT, Table 4.1.2-5-2
+ * expressed in integer form.
+ *
+ * For Beidou, this is 1-bit health information. (0=healthy, 1=unhealthy).
+ *
+ * For Galileo, this is 6-bit health, bit 0 and 1 is for E5a, bit 2 and 3 is for E5b, bit
+ * 4 and 5 is for E1b.
+ */
+ int svHealth;
+
+ /** Eccentricity. */
+ double eccentricity;
+
+ /**
+ * Inclination in semi-circles.
+ *
+ * For GPS and Galileo, this is the difference between the inclination angle at reference
+ * time and the nominal inclination in semi-circles.
+ *
+ * For Beidou and QZSS, this is the inclination angle at reference time in semi-circles.
+ */
+ double inclination;
+
+ /** Argument of perigee in semi-circles. */
+ double omega;
+
+ /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
+ double omega0;
+
+ /** Rate of right ascension in semi-circles per second. */
+ double omegaDot;
+
+ /**
+ * Square root of semi-major axis in square root of meters.
+ *
+ * For Galileo, this is the difference with respect to the square root of the nominal
+ * semi-major axis in square root of meters.
+ */
+ double rootA;
+
+ /** Mean anomaly at reference time in semi-circles. */
+ double m0;
+
+ /** Satellite clock time bias correction coefficient in seconds. */
+ double af0;
+
+ /** Satellite clock time drift correction coefficient in seconds per second. */
+ double af1;
+ }
+
+ /** Array of GnssSatelliteAlmanac. */
+ GnssSatelliteAlmanac[] satelliteAlmanac;
+}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index dad0764..ddff848 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -16,19 +16,16 @@
package android.hardware.gnss.gnss_assistance;
-import android.hardware.gnss.gnss_assistance.BeidouAlmanac;
import android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris;
-import android.hardware.gnss.gnss_assistance.GalileoAlmanac;
import android.hardware.gnss.gnss_assistance.GalileoIonosphericModel;
import android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.GlonassAlmanac;
import android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris;
-import android.hardware.gnss.gnss_assistance.GpsAlmanac;
+import android.hardware.gnss.gnss_assistance.GnssAlmanac;
import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.IonosphericCorrection;
import android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel;
import android.hardware.gnss.gnss_assistance.LeapSecondsModel;
-import android.hardware.gnss.gnss_assistance.QzssAlmanac;
import android.hardware.gnss.gnss_assistance.QzssSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel;
import android.hardware.gnss.gnss_assistance.TimeModel;
@@ -65,7 +62,7 @@
@VintfStability
parcelable GpsAssistance {
/** The GPS almanac. */
- GpsAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -93,7 +90,7 @@
@VintfStability
parcelable GalileoAssistance {
/** The Galileo almanac. */
- GalileoAlmanac almanac;
+ GnssAlmanac almanac;
/** The Galileo ionospheric model. */
GalileoIonosphericModel ionosphericModel;
@@ -140,7 +137,7 @@
@VintfStability
parcelable QzssAssistance {
/** The QZSS almanac. */
- QzssAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -168,7 +165,7 @@
@VintfStability
parcelable BeidouAssistance {
/** The Beidou almanac. */
- BeidouAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -196,14 +193,14 @@
GpsAssistance gpsAssistance;
/** Glonass assistance. */
- GlonassAssistance gloAssistance;
+ GlonassAssistance glonassAssistance;
/** Galileo assistance. */
- GalileoAssistance galAssistance;
+ GalileoAssistance galileoAssistance;
/** Beidou assistance. */
- BeidouAssistance bdsAssistance;
+ BeidouAssistance beidouAssistance;
/** QZSS assistance. */
- QzssAssistance qzsAssistance;
+ QzssAssistance qzssAssistance;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
deleted file mode 100644
index 9cc37f9..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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 GPS almanac data.
- * This is defined in IS-GPS-200, section 20.3.3.5.1.2.
- *
- * @hide
- */
-@VintfStability
-parcelable GpsAlmanac {
- /** GPS week number. */
- int gpsWeekNumber;
-
- /** GPS time of week in seconds. */
- int secondsOfGpsWeek;
-
- /**
- * Contains GPS satellite almanac data.
- * This is defined in IS-GPS-200, section 20.3.3.5.1.2.
- */
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- /** The PRN number of the GPS satellite. */
- int prn;
-
- /**
- * Satellite health information.
- * The satellite subframe 4 and 5, page 25 six-bit health code as defined
- * in IS-GPS-200 Table 20-VIII expressed in integer form.
- */
- int svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at
- * reference time in semi-circles.
- */
- double inclination;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Array of GpsSatelliteAlmanac. */
- GpsSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
index 15003e7..441b61d 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
@@ -33,25 +33,25 @@
/** Eccentricity. */
double eccentricity;
- /** Inclination angle at reference time in semi-circles. */
+ /** Inclination angle at reference time in radians. */
double i0;
- /** Rate of change of inclination angle in semi-circles per second. */
+ /** Rate of change of inclination angle in radians per second. */
double iDot;
- /** Argument of perigee in semi-circles. */
+ /** Argument of perigee in radians. */
double omega;
- /** Longitude of ascending node of orbit plane at beginning of week in semi-circles. */
+ /** Longitude of ascending node of orbit plane at beginning of week in radians. */
double omega0;
- /** Rate of right ascension in semi-circles per second. */
+ /** Rate of right ascension in radians per second. */
double omegaDot;
- /** Mean anomaly at reference time in semi-circles. */
+ /** Mean anomaly at reference time in radians. */
double m0;
- /** Mean motion difference from computed value in semi-circles per second. */
+ /** Mean motion difference from computed value in radians per second. */
double deltaN;
/**
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
deleted file mode 100644
index 80ace39..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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 QZSS almanac data.
- * This is defined in IS-QZSS-PNT, section 4.1.2.6.
- *
- * @hide
- */
-@VintfStability
-parcelable QzssAlmanac {
- /** QZSS week number. */
- int qzssWeekNumber;
-
- /** QZSS time of week in seconds. */
- int secondsOfQzssWeek;
-
- /**
- * Contains QZSS satellite almanac data.
- * This is defined in IS-QZSS-PNT, section 4.1.2.6.
- */
- @VintfStability
- parcelable QzssSatelliteAlmanac {
- /** The PRN number of the QZSS satellite. */
- int prn;
-
- /**
- * Satellite health information.
- * This is the 5-bit health code as defined in IS-QZSS-PNT, Table 4.1.2-5-2
- * expressed in integer form.
- */
- int svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at
- * reference time in semi-circles.
- */
- double inclination;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Array of QzssSatelliteAlmanac. */
- QzssSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
index 2d9b3e6..8849401 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
@@ -28,7 +28,7 @@
/** The issue of ephemeris data. */
int iode;
- /** The satellite week number. */
+ /** The satellite week number without rollover. */
int weekNumber;
/** The broadcast time of ephemeris in GNSS time of week in seconds. */
diff --git a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index c807ffd..f779105 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -23,23 +23,23 @@
@Backing(type="int")
enum DisplayHotplugEvent {
/**
- * Display is successfully connected.
- * Connected may be called more than once and the behavior of subsequent
- * calls is that SurfaceFlinger queries the display properties again.
+ * Display was successfully connected.
+ * CONNECTED may be emitted more than once and the behavior of subsequent
+ * events is that SurfaceFlinger queries the display properties again.
*/
CONNECTED = 0,
- /** Display is successfully disconnected */
+ /** Display was successfully disconnected */
DISCONNECTED = 1,
- /** Display is plugged in, but an unknown error occurred */
+ /** Unknown error occurred */
ERROR_UNKNOWN = -1,
- /** Display is plugged in, but incompatible cable error detected */
+ /** Display was plugged in, but incompatible cable error detected */
ERROR_INCOMPATIBLE_CABLE = -2,
/**
- * Display is plugged in, but exceeds the max number of
+ * Display was plugged in, but exceeds the max number of
* displays that can be simultaneously connected
*/
ERROR_TOO_MANY_DISPLAYS = -3,
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl
index 040afd7..c522188 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl
@@ -41,6 +41,7 @@
int configGroup;
int vsyncPeriod;
@nullable android.hardware.graphics.composer3.VrrConfig vrrConfig;
+ android.hardware.graphics.composer3.OutputType hdrOutputType;
parcelable Dpi {
float x;
float y;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index 55604a6..adbc344 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -88,6 +88,7 @@
android.hardware.graphics.composer3.DisplayConfiguration[] getDisplayConfigurations(long display, int maxFrameIntervalNs);
oneway void notifyExpectedPresent(long display, in android.hardware.graphics.composer3.ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
int getMaxLayerPictureProfiles(long display);
+ oneway void startHdcpNegotiation(long display, in android.hardware.drm.HdcpLevels levels);
const int EX_BAD_CONFIG = 1;
const int EX_BAD_DISPLAY = 2;
const int EX_BAD_LAYER = 3;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/OutputType.aidl
similarity index 74%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/OutputType.aidl
index f42e1d0..e1149cb 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/OutputType.aidl
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -31,25 +31,11 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum OutputType {
+ INVALID = 0,
+ SYSTEM = 1,
+ SDR = 2,
+ HDR10 = 3,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl
index 09c42dc..80d1337 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl
@@ -15,6 +15,8 @@
*/
package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.OutputType;
import android.hardware.graphics.composer3.VrrConfig;
@VintfStability
@@ -67,4 +69,9 @@
* Non-VRR modes should set this to null.
*/
@nullable VrrConfig vrrConfig;
+
+ /**
+ * The HDR output format available.
+ */
+ OutputType hdrOutputType;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index edbb988..b4d2e7f 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -16,6 +16,7 @@
package android.hardware.graphics.composer3;
+import android.hardware.drm.HdcpLevels;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.hardware.graphics.common.Hdr;
import android.hardware.graphics.common.HdrConversionCapability;
@@ -938,4 +939,21 @@
* pipeline, a value of zero should be returned here.
*/
int getMaxLayerPictureProfiles(long display);
+
+ /**
+ * Supports HDCP lazy activation.
+ *
+ * When SurfaceFlinger detects secure layers, this method is called to instruct HWC side that
+ * HDCP negotiation process can be started.
+ *
+ * When HDCP is successfully started or failed to start, HWC reports the HDCP levels via
+ * IComposerCallback.onHdcpLevelsChanged().
+ *
+ * @param display is the display whose HDCP negotiation can be started.
+ * @param levels is the desired HDCP levels.
+ *
+ * @see IComposerCallback.onHdcpLevelsChanged
+ *
+ */
+ oneway void startHdcpNegotiation(long display, in HdcpLevels levels);
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
index 592ac50..393354e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
@@ -40,15 +40,16 @@
* For data precision, 32-bit float is used to specify a Lut by both the HWC and
* the platform.
*
- * For unflattening/flattening 3D Lut(s), the algorithm below should be observed
- * by both the HWC and the platform.
* Assuming that we have a 3D array `ORIGINAL[WIDTH, HEIGHT, DEPTH]`, we would turn it into
* `FLAT[WIDTH * HEIGHT * DEPTH]` by
*
* `FLAT[z + DEPTH * (y + HEIGHT * x)] = ORIGINAL[x, y, z]`
*
- * Noted that 1D Lut(s) should be gain curve ones
- * and 3D Lut(s) should be pure color lookup ones.
+ * Note that 1D Lut(s) should be gain curve ones and 3D Lut(s) should be pure color lookup
+ * ones. For 3D Luts buffer,the values of the lut buffer should be normalized, ranging from 0.0
+ * to 1.0, inclusively and the data is organized in the order of R, G, B channels.
+ * For 1D Luts, the lut's values should be also normalized for fixed point pixel formats,
+ * and we now ignore floating point pixel formats + extended range buffers.
*/
@nullable ParcelFileDescriptor pfd;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/OutputType.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/OutputType.aidl
new file mode 100644
index 0000000..bf4a786
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/OutputType.aidl
@@ -0,0 +1,42 @@
+/*
+ * 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.graphics.composer3;
+
+/**
+ * Display output formats for HDR content.
+ */
+@VintfStability
+@Backing(type="int")
+enum OutputType {
+ /**
+ * Invalid HDR output type
+ */
+ INVALID = 0,
+ /**
+ * Display output format will be chosen by the HAL implementation
+ * and will not adjust to match the content format
+ */
+ SYSTEM = 1,
+ /**
+ * Display supports SDR output type
+ */
+ SDR = 2,
+ /**
+ * Display supports HDR10 output type
+ */
+ HDR10 = 3,
+}
diff --git a/graphics/composer/aidl/vts/Android.bp b/graphics/composer/aidl/vts/Android.bp
index 894ca52..61c2593 100644
--- a/graphics/composer/aidl/vts/Android.bp
+++ b/graphics/composer/aidl/vts/Android.bp
@@ -71,6 +71,7 @@
"libarect",
"libbase",
"libfmq",
+ "libgmock",
"libgtest",
"libmath",
"librenderengine",
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 8006523..2c53377 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -22,6 +22,7 @@
#include <aidl/android/hardware/graphics/common/PixelFormat.h>
#include <aidl/android/hardware/graphics/common/Rect.h>
#include <aidl/android/hardware/graphics/composer3/Composition.h>
+#include <aidl/android/hardware/graphics/composer3/OutputType.h>
#include <aidl/android/hardware/graphics/composer3/IComposer.h>
#include <android-base/properties.h>
#include <android/binder_process.h>
@@ -29,6 +30,7 @@
#include <android/hardware/graphics/composer3/ComposerClientWriter.h>
#include <binder/ProcessState.h>
#include <cutils/ashmem.h>
+#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ui/Fence.h>
#include <ui/GraphicBuffer.h>
@@ -47,6 +49,8 @@
#undef LOG_TAG
#define LOG_TAG "VtsHalGraphicsComposer3_TargetTest"
+using testing::Ge;
+
namespace aidl::android::hardware::graphics::composer3::vts {
using namespace std::chrono_literals;
@@ -1265,6 +1269,16 @@
EXPECT_TRUE(status.isOk());
EXPECT_FALSE(displayConfigurations.empty());
+ const bool areAllModesARR =
+ std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
+ [](const auto& config) { return config.vrrConfig.has_value(); });
+
+ const bool areAllModesMRR =
+ std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
+ [](const auto& config) { return !config.vrrConfig.has_value(); });
+
+ EXPECT_TRUE(areAllModesARR || areAllModesMRR) << "Mixing MRR and ARR modes is not allowed";
+
for (const auto& displayConfig : displayConfigurations) {
EXPECT_NE(-1, displayConfig.width);
EXPECT_NE(-1, displayConfig.height);
@@ -1399,14 +1413,6 @@
}
}
-TEST_P(GraphicsComposerAidlV3Test, GetMaxLayerPictureProfiles) {
- for (const auto& display : mDisplays) {
- const auto& [status, maxPorfiles] =
- mComposerClient->getMaxLayerPictureProfiles(display.getDisplayId());
- EXPECT_TRUE(status.isOk());
- }
-}
-
// Tests for Command.
class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
protected:
@@ -3239,19 +3245,44 @@
});
}
-TEST_P(GraphicsComposerAidlCommandV3Test, getMaxLayerPictureProfiles_success) {
+class GraphicsComposerAidlCommandV4Test : public GraphicsComposerAidlCommandTest {
+ protected:
+ void SetUp() override {
+ GraphicsComposerAidlTest::SetUp();
+ if (getInterfaceVersion() <= 3) {
+ GTEST_SKIP() << "Device interface version is expected to be >= 4";
+ }
+ }
+};
+
+TEST_P(GraphicsComposerAidlCommandV4Test, getMaxLayerPictureProfiles_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
continue;
}
const auto& [status, maxProfiles] =
- mComposerClient->getMaxLayerPictureProfiles(getPrimaryDisplayId());
+ mComposerClient->getMaxLayerPictureProfiles(displayId);
EXPECT_TRUE(status.isOk());
+ EXPECT_THAT(maxProfiles, Ge(0));
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setDisplayPictureProfileId_success) {
+TEST_P(GraphicsComposerAidlCommandV4Test, getMaxLayerPictureProfiles_unsupported) {
+ for (auto& display : mDisplays) {
+ int64_t displayId = display.getDisplayId();
+ if (hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+ continue;
+ }
+ const auto& [status, maxProfiles] =
+ mComposerClient->getMaxLayerPictureProfiles(displayId);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_NO_FATAL_FAILURE(
+ assertServiceSpecificError(status, IComposerClient::EX_UNSUPPORTED));
+ }
+}
+
+TEST_P(GraphicsComposerAidlCommandV4Test, setDisplayPictureProfileId_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3262,7 +3293,7 @@
const auto layer = createOnScreenLayer(display);
const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
ASSERT_NE(nullptr, buffer->handle);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setDisplayPictureProfileId(displayId, PictureProfileId(1));
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
@@ -3271,7 +3302,7 @@
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_success) {
+TEST_P(GraphicsComposerAidlCommandV4Test, setLayerPictureProfileId_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3289,14 +3320,14 @@
ASSERT_NE(nullptr, buffer->handle);
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(1));
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_failsWithTooManyProfiles) {
+TEST_P(GraphicsComposerAidlCommandV4Test, setLayerPictureProfileId_failsWithTooManyProfiles) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3315,7 +3346,7 @@
ASSERT_NE(nullptr, buffer->handle);
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(profileId));
}
execute();
@@ -3325,16 +3356,6 @@
}
}
-class GraphicsComposerAidlCommandV4Test : public GraphicsComposerAidlCommandTest {
- protected:
- void SetUp() override {
- GraphicsComposerAidlTest::SetUp();
- if (getInterfaceVersion() <= 3) {
- GTEST_SKIP() << "Device interface version is expected to be >= 4";
- }
- }
-};
-
TEST_P(GraphicsComposerAidlCommandV4Test, SetUnsupportedLayerLuts) {
auto& writer = getWriter(getPrimaryDisplayId());
const auto& [layerStatus, layer] =
@@ -3373,6 +3394,19 @@
}
}
+TEST_P(GraphicsComposerAidlCommandV4Test, GetDisplayConfigurations_hasHdrType) {
+ for (const auto& display : mDisplays) {
+ const auto& [status, displayConfigurations] =
+ mComposerClient->getDisplayConfigurations(display.getDisplayId());
+ EXPECT_TRUE(status.isOk());
+ EXPECT_FALSE(displayConfigurations.empty());
+
+ for (const auto& displayConfig : displayConfigurations) {
+ EXPECT_NE(displayConfig.hdrOutputType, OutputType::INVALID);
+ }
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, GraphicsComposerAidlCommandTest,
diff --git a/health/aidl/Android.bp b/health/aidl/Android.bp
index 97de0e2..d2ad3b1 100644
--- a/health/aidl/Android.bp
+++ b/health/aidl/Android.bp
@@ -50,9 +50,8 @@
version: "3",
imports: [],
},
-
],
- frozen: true,
+ frozen: false,
}
@@ -84,7 +83,7 @@
name: "android.hardware.health-translate-ndk",
defaults: ["android.hardware.health-translate-ndk_defaults"],
shared_libs: [
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
],
}
@@ -101,7 +100,7 @@
name: "android.hardware.health-translate-java",
srcs: ["android/hardware/health/Translate.java"],
libs: [
- "android.hardware.health-V3-java",
+ "android.hardware.health-V4-java",
"android.hardware.health-V2.0-java",
"android.hardware.health-V2.1-java",
],
diff --git a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/BatteryPartStatus.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/BatteryPartStatus.aidl
index e013e31..9303767 100644
--- a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/BatteryPartStatus.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/BatteryPartStatus.aidl
@@ -34,7 +34,7 @@
package android.hardware.health;
@Backing(type="int") @VintfStability
enum BatteryPartStatus {
- UNSUPPORTED,
- ORIGINAL,
- REPLACED,
+ UNSUPPORTED = 0,
+ ORIGINAL = 1,
+ REPLACED = 2,
}
diff --git a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
index bfa1475..548a793 100644
--- a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
@@ -60,5 +60,6 @@
android.hardware.health.BatteryChargingState chargingState;
android.hardware.health.BatteryChargingPolicy chargingPolicy;
@nullable android.hardware.health.BatteryHealthData batteryHealthData;
+ @nullable android.hardware.health.HingeInfo[] foldInfos;
const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = (-1) /* -1 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HingeInfo.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HingeInfo.aidl
index f42e1d0..b3c38ad 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HingeInfo.aidl
@@ -31,25 +31,9 @@
// 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 */
+package android.hardware.health;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable HingeInfo {
+ int numTimesFolded;
+ int expectedHingeLifespan;
}
diff --git a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/IHealth.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/IHealth.aidl
index b49dfff..e919f14 100644
--- a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/IHealth.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/IHealth.aidl
@@ -49,6 +49,7 @@
void setChargingPolicy(android.hardware.health.BatteryChargingPolicy in_value);
android.hardware.health.BatteryChargingPolicy getChargingPolicy();
android.hardware.health.BatteryHealthData getBatteryHealthData();
+ android.hardware.health.HingeInfo[] getHingeInfo();
const int STATUS_UNKNOWN = 2;
const int STATUS_CALLBACK_DIED = 4;
}
diff --git a/health/aidl/android/hardware/health/HealthInfo.aidl b/health/aidl/android/hardware/health/HealthInfo.aidl
index af84089..12a397a 100644
--- a/health/aidl/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/android/hardware/health/HealthInfo.aidl
@@ -24,6 +24,7 @@
import android.hardware.health.BatteryStatus;
import android.hardware.health.DiskStats;
import android.hardware.health.StorageInfo;
+import android.hardware.health.HingeInfo;
/**
* Health Information.
@@ -115,7 +116,6 @@
* Battery capacity level. See {@link BatteryCapacityLevel} for more details.
*/
BatteryCapacityLevel batteryCapacityLevel;
-
/**
* Value of {@link #batteryChargeTimeToFullNowSeconds} if it is not
* supported.
@@ -148,4 +148,8 @@
* Battery health data
*/
@nullable BatteryHealthData batteryHealthData;
+ /**
+ * Information about foldable hinge health. Will be an empty vector if no hinges present
+ */
+ @nullable HingeInfo[] foldInfos;
}
diff --git a/health/aidl/android/hardware/health/HingeInfo.aidl b/health/aidl/android/hardware/health/HingeInfo.aidl
new file mode 100644
index 0000000..19b46df
--- /dev/null
+++ b/health/aidl/android/hardware/health/HingeInfo.aidl
@@ -0,0 +1,37 @@
+/*
+ * 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.health;
+
+/*
+ * Information on foldable hinge health life time estimates, end of life
+ * information and other attributes.
+ *
+ * All integers in this struct must be interpreted as non-negative.
+ */
+@VintfStability
+parcelable HingeInfo {
+ /**
+ * returns count of times a given hinge has been folded.
+ *
+ * opening fully counts as 1 fold and closing fully counts as another
+ */
+ int numTimesFolded;
+ /**
+ * returns the expected lifespan of hinge in units of number of folds
+ */
+ int expectedHingeLifespan;
+}
diff --git a/health/aidl/android/hardware/health/IHealth.aidl b/health/aidl/android/hardware/health/IHealth.aidl
index bdfe07a..c88141c 100644
--- a/health/aidl/android/hardware/health/IHealth.aidl
+++ b/health/aidl/android/hardware/health/IHealth.aidl
@@ -23,6 +23,7 @@
import android.hardware.health.HealthInfo;
import android.hardware.health.IHealthInfoCallback;
import android.hardware.health.StorageInfo;
+import android.hardware.health.HingeInfo;
/**
* IHealth manages health info and posts events on registered callbacks.
@@ -242,4 +243,17 @@
* for other errors.
*/
BatteryHealthData getBatteryHealthData();
+
+ /**
+ * Get Hinge info.
+ *
+ * @return vector of HingeInfo structs if successful.
+ * If error:
+ * - Return exception with code EX_UNSUPPORTED_OPERATION
+ * if this property is not supported,
+ * - Return service specific error with code STATUS_UNKNOWN
+ * for other errors.
+ */
+ HingeInfo[] getHingeInfo();
+
}
diff --git a/health/aidl/default/Android.bp b/health/aidl/default/Android.bp
index 2071f08..cc5d0a0 100644
--- a/health/aidl/default/Android.bp
+++ b/health/aidl/default/Android.bp
@@ -29,7 +29,7 @@
"libcutils",
"liblog",
"libutils",
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
// TODO(b/177269435): remove when BatteryMonitor works with AIDL HealthInfo.
"libhidlbase",
@@ -48,7 +48,7 @@
name: "libhealth_aidl_charger_defaults",
shared_libs: [
// common
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
"libbase",
"libcutils",
"liblog",
@@ -195,7 +195,7 @@
"service_fuzzer_defaults",
],
static_libs: [
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
"libbase",
"liblog",
"fuzz_libhealth_aidl_impl",
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp
index 37662ea..d0e2dac 100644
--- a/health/aidl/default/Health.cpp
+++ b/health/aidl/default/Health.cpp
@@ -192,6 +192,12 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
+ndk::ScopedAStatus Health::getHingeInfo(std::vector<HingeInfo>*) {
+ // This implementation does not support HingeInfo. An implementation may extend this
+ // class and override this function to support storage info.
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
ndk::ScopedAStatus Health::getHealthInfo(HealthInfo* out) {
battery_monitor_.updateValues();
diff --git a/health/aidl/default/android.hardware.health-service.example.xml b/health/aidl/default/android.hardware.health-service.example.xml
index 2acaaba..8ddfbda 100644
--- a/health/aidl/default/android.hardware.health-service.example.xml
+++ b/health/aidl/default/android.hardware.health-service.example.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.health</name>
- <version>3</version>
+ <version>4</version>
<fqname>IHealth/default</fqname>
</hal>
</manifest>
diff --git a/health/aidl/default/include/health-impl/Health.h b/health/aidl/default/include/health-impl/Health.h
index 429ae2a..96df517 100644
--- a/health/aidl/default/include/health-impl/Health.h
+++ b/health/aidl/default/include/health-impl/Health.h
@@ -72,6 +72,7 @@
// The default implementations return nothing in |out|.
ndk::ScopedAStatus getDiskStats(std::vector<DiskStats>* out) override;
ndk::ScopedAStatus getStorageInfo(std::vector<StorageInfo>* out) override;
+ ndk::ScopedAStatus getHingeInfo(std::vector<HingeInfo>* out) override;
ndk::ScopedAStatus setChargingPolicy(BatteryChargingPolicy in_value) override;
ndk::ScopedAStatus getChargingPolicy(BatteryChargingPolicy* out) override;
diff --git a/health/aidl/vts/functional/Android.bp b/health/aidl/vts/functional/Android.bp
index 25ba5f8..75bec97 100644
--- a/health/aidl/vts/functional/Android.bp
+++ b/health/aidl/vts/functional/Android.bp
@@ -40,7 +40,7 @@
"libbinder_ndk",
],
static_libs: [
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
"libgmock",
],
header_libs: [
diff --git a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
index 45a1e40..c47ddca 100644
--- a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
+++ b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
@@ -360,6 +360,19 @@
}
/*
+ * Tests the values returned by getHingeInfo() from interface IHealth.
+ */
+TEST_P(HealthAidl, getHingeInfo) {
+ std::vector<HingeInfo> value;
+ auto status = health->getHingeInfo(&value);
+ ASSERT_THAT(status, AnyOf(IsOk(), ExceptionIs(EX_UNSUPPORTED_OPERATION)));
+ if (!status.isOk()) return;
+ for (auto& hinge : value) {
+ ASSERT_TRUE(hinge.expectedHingeLifespan > 0);
+ }
+}
+
+/*
* Tests the values returned by getDiskStats() from interface IHealth.
*/
TEST_P(HealthAidl, getDiskStats) {
diff --git a/health/utils/libhealthshim/Android.bp b/health/utils/libhealthshim/Android.bp
index b0ea743..9f9970f 100644
--- a/health/utils/libhealthshim/Android.bp
+++ b/health/utils/libhealthshim/Android.bp
@@ -34,7 +34,7 @@
"-Werror",
],
static_libs: [
- "android.hardware.health-V3-ndk",
+ "android.hardware.health-V4-ndk",
"android.hardware.health-translate-ndk",
"android.hardware.health@1.0",
"android.hardware.health@2.0",
diff --git a/health/utils/libhealthshim/include/health-shim/shim.h b/health/utils/libhealthshim/include/health-shim/shim.h
index ff6849b..9a62601 100644
--- a/health/utils/libhealthshim/include/health-shim/shim.h
+++ b/health/utils/libhealthshim/include/health-shim/shim.h
@@ -43,6 +43,7 @@
ndk::ScopedAStatus getEnergyCounterNwh(int64_t* _aidl_return) override;
ndk::ScopedAStatus getChargeStatus(BatteryStatus* _aidl_return) override;
ndk::ScopedAStatus getStorageInfo(std::vector<StorageInfo>* _aidl_return) override;
+ ndk::ScopedAStatus getHingeInfo(std::vector<HingeInfo>* _aidl_return) override;
ndk::ScopedAStatus getDiskStats(std::vector<DiskStats>* _aidl_return) override;
ndk::ScopedAStatus getHealthInfo(HealthInfo* _aidl_return) override;
ndk::ScopedAStatus setChargingPolicy(BatteryChargingPolicy in_value) override;
diff --git a/health/utils/libhealthshim/shim.cpp b/health/utils/libhealthshim/shim.cpp
index a5ba919..2ddf97e 100644
--- a/health/utils/libhealthshim/shim.cpp
+++ b/health/utils/libhealthshim/shim.cpp
@@ -190,6 +190,10 @@
return ReturnAndResultToStatus(ret, out_result);
}
+ScopedAStatus HealthShim::getHingeInfo(std::vector<HingeInfo>* /*out*/) {
+ return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
ScopedAStatus HealthShim::getDiskStats(std::vector<DiskStats>* out) {
Result out_result = Result::UNKNOWN;
auto ret = service_->getDiskStats([out, &out_result](auto result, const auto& value) {
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 51afa12..3aa5d76 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -83,6 +83,16 @@
// additional overhead, for the digest algorithmIdentifier required by PKCS#1.
const size_t kPkcs1UndigestedSignaturePaddingOverhead = 11;
+// Determine whether the key description is for an asymmetric key.
+bool is_asymmetric(const AuthorizationSet& key_desc) {
+ auto algorithm = key_desc.GetTagValue(TAG_ALGORITHM);
+ if (algorithm && (algorithm.value() == Algorithm::RSA || algorithm.value() == Algorithm::EC)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
size_t count_tag_invalid_entries(const std::vector<KeyParameter>& authorizations) {
return std::count_if(authorizations.begin(), authorizations.end(),
[](const KeyParameter& e) -> bool { return e.tag == Tag::INVALID; });
@@ -418,11 +428,14 @@
vector<Certificate> attest_cert_chain;
// If an attestation is requested, but the system is RKP-only, we need to supply an explicit
// attestation key. Else the result is a key without an attestation.
- // If the RKP-only value is undeterminable (i.e., when running on GSI), generate and use the
- // attest key anyways. In the case that using an attest key is not supported
- // (shouldSkipAttestKeyTest), assume the device has factory keys (so not RKP-only).
+ // - If the RKP-only value is undeterminable (i.e., when running on GSI), generate and use the
+ // `ATTEST_KEY` anyways.
+ // - In the case that using an `ATTEST_KEY` is not supported
+ // (shouldSkipAttestKeyTest), assume the device has factory keys (so not RKP-only).
+ // - If the key being generated is a symmetric key (from test cases that check that the
+ // attestation parameters are correctly ignored), don't try to use an `ATTEST_KEY`.
if (isRkpOnly().value_or(true) && key_desc.Contains(TAG_ATTESTATION_CHALLENGE) &&
- !shouldSkipAttestKeyTest()) {
+ !shouldSkipAttestKeyTest() && is_asymmetric(key_desc)) {
AuthorizationSet attest_key_desc =
AuthorizationSetBuilder().EcdsaKey(EcCurve::P_256).AttestKey().SetDefaultValidity();
attest_key.emplace();
@@ -462,10 +475,7 @@
*key_characteristics = std::move(creationResult.keyCharacteristics);
*cert_chain = std::move(creationResult.certificateChain);
- auto algorithm = key_desc.GetTagValue(TAG_ALGORITHM);
- EXPECT_TRUE(algorithm);
- if (algorithm &&
- (algorithm.value() == Algorithm::RSA || algorithm.value() == Algorithm::EC)) {
+ if (is_asymmetric(key_desc)) {
EXPECT_GE(cert_chain->size(), 1);
if (key_desc.Contains(TAG_ATTESTATION_CHALLENGE)) {
if (attest_key) {
@@ -506,10 +516,7 @@
*key_characteristics = std::move(creationResult.keyCharacteristics);
cert_chain_ = std::move(creationResult.certificateChain);
- auto algorithm = key_desc.GetTagValue(TAG_ALGORITHM);
- EXPECT_TRUE(algorithm);
- if (algorithm &&
- (algorithm.value() == Algorithm::RSA || algorithm.value() == Algorithm::EC)) {
+ if (is_asymmetric(key_desc)) {
EXPECT_GE(cert_chain_.size(), 1);
if (key_desc.Contains(TAG_ATTESTATION_CHALLENGE)) EXPECT_GT(cert_chain_.size(), 1);
} else {
@@ -554,10 +561,7 @@
for (auto& entry : key_characteristics_) {
allAuths.push_back(AuthorizationSet(entry.authorizations));
}
- auto algorithm = allAuths.GetTagValue(TAG_ALGORITHM);
- EXPECT_TRUE(algorithm);
- if (algorithm &&
- (algorithm.value() == Algorithm::RSA || algorithm.value() == Algorithm::EC)) {
+ if (is_asymmetric(allAuths)) {
EXPECT_GE(cert_chain_.size(), 1);
} else {
// For symmetric keys there should be no certificates.
diff --git a/security/see/authmgr/aidl/Android.bp b/security/see/authmgr/aidl/Android.bp
new file mode 100644
index 0000000..a32d4e9
--- /dev/null
+++ b/security/see/authmgr/aidl/Android.bp
@@ -0,0 +1,57 @@
+// 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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+aidl_interface {
+ name: "android.hardware.security.see.authmgr",
+ vendor_available: true,
+ srcs: [
+ "android/hardware/security/see/authmgr/*.aidl",
+ ],
+ stability: "vintf",
+ frozen: false,
+ backend: {
+ java: {
+ platform_apis: true,
+ },
+ ndk: {
+ enabled: true,
+ },
+ rust: {
+ enabled: true,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
+ },
+ },
+}
+
+// A rust_defaults that includes the latest authmgr AIDL library.
+// Modules that depend on authmgr directly can include this rust_defaults to avoid
+// managing dependency versions explicitly.
+rust_defaults {
+ name: "authmgr_use_latest_hal_aidl_rust",
+ rustlibs: [
+ "android.hardware.security.see.authmgr-V1-rust",
+ ],
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
index f42e1d0..b775f95 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
@@ -31,25 +31,8 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DiceChainEntry {
+ byte[] diceChainEntry;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
index f42e1d0..0f61900 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
@@ -31,25 +31,9 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DiceLeafArtifacts {
+ android.hardware.security.see.authmgr.DiceChainEntry diceLeaf;
+ android.hardware.security.see.authmgr.DicePolicy diceLeafPolicy;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
index f42e1d0..f434c3c 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
@@ -31,25 +31,8 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DicePolicy {
+ byte[] dicePolicy;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
similarity index 66%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
index f42e1d0..9e6a501 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
@@ -31,25 +31,24 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@Backing(type="int") @VintfStability
+enum Error {
+ OK = 0,
+ AUTHENTICATION_ALREADY_STARTED = (-1) /* -1 */,
+ INSTANCE_ALREADY_AUTHENTICATED = (-2) /* -2 */,
+ INVALID_DICE_CERT_CHAIN = (-3) /* -3 */,
+ INVALID_DICE_LEAF = (-4) /* -4 */,
+ INVALID_DICE_POLICY = (-5) /* -5 */,
+ DICE_POLICY_MATCHING_FAILED = (-6) /* -6 */,
+ SIGNATURE_VERIFICATION_FAILED = (-7) /* -7 */,
+ CONNECTION_HANDOVER_FAILED = (-8) /* -8 */,
+ CONNECTION_NOT_AUTHENTICATED = (-9) /* -9 */,
+ NO_CONNECTION_TO_AUTHORIZE = (-10) /* -10 */,
+ INVALID_INSTANCE_IDENTIFIER = (-11) /* -11 */,
+ MEMORY_ALLOCATION_FAILED = (-12) /* -12 */,
+ INSTANCE_PENDING_DELETION = (-13) /* -13 */,
+ CLIENT_PENDING_DELETION = (-14) /* -14 */,
+ AUTHENTICATION_NOT_STARTED = (-15) /* -15 */,
+ INSTANCE_CONTEXT_CREATION_DENIED = (-16) /* -16 */,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
index f42e1d0..18d90eb 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
@@ -31,25 +31,8 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable ExplicitKeyDiceCertChain {
+ byte[] diceCertChain;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
similarity index 73%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
index f42e1d0..a120b49 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.security.see.authmgr;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface IAuthMgrAuthorization {
+ byte[32] initAuthentication(in android.hardware.security.see.authmgr.ExplicitKeyDiceCertChain diceCertChain, in @nullable byte[] instanceIdentifier);
+ void completeAuthentication(in android.hardware.security.see.authmgr.SignedConnectionRequest signedConnectionRequest, in android.hardware.security.see.authmgr.DicePolicy dicePolicy);
+ void authorizeAndConnectClientToTrustedService(in byte[] clientID, String serviceName, in byte[32] token, in android.hardware.security.see.authmgr.DiceLeafArtifacts clientDiceArtifacts);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
index f42e1d0..46d8373 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
@@ -31,25 +31,8 @@
// 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 BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable SignedConnectionRequest {
+ byte[] signedConnectionRequest;
}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl
new file mode 100644
index 0000000..3b4a35b
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl
@@ -0,0 +1,31 @@
+/*
+ * 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.security.see.authmgr;
+
+/**
+ * A CBOR encoded DICE certificate.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DiceChainEntry {
+ /**
+ * Data is CBOR encoded according to the `DiceChainEntry` CDDL in
+ * hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/
+ * generateCertificateRequestV2.cddl
+ */
+ byte[] diceChainEntry;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
new file mode 100644
index 0000000..333096f
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.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.security.see.authmgr;
+
+import android.hardware.security.see.authmgr.DiceChainEntry;
+import android.hardware.security.see.authmgr.DicePolicy;
+
+/**
+ * This contains the DICE certificate and the DICE policy created for the client by the AuthMgr FE.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DiceLeafArtifacts {
+ DiceChainEntry diceLeaf;
+ DicePolicy diceLeafPolicy;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl
new file mode 100644
index 0000000..4b55330
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl
@@ -0,0 +1,31 @@
+/*
+ * 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.security.see.authmgr;
+
+/**
+ * DICE policy - CBOR encoded according to DicePolicy.cddl.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DicePolicy {
+ /**
+ * Data is CBOR encoded according to the `DicePolicy` CDDL in
+ * hardware/interfaces/security/authgraph/aidl/android/hardware/security/authgraph/
+ * DicePolicy.cddl
+ */
+ byte[] dicePolicy;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.aidl
new file mode 100644
index 0000000..f7c3592
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.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.security.see.authmgr;
+
+/**
+ * AuthMgr error codes. Aidl will return these error codes as service specific errors in
+ * EX_SERVICE_SPECIFIC.
+ */
+@VintfStability
+@Backing(type="int")
+enum Error {
+ /** Success */
+ OK = 0,
+
+ /** Duplicated attempt to start authentication from the same transport ID */
+ AUTHENTICATION_ALREADY_STARTED = -1,
+
+ /** Duplicated authenticated attempt with the same instance ID */
+ INSTANCE_ALREADY_AUTHENTICATED = -2,
+
+ /** Invalid DICE certificate chain of the AuthMgr FE */
+ INVALID_DICE_CERT_CHAIN = -3,
+
+ /** Invalid DICE leaf of the client */
+ INVALID_DICE_LEAF = -4,
+
+ /** Invalid DICE policy */
+ INVALID_DICE_POLICY = -5,
+
+ /** The DICE chain to policy matching failed */
+ DICE_POLICY_MATCHING_FAILED = -6,
+
+ /** Invalid signature */
+ SIGNATURE_VERIFICATION_FAILED = -7,
+
+ /** Failed to handover the connection to the trusted service */
+ CONNECTION_HANDOVER_FAILED = -8,
+
+ /**
+ * An authentication required request (e.g. phase 2) is invoked on a non-authenticated
+ * connection
+ */
+ CONNECTION_NOT_AUTHENTICATED = -9,
+
+ /** There is no pending connection with a matching token to authorize in phase 2 */
+ NO_CONNECTION_TO_AUTHORIZE = -10,
+
+ /** Invalid instance identifier */
+ INVALID_INSTANCE_IDENTIFIER = -11,
+
+ /** Failed to allocate memory */
+ MEMORY_ALLOCATION_FAILED = -12,
+
+ /** An instance which is pending deletion is trying to authenticate */
+ INSTANCE_PENDING_DELETION = -13,
+
+ /** A client which is pending deletion is trying to authorize */
+ CLIENT_PENDING_DELETION = -14,
+
+ /** Trying to complete authentication for an instance for which authentication is not started */
+ AUTHENTICATION_NOT_STARTED = -15,
+
+ /** Creation of the pVM instance's context in the secure storage is not allowed */
+ INSTANCE_CONTEXT_CREATION_DENIED = -16,
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
new file mode 100644
index 0000000..de23530
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
@@ -0,0 +1,31 @@
+/*
+ * 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.security.see.authmgr;
+
+/**
+ * DICE certificate chain - CBOR encoded according to ExplicitKeyDiceCertChain.cddl.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable ExplicitKeyDiceCertChain {
+ /**
+ * Data is CBOR encoded according to the `ExplicitKeyDiceCertChain` CDDL in
+ * hardware/interfaces/security/authgraph/aidl/android/hardware/security/authgraph/
+ * ExplicitKeyDiceCertChain.cddl
+ */
+ byte[] diceCertChain;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
new file mode 100644
index 0000000..43c3bde
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
@@ -0,0 +1,276 @@
+/*
+ * 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.security.see.authmgr;
+
+import android.hardware.security.see.authmgr.DiceLeafArtifacts;
+import android.hardware.security.see.authmgr.DicePolicy;
+import android.hardware.security.see.authmgr.ExplicitKeyDiceCertChain;
+import android.hardware.security.see.authmgr.SignedConnectionRequest;
+
+/**
+ * This is the interface to be implemented by an AuthMgr backend component (AuthMgr BE), in order to
+ * allow the AuthMgr frontend component (AuthMgr FE) in a pVM instance to authenticate itself and
+ * to authorize one or more clients in the pVM instance, in order to let the clients access
+ * trusted services in the Trusted Execution Environment (TEE).
+ *
+ * The following assumptions must be true for the underlying IPC mechanism and the transport layer:
+ * 1. Both parties should be able to retrieve a non-spoofable identifier of the other party from
+ * the transport layer (a.k.a transport ID or vM ID), which stays the same throughout a given
+ * boot cycle of a pVM instance. This is important to prevent person-in-the-middle (PITM)
+ * attacks and to authorize a new connection from a pVM instance based on an already
+ * authenicated connection from the same pVM instance.
+ *
+ * 2. Each of AuthMgr FE and the AuthMgr BE should be able to hand over a connection that is
+ * setup between them to another party so that such connection can be used for communication
+ * between the two new parties subsequently. This is important to be able to handover an
+ * authorized connection established between the AuthMgr FE and the AuthMgr BE to a client in
+ * in a pVM instance and a trusted service in TEE respectively.
+ *
+ * 3. This API should be exposed over an IPC mechanism that supports statefull connections. This
+ * is important for the AuthMgr FE to setup an authenicated connection once per boot cycle
+ * and reuse it to authorize multiple client connections afterwards, if needed.
+ *
+ * 4. AuthMgr FE has a mechanism for discovering and establishing a connection to the trusted
+ * AuthMgr BE. Based on this assumptionson, mutual authentication is not covered by this
+ * API.
+ *
+ * The AuthMgr authorization protocol consists of two phases:
+ * 1. Phase 1 authenticates the AuthMgr FE to the AuthMgr BE via the first two methods of this
+ * API: `initAuthentication` and `completeAuthentication`. At the end of the successful
+ * excecution of phase 1, the AuthMgr FE and the AuthMgr BE have an authenticated connection
+ * established between them. Phase 1 also enforces rollback protection on AuthMgr FE in
+ * addition to authentication.
+ *
+ * Authentication is performed by verifying the AuthMgr FE's signature on the challenge
+ * issued by the AuthMgr BE. The public signing key of the AuthMgr FE is obtained from the
+ * validated DICE certificate chain for verifying the signature. Rollback protection is
+ * enforced by matching the DICE certificate chain against the stored DICE policy.
+ * AuthMgr FE uses this authenticated connection throughout the boot cycle of the pVM to send
+ * phase 2 requests to the AuthMgr BE. Therefore, phase 1 needs to be executed only once per
+ * boot cycle of the pVM. AuthMgr BE should take measures to prevent any duplicate
+ * authentication attempts from the same instance or from any impersonating instances.
+ *
+ * 2. Phase 2 authorizes a client in the pVM to access trusted service(s) in the TEE and
+ * establishes a new connection between the client and the trusted service based on the trust
+ * in the authenticated connection established in phase 1. The client and the trusted service
+ * can communicate independently from the AuthMgr(s) after the successful execution of
+ * phase 2 of the authorization protocol.
+ *
+ * The AuthMgr FE first opens a new vsock connection to the AuthMgr BE and sends a one-time
+ * token over that connection. The AuthMgr FE then invokes the third method of this API
+ * (`authorizeAndConnectClientToTrustedService`) on the authenticated connection established
+ * with the AuthMgr BE in phase 1. Rollback protection is enforced on the client by matching
+ * the client's DICE certificate against the stored DICE policy. The new connection is
+ * authorized by matching the token sent over the new connection and the token sent over the
+ * authenicated connection.
+ *
+ * AuthMgr BE should make sure that "use-after-destroy" threats are prevented in the implementation
+ * of this authorization protocol. This means that even if a client/pVM instance is created with the
+ * same identifier(s) of a deleted client/pVM instance, the new client should not be able to access
+ * the deleted client's secrets/resources created in the trusted services. The following
+ * requirements should be addressed in order to ensure this:
+ * 1) Each client should be identified by a unique identifier at the AuthMgr BE. The uniqueness
+ * should be guaranteed across factory resets.
+ * 2) The client's unique identifier should be used when constructing the file path to store the
+ * client's context, including the client's DICE policy, in the AuthMgr BE's secure storage.
+ * 3) The client's unique identifier should be conveyed to the trusted service(s) that the client
+ * accesses, when an authorized connection is setup between the client and the trusted service in
+ * phase 2. The trusted service(s) should mix in this unique client identifier when providing the
+ * critical services to the clients (e.g. deriving HW-backed keys by the HWCrypto service,
+ * storing data by the SecureStorage service).
+ *
+ * An example approach to build a unique identifier for a client is as follows:
+ * The AuthMgr BE stores a `global sequence number` in the secure storage that does not get
+ * wiped upon factory reset. Everytime the AuthMgr BE sees a new instance or a client, it assigns
+ * the current `global sequence number` as the unique sequence number of the instance or the client
+ * and increments the `global sequence number`.
+ */
+@VintfStability
+interface IAuthMgrAuthorization {
+ /**
+ * AuthMgr FE initiates the challenge-response protocol with the AuthMgr BE in order to
+ * authenticate the AuthMgr FE to the AuthMgr BE. AuthMgr BE creates and returns a challenge
+ * (a cryptographic random of 32 bytes) to the AuthMgr FE.
+ *
+ * The AuthMgr BE extracts the instance identifier from the DICE certificate chain of the
+ * AuthMgr FE (given in the input: `diceCertChain`). If the instance identifier is not included
+ * in the DICE certificate chain, then it should be sent in the optional
+ * input: `instanceIdentifier`. The instance identifier is used by the AuthMgr BE in this step
+ * to detect and reject any duplicate authentication attempts.
+ * The instance identifier is used in step 2 to build the file path in the secure storage to
+ * store the instance's context.
+ *
+ * If authentication is already started (but not completed) from the same transport ID, return
+ * the error code `AUTHENTICATION_ALREADY_STARTED`.
+ *
+ * @param diceCertChain - DICE certificate chain of the AuthMgr FE.
+ *
+ * @param instanceIdentifier - optional parameter to send the instance identifier, if it is not
+ * included in the DICE certificate chain
+ *
+ * @return challenge to be included in the signed response sent by the AuthMgr FE in
+ * `completeAuthentication`
+ *
+ * @throws ServiceSpecificException:
+ * Error::INSTANCE_ALREADY_AUTHENTICATED - when a pVM instance with the same
+ * `instanceIdentifier` or the same transport id has already been authenticated.
+ * Error::AUTHENTICATION_ALREADY_STARTED - when a pVM instance with the same
+ * the same transport id has already started authentication
+ */
+ byte[32] initAuthentication(in ExplicitKeyDiceCertChain diceCertChain,
+ in @nullable byte[] instanceIdentifier);
+
+ /**
+ * AuthMgr FE invokes this method to complete phase 1 of the authorization protocol. The AuthMgr
+ * BE verifies the signature in `signedConnectionRequest` with the public signing key of the
+ * AuthMgr FE obtained from the DICE certificate chain.
+ *
+ * As per the CDDL for `SignedConnectionRequest` in SignedConnectionRequest.cddl, the AuthMgr FE
+ * includes the challenge sent by the AuthMgr BE and the unique transport IDs of the AuthMgr FE
+ * and AuthMgr BE in the signed response. This is to prevent replay attacks in the presence of
+ * more than one AuthMgr BE, where one AuthMgr BE may impersonate a pVM instance/AuthMgr FE to
+ * another AuthMgr BE. Both transport IDs are included for completeness, although it is
+ * sufficient to include either of them for the purpose of preventing such attacks.
+ *
+ * AuthMgr BE validates the DICE certificate chain by verifying all the signatures in the chain
+ * and by checking wither the root public key is trusted.
+ *
+ * The AuthMgr BE matches the DICE certificate chain of the AuthMgr FE to the DICE policy given
+ * in the input: `dicePolicy`. If this is the first invocation of this method during the
+ * lifetime of the AuthMgr FE, the AuthMgr BE stores the DICE policy in the secure storage as
+ * part of the pVM instance's context, upon successful matching of DICE chain to the policy.
+ * The file path for the storage of the pVM context is constructed using the instance
+ * identifier. Note that the creation of a pVM instance's context in the secure storage is
+ * allowed only during the factory, for the first version of this API. In the future, we expect
+ * to allow the creation of a pVM instance's context in the secure storage even after the device
+ * leaves the factory, based on hard-coded DICE policies and/or via a separate
+ * `IAuthMgrInstanceContextMaintenance` API.
+ *
+ * In the subsequent invocations of this method, the AuthMgr BE matches the given DICE chain
+ * to the stored DICE policy in order to enforce rollback protection. If that succeeds and if
+ * the given DICE poliy is different from the stored DICE policy, the AuthMgr BE replaces the
+ * stored DICE policy with the given DICE policy.
+ *
+ * Upon successful execution of this method, the AuthMgr BE should store some state associated
+ * with the connection, in order to distinguish authenicated connections from any
+ * non-authenticated connections. The state associated with the connection may cache certain
+ * artifacts such as instance identifier, instance sequence number, transport ID, DICE chain
+ * and DICE policy of the AuthMgr FE, so that they can be reused when serving phase 2 requests.
+ * The requests for phase 2 of the authorization protocol are allowed only on authenticated
+ * connections.
+ *
+ * @param signedConnectionRequest - signature from AuthMgr FE (CBOR encoded according to
+ * SignedConnectionRequest.cddl)
+ *
+ * @param dicePolicy - DICE policy of the AuthMgr FE
+ *
+ * @throws ServiceSpecificException:
+ * Error::AUTHENTICATION_NOT_STARTED - when the authentication process has not been
+ * started for the pVM instance.
+ * Error::INSTANCE_ALREADY_AUTHENTICATED - when a pVM instance with the same
+ * `instanceIdentifier` or the same transport id has already been authenticated.
+ * Error::SIGNATURE_VERIFICATION_FAILED - when the signature verification fails.
+ * Error::INVALID_DICE_CERT_CHAIN - when the DICE certificate chain validation fails.
+ * Error::DICE_POLICY_MATCHING_FAILED - when the DICE certificate chain to DICE policy
+ * matching fails for the pVM instance.
+ * Error::INSTANCE_CONTEXT_CREATION_DENIED - when the creation of the pVM instances's
+ * context in the AuthMgr BE is not allowed.
+ * Error::INSTANCE_PENDING_DELETION - when a pVM that is being deleted is trying to
+ * authenticate.
+ *
+ */
+ void completeAuthentication(
+ in SignedConnectionRequest signedConnectionRequest, in DicePolicy dicePolicy);
+
+ /**
+ * When the AuthMgr FE receives a request from a client to access a trusted service, the
+ * AuthMgr FE first creates a new (out-of-band) connection with the AuthMgr BE and sends a
+ * one-time cryptographic token of 32 bytes over that new connection.
+ *
+ * The AuthMgr FE then invokes this method on the authenticated connection established with the
+ * AuthMgr BE in phase 1. When this method is invoked, the AuthMgr BE checks whether the
+ * underlying connection of this method call is already authenticated.
+ *
+ * The AuthMgr FE acts as the DICE manager for all the clients in the pVM and generates the DICE
+ * leaf certificate and the DICE leaf policy for the client, which are sent in the input:
+ * `clientDiceArtifacts`.
+ *
+ * The AuthMgr BE matches the client's DICE leaf certificate to the client's DICE policy.
+ * If this is the first invocation of this method in the lifetime of the client, the AuthMgr BE
+ * stores the client's DICE policy in the secure storage as part of the client's context, upon
+ * successful matching of the DICE certificate to the policy. The file path for the storage of
+ * the client's context should be constructed using the unique id assigned to the pVM instance
+ * by the AuthMgr BE (e.g. instance sequence number) and the client ID. There is no use
+ * case for deleting a client context or a pVM context created in the secure storage, for the
+ * first version of this API, outside of the factory reset. In the future, we expect to
+ * expose APIs for those tasks.
+ *
+ * In the subsequent invocations of this method, the AuthMgr BE matches the given DICE leaf
+ * certificate to the stored DICE policy in order to enforce rollback protection. If that
+ * succeeds and if the given DICE policy is different from the stored DICE policy, the AuthMgr
+ * BE replaces the stored DICE policy with the given DICE policy.
+ *
+ * If the same client requests multiple trusted services or connects to the same trusted service
+ * multiple times during the same boot cycle of the pVM instance, it is recommended to validate
+ * the client's DICE artifacts only once for a given client as an optimization.
+ *
+ * The AuthMgr BE keeps track of the aforementioned new connections that are pending
+ * authorization along with the tokens sent over them and the transport ID of the pVM instance
+ * which created those connections.
+ *
+ * The AuthMgr FE sends the same token that was sent over an aforementioned new connection
+ * in the input: `token` of this method call, in order to authorize the new connection, based on
+ * the trust in the authenticated connection established in phase 1.
+ *
+ * Once the validation of the client's DICE artifacts is completed, the AuthMgr BE retrieves the
+ * pending new connection to be authorized, which is associated with a token that matches the
+ * token sent in this method call and a transport ID that matches the transport ID associated
+ * with the connection underlying this method call.
+ *
+ * Next the AuthMgr BE connects to the trusted service requested by the client in order to
+ * handover the new authorized connection to the trusted service. Once the connection
+ * handover is successful, the AuthMgr BE returns OK to the AuthMgr FE. Then the AuthMgr FE
+ * returns to the client a handle to the new connection (created at the beginning of phase 2).
+ * At this point, an authorized connection is setup between the client and the trusted service,
+ * which they can use to communicate independently of the AuthMgr FE and the AuthMgr BE.
+ *
+ * @param clientID - the identifier of the client in the pVM instance, which is unique in the
+ * context of the pVM instance
+ *
+ * @param service name - the name of the trusted service requested by the client
+ *
+ * @param token - the one-time token used to authorize the new connection created between the
+ * AuthMgr FE and the AuthMgr BE
+ *
+ * @param clientDiceArtifacts - DICE leaf certificate and the DICE leaf policy of the client
+ *
+ * @throws ServiceSpecificException:
+ * Error::CONNECTION_NOT_AUTHENTICATED - when the underlying connection of this method
+ * call is not authenticated.
+ * Error::DICE_POLICY_MATCHING_FAILED - when the DICE certificate chain to DICE policy
+ * matching fails for the client.
+ * Error::NO_CONNECTION_TO_AUTHORIZE - when there is no pending new connection that
+ * is associated with a token and a transport ID that matches those of this
+ * method call.
+ * Error::CONNECTION_HANDOVER_FAILED - when the hanover of the authorized connection to
+ * the trusted service fails.
+ * Error::CLIENT_PENDING_DELETION - when a client that is being deleted is trying to be
+ * authorized.
+ */
+ void authorizeAndConnectClientToTrustedService(in byte[] clientID, String serviceName,
+ in byte[32] token, in DiceLeafArtifacts clientDiceArtifacts);
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
new file mode 100644
index 0000000..f258603
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
@@ -0,0 +1,29 @@
+/*
+ * 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.security.see.authmgr;
+
+/**
+ * The response from the AuthMgr FE which includes the challenge sent by the AuthMgr BE and other
+ * information signed by the AuthMgr FE's signing key.
+ */
+
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable SignedConnectionRequest {
+ /* Data is CBOR encoded according the CDDL in ./SignedConnectionRequest.cddl */
+ byte[] signedConnectionRequest;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl
new file mode 100644
index 0000000..a74ccd7
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+SignedConnectionRequestProtected = {
+ 1 : AlgorithmEdDSA / AlgorithmES256,
+}
+
+SignedConnectionRequest = [ ; COSE_Sign1 (untagged) [RFC9052 s4.2]
+ protected: bstr .cbor SignedConnectionRequesProtected,
+ unprotected: {},
+ payload: bstr .cbor ConnectionRequest,
+ signature: bstr ; PureEd25519(privateKey, SignedResponseSigStruct) /
+ ; ECDSA(privateKey, SignedResponseSigStruct)
+]
+
+ConnectionRequestSigStruct = [ ; Sig_structure for SignedConnectionRequest [ RFC9052 s4.4]
+ context: "Signature1",
+ body_protected: bstr .cbor SignedConnectionRequesProtected,
+ external_aad: bstr .cbor ExternalAADForDICESignedConnectionRequest,
+ payload: bstr .cbor ConnectionRequest,
+]
+
+; The payload structure signed by the DICE signing key
+ConnectionRequest [
+ challenge: bstr .size 32,
+ transport_type: TransportType, ; this indicates what CBOR structure should be exected for the
+ ; next element (i.e. transport_id_info)
+ transport_id_info: TransportIdInfo, ; this information is used to detect person-in-the-middle
+ ; attacks
+]
+
+; The unique id assigned to the `ConnectionRequest` payload structure
+ConnectionRequestUuid = h'34c82916 9579 4d86 baef 592a066419e4' ; bstr .size 16 (UUID v4 - RFC 9562)
+
+; An integer that identifies the type of the transport used for communication between clients and
+; trusted services
+TransportType = &(
+ FFA: 1,
+ ; Any other transport type(s) also be defined here
+)
+
+; Identity information of the peers provided by the transport layer
+TransportIdInfo = &(
+ FFATransportId,
+ ; Any other type(s) containing transport layer identity information should also be defiend here
+)
+
+; Transport ids (a.k.a VM IDs) provided by the FFA transport
+FFATransportId = [
+ feID: uint .size 2, ; FF-A partition ID of the AuthMgr FE
+ beID: uint .size 2, ; FF-A partition ID of the AuthMgr BE
+]
+
+; External AAD to be added to any Sig_structure signed by the DICE signing key, with the mandatory
+; field of `uuid_of_payload_struct` of type UUID v4 (RFC 9562). This field is required to ensure
+; that both the signer and the verifier refer to the same payload structure, given that there are
+; various payload structures signed by the DICE signing key in different protocols in Android.
+ExternalAADForDICESigned = [
+ uuid_of_payload_struct: buuid,
+]
+
+; RFC8610 - Section 3.6
+buuid = #6.37(bstr .size 16)
+
+ExternalAADForDICESignedConnectionRequest = [ ; ExternalAADForDICESigned for ConnectionRequest
+ uuid_of_payload_struct: #6.37(ConnectionRequestUuid),
+]
+
+AlgorithmES256 = -7 ; [RFC9053 s2.1]
+AlgorithmEdDSA = -8 ; [RFC9053 s2.2]
diff --git a/security/see/authmgr/aidl/vts/Android.bp b/security/see/authmgr/aidl/vts/Android.bp
new file mode 100644
index 0000000..3d6fce2
--- /dev/null
+++ b/security/see/authmgr/aidl/vts/Android.bp
@@ -0,0 +1,36 @@
+// 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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["Android-Apache-2.0"],
+ default_team: "trendy_team_trusty",
+}
+
+rust_test {
+ name: "VtsAidlAuthMgrNonExistentTest",
+ srcs: ["test.rs"],
+ require_root: true,
+ test_suites: [
+ "general-tests",
+ "vts",
+ ],
+ rustlibs: [
+ "libbinder_rs",
+ ],
+}
diff --git a/security/see/authmgr/aidl/vts/test.rs b/security/see/authmgr/aidl/vts/test.rs
new file mode 100644
index 0000000..45533a7
--- /dev/null
+++ b/security/see/authmgr/aidl/vts/test.rs
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+//! Test for asserting the non-existence of an IAuthMgrAuthorization.aidl
+
+#![cfg(test)]
+
+use binder;
+
+const AUTHMGR_INTERFACE_NAME: &str = "android.hardware.security.see.authmgr.IAuthMgrAuthorization";
+
+#[test]
+fn test_authmgr_non_existence() {
+ let authmgr_instances = match binder::get_declared_instances(AUTHMGR_INTERFACE_NAME) {
+ Ok(vec) => vec,
+ Err(e) => {
+ panic!("failed to retrieve the declared interfaces for AuthMgr: {:?}", e);
+ }
+ };
+ assert!(authmgr_instances.is_empty());
+}
diff --git a/staging/security/see/storage/aidl/Android.bp b/security/see/storage/aidl/Android.bp
similarity index 91%
rename from staging/security/see/storage/aidl/Android.bp
rename to security/see/storage/aidl/Android.bp
index f669be8..279cb90 100644
--- a/staging/security/see/storage/aidl/Android.bp
+++ b/security/see/storage/aidl/Android.bp
@@ -4,7 +4,7 @@
aidl_interface {
name: "android.hardware.security.see.storage",
- unstable: true,
+ stability: "vintf",
host_supported: true,
srcs: [
"android/hardware/security/see/storage/*.aidl",
@@ -23,4 +23,5 @@
enabled: true,
},
},
+ frozen: false,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Availability.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Availability.aidl
index 60e0b96..62af569 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Availability.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,9 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+enum Availability {
+ BEFORE_USERDATA,
+ AFTER_USERDATA,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/CreationMode.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/CreationMode.aidl
index 60e0b96..f999205 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/CreationMode.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+enum CreationMode {
+ NO_CREATE,
+ CREATE_EXCLUSIVE,
+ CREATE,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/FileMode.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/FileMode.aidl
index 60e0b96..604e61f 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/FileMode.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+enum FileMode {
+ READ_ONLY,
+ WRITE_ONLY,
+ READ_WRITE,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Filesystem.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Filesystem.aidl
index 60e0b96..df08380 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Filesystem.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable Filesystem {
+ android.hardware.security.see.storage.Integrity integrity = android.hardware.security.see.storage.Integrity.TAMPER_PROOF_AT_REST;
+ android.hardware.security.see.storage.Availability availability = android.hardware.security.see.storage.Availability.BEFORE_USERDATA;
+ boolean persistent;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IDir.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IDir.aidl
index 60e0b96..7068ea2 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IDir.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,8 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface IDir {
+ @utf8InCpp String[] readNextFilenames(int maxCount);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IFile.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IFile.aidl
index 60e0b96..734ec0c 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IFile.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,12 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface IFile {
+ byte[] read(long size, long offset);
+ long write(long offset, in byte[] buffer);
+ long getSize();
+ void setSize(long newSize);
+ void rename(in @utf8InCpp String destPath, in android.hardware.security.see.storage.CreationMode destCreateMode);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/ISecureStorage.aidl
similarity index 75%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
rename to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/ISecureStorage.aidl
index 60e0b96..c99c039 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/ISecureStorage.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,14 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface ISecureStorage {
+ android.hardware.security.see.storage.IStorageSession startSession(in android.hardware.security.see.storage.Filesystem filesystem);
+ const int ERR_UNSUPPORTED_PROPERTIES = 1;
+ const int ERR_NOT_FOUND = 2;
+ const int ERR_ALREADY_EXISTS = 3;
+ const int ERR_BAD_TRANSACTION = 4;
+ const int ERR_AB_UPDATE_IN_PROGRESS = 5;
+ const int ERR_FS_TAMPERED = 6;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IStorageSession.aidl
similarity index 71%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IStorageSession.aidl
index f42e1d0..11b4b9a 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/IStorageSession.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,14 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface IStorageSession {
+ void commitChanges();
+ void stageChangesForCommitOnAbUpdateComplete();
+ void abandonChanges();
+ android.hardware.security.see.storage.IFile openFile(in @utf8InCpp String filePath, in android.hardware.security.see.storage.OpenOptions options);
+ void deleteFile(in @utf8InCpp String filePath);
+ void renameFile(in @utf8InCpp String currentPath, in @utf8InCpp String destPath, in android.hardware.security.see.storage.CreationMode destCreateMode);
+ android.hardware.security.see.storage.IDir openDir(in @utf8InCpp String path);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Integrity.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Integrity.aidl
index 60e0b96..801da04 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/Integrity.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,9 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+enum Integrity {
+ TAMPER_PROOF_AT_REST,
+ TAMPER_DETECT,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/OpenOptions.aidl
similarity index 75%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
copy to security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/OpenOptions.aidl
index 60e0b96..eda2404 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/security/see/storage/aidl/aidl_api/android.hardware.security.see.storage/current/android/hardware/security/see/storage/OpenOptions.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2024 The Android Open Source Project
+ * 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.
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.security.see.storage;
@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable OpenOptions {
+ android.hardware.security.see.storage.CreationMode createMode = android.hardware.security.see.storage.CreationMode.NO_CREATE;
+ android.hardware.security.see.storage.FileMode accessMode = android.hardware.security.see.storage.FileMode.READ_WRITE;
+ boolean truncateOnOpen;
}
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl
index 21a275c..e2954d5 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/Availability.aidl
@@ -16,6 +16,7 @@
package android.hardware.security.see.storage;
/** Determines how early during the boot process file is able to be accessed. */
+@VintfStability
enum Availability {
/** Available before userdata is mounted, but after android has booted. */
BEFORE_USERDATA,
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl
index 1c65038..652d5c6 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/CreationMode.aidl
@@ -15,6 +15,7 @@
*/
package android.hardware.security.see.storage;
+@VintfStability
enum CreationMode {
/** Returns an error if the file does not already exist. */
NO_CREATE,
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl
similarity index 97%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl
index 18a2eae..b167a17 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/FileMode.aidl
@@ -15,6 +15,7 @@
*/
package android.hardware.security.see.storage;
+@VintfStability
enum FileMode {
/** The file may only be read from. */
READ_ONLY,
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl
index ea8db53..eacd4fe 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/Filesystem.aidl
@@ -21,6 +21,7 @@
/**
* Specifies minimum security requirements for a Secure Storage filesystem.
*/
+@VintfStability
parcelable Filesystem {
Integrity integrity = Integrity.TAMPER_PROOF_AT_REST;
Availability availability = Availability.BEFORE_USERDATA;
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl
index 5d9a761..ddf8ed1 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/IDir.aidl
@@ -16,6 +16,7 @@
package android.hardware.security.see.storage;
/** The interface for an open directory */
+@VintfStability
interface IDir {
/**
* Gets the next batch of filenames in this directory.
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl
similarity index 99%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl
index fd2032e..414d423 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/IFile.aidl
@@ -18,6 +18,7 @@
import android.hardware.security.see.storage.CreationMode;
/** The interface for an open file */
+@VintfStability
interface IFile {
/**
* Read bytes from this file.
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
index 1841bf5..d2ac4d3 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
@@ -23,6 +23,7 @@
*
* Creates sessions which can be used to access storage.
*/
+@VintfStability
interface ISecureStorage {
const int ERR_UNSUPPORTED_PROPERTIES = 1;
const int ERR_NOT_FOUND = 2;
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
similarity index 99%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
index dc1e6a8..9a8d0d7 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
@@ -31,6 +31,7 @@
*
* Any changes still pending when the session is dropped will be abandoned.
*/
+@VintfStability
interface IStorageSession {
/**
* Commits any pending changes made through this session to storage.
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl
index 2f7f7ab..6f86ab0 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/Integrity.aidl
@@ -15,6 +15,7 @@
*/
package android.hardware.security.see.storage;
+@VintfStability
enum Integrity {
/** REE may prevent operations, but cannot alter data once written. */
TAMPER_PROOF_AT_REST,
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl b/security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl
similarity index 98%
rename from staging/security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl
rename to security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl
index 9fdf9e5..110b370 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl
+++ b/security/see/storage/aidl/android/hardware/security/see/storage/OpenOptions.aidl
@@ -18,6 +18,7 @@
import android.hardware.security.see.storage.CreationMode;
import android.hardware.security.see.storage.FileMode;
+@VintfStability
parcelable OpenOptions {
/** Controls creation behavior of the to-be-opened file. See `CreationMode` docs for details. */
CreationMode createMode = CreationMode.NO_CREATE;
diff --git a/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl b/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
index 904496c..3cff780 100644
--- a/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
+++ b/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
@@ -46,4 +46,5 @@
void unregisterThermalChangedCallback(in android.hardware.thermal.IThermalChangedCallback callback);
void registerCoolingDeviceChangedCallbackWithType(in android.hardware.thermal.ICoolingDeviceChangedCallback callback, in android.hardware.thermal.CoolingType type);
void unregisterCoolingDeviceChangedCallback(in android.hardware.thermal.ICoolingDeviceChangedCallback callback);
+ float forecastSkinTemperature(in int forecastSeconds);
}
diff --git a/thermal/aidl/android/hardware/thermal/IThermal.aidl b/thermal/aidl/android/hardware/thermal/IThermal.aidl
index 4aa4090..87f7637 100644
--- a/thermal/aidl/android/hardware/thermal/IThermal.aidl
+++ b/thermal/aidl/android/hardware/thermal/IThermal.aidl
@@ -225,4 +225,20 @@
* getMessage() must be populated with human-readable error message.
*/
void unregisterCoolingDeviceChangedCallback(in ICoolingDeviceChangedCallback callback);
+
+ /**
+ * Retrieves the forecasted skin temperature in Celsius.
+ *
+ * @param forecastSeconds the number of seconds to forecast the skin temperature, it should
+ * at least support superset of [0, 60] seconds range.
+ *
+ * @return forecasted skin temperature in Celsius.
+ *
+ * @throws EX_ILLEGAL_STATE If the Thermal HAL is not initialized successfully
+ * @throws EX_ILLEGAL_ARGUMENT If the provided forecastSeconds is negative
+ * @throws EX_UNSUPPORTED_OPERATION if API is not supported or the forecastSeconds exceeds the
+ * supported range. And the getMessage() must be populated with human-readable
+ * error message.
+ */
+ float forecastSkinTemperature(in int forecastSeconds);
}
diff --git a/thermal/aidl/default/Thermal.cpp b/thermal/aidl/default/Thermal.cpp
index 41d0be8..339e9b8 100644
--- a/thermal/aidl/default/Thermal.cpp
+++ b/thermal/aidl/default/Thermal.cpp
@@ -191,4 +191,9 @@
}
return ScopedAStatus::ok();
}
+
+ndk::ScopedAStatus Thermal::forecastSkinTemperature(int32_t, float*) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
} // namespace aidl::android::hardware::thermal::impl::example
diff --git a/thermal/aidl/default/Thermal.h b/thermal/aidl/default/Thermal.h
index d3d8874..a4d8b00 100644
--- a/thermal/aidl/default/Thermal.h
+++ b/thermal/aidl/default/Thermal.h
@@ -60,6 +60,8 @@
ndk::ScopedAStatus unregisterCoolingDeviceChangedCallback(
const std::shared_ptr<ICoolingDeviceChangedCallback>& in_callback) override;
+ ndk::ScopedAStatus forecastSkinTemperature(int32_t forecastSeconds,
+ float* _aidl_return) override;
private:
std::mutex thermal_callback_mutex_;
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 066e773..17653b4 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -426,6 +426,23 @@
}
}
+// Test Thermal->forecastSkinTemperature.
+TEST_P(ThermalAidlTest, ForecastSkinTemperatureTest) {
+ auto apiLevel = ::android::base::GetIntProperty<int32_t>("ro.vendor.api_level", 0);
+ if (apiLevel < 202504) {
+ GTEST_SKIP() << "Skipping test as the vendor level is below 202504: " << apiLevel;
+ }
+ float temperature = 0.0f;
+ ::ndk::ScopedAStatus status = mThermal->forecastSkinTemperature(1, &temperature);
+ if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+ GTEST_SKIP() << "Skipping test as temperature forecast is not supported";
+ }
+ for (int i = 0; i <= 60; i++) {
+ status = mThermal->forecastSkinTemperature(i, &temperature);
+ ASSERT_NE(NAN, temperature);
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ThermalAidlTest);
INSTANTIATE_TEST_SUITE_P(
Thermal, ThermalAidlTest,
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapd.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapd.aidl
index ff941fd..3898bb8 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapd.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapd.aidl
@@ -40,4 +40,5 @@
void removeAccessPoint(in String ifaceName);
void setDebugParams(in android.hardware.wifi.hostapd.DebugLevel level);
oneway void terminate();
+ void removeLinkFromMultipleLinkBridgedApIface(in String ifaceName, in String linkIdentity);
}
diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl
index d2f4795..cd552ab 100644
--- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl
+++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl
@@ -103,4 +103,22 @@
* wait to be restarted.
*/
oneway void terminate();
+
+ /**
+ * Removes an existing link from multiple link device which the current AP resides on.
+ *
+ * The multiple link device is an access point which was added by |IHostapd.addAccessPoint| with
+ * |IfaceParams.usesMlo| set to true.
+ *
+ * @param ifaceName Name of the interface which was added by |IHostapd.addAccessPoint|
+ * @param linkIdentity the identity of the link which associated to the multiple link device
+ * that the current AP resides on. The link identity should be one of the identities provided in
+ * |IfaceParams.instanceIdentities| when this iface was created.
+ * @throws ServiceSpecificException with one of the following values:
+ * |HostapdStatusCode.FAILURE_UNKNOWN|,
+ * |HostapdStatusCode.FAILURE_ARGS_INVALID| when the linkIdentity mis-matches one of the
+ * identities provided in |IfaceParams.instanceIdentities|.
+ * |HostapdStatusCode.FAILURE_IFACE_UNKNOWN| when current existing AP isn't using mlo.
+ */
+ void removeLinkFromMultipleLinkBridgedApIface(in String ifaceName, in String linkIdentity);
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index d54e44c..c584d57 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -79,6 +79,9 @@
*/
void provisionDiscovery(in byte[] peerAddress, in android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod);
void registerCallback(in android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback callback);
+ /**
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use reinvokePersistentGroup.
+ */
void reinvoke(in int persistentNetworkId, in byte[] peerAddress);
void reject(in byte[] peerAddress);
void removeBonjourService(in byte[] query);
@@ -132,6 +135,9 @@
int startUsdBasedServiceAdvertisement(in android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig serviceAdvertisementConfig);
void stopUsdBasedServiceAdvertisement(in int sessionId);
void provisionDiscoveryWithParams(in android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams params);
+ android.hardware.wifi.supplicant.P2pDirInfo getDirInfo();
+ int validateDirInfo(in android.hardware.wifi.supplicant.P2pDirInfo dirInfo);
+ void reinvokePersistentGroup(in android.hardware.wifi.supplicant.P2pReinvokePersistentGroupParams reinvokeGroupParams);
const long P2P_FEATURE_V2 = (1 << 0) /* 1 */;
const long P2P_FEATURE_PCC_MODE_WPA3_COMPATIBILITY = (1 << 1) /* 2 */;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index 88dd740..a88a829 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -43,4 +43,7 @@
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
int pairingBootstrappingMethod;
@nullable String password;
+ int frequencyMHz;
+ boolean authorizeConnectionFromPeer;
+ @nullable String groupInterfaceName;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index 68cde9e..184fbd0 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -46,4 +46,5 @@
byte[] vendorElemBytes;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
int pairingBootstrappingMethods;
+ @nullable android.hardware.wifi.supplicant.P2pDirInfo dirInfo;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
index f42e1d0..2c55410 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
@@ -31,25 +31,16 @@
// 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 */
+package android.hardware.wifi.supplicant;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
+parcelable P2pDirInfo {
+ android.hardware.wifi.supplicant.P2pDirInfo.CipherVersion cipherVersion;
+ byte[6] deviceInterfaceMacAddress;
+ byte[] nonce;
+ byte[] dirTag;
+ @Backing(type="int") @VintfStability
+ enum CipherVersion {
+ NONE,
+ DIRA_CIPHER_VERSION_128_BIT,
}
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
index 6e83277..182c091 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -39,4 +39,5 @@
const int BOOTSTRAPPING_DISPLAY_PASSPHRASE = (1 << 2) /* 4 */;
const int BOOTSTRAPPING_KEYPAD_PINCODE = (1 << 3) /* 8 */;
const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = (1 << 4) /* 16 */;
+ const int BOOTSTRAPPING_OUT_OF_BAND = (1 << 5) /* 32 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
similarity index 77%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
rename to wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
index f42e1d0..0743a64 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
@@ -31,25 +31,10 @@
// 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 */
+package android.hardware.wifi.supplicant;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable P2pReinvokePersistentGroupParams {
+ byte[6] peerMacAddress;
+ int persistentNetworkId;
+ int deviceIdentityEntryId;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
index d7ff798..8675ab3 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
@@ -46,4 +46,5 @@
FAILURE_NETWORK_UNKNOWN,
FAILURE_UNSUPPORTED,
FAILURE_ONGOING_REQUEST,
+ FAILURE_DATA_NOT_AVAILABLE,
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index 62f9fc3..75e65ff 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -25,11 +25,13 @@
import android.hardware.wifi.supplicant.P2pAddGroupConfigurationParams;
import android.hardware.wifi.supplicant.P2pConnectInfo;
import android.hardware.wifi.supplicant.P2pCreateGroupOwnerInfo;
+import android.hardware.wifi.supplicant.P2pDirInfo;
import android.hardware.wifi.supplicant.P2pDiscoveryInfo;
import android.hardware.wifi.supplicant.P2pExtListenInfo;
import android.hardware.wifi.supplicant.P2pFrameTypeMask;
import android.hardware.wifi.supplicant.P2pGroupCapabilityMask;
import android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams;
+import android.hardware.wifi.supplicant.P2pReinvokePersistentGroupParams;
import android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig;
import android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryConfig;
import android.hardware.wifi.supplicant.WpsConfigMethods;
@@ -439,6 +441,9 @@
/**
* Reinvoke a device from a persistent group.
+ * <p>
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use
+ * reinvokePersistentGroup.
*
* @param persistentNetworkId Used to specify the persistent group.
* @param peerAddress MAC address of the device to reinvoke.
@@ -1022,4 +1027,42 @@
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
*/
void provisionDiscoveryWithParams(in P2pProvisionDiscoveryParams params);
+
+ /**
+ * The Device Identity Resolution (DIR) Info used to send in
+ * Bluetooth LE advertising packet for the receiving device to
+ * check if the device is a previously paired device.
+ *
+ * @return The DIR info - |P2pDirInfo|
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_DATA_NOT_AVAILABLE|
+ */
+ P2pDirInfo getDirInfo();
+
+ /**
+ * Validate a Device Identity Resolution (DIR) Info of a P2P device.
+ * wpa_supplicant takes the |P2pDirInfo| and derives a set of Tag values based on
+ * the cached Device Identity Keys (DevIK) of all paired peers saved in the
+ * configuration file. If a derived Tag value matches the Tag value received in the
+ * |P2pDirInfo|, the device is identified as a paired peer and returns an identifier
+ * identifying the device identity key information stored in the configuration file.
+ *
+ * @return The identifier of device identity key stored in the configuration file.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ int validateDirInfo(in P2pDirInfo dirInfo);
+
+ /**
+ * Reinvoke a device from a persistent group.
+ *
+ * @param reinvokeGroupParams Parameters associated to reinvoke a group.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ void reinvokePersistentGroup(in P2pReinvokePersistentGroupParams reinvokeGroupParams);
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index 8f3c596..6467436 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -25,7 +25,8 @@
@VintfStability
parcelable P2pConnectInfo {
/**
- * MAC address of the device to connect to.
+ * MAC address of the peer device to connect to or to authorize a connect
+ * request.
*/
byte[6] peerAddress;
@@ -82,4 +83,23 @@
* null otherwise.
*/
@nullable String password;
+
+ /**
+ * Channel frequency in MHz to start group formation,
+ * join an existing group owner or authorize a connection request.
+ */
+ int frequencyMHz;
+
+ /**
+ * Used to authorize a connection request from the Peer device.
+ * The MAC address of the peer device is set in peerAddress.
+ */
+ boolean authorizeConnectionFromPeer;
+
+ /**
+ * Used to check if the authorize connection request is on an existing Group Owner
+ * interface to allow a peer device to connect. This field is set to null if the request
+ * is to form a group or join an existing group.
+ */
+ @nullable String groupInterfaceName;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index 31e64ac..e320954 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -17,6 +17,7 @@
package android.hardware.wifi.supplicant;
import android.hardware.wifi.common.OuiKeyedData;
+import android.hardware.wifi.supplicant.P2pDirInfo;
/**
* Parameters passed as a part of a P2P Device found event.
@@ -95,4 +96,9 @@
* the pairing bootstrapping between bootstrapping initiator and a bootstrapping responder.
*/
int pairingBootstrappingMethods;
+
+ /**
+ * The Device Identity Resolution Attribute (DIRA) |P2pDirInfo| received in the USD frame.
+ */
+ @nullable P2pDirInfo dirInfo;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.aidl
new file mode 100644
index 0000000..22037ed
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.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.wifi.supplicant;
+
+/**
+ * The Device Identity Resolution (DIR) Info is used to identify a previously
+ * paired P2P device.
+ * The device advertises this information in Bluetooth LE advertising packets
+ * and Unsynchronized Service Discovery (USD) frames. The device receiving DIR
+ * Info uses this information to identify that the peer device is a previously paired device.
+ * For Details, refer Wi-Fi Alliance Wi-Fi Direct R2 specification section 3.8.2 Pairing Identity
+ * and section 3.9.2.3.2 Optional Advertising Data Elements.
+ */
+@VintfStability
+parcelable P2pDirInfo {
+ /**
+ * Enums for the |cipherVersion| field.
+ */
+ @VintfStability
+ @Backing(type="int")
+ enum CipherVersion {
+ NONE,
+ /**
+ * DIRA cipher version 128 bit.
+ * 128-bit Device Identity Key, 64-bit Nonce, 64-bit Tag.
+ * 64-bit Tag = Truncate-64(HMAC-SHA-256(DevIk, "DIR" ||
+ * P2P Device Address || Nonce))
+ */
+ DIRA_CIPHER_VERSION_128_BIT,
+ }
+
+ /**
+ * DIRA cipher version. The value of cipher version indicates the
+ * cryptographic parameters and method used to derive the dirTag field.
+ * Set to one of the |DIRA_CIPHER_VERSION_*|.
+ */
+ CipherVersion cipherVersion;
+
+ /**
+ * The MAC address of the P2P device interface.
+ */
+ byte[6] deviceInterfaceMacAddress;
+
+ /**
+ * Random number. The size limit is defined in the cipher version comment.
+ */
+ byte[] nonce;
+
+ /**
+ * A resolvable identity. The size limit is defined in the cipher version comment.
+ */
+ byte[] dirTag;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
index cac8c53..03c2703 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -31,4 +31,9 @@
const int BOOTSTRAPPING_KEYPAD_PINCODE = 1 << 3;
/** Keypad passphrase */
const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = 1 << 4;
+ /**
+ * Pairing bootstrapping done Out of band (For example: Over Bluetooth LE.
+ * Refer Wi-Fi Alliance Wi-Fi Direct R2 specification Section 3.9 for the details).
+ */
+ const int BOOTSTRAPPING_OUT_OF_BAND = 1 << 5;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
new file mode 100644
index 0000000..f5f4562
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.wifi.supplicant;
+
+/**
+ * Parameters used for |ISupplicantP2pIface.reinvokePersistentGroup|
+ */
+@VintfStability
+parcelable P2pReinvokePersistentGroupParams {
+ /**
+ * MAC address of the peer device to reinvoke the persistent group.
+ */
+ byte[6] peerMacAddress;
+
+ /**
+ * Persistent network ID of the group.
+ */
+ int persistentNetworkId;
+
+ /**
+ * The identifier of device identity key information stored in the configuration file.
+ * This field is valid only for P2P group formed via pairing protocol (P2P version 2).
+ * Set to invalid value of -1 for a group formed via WPS process (P2P version 1).
+ */
+ int deviceIdentityEntryId;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
index e97d6ee..271da7f 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
@@ -67,4 +67,8 @@
* A different request is currently being processed.
*/
FAILURE_ONGOING_REQUEST,
+ /**
+ * Requested data is not available.
+ */
+ FAILURE_DATA_NOT_AVAILABLE,
}
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
index 3226ffd..3638ac5 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
@@ -43,6 +43,7 @@
using aidl::android::hardware::wifi::supplicant::P2pConnectInfo;
using aidl::android::hardware::wifi::supplicant::P2pCreateGroupOwnerInfo;
using aidl::android::hardware::wifi::supplicant::P2pDeviceFoundEventParams;
+using aidl::android::hardware::wifi::supplicant::P2pDirInfo;
using aidl::android::hardware::wifi::supplicant::P2pDiscoveryInfo;
using aidl::android::hardware::wifi::supplicant::P2pExtListenInfo;
using aidl::android::hardware::wifi::supplicant::P2pFrameTypeMask;
@@ -56,7 +57,7 @@
using aidl::android::hardware::wifi::supplicant::P2pProvDiscStatusCode;
using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryCompletedEventParams;
using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryParams;
-;
+using aidl::android::hardware::wifi::supplicant::P2pReinvokePersistentGroupParams;
using aidl::android::hardware::wifi::supplicant::P2pScanType;
using aidl::android::hardware::wifi::supplicant::P2pStatusCode;
using aidl::android::hardware::wifi::supplicant::P2pUsdBasedServiceAdvertisementConfig;
@@ -80,6 +81,8 @@
const std::string kTestServiceSpecificInfoStr = "TestServiceSpecificInfo";
const std::vector<uint8_t> kTestServiceSpecificInfo = std::vector<uint8_t>(
kTestServiceSpecificInfoStr.begin(), kTestServiceSpecificInfoStr.end());
+const std::vector<uint8_t> kTestNonce = {0x11, 0x22, 0x33, 0x44, 0x55, 0x92, 0x22, 0x33};
+const std::vector<uint8_t> kTestDirTag = {0xaa, 0x22, 0x55, 0x44, 0x55, 0x92, 0x22, 0x33};
const std::string kTestPassphrase = "P2pWorld1234";
const std::string kTestConnectPin = "34556665";
const std::string kTestGroupIfName = "TestGroup";
@@ -924,6 +927,60 @@
EXPECT_TRUE(p2p_iface_->provisionDiscoveryWithParams(params).isOk());
}
+/*
+ * ValidateDirInfo
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, ValidateDirInfo) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "ValidateDirInfo is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ int32_t ret;
+ P2pDirInfo dirInfo;
+ dirInfo.cipherVersion = P2pDirInfo::CipherVersion::DIRA_CIPHER_VERSION_128_BIT;
+ dirInfo.deviceInterfaceMacAddress = vecToArrayMacAddr(kTestMacAddr);
+ dirInfo.nonce = kTestNonce;
+ dirInfo.dirTag = kTestDirTag;
+ EXPECT_TRUE(p2p_iface_->validateDirInfo(dirInfo, &ret).isOk());
+}
+
+/*
+ * GetDirInfo
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, GetDirInfo) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "GetDirInfo is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ P2pDirInfo dirInfo;
+ EXPECT_TRUE(p2p_iface_->getDirInfo(&dirInfo).isOk());
+}
+
+/*
+ * ReinvokePersistentGroup
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, ReinvokePersistentGroup) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "ReinvokePersistentGroup is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ P2pReinvokePersistentGroupParams params;
+ params.peerMacAddress = vecToArrayMacAddr(kTestMacAddr);
+ params.persistentNetworkId = 0;
+ params.deviceIdentityEntryId = 0;
+
+ EXPECT_TRUE(p2p_iface_->reinvokePersistentGroup(params).isOk());
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SupplicantP2pIfaceAidlTest);
INSTANTIATE_TEST_SUITE_P(Supplicant, SupplicantP2pIfaceAidlTest,
testing::ValuesIn(android::getAidlHalInstanceNames(