Merge "Clarify SRBs in cellular transparency HAL" into main
diff --git a/Android.bp b/Android.bp
index 68115aa..baf3291 100644
--- a/Android.bp
+++ b/Android.bp
@@ -86,9 +86,3 @@
"VtsHalHidlTargetTestBase",
],
}
-
-dirgroup {
- name: "trusty_dirgroup_hardware_interfaces",
- dirs: ["."],
- visibility: ["//trusty/vendor/google/aosp/scripts"],
-}
diff --git a/audio/aidl/Android.bp b/audio/aidl/Android.bp
index 4902497..7b6109a 100644
--- a/audio/aidl/Android.bp
+++ b/audio/aidl/Android.bp
@@ -228,6 +228,13 @@
],
}
+rust_defaults {
+ name: "latest_android_hardware_audio_core_rust",
+ rustlibs: [
+ latest_android_hardware_audio_core + "-rust",
+ ],
+}
+
// Used for the standalone sounddose HAL
aidl_interface {
name: "android.hardware.audio.core.sounddose",
diff --git a/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv b/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv
index 56b7926..e2da90d 100644
--- a/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv
+++ b/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv
@@ -45,6 +45,8 @@
PAUSED -> ACTIVE [label="start"]; // consumer -> active
PAUSED -> IDLE [label="flush"]; // producer -> passive, buffer is cleared
DRAINING -> IDLE [label="←IStreamCallback.onDrainReady"];
+ DRAINING -> DRAINING [label="←IStreamCallback.onDrainReady"]; // allowed for `DRAIN_EARLY_NOTIFY`
+ DRAINING -> IDLE [label="<empty buffer>"]; // allowed for `DRAIN_EARLY_NOTIFY`
DRAINING -> TRANSFERRING [label="burst"]; // producer -> active
DRAINING -> ACTIVE [label="burst"]; // full write
DRAINING -> DRAIN_PAUSED [label="pause"]; // consumer -> passive (not consuming)
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 51b6085..e96cf81 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -207,9 +207,9 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
const auto& flags = portConfigIt->flags.value();
- StreamContext::DebugParameters params{mDebug.streamTransientStateDelayMs,
- mVendorDebug.forceTransientBurst,
- mVendorDebug.forceSynchronousDrain};
+ StreamContext::DebugParameters params{
+ mDebug.streamTransientStateDelayMs, mVendorDebug.forceTransientBurst,
+ mVendorDebug.forceSynchronousDrain, mVendorDebug.forceDrainToDraining};
std::unique_ptr<StreamContext::DataMQ> dataMQ = nullptr;
std::shared_ptr<IStreamCallback> streamAsyncCallback = nullptr;
std::shared_ptr<ISoundDose> soundDose;
@@ -1524,6 +1524,7 @@
const std::string Module::VendorDebug::kForceTransientBurstName = "aosp.forceTransientBurst";
const std::string Module::VendorDebug::kForceSynchronousDrainName = "aosp.forceSynchronousDrain";
+const std::string Module::VendorDebug::kForceDrainToDrainingName = "aosp.forceDrainToDraining";
ndk::ScopedAStatus Module::getVendorParameters(const std::vector<std::string>& in_ids,
std::vector<VendorParameter>* _aidl_return) {
@@ -1538,6 +1539,10 @@
VendorParameter forceSynchronousDrain{.id = id};
forceSynchronousDrain.ext.setParcelable(Boolean{mVendorDebug.forceSynchronousDrain});
_aidl_return->push_back(std::move(forceSynchronousDrain));
+ } else if (id == VendorDebug::kForceDrainToDrainingName) {
+ VendorParameter forceDrainToDraining{.id = id};
+ forceDrainToDraining.ext.setParcelable(Boolean{mVendorDebug.forceDrainToDraining});
+ _aidl_return->push_back(std::move(forceDrainToDraining));
} else {
allParametersKnown = false;
LOG(VERBOSE) << __func__ << ": " << mType << ": unrecognized parameter \"" << id << "\"";
@@ -1578,6 +1583,10 @@
if (!extractParameter<Boolean>(p, &mVendorDebug.forceSynchronousDrain)) {
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
+ } else if (p.id == VendorDebug::kForceDrainToDrainingName) {
+ if (!extractParameter<Boolean>(p, &mVendorDebug.forceDrainToDraining)) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
} else {
allParametersKnown = false;
LOG(VERBOSE) << __func__ << ": " << mType << ": unrecognized parameter \"" << p.id
diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index 3d7f30c..4525f6a 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -382,8 +382,20 @@
const std::string StreamOutWorkerLogic::kThreadName = "writer";
StreamOutWorkerLogic::Status StreamOutWorkerLogic::cycle() {
- if (mState == StreamDescriptor::State::DRAINING ||
- mState == StreamDescriptor::State::TRANSFERRING) {
+ if (mState == StreamDescriptor::State::DRAINING && mContext->getForceDrainToDraining() &&
+ mOnDrainReadyStatus == OnDrainReadyStatus::UNSENT) {
+ std::shared_ptr<IStreamCallback> asyncCallback = mContext->getAsyncCallback();
+ if (asyncCallback != nullptr) {
+ ndk::ScopedAStatus status = asyncCallback->onDrainReady();
+ if (!status.isOk()) {
+ LOG(ERROR) << __func__ << ": error from onDrainReady: " << status;
+ }
+ // This sets the timeout for moving into IDLE on next iterations.
+ switchToTransientState(StreamDescriptor::State::DRAINING);
+ mOnDrainReadyStatus = OnDrainReadyStatus::SENT;
+ }
+ } else if (mState == StreamDescriptor::State::DRAINING ||
+ mState == StreamDescriptor::State::TRANSFERRING) {
if (auto stateDurationMs = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now() - mTransientStateStart);
stateDurationMs >= mTransientStateDelayMs) {
@@ -396,9 +408,12 @@
// drain or transfer completion. In the stub, we switch unconditionally.
if (mState == StreamDescriptor::State::DRAINING) {
mState = StreamDescriptor::State::IDLE;
- ndk::ScopedAStatus status = asyncCallback->onDrainReady();
- if (!status.isOk()) {
- LOG(ERROR) << __func__ << ": error from onDrainReady: " << status;
+ if (mOnDrainReadyStatus != OnDrainReadyStatus::SENT) {
+ ndk::ScopedAStatus status = asyncCallback->onDrainReady();
+ if (!status.isOk()) {
+ LOG(ERROR) << __func__ << ": error from onDrainReady: " << status;
+ }
+ mOnDrainReadyStatus = OnDrainReadyStatus::SENT;
}
} else {
mState = StreamDescriptor::State::ACTIVE;
@@ -537,6 +552,10 @@
mState = StreamDescriptor::State::IDLE;
} else {
switchToTransientState(StreamDescriptor::State::DRAINING);
+ mOnDrainReadyStatus =
+ mode == StreamDescriptor::DrainMode::DRAIN_EARLY_NOTIFY
+ ? OnDrainReadyStatus::UNSENT
+ : OnDrainReadyStatus::IGNORE;
}
} else {
LOG(ERROR) << __func__ << ": drain failed: " << status;
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 7e32cf2..d03598a 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -148,8 +148,10 @@
struct VendorDebug {
static const std::string kForceTransientBurstName;
static const std::string kForceSynchronousDrainName;
+ static const std::string kForceDrainToDrainingName;
bool forceTransientBurst = false;
bool forceSynchronousDrain = false;
+ bool forceDrainToDraining = false;
};
// ids of device ports created at runtime via 'connectExternalDevice'.
// Also stores a list of ids of mix ports with dynamic profiles that were populated from
diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index f7b9269..8297fc5 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -78,6 +78,10 @@
bool forceTransientBurst = false;
// Force the "drain" command to be synchronous, going directly to the IDLE state.
bool forceSynchronousDrain = false;
+ // Force the "drain early notify" command to keep the SM in the DRAINING state
+ // after sending 'onDrainReady' callback. The SM moves to IDLE after
+ // 'transientStateDelayMs'.
+ bool forceDrainToDraining = false;
};
StreamContext() = default;
@@ -119,6 +123,7 @@
::aidl::android::media::audio::common::AudioIoFlags getFlags() const { return mFlags; }
bool getForceTransientBurst() const { return mDebugParameters.forceTransientBurst; }
bool getForceSynchronousDrain() const { return mDebugParameters.forceSynchronousDrain; }
+ bool getForceDrainToDraining() const { return mDebugParameters.forceDrainToDraining; }
size_t getFrameSize() const;
int getInternalCommandCookie() const { return mInternalCommandCookie; }
int32_t getMixPortHandle() const { return mMixPortHandle; }
@@ -301,6 +306,9 @@
bool write(size_t clientSize, StreamDescriptor::Reply* reply);
std::shared_ptr<IStreamOutEventCallback> mEventCallback;
+
+ enum OnDrainReadyStatus : int32_t { IGNORE /*used for DRAIN_ALL*/, UNSENT, SENT };
+ OnDrainReadyStatus mOnDrainReadyStatus = OnDrainReadyStatus::IGNORE;
};
using StreamOutWorker = StreamWorkerImpl<StreamOutWorkerLogic>;
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index cbd42c0..467ad62 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -166,6 +166,9 @@
name: "VtsHalVisualizerTargetTest",
defaults: ["VtsHalAudioEffectTargetTestDefaults"],
srcs: ["VtsHalVisualizerTargetTest.cpp"],
+ shared_libs: [
+ "libaudioutils",
+ ],
}
cc_test {
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index d716975..570ecef 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -375,7 +375,8 @@
std::vector<float>& outputBuffer,
const std::shared_ptr<IEffect>& effect,
IEffect::OpenEffectReturn* openEffectReturn,
- int version = -1, int times = 1) {
+ int version = -1, int times = 1,
+ bool callStopReset = true) {
// Initialize AidlMessagequeues
auto statusMQ = std::make_unique<EffectHelper::StatusMQ>(openEffectReturn->statusMQ);
ASSERT_TRUE(statusMQ->isValid());
@@ -401,10 +402,14 @@
}
// Disable the process
- ASSERT_NO_FATAL_FAILURE(command(effect, CommandId::STOP));
+ if (callStopReset) {
+ ASSERT_NO_FATAL_FAILURE(command(effect, CommandId::STOP));
+ }
EXPECT_NO_FATAL_FAILURE(EffectHelper::readFromFmq(statusMQ, 0, outputMQ, 0, outputBuffer));
- ASSERT_NO_FATAL_FAILURE(command(effect, CommandId::RESET));
+ if (callStopReset) {
+ ASSERT_NO_FATAL_FAILURE(command(effect, CommandId::RESET));
+ }
}
// Find FFT bin indices for testFrequencies and get bin center frequencies
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 6bfba65..6bce107 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -117,6 +117,10 @@
using ndk::enum_range;
using ndk::ScopedAStatus;
+static constexpr int32_t kAidlVersion1 = 1;
+static constexpr int32_t kAidlVersion2 = 2;
+static constexpr int32_t kAidlVersion3 = 3;
+
template <typename T>
std::set<int32_t> extractIds(const std::vector<T>& v) {
std::set<int32_t> ids;
@@ -452,7 +456,6 @@
// This is implemented by the 'StreamFixture' utility class.
static constexpr int kNegativeTestBufferSizeFrames = 256;
static constexpr int kDefaultLargeBufferSizeFrames = 48000;
- static constexpr int32_t kAidlVersion3 = 3;
void SetUpImpl(const std::string& moduleName, bool setUpDebug = true) {
ASSERT_NO_FATAL_FAILURE(ConnectToService(moduleName, setUpDebug));
@@ -582,7 +585,7 @@
std::unique_ptr<WithDebugFlags> debug;
std::vector<AudioPort> initialPorts;
std::vector<AudioRoute> initialRoutes;
- int32_t aidlVersion;
+ int32_t aidlVersion = -1;
};
class WithDevicePortConnectedState {
@@ -1837,6 +1840,7 @@
}
TEST_P(AudioCoreModule, SetAudioPortConfigInvalidPortAudioGain) {
+ ASSERT_GE(aidlVersion, kAidlVersion1);
if (aidlVersion < kAidlVersion3) {
GTEST_SKIP() << "Skip for audio HAL version lower than " << kAidlVersion3;
}
@@ -4021,6 +4025,7 @@
enum {
NAMED_CMD_NAME,
+ NAMED_CMD_MIN_INTERFACE_VERSION,
NAMED_CMD_DELAY_MS,
NAMED_CMD_STREAM_TYPE,
NAMED_CMD_CMDS,
@@ -4028,7 +4033,7 @@
};
enum class StreamTypeFilter { ANY, SYNC, ASYNC };
using NamedCommandSequence =
- std::tuple<std::string, int /*cmdDelayMs*/, StreamTypeFilter,
+ std::tuple<std::string, int /*minInterfaceVersion*/, int /*cmdDelayMs*/, StreamTypeFilter,
std::shared_ptr<StateSequence>, bool /*validatePositionIncrease*/>;
enum { PARAM_MODULE_NAME, PARAM_CMD_SEQ, PARAM_SETUP_SEQ };
using StreamIoTestParameters =
@@ -4039,6 +4044,12 @@
public:
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(SetUpImpl(std::get<PARAM_MODULE_NAME>(GetParam())));
+ ASSERT_GE(aidlVersion, kAidlVersion1);
+ if (const int minVersion =
+ std::get<NAMED_CMD_MIN_INTERFACE_VERSION>(std::get<PARAM_CMD_SEQ>(GetParam()));
+ aidlVersion < minVersion) {
+ GTEST_SKIP() << "Skip for audio HAL version lower than " << minVersion;
+ }
ASSERT_NO_FATAL_FAILURE(SetUpModuleConfig());
}
@@ -4048,6 +4059,20 @@
if (allPortConfigs.empty()) {
GTEST_SKIP() << "No mix ports have attached devices";
}
+ const auto& commandsAndStates =
+ std::get<NAMED_CMD_CMDS>(std::get<PARAM_CMD_SEQ>(GetParam()));
+ const bool validatePositionIncrease =
+ std::get<NAMED_CMD_VALIDATE_POS_INCREASE>(std::get<PARAM_CMD_SEQ>(GetParam()));
+ auto runStreamIoCommands = [&](const AudioPortConfig& portConfig) {
+ if (!std::get<PARAM_SETUP_SEQ>(GetParam())) {
+ ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq1(portConfig, commandsAndStates,
+ validatePositionIncrease));
+ } else {
+ ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq2(portConfig, commandsAndStates,
+ validatePositionIncrease));
+ }
+ };
+
for (const auto& portConfig : allPortConfigs) {
auto port = moduleConfig->getPort(portConfig.portId);
ASSERT_TRUE(port.has_value());
@@ -4075,16 +4100,18 @@
delayTransientStates.flags().streamTransientStateDelayMs =
std::get<NAMED_CMD_DELAY_MS>(std::get<PARAM_CMD_SEQ>(GetParam()));
ASSERT_NO_FATAL_FAILURE(delayTransientStates.SetUp(module.get()));
- const auto& commandsAndStates =
- std::get<NAMED_CMD_CMDS>(std::get<PARAM_CMD_SEQ>(GetParam()));
- const bool validatePositionIncrease =
- std::get<NAMED_CMD_VALIDATE_POS_INCREASE>(std::get<PARAM_CMD_SEQ>(GetParam()));
- if (!std::get<PARAM_SETUP_SEQ>(GetParam())) {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq1(portConfig, commandsAndStates,
- validatePositionIncrease));
- } else {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq2(portConfig, commandsAndStates,
- validatePositionIncrease));
+ ASSERT_NO_FATAL_FAILURE(runStreamIoCommands(portConfig));
+ if (aidlVersion >= kAidlVersion3 && isNonBlocking && !IOTraits<Stream>::is_input) {
+ // Also try running the same sequence with "aosp.forceDrainToDraining" set.
+ // This will only work with the default implementation. When it works, the stream
+ // tries always to move to the 'DRAINING' state after an "early notify" drain.
+ // This helps to check more paths for our test scenarios.
+ WithModuleParameter forceDrainToDraining("aosp.forceDrainToDraining",
+ Boolean{true});
+ if (forceDrainToDraining.SetUpNoChecks(module.get(), true /*failureExpected*/)
+ .isOk()) {
+ ASSERT_NO_FATAL_FAILURE(runStreamIoCommands(portConfig));
+ }
}
if (isNonBlocking) {
// Also try running the same sequence with "aosp.forceTransientBurst" set.
@@ -4094,13 +4121,7 @@
WithModuleParameter forceTransientBurst("aosp.forceTransientBurst", Boolean{true});
if (forceTransientBurst.SetUpNoChecks(module.get(), true /*failureExpected*/)
.isOk()) {
- if (!std::get<PARAM_SETUP_SEQ>(GetParam())) {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq1(
- portConfig, commandsAndStates, validatePositionIncrease));
- } else {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq2(
- portConfig, commandsAndStates, validatePositionIncrease));
- }
+ ASSERT_NO_FATAL_FAILURE(runStreamIoCommands(portConfig));
}
} else if (!IOTraits<Stream>::is_input) {
// Also try running the same sequence with "aosp.forceSynchronousDrain" set.
@@ -4111,13 +4132,7 @@
Boolean{true});
if (forceSynchronousDrain.SetUpNoChecks(module.get(), true /*failureExpected*/)
.isOk()) {
- if (!std::get<PARAM_SETUP_SEQ>(GetParam())) {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq1(
- portConfig, commandsAndStates, validatePositionIncrease));
- } else {
- ASSERT_NO_FATAL_FAILURE(RunStreamIoCommandsImplSeq2(
- portConfig, commandsAndStates, validatePositionIncrease));
- }
+ ASSERT_NO_FATAL_FAILURE(runStreamIoCommands(portConfig));
}
}
}
@@ -4570,14 +4585,14 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kReadSeq =
- std::make_tuple(std::string("Read"), 0, StreamTypeFilter::ANY, makeBurstCommands(true),
- true /*validatePositionIncrease*/);
+ std::make_tuple(std::string("Read"), kAidlVersion1, 0, StreamTypeFilter::ANY,
+ makeBurstCommands(true), true /*validatePositionIncrease*/);
static const NamedCommandSequence kWriteSyncSeq =
- std::make_tuple(std::string("Write"), 0, StreamTypeFilter::SYNC, makeBurstCommands(true),
- true /*validatePositionIncrease*/);
+ std::make_tuple(std::string("Write"), kAidlVersion1, 0, StreamTypeFilter::SYNC,
+ makeBurstCommands(true), true /*validatePositionIncrease*/);
static const NamedCommandSequence kWriteAsyncSeq =
- std::make_tuple(std::string("Write"), 0, StreamTypeFilter::ASYNC, makeBurstCommands(false),
- true /*validatePositionIncrease*/);
+ std::make_tuple(std::string("Write"), kAidlVersion1, 0, StreamTypeFilter::ASYNC,
+ makeBurstCommands(false), true /*validatePositionIncrease*/);
std::shared_ptr<StateSequence> makeAsyncDrainCommands(bool isInput) {
using State = StreamDescriptor::State;
@@ -4606,10 +4621,10 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kWriteDrainAsyncSeq = std::make_tuple(
- std::string("WriteDrain"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
- makeAsyncDrainCommands(false), false /*validatePositionIncrease*/);
+ std::string("WriteDrain"), kAidlVersion1, kStreamTransientStateTransitionDelayMs,
+ StreamTypeFilter::ASYNC, makeAsyncDrainCommands(false), false /*validatePositionIncrease*/);
static const NamedCommandSequence kDrainInSeq =
- std::make_tuple(std::string("Drain"), 0, StreamTypeFilter::ANY,
+ std::make_tuple(std::string("Drain"), kAidlVersion1, 0, StreamTypeFilter::ANY,
makeAsyncDrainCommands(true), false /*validatePositionIncrease*/);
std::shared_ptr<StateSequence> makeDrainOutCommands(bool isSync) {
@@ -4631,12 +4646,28 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kDrainOutSyncSeq =
- std::make_tuple(std::string("Drain"), 0, StreamTypeFilter::SYNC, makeDrainOutCommands(true),
- false /*validatePositionIncrease*/);
+ std::make_tuple(std::string("Drain"), kAidlVersion1, 0, StreamTypeFilter::SYNC,
+ makeDrainOutCommands(true), false /*validatePositionIncrease*/);
static const NamedCommandSequence kDrainOutAsyncSeq =
- std::make_tuple(std::string("Drain"), 0, StreamTypeFilter::ASYNC,
+ std::make_tuple(std::string("Drain"), kAidlVersion3, 0, StreamTypeFilter::ASYNC,
makeDrainOutCommands(false), false /*validatePositionIncrease*/);
+std::shared_ptr<StateSequence> makeDrainEarlyOutCommands() {
+ using State = StreamDescriptor::State;
+ auto d = std::make_unique<StateDag>();
+ StateDag::Node last = d->makeFinalNode(State::IDLE);
+ StateDag::Node draining = d->makeNode(State::DRAINING, kDrainReadyEvent, last);
+ draining.children().push_back(d->makeNode(State::DRAINING, kGetStatusCommand, last));
+ StateDag::Node active = d->makeNode(State::ACTIVE, kDrainOutEarlyCommand, draining);
+ StateDag::Node idle = d->makeNode(State::IDLE, kBurstCommand, active);
+ idle.children().push_back(d->makeNode(State::TRANSFERRING, kTransferReadyEvent, active));
+ d->makeNode(State::STANDBY, kStartCommand, idle);
+ return std::make_shared<StateSequenceFollower>(std::move(d));
+}
+static const NamedCommandSequence kDrainEarlyOutAsyncSeq =
+ std::make_tuple(std::string("DrainEarly"), kAidlVersion3, 0, StreamTypeFilter::ASYNC,
+ makeDrainEarlyOutCommands(), false /*validatePositionIncrease*/);
+
std::shared_ptr<StateSequence> makeDrainPauseOutCommands(bool isSync) {
using State = StreamDescriptor::State;
auto d = std::make_unique<StateDag>();
@@ -4656,12 +4687,33 @@
d->makeNode(State::STANDBY, kStartCommand, idle);
return std::make_shared<StateSequenceFollower>(std::move(d));
}
-static const NamedCommandSequence kDrainPauseOutSyncSeq = std::make_tuple(
- std::string("DrainPause"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::SYNC,
- makeDrainPauseOutCommands(true), false /*validatePositionIncrease*/);
-static const NamedCommandSequence kDrainPauseOutAsyncSeq = std::make_tuple(
- std::string("DrainPause"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
- makeDrainPauseOutCommands(false), false /*validatePositionIncrease*/);
+static const NamedCommandSequence kDrainPauseOutSyncSeq =
+ std::make_tuple(std::string("DrainPause"), kAidlVersion1,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::SYNC,
+ makeDrainPauseOutCommands(true), false /*validatePositionIncrease*/);
+static const NamedCommandSequence kDrainPauseOutAsyncSeq =
+ std::make_tuple(std::string("DrainPause"), kAidlVersion1,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
+ makeDrainPauseOutCommands(false), false /*validatePositionIncrease*/);
+
+std::shared_ptr<StateSequence> makeDrainEarlyPauseOutCommands() {
+ using State = StreamDescriptor::State;
+ auto d = std::make_unique<StateDag>();
+ StateDag::Node draining = d->makeNodes({std::make_pair(State::DRAINING, kPauseCommand),
+ std::make_pair(State::DRAIN_PAUSED, kStartCommand),
+ std::make_pair(State::DRAINING, kPauseCommand),
+ std::make_pair(State::DRAIN_PAUSED, kBurstCommand)},
+ State::TRANSFER_PAUSED);
+ StateDag::Node active = d->makeNode(State::ACTIVE, kDrainOutEarlyCommand, draining);
+ StateDag::Node idle = d->makeNode(State::IDLE, kBurstCommand, active);
+ idle.children().push_back(d->makeNode(State::TRANSFERRING, kDrainOutEarlyCommand, draining));
+ d->makeNode(State::STANDBY, kStartCommand, idle);
+ return std::make_shared<StateSequenceFollower>(std::move(d));
+}
+static const NamedCommandSequence kDrainEarlyPauseOutAsyncSeq =
+ std::make_tuple(std::string("DrainEarlyPause"), kAidlVersion3,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
+ makeDrainEarlyPauseOutCommands(), false /*validatePositionIncrease*/);
// This sequence also verifies that the capture / presentation position is not reset on standby.
std::shared_ptr<StateSequence> makeStandbyCommands(bool isInput, bool isSync) {
@@ -4703,14 +4755,15 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kStandbyInSeq =
- std::make_tuple(std::string("Standby"), 0, StreamTypeFilter::ANY,
+ std::make_tuple(std::string("Standby"), kAidlVersion1, 0, StreamTypeFilter::ANY,
makeStandbyCommands(true, false), false /*validatePositionIncrease*/);
static const NamedCommandSequence kStandbyOutSyncSeq =
- std::make_tuple(std::string("Standby"), 0, StreamTypeFilter::SYNC,
+ std::make_tuple(std::string("Standby"), kAidlVersion1, 0, StreamTypeFilter::SYNC,
makeStandbyCommands(false, true), false /*validatePositionIncrease*/);
-static const NamedCommandSequence kStandbyOutAsyncSeq = std::make_tuple(
- std::string("Standby"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
- makeStandbyCommands(false, false), false /*validatePositionIncrease*/);
+static const NamedCommandSequence kStandbyOutAsyncSeq =
+ std::make_tuple(std::string("Standby"), kAidlVersion1,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
+ makeStandbyCommands(false, false), false /*validatePositionIncrease*/);
std::shared_ptr<StateSequence> makePauseCommands(bool isInput, bool isSync) {
using State = StreamDescriptor::State;
@@ -4745,14 +4798,15 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kPauseInSeq =
- std::make_tuple(std::string("Pause"), 0, StreamTypeFilter::ANY,
+ std::make_tuple(std::string("Pause"), kAidlVersion1, 0, StreamTypeFilter::ANY,
makePauseCommands(true, false), false /*validatePositionIncrease*/);
static const NamedCommandSequence kPauseOutSyncSeq =
- std::make_tuple(std::string("Pause"), 0, StreamTypeFilter::SYNC,
+ std::make_tuple(std::string("Pause"), kAidlVersion1, 0, StreamTypeFilter::SYNC,
makePauseCommands(false, true), false /*validatePositionIncrease*/);
-static const NamedCommandSequence kPauseOutAsyncSeq = std::make_tuple(
- std::string("Pause"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
- makePauseCommands(false, false), false /*validatePositionIncrease*/);
+static const NamedCommandSequence kPauseOutAsyncSeq =
+ std::make_tuple(std::string("Pause"), kAidlVersion1, kStreamTransientStateTransitionDelayMs,
+ StreamTypeFilter::ASYNC, makePauseCommands(false, false),
+ false /*validatePositionIncrease*/);
std::shared_ptr<StateSequence> makeFlushCommands(bool isInput, bool isSync) {
using State = StreamDescriptor::State;
@@ -4780,14 +4834,15 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kFlushInSeq =
- std::make_tuple(std::string("Flush"), 0, StreamTypeFilter::ANY,
+ std::make_tuple(std::string("Flush"), kAidlVersion1, 0, StreamTypeFilter::ANY,
makeFlushCommands(true, false), false /*validatePositionIncrease*/);
static const NamedCommandSequence kFlushOutSyncSeq =
- std::make_tuple(std::string("Flush"), 0, StreamTypeFilter::SYNC,
+ std::make_tuple(std::string("Flush"), kAidlVersion1, 0, StreamTypeFilter::SYNC,
makeFlushCommands(false, true), false /*validatePositionIncrease*/);
-static const NamedCommandSequence kFlushOutAsyncSeq = std::make_tuple(
- std::string("Flush"), kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
- makeFlushCommands(false, false), false /*validatePositionIncrease*/);
+static const NamedCommandSequence kFlushOutAsyncSeq =
+ std::make_tuple(std::string("Flush"), kAidlVersion1, kStreamTransientStateTransitionDelayMs,
+ StreamTypeFilter::ASYNC, makeFlushCommands(false, false),
+ false /*validatePositionIncrease*/);
std::shared_ptr<StateSequence> makeDrainPauseFlushOutCommands(bool isSync) {
using State = StreamDescriptor::State;
@@ -4807,13 +4862,13 @@
return std::make_shared<StateSequenceFollower>(std::move(d));
}
static const NamedCommandSequence kDrainPauseFlushOutSyncSeq =
- std::make_tuple(std::string("DrainPauseFlush"), kStreamTransientStateTransitionDelayMs,
- StreamTypeFilter::SYNC, makeDrainPauseFlushOutCommands(true),
- false /*validatePositionIncrease*/);
+ std::make_tuple(std::string("DrainPauseFlush"), kAidlVersion1,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::SYNC,
+ makeDrainPauseFlushOutCommands(true), false /*validatePositionIncrease*/);
static const NamedCommandSequence kDrainPauseFlushOutAsyncSeq =
- std::make_tuple(std::string("DrainPauseFlush"), kStreamTransientStateTransitionDelayMs,
- StreamTypeFilter::ASYNC, makeDrainPauseFlushOutCommands(false),
- false /*validatePositionIncrease*/);
+ std::make_tuple(std::string("DrainPauseFlush"), kAidlVersion1,
+ kStreamTransientStateTransitionDelayMs, StreamTypeFilter::ASYNC,
+ makeDrainPauseFlushOutCommands(false), false /*validatePositionIncrease*/);
// Note, this isn't the "official" enum printer, it is only used to make the test name suffix.
std::string PrintStreamFilterToString(StreamTypeFilter filter) {
@@ -4851,9 +4906,10 @@
AudioStreamIoOutTest, AudioStreamIoOut,
testing::Combine(testing::ValuesIn(android::getAidlHalInstanceNames(IModule::descriptor)),
testing::Values(kWriteSyncSeq, kWriteAsyncSeq, kWriteDrainAsyncSeq,
- kDrainOutSyncSeq, kDrainPauseOutSyncSeq,
- kDrainPauseOutAsyncSeq, kStandbyOutSyncSeq,
- kStandbyOutAsyncSeq,
+ kDrainOutSyncSeq, kDrainOutAsyncSeq,
+ kDrainEarlyOutAsyncSeq, kDrainPauseOutSyncSeq,
+ kDrainPauseOutAsyncSeq, kDrainEarlyPauseOutAsyncSeq,
+ kStandbyOutSyncSeq, kStandbyOutAsyncSeq,
kPauseOutSyncSeq, // kPauseOutAsyncSeq,
kFlushOutSyncSeq, kFlushOutAsyncSeq,
kDrainPauseFlushOutSyncSeq, kDrainPauseFlushOutAsyncSeq),
diff --git a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
index a0e43bc..a942521 100644
--- a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
@@ -19,6 +19,7 @@
#define LOG_TAG "VtsHalVisualizerTest"
#include <android-base/logging.h>
#include <android/binder_enums.h>
+#include <audio_utils/power.h>
#include "EffectHelper.h"
@@ -44,9 +45,8 @@
PARAM_MEASUREMENT_MODE,
PARAM_LATENCY,
};
-using VisualizerParamTestParam =
- std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int, Visualizer::ScalingMode,
- Visualizer::MeasurementMode, int>;
+using VisualizerTestParam = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int,
+ Visualizer::ScalingMode, Visualizer::MeasurementMode, int>;
class VisualizerTestHelper : public EffectHelper {
public:
@@ -139,10 +139,15 @@
{Visualizer::latencyMs, Visualizer::make<Visualizer::latencyMs>(latency)});
}
+ static std::unordered_set<Visualizer::ScalingMode> getScalingModeValues() {
+ return {ndk::enum_range<Visualizer::ScalingMode>().begin(),
+ ndk::enum_range<Visualizer::ScalingMode>().end()};
+ }
+
static constexpr long kInputFrameCount = 0x100, kOutputFrameCount = 0x100;
const size_t mChannelCount =
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
- AudioChannelLayout::LAYOUT_STEREO));
+ AudioChannelLayout::LAYOUT_MONO));
const size_t mBufferSizeInFrames = kInputFrameCount * mChannelCount;
const int mCaptureSize;
const int mLatency;
@@ -161,7 +166,7 @@
void CleanUp() { mCommonTags.clear(); }
};
-class VisualizerParamTest : public ::testing::TestWithParam<VisualizerParamTestParam>,
+class VisualizerParamTest : public ::testing::TestWithParam<VisualizerTestParam>,
public VisualizerTestHelper {
public:
VisualizerParamTest()
@@ -181,11 +186,6 @@
return {ndk::enum_range<Visualizer::MeasurementMode>().begin(),
ndk::enum_range<Visualizer::MeasurementMode>().end()};
}
-
- static std::unordered_set<Visualizer::ScalingMode> getScalingModeValues() {
- return {ndk::enum_range<Visualizer::ScalingMode>().begin(),
- ndk::enum_range<Visualizer::ScalingMode>().end()};
- }
};
TEST_P(VisualizerParamTest, SetAndGetCaptureSize) {
@@ -237,6 +237,82 @@
}
}
+class VisualizerDataTest : public ::testing::TestWithParam<VisualizerTestParam>,
+ public VisualizerTestHelper {
+ public:
+ VisualizerDataTest()
+ : VisualizerTestHelper(std::get<PARAM_INSTANCE_NAME>(GetParam()),
+ std::get<PARAM_CAPTURE_SIZE>(GetParam()),
+ std::get<PARAM_LATENCY>(GetParam()),
+ std::get<PARAM_SCALING_MODE>(GetParam()),
+ std::get<PARAM_MEASUREMENT_MODE>(GetParam())) {}
+
+ void SetUp() override { SetUpVisualizer(); }
+
+ void TearDown() override { TearDownVisualizer(); }
+};
+
+TEST_P(VisualizerDataTest, testScalingModeParameters) {
+ SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+
+ // This test holds true for the following range
+ static_assert(kMaxAudioSampleValue <= 1.0 && kMaxAudioSampleValue > 0.0,
+ "Valid range of kMaxAudioSample value for the test: (0.0, 1.0]");
+
+ constexpr float kPowerToleranceDb = 0.5;
+
+ generateSineWave(std::vector<int>{1000}, mInputBuffer, 1.0, mBufferSizeInFrames);
+ const float expectedPowerNormalized = audio_utils_compute_power_mono(
+ mInputBuffer.data(), AUDIO_FORMAT_PCM_FLOAT, mInputBuffer.size());
+
+ const std::vector<float> testMaxAudioSampleValueList = {
+ 0.25 * kMaxAudioSampleValue, 0.5 * kMaxAudioSampleValue, 0.75 * kMaxAudioSampleValue,
+ kMaxAudioSampleValue};
+
+ Parameter::Id idCsb;
+ Visualizer::Id vsIdCsb;
+ vsIdCsb.set<Visualizer::Id::commonTag>(Visualizer::captureSampleBuffer);
+ idCsb.set<Parameter::Id::visualizerTag>(vsIdCsb);
+
+ for (float maxAudioSampleValue : testMaxAudioSampleValueList) {
+ bool allParamsValid = true;
+ ASSERT_NO_FATAL_FAILURE(addCaptureSizeParam(mCaptureSize));
+ ASSERT_NO_FATAL_FAILURE(addScalingModeParam(mScalingMode));
+ ASSERT_NO_FATAL_FAILURE(addLatencyParam(mLatency));
+ ASSERT_NO_FATAL_FAILURE(SetAndGetParameters(&allParamsValid));
+
+ generateSineWave(std::vector<int>{1000}, mInputBuffer, maxAudioSampleValue,
+ mBufferSizeInFrames);
+
+ // The stop and reset calls to the effect are made towards the end in order to fetch the
+ // captureSampleBuffer values
+ ASSERT_NO_FATAL_FAILURE(processAndWriteToOutput(mInputBuffer, mOutputBuffer, mEffect,
+ &mOpenEffectReturn, mVersion, 1, false));
+ if (allParamsValid) {
+ Parameter getParam;
+ EXPECT_STATUS(EX_NONE, mEffect->getParameter(idCsb, &getParam))
+ << " with: " << idCsb.toString();
+ std::vector<uint8_t> captureBuffer = getParam.get<Parameter::specific>()
+ .get<Parameter::Specific::visualizer>()
+ .get<Visualizer::captureSampleBuffer>();
+ ASSERT_EQ((size_t)mCaptureSize, captureBuffer.size());
+
+ float currPowerCsb = audio_utils_compute_power_mono(
+ captureBuffer.data(), AUDIO_FORMAT_PCM_8_BIT, mCaptureSize);
+
+ if (mScalingMode == Visualizer::ScalingMode::NORMALIZED) {
+ EXPECT_NEAR(currPowerCsb, expectedPowerNormalized, kPowerToleranceDb);
+ } else {
+ float powerI = audio_utils_compute_power_mono(
+ mInputBuffer.data(), AUDIO_FORMAT_PCM_FLOAT, mInputBuffer.size());
+ EXPECT_NEAR(currPowerCsb, powerI, kPowerToleranceDb);
+ }
+ }
+ ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::STOP));
+ ASSERT_NO_FATAL_FAILURE(command(mEffect, CommandId::RESET));
+ }
+}
+
std::vector<std::pair<std::shared_ptr<IFactory>, Descriptor>> kDescPair;
INSTANTIATE_TEST_SUITE_P(
VisualizerParamTest, VisualizerParamTest,
@@ -246,7 +322,7 @@
testing::ValuesIn(EffectHelper::getTestValueSet<Visualizer, int, Range::visualizer,
Visualizer::captureSamples>(
kDescPair, EffectHelper::expandTestValueBasic<int>)),
- testing::ValuesIn(VisualizerParamTest::getScalingModeValues()),
+ testing::ValuesIn(VisualizerTestHelper::getScalingModeValues()),
testing::ValuesIn(VisualizerParamTest::getMeasurementModeValues()),
testing::ValuesIn(EffectHelper::getTestValueSet<Visualizer, int, Range::visualizer,
Visualizer::latencyMs>(
@@ -270,6 +346,35 @@
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VisualizerParamTest);
+INSTANTIATE_TEST_SUITE_P(
+ VisualizerDataTest, VisualizerDataTest,
+ ::testing::Combine(
+ testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidVisualizer())),
+ testing::Values(128), // captureSize
+ testing::ValuesIn(VisualizerTestHelper::getScalingModeValues()),
+ testing::Values(Visualizer::MeasurementMode::PEAK_RMS),
+ testing::Values(0) // latency
+ ),
+ [](const testing::TestParamInfo<VisualizerDataTest::ParamType>& info) {
+ auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
+ std::string captureSize = std::to_string(std::get<PARAM_CAPTURE_SIZE>(info.param));
+ std::string scalingMode = aidl::android::hardware::audio::effect::toString(
+ std::get<PARAM_SCALING_MODE>(info.param));
+ std::string measurementMode = aidl::android::hardware::audio::effect::toString(
+ std::get<PARAM_MEASUREMENT_MODE>(info.param));
+ std::string latency = std::to_string(std::get<PARAM_LATENCY>(info.param));
+
+ std::string name = getPrefix(descriptor) + "_captureSize" + captureSize +
+ "_scalingMode" + scalingMode + "_measurementMode" + measurementMode +
+ "_latency" + latency;
+ std::replace_if(
+ name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
+ return name;
+ });
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VisualizerDataTest);
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer());
diff --git a/authsecret/1.0/vts/functional/Android.bp b/authsecret/1.0/vts/functional/Android.bp
index 853b4dd..388cf3c 100644
--- a/authsecret/1.0/vts/functional/Android.bp
+++ b/authsecret/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/authsecret/aidl/vts/Android.bp b/authsecret/aidl/vts/Android.bp
index 5ec9947..bde1a40 100644
--- a/authsecret/aidl/vts/Android.bp
+++ b/authsecret/aidl/vts/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/automotive/can/1.0/default/libnetdevice/Android.bp b/automotive/can/1.0/default/libnetdevice/Android.bp
index 653e773..b42893e 100644
--- a/automotive/can/1.0/default/libnetdevice/Android.bp
+++ b/automotive/can/1.0/default/libnetdevice/Android.bp
@@ -23,10 +23,19 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_library_static {
- name: "android.hardware.automotive.can@libnetdevice",
- defaults: ["android.hardware.automotive.can@defaults"],
+cc_defaults {
+ name: "libnetdevice-common",
vendor_available: true,
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
+ ],
+ shared_libs: [
+ "libbase",
+ "libutils",
+ ],
srcs: [
"can.cpp",
"common.cpp",
@@ -40,3 +49,14 @@
"libnl++",
],
}
+
+// TODO: migrate to "libnetdevice" and remove
+cc_library_static {
+ name: "android.hardware.automotive.can@libnetdevice",
+ defaults: ["libnetdevice-common"],
+}
+
+cc_library_static {
+ name: "libnetdevice",
+ defaults: ["libnetdevice-common"],
+}
diff --git a/automotive/can/1.0/default/libnl++/Android.bp b/automotive/can/1.0/default/libnl++/Android.bp
index 01c1e55..d929d84 100644
--- a/automotive/can/1.0/default/libnl++/Android.bp
+++ b/automotive/can/1.0/default/libnl++/Android.bp
@@ -25,8 +25,17 @@
cc_library_static {
name: "libnl++",
- defaults: ["android.hardware.automotive.can@defaults"],
vendor_available: true,
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
+ ],
+ shared_libs: [
+ "libbase",
+ "libutils",
+ ],
srcs: [
"protocols/common/Empty.cpp",
"protocols/common/Error.cpp",
diff --git a/bluetooth/ranging/OWNERS b/bluetooth/ranging/OWNERS
index 3d95624..88a91ea 100644
--- a/bluetooth/ranging/OWNERS
+++ b/bluetooth/ranging/OWNERS
@@ -3,3 +3,4 @@
include platform/packages/modules/Bluetooth:/OWNERS
chienyuanhuang@google.com
+steveliu@google.com
diff --git a/bluetooth/ranging/aidl/Android.bp b/bluetooth/ranging/aidl/Android.bp
index d0d1b90..4096669 100644
--- a/bluetooth/ranging/aidl/Android.bp
+++ b/bluetooth/ranging/aidl/Android.bp
@@ -42,6 +42,6 @@
imports: [],
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
index e8fefbe..03a7d24 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
@@ -38,6 +38,9 @@
int aclHandle;
int l2capCid;
int realTimeProcedureDataAttHandle;
+ /**
+ * @deprecated use the role in Config.aidl
+ */
android.hardware.bluetooth.ranging.Role role;
boolean localSupportsSoundingPhaseBasedRanging;
boolean remoteSupportsSoundingPhaseBaseRanging;
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl
new file mode 100644
index 0000000..70bed88
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum Ch3cShapeType {
+ HAT_SHAPE = 0x00,
+ X_SHAPE = 0x01,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl
new file mode 100644
index 0000000..78bbbc1
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum ChannelSelectionType {
+ ALOGRITHM_3B = 0x00,
+ ALOGRITHM_3C = 0x01,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
index 8fc77ae..64aabec 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
@@ -32,6 +32,9 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
+/**
+ * @deprecated use ChannelSoundingProcedureData
+ */
@VintfStability
parcelable ChannelSoudingRawData {
int procedureCounter;
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl
new file mode 100644
index 0000000..ef4facc
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable ChannelSoundingProcedureData {
+ int procedureCounter;
+ int procedureSequence;
+ byte initiatorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE /* 127 */;
+ byte reflectorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE /* 127 */;
+ android.hardware.bluetooth.ranging.SubeventResultData[] initiatorSubeventResultData;
+ android.hardware.bluetooth.ranging.ProcedureAbortReason initiatorProcedureAbortReason;
+ android.hardware.bluetooth.ranging.SubeventResultData[] reflectorSubeventResultData;
+ android.hardware.bluetooth.ranging.ProcedureAbortReason reflectorProcedureAbortReason;
+ const byte SELECTED_TX_POWER_UNAVAILABLE = 0x7Fu8;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
index 172ac5e..b86994e 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
@@ -32,6 +32,9 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
+/**
+ * @deprecated use ChannelSoundingProcedureData
+ */
@VintfStability
parcelable ChannelSoundingSingleSideData {
@nullable android.hardware.bluetooth.ranging.StepTonePct[] stepTonePcts;
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ComplexNumber.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ComplexNumber.aidl
index 4d5ac21..c3d5d91 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ComplexNumber.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ComplexNumber.aidl
@@ -32,6 +32,9 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
+/**
+ * @deprecated use PctIQSample instead for V2 and above.
+ */
@VintfStability
parcelable ComplexNumber {
double real;
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Config.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Config.aidl
index c9ac991..bd07cd0 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Config.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/Config.aidl
@@ -38,4 +38,22 @@
android.hardware.bluetooth.ranging.SubModeType subModeType;
android.hardware.bluetooth.ranging.RttType rttType;
byte[10] channelMap;
+ int minMainModeSteps;
+ int maxMainModeSteps;
+ byte mainModeRepetition;
+ byte mode0Steps;
+ android.hardware.bluetooth.ranging.Role role;
+ android.hardware.bluetooth.ranging.CsSyncPhyType csSyncPhyType;
+ android.hardware.bluetooth.ranging.ChannelSelectionType channelSelectionType;
+ android.hardware.bluetooth.ranging.Ch3cShapeType ch3cShapeType;
+ byte ch3cJump;
+ int channelMapRepetition;
+ int tIp1TimeUs;
+ int tIp2TimeUs;
+ int tFcsTimeUs;
+ byte tPmTimeUs;
+ byte tSwTimeUsSupportedByLocal;
+ byte tSwTimeUsSupportedByRemote;
+ int bleConnInterval = BLE_CONN_INTERVAL_UNAVAILABLE /* 0 */;
+ const int BLE_CONN_INTERVAL_UNAVAILABLE = 0;
}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl
new file mode 100644
index 0000000..9611f13
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum CsSyncPhyType {
+ NOT_VALID_PHY = 0x00,
+ LE_1M_PHY = 0x01,
+ LE_2M_PHY = 0x02,
+ LE_2M_2BT_PHY = 0x03,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
index 004a482..19b949f 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
@@ -36,6 +36,10 @@
interface IBluetoothChannelSounding {
@nullable android.hardware.bluetooth.ranging.VendorSpecificData[] getVendorSpecificData();
@nullable android.hardware.bluetooth.ranging.SessionType[] getSupportedSessionTypes();
+ /**
+ * @deprecated use getSupportedCsSecurityLevels() instead
+ */
android.hardware.bluetooth.ranging.CsSecurityLevel getMaxSupportedCsSecurityLevel();
@nullable android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSession openSession(in android.hardware.bluetooth.ranging.BluetoothChannelSoundingParameters params, in android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSessionCallback callback);
+ android.hardware.bluetooth.ranging.CsSecurityLevel[] getSupportedCsSecurityLevels();
}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
index 9f691b4..99418bc 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
@@ -39,4 +39,8 @@
boolean isAbortedProcedureRequired();
void writeRawData(in android.hardware.bluetooth.ranging.ChannelSoudingRawData rawData);
void close(android.hardware.bluetooth.ranging.Reason reason);
+ void writeProcedureData(in android.hardware.bluetooth.ranging.ChannelSoundingProcedureData procedureData);
+ void updateChannelSoundingConfig(in android.hardware.bluetooth.ranging.Config conifg);
+ void updateProcedureEnableConfig(in android.hardware.bluetooth.ranging.ProcedureEnableConfig procedureEnableConfig);
+ void updateBleConnInterval(in int bleConnInterval);
}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeData.aidl
new file mode 100644
index 0000000..6fdfffe
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeData.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+union ModeData {
+ android.hardware.bluetooth.ranging.ModeZeroData modeZeroData;
+ android.hardware.bluetooth.ranging.ModeOneData modeOneData;
+ android.hardware.bluetooth.ranging.ModeTwoData modeTwoData;
+ android.hardware.bluetooth.ranging.ModeThreeData modeThreeData;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeOneData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeOneData.aidl
new file mode 100644
index 0000000..698dd63
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeOneData.aidl
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable ModeOneData {
+ byte packetQuality;
+ android.hardware.bluetooth.ranging.Nadm packetNadm;
+ byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE /* 127 */;
+ android.hardware.bluetooth.ranging.RttToaTodData rttToaTodData;
+ byte packetAntenna;
+ @nullable android.hardware.bluetooth.ranging.PctIQSample packetPct1;
+ @nullable android.hardware.bluetooth.ranging.PctIQSample packetPct2;
+ const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
+ const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
+ const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
+ const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF;
+ const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
+ const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeThreeData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeThreeData.aidl
new file mode 100644
index 0000000..1aa928b
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeThreeData.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable ModeThreeData {
+ android.hardware.bluetooth.ranging.ModeOneData modeOneData;
+ android.hardware.bluetooth.ranging.ModeTwoData modeTwoData;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeTwoData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeTwoData.aidl
new file mode 100644
index 0000000..c07b0c0
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeTwoData.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable ModeTwoData {
+ byte antennaPermutationIndex;
+ android.hardware.bluetooth.ranging.PctIQSample[] tonePctIQSamples;
+ byte[] toneQualityIndicators;
+ const int TONE_QUALITY_HIGH = 0x0;
+ const int TONE_QUALITY_MEDIUM = 0x1;
+ const int TONE_QUALITY_LOW = 0x2;
+ const int TONE_QUALITY_UNAVAILABLE = 0x3;
+ const int EXTENSION_SLOT_NONE = 0x0;
+ const int EXTENSION_SLOT_TONE_NOT_EXPECTED_TO_BE_PRESENT = 0x1;
+ const int EXTENSION_SLOT_TONE_EXPECTED_TO_BE_PRESENT = 0x2;
+ const int EXTENSION_SLOT_SHIFT = 4;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeZeroData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeZeroData.aidl
new file mode 100644
index 0000000..f94f3d1
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeZeroData.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2023 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.bluetooth.ranging;
+@VintfStability
+parcelable ModeZeroData {
+ byte packetQuality;
+ byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE /* 127 */;
+ byte packetAntenna;
+ int initiatorMeasuredFreqOffset = MEASURED_FREQ_OFFSET_UNAVAILABLE /* -16384 */;
+ const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
+ const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
+ const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
+ const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF;
+ const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
+ const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
+ const int MEASURED_FREQ_OFFSET_UNAVAILABLE = 0xFFFFC000;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/PctIQSample.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/PctIQSample.aidl
new file mode 100644
index 0000000..a15b579
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/PctIQSample.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable PctIQSample {
+ int iSample = SAMPLE_UNAVAILABLE /* -1 */;
+ int qSample = SAMPLE_UNAVAILABLE /* -1 */;
+ const int SAMPLE_UNAVAILABLE = 0xFFFFFFFF;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl
new file mode 100644
index 0000000..ead7ceb
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum ProcedureAbortReason {
+ SUCCESS = 0x0,
+ LOCAL_OR_REMOTE_REQUEST = 0x01,
+ FILTERED_CHANNEL_MAP_LESS_THAN_15 = 0x02,
+ CHANNEL_MAP_UPDATE_INSTANT_PASSED = 0x03,
+ UNSPECIFIED = 0x0F,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl
new file mode 100644
index 0000000..11030bb
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable ProcedureEnableConfig {
+ byte toneAntennaConfigSelection;
+ int subeventLenUs;
+ byte subeventsPerEvent;
+ int subeventInterval;
+ int eventInterval;
+ int procedureInterval;
+ int procedureCount;
+ int maxProcedureLen;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResult.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResult.aidl
index d092b80..ccac70b 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResult.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResult.aidl
@@ -45,4 +45,6 @@
android.hardware.bluetooth.ranging.Nadm detectedAttackLevel;
double velocityMetersPerSecond;
@nullable byte[] vendorSpecificCsRangingResultsData;
+ android.hardware.bluetooth.ranging.RangingResultStatus rangingResultStatus;
+ long timestampNanos;
}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResultStatus.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResultStatus.aidl
new file mode 100644
index 0000000..cdf8ed2
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RangingResultStatus.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum RangingResultStatus {
+ SUCCESS = 0x00,
+ FAIL_INITIATOR_ABORT = 0x01,
+ FAIL_REFLECTOR_ABORT = 0x02,
+ FAIL_BOTH_ABORT = 0x03,
+ FAIL_UNSPECIFIED = 0xFFu8,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RttToaTodData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RttToaTodData.aidl
new file mode 100644
index 0000000..496ccb2
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/RttToaTodData.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+union RttToaTodData {
+ int toaTodInitiator = TOA_TOD_UNAVAILABLE /* -32768 */;
+ int todToaReflector = TOA_TOD_UNAVAILABLE /* -32768 */;
+ const int TOA_TOD_UNAVAILABLE = 0xFFFF8000;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepData.aidl
new file mode 100644
index 0000000..cdebc8e
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepData.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable StepData {
+ byte stepChannel;
+ android.hardware.bluetooth.ranging.ModeType stepMode;
+ android.hardware.bluetooth.ranging.ModeData stepModeData;
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepTonePct.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepTonePct.aidl
index 4125748..02d5413 100644
--- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepTonePct.aidl
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/StepTonePct.aidl
@@ -32,6 +32,9 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.ranging;
+/**
+ * @deprecated use ModeTwoData
+ */
@VintfStability
parcelable StepTonePct {
List<android.hardware.bluetooth.ranging.ComplexNumber> tonePcts;
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl
new file mode 100644
index 0000000..a3bb366
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@Backing(type="byte") @VintfStability
+enum SubeventAbortReason {
+ SUCCESS = 0x0,
+ LOCAL_OR_REMOTE_REQUEST = 0x01,
+ NO_CS_SYNC_RECEIVED = 0x02,
+ SCHEDULING_CONFLICTS_OR_LIMITED_RESOURCES = 0x03,
+ UNSPECIFIED = 0x0F,
+}
diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventResultData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventResultData.aidl
new file mode 100644
index 0000000..3a7c393
--- /dev/null
+++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubeventResultData.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.bluetooth.ranging;
+@VintfStability
+parcelable SubeventResultData {
+ int startAclConnEventCounter;
+ int frequencyCompensation = FREQ_COMPENSATION_UNAVAILABLE /* -16384 */;
+ byte referencePowerLevelDbm;
+ byte numAntennaPaths;
+ android.hardware.bluetooth.ranging.SubeventAbortReason subeventAbortReason;
+ android.hardware.bluetooth.ranging.StepData[] stepData;
+ long timestampNanos;
+ const int FREQ_COMPENSATION_UNAVAILABLE = 0xFFFFC000;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
index 0cda847..fbc0165 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/BluetoothChannelSoundingParameters.aidl
@@ -44,6 +44,7 @@
int realTimeProcedureDataAttHandle;
/**
* Role of the local device.
+ * @deprecated use the role in Config.aidl
*/
Role role;
/**
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl
new file mode 100644
index 0000000..558f68b
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Ch3cShapeType.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * The selected shape to be rendered when Channel Selection Algorithm #3c is used
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+@Backing(type="byte")
+enum Ch3cShapeType {
+ /**
+ * Use Hat shape for user-specified channel sequence
+ */
+ HAT_SHAPE = 0x00,
+ /**
+ * Use X shape for user-specified channel sequence
+ */
+ X_SHAPE = 0x01,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl
new file mode 100644
index 0000000..6fd71aa
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSelectionType.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * The channel selection algorithm for non-mode-0 steps
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+@Backing(type="byte")
+enum ChannelSelectionType {
+ /**
+ * Use Channel Selection Algorithm #3b for non-mode-0 CS steps
+ */
+ ALOGRITHM_3B = 0x00,
+ /**
+ * Use Channel Selection Algorithm #3c for non-mode-0 CS steps
+ */
+ ALOGRITHM_3C = 0x01,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
index 78ce4f4..f06af0f 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl
@@ -24,6 +24,7 @@
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
*
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
+ * @deprecated use ChannelSoundingProcedureData
*/
@VintfStability
parcelable ChannelSoudingRawData {
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl
new file mode 100644
index 0000000..2c51abe
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingProcedureData.aidl
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.ProcedureAbortReason;
+import android.hardware.bluetooth.ranging.SubeventResultData;
+
+/**
+ * The measured data for a whole procedure, it includes all local and remote related data.
+ */
+@VintfStability
+parcelable ChannelSoundingProcedureData {
+ /**
+ * CS procedure count since completion of the Channel Sounding Security Start procedure
+ */
+ int procedureCounter;
+ /**
+ * The procequre sequence since completion of the Channel Sounding Procecedure Enable procedure,
+ * this is not defined by spec, BT
+ */
+ int procedureSequence;
+ const byte SELECTED_TX_POWER_UNAVAILABLE = 0x7Fu8;
+ /**
+ * Transmit power level used for CS procedure of initiator.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43
+ * ** HCI_LE_CS_Procedure_Enable_Complete#selected_tx_power
+ * See BLUETOOTH Ranging Service Version 1.0 3.2.1.2
+ * ** Ranging Header#Selected TX power
+ * Range: -127 to 20
+ * Unit: dBm
+ * value: 0x7F - Transmit power level is unavailable
+ */
+ byte initiatorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE;
+ /**
+ * Transmit power level used for CS procedure of reflector.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43
+ * ** HCI_LE_CS_Procedure_Enable_Complete#selected_tx_power
+ * See BLUETOOTH Ranging Service Version 1.0 3.2.1.2
+ * ** Ranging Header#Selected TX power
+ * Range: -127 to 20
+ * Unit: dBm
+ * value: 0x7F - Transmit power level is unavailable
+ */
+ byte reflectorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE;
+ /**
+ * The subevent result data of initiator
+ */
+ SubeventResultData[] initiatorSubeventResultData;
+ /**
+ * Indicates the procedure abort reason of the initiator
+ */
+ ProcedureAbortReason initiatorProcedureAbortReason;
+ /**
+ * The subevent result data of reflector
+ */
+ SubeventResultData[] reflectorSubeventResultData;
+ /**
+ * Indicates the procedure abort reason of the initiator
+ */
+ ProcedureAbortReason reflectorProcedureAbortReason;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
index 9c4b472..75f0b67 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl
@@ -25,6 +25,7 @@
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
*
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
+ * @deprecated use ChannelSoundingProcedureData
*/
@VintfStability
parcelable ChannelSoundingSingleSideData {
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ComplexNumber.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ComplexNumber.aidl
index 5253d9f..8d59934 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ComplexNumber.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ComplexNumber.aidl
@@ -16,6 +16,9 @@
package android.hardware.bluetooth.ranging;
+/**
+ * @deprecated use PctIQSample instead for V2 and above.
+ */
@VintfStability
parcelable ComplexNumber {
double real;
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Config.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Config.aidl
index 85ae4c1..95817b5 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Config.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Config.aidl
@@ -16,10 +16,20 @@
package android.hardware.bluetooth.ranging;
+import android.hardware.bluetooth.ranging.Ch3cShapeType;
+import android.hardware.bluetooth.ranging.ChannelSelectionType;
+import android.hardware.bluetooth.ranging.CsSyncPhyType;
import android.hardware.bluetooth.ranging.ModeType;
+import android.hardware.bluetooth.ranging.Role;
import android.hardware.bluetooth.ranging.RttType;
import android.hardware.bluetooth.ranging.SubModeType;
+/**
+ * LE CS Config Complete data of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.8.137 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
@VintfStability
parcelable Config {
/**
@@ -42,4 +52,96 @@
* Channel n is disabled for CS procedure = 0
*/
byte[10] channelMap;
+ /**
+ * Minimum number of CS main mode steps to be executed before a submode step is executed
+ * Value: 0x02 to 0xFF
+ */
+ int minMainModeSteps;
+ /**
+ * Maximum number of CS main mode steps to be executed before a submode step is executed
+ * Value: 0x02 to 0xFF
+ */
+ int maxMainModeSteps;
+ /**
+ * Number of main mode steps taken from the end of the last CS subevent to be repeated at
+ * the beginning of the current CS subevent directly after the last mode-0 step of that event
+ * Value: 0x00 to 0x03
+ */
+ byte mainModeRepetition;
+ /**
+ * Number of CS mode-0 steps to be included at the beginning of each CS subevent
+ * Value: 0x00 to 0x03
+ */
+ byte mode0Steps;
+ /**
+ * The Channel Sounding role of the local device
+ */
+ Role role;
+ /**
+ * Indicates the PHY to be used for CS_SYNC exchanges during the CS procedure
+ */
+ CsSyncPhyType csSyncPhyType;
+ /**
+ * Indicates the Channel Selection Algorithm to be used during the CS procedure for non-mode-0
+ * steps
+ */
+ ChannelSelectionType channelSelectionType;
+ /**
+ * Indicates the selected shape
+ */
+ Ch3cShapeType ch3cShapeType;
+ /**
+ * Number of channels skipped in each rising and falling sequence
+ * Value: 0x02 to 0x08
+ */
+ byte ch3cJump;
+ /**
+ * The number of times the map represented by the Channel_Map field is to be cycled through
+ * for non-mode-0 steps within a CS procedure
+ * Value: 0x01 to 0xFF
+ */
+ int channelMapRepetition;
+ /**
+ * Interlude time in microseconds between the RTT packets
+ * Value: 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, or 0x91
+ * unit: us
+ */
+ int tIp1TimeUs;
+ /**
+ * Interlude time in microseconds between the CS tones
+ * Value: 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, or 0x91
+ * unit: us
+ */
+ int tIp2TimeUs;
+ /**
+ * Time in microseconds for frequency changes
+ * Value: 0x0F, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, 0x64, 0x78, or 0x96
+ * unit: us
+ */
+ int tFcsTimeUs;
+ /**
+ * Time in microseconds for the phase measurement period of the CS tones
+ * Value: 0x0A, 0x14, or 0x28
+ * unit: us
+ */
+ byte tPmTimeUs;
+ /**
+ * Time in microseconds for the antenna switch period of the CS tones supported by local device
+ * Value: 0, 1, 2, 4, 10 us
+ * see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.8.130
+ */
+ byte tSwTimeUsSupportedByLocal;
+ /**
+ * Time in microseconds for the antenna switch period of the CS tones supported by remote device
+ * Value: 0, 1, 2, 4, 10 us
+ * see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.39
+ */
+ byte tSwTimeUsSupportedByRemote;
+ const int BLE_CONN_INTERVAL_UNAVAILABLE = 0;
+ /**
+ * BLE event connection interval, a multiple of 1.25 ms in the range 7.5 ms to 4.0 s
+ * see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 6, Part B 4.5.1
+ * Unit: 1.25ms
+ */
+ int bleConnInterval = BLE_CONN_INTERVAL_UNAVAILABLE;
}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl
new file mode 100644
index 0000000..c7fe8a6
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/CsSyncPhyType.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * The PHY to be used for CS_SYNC exchanges during the CS procedure
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+@Backing(type="byte")
+enum CsSyncPhyType {
+ NOT_VALID_PHY = 0x00,
+ LE_1M_PHY = 0x01,
+ LE_2M_PHY = 0x02,
+ LE_2M_2BT_PHY = 0x03,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
index 45ec79f..283f588 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSounding.aidl
@@ -52,6 +52,7 @@
*
* @return CsSecurityLevel that indicates max supported security level of CS for ranging
* algorithms.
+ * @deprecated use getSupportedCsSecurityLevels() instead
*/
CsSecurityLevel getMaxSupportedCsSecurityLevel();
@@ -63,4 +64,13 @@
@nullable IBluetoothChannelSoundingSession openSession(
in BluetoothChannelSoundingParameters params,
in IBluetoothChannelSoundingSessionCallback callback);
+
+ /**
+ * API to get all supported security level (0 to 4) of CS for ranging algorithms.
+ *
+ * See: BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 3, Part C 10.11.1
+ *
+ * @return All supported security level of CS for ranging algorithms.
+ */
+ CsSecurityLevel[] getSupportedCsSecurityLevels();
}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
index 97b147e..b87024e 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/IBluetoothChannelSoundingSession.aidl
@@ -17,6 +17,9 @@
package android.hardware.bluetooth.ranging;
import android.hardware.bluetooth.ranging.ChannelSoudingRawData;
+import android.hardware.bluetooth.ranging.ChannelSoundingProcedureData;
+import android.hardware.bluetooth.ranging.Config;
+import android.hardware.bluetooth.ranging.ProcedureEnableConfig;
import android.hardware.bluetooth.ranging.Reason;
import android.hardware.bluetooth.ranging.ResultType;
import android.hardware.bluetooth.ranging.VendorSpecificData;
@@ -63,4 +66,28 @@
* Close the current session. Object is no longer useful after this method.
*/
void close(Reason reason);
+
+ /**
+ * API to provide raw ranging procedure data to the HAL. The HAL converts this data into
+ * meaningful ranging results using a proprietary algorithm and then calls back to the
+ * Bluetooth stack via BluetoothChannelSoundingSessionCallback.onResult().
+ */
+ void writeProcedureData(in ChannelSoundingProcedureData procedureData);
+
+ /**
+ * API to provide the latest CS config to the HAL.
+ */
+ void updateChannelSoundingConfig(in Config conifg);
+
+ /**
+ * API to provide the latest CS procedure enable complete information.
+ */
+ void updateProcedureEnableConfig(in ProcedureEnableConfig procedureEnableConfig);
+
+ /**
+ * API to provide the latest BLE event connection interval.
+ * BLE event connection interval, a multiple of 1.25 ms in the range 7.5 ms to 4.0 s
+ * see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 6, Part B 4.5.1
+ */
+ void updateBleConnInterval(in int bleConnInterval);
}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeData.aidl
new file mode 100644
index 0000000..99199d2
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeData.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.ModeOneData;
+import android.hardware.bluetooth.ranging.ModeThreeData;
+import android.hardware.bluetooth.ranging.ModeTwoData;
+import android.hardware.bluetooth.ranging.ModeZeroData;
+
+/**
+ * Mode specific data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+union ModeData {
+ ModeZeroData modeZeroData;
+ ModeOneData modeOneData;
+ ModeTwoData modeTwoData;
+ ModeThreeData modeThreeData;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeOneData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeOneData.aidl
new file mode 100644
index 0000000..51e8c70
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeOneData.aidl
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.Nadm;
+import android.hardware.bluetooth.ranging.PctIQSample;
+import android.hardware.bluetooth.ranging.RttToaTodData;
+
+/**
+ * Mode 1 data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable ModeOneData {
+ const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
+ const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
+ const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
+ const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF; // bit 3 is reserved
+ const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
+ /**
+ * bits 0 to 3:
+ * ** 0x0 = CS Access Address check is successful, and all bits match the expected sequence
+ * ** 0x1 = CS Access Address check contains one or more bit errors
+ * ** 0x2 = CS Access Address not found
+ * bits 4 to 7: Number of bit errors being reported on the payload with a random or sounding
+ * sequence. Value 0 may indicate zero bit errors or no report available.
+ * Value 15 may indicate 15 or more bit errors.
+ */
+ byte packetQuality;
+ /**
+ * Normalized Attack Detector Metric.
+ */
+ Nadm packetNadm;
+ const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
+ /**
+ * Range: -127 to +20
+ * Unit: dBm
+ * Value: 0x7F - RSSI is not available
+ */
+ byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE;
+ /**
+ * Time difference of the time of arrival and the time of depature of the CS packets.
+ * see RttToaTodData for details.
+ */
+ RttToaTodData rttToaTodData;
+ /**
+ * Antenna identifier used for the RTT packet
+ * Value: 0x01 to 0x04
+ */
+ byte packetAntenna;
+ /**
+ * Phase Correction Term 1 of the sounding sequence.
+ */
+ @nullable PctIQSample packetPct1;
+ /**
+ * Phase Correction Term 2 of the sounding sequence.
+ */
+ @nullable PctIQSample packetPct2;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeThreeData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeThreeData.aidl
new file mode 100644
index 0000000..a70d371
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeThreeData.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.ModeOneData;
+import android.hardware.bluetooth.ranging.ModeTwoData;
+
+/**
+ * Mode 3 data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable ModeThreeData {
+ ModeOneData modeOneData;
+ ModeTwoData modeTwoData;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeTwoData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeTwoData.aidl
new file mode 100644
index 0000000..b360c90
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeTwoData.aidl
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.PctIQSample;
+
+/**
+ * Mode 2 data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable ModeTwoData {
+ /**
+ * Antenna Permutation Index for the chosen Num_Antenna_Paths parameter used during the
+ * phase measurement stage of the CS step
+ */
+ byte antennaPermutationIndex;
+ /**
+ * The I and Q sample of Phase Correction Term for (Num_Antenna_Paths + 1) CS tone
+ * The order is the same as the BT core defined
+ */
+ PctIQSample[] tonePctIQSamples;
+
+ const int TONE_QUALITY_HIGH = 0x0;
+ const int TONE_QUALITY_MEDIUM = 0x1;
+ const int TONE_QUALITY_LOW = 0x2;
+ const int TONE_QUALITY_UNAVAILABLE = 0x3;
+ const int EXTENSION_SLOT_NONE = 0x0;
+ const int EXTENSION_SLOT_TONE_NOT_EXPECTED_TO_BE_PRESENT = 0x1;
+ const int EXTENSION_SLOT_TONE_EXPECTED_TO_BE_PRESENT = 0x2;
+ /**
+ * Shift amount for extension slot (bits 4 to 7).
+ */
+ const int EXTENSION_SLOT_SHIFT = 4;
+ /**
+ * Tone quality indicator for (Num_Antenna_Paths + 1) CS tone
+ * bits 0 to 3:
+ * ** 0x0 = Tone quality is high
+ * ** 0x1 = Tone quality is medium
+ * ** 0x2 = Tone quality is low
+ * ** 0x3 = Tone quality is unavailable
+ * bits 4 to 7:
+ * ** 0x0 = Not tone extension slot
+ * ** 0x1 = Tone extension slot; tone not expected to be present
+ * ** 0x2 = Tone extension slot; tone expected to be present
+ */
+ byte[] toneQualityIndicators;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeZeroData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeZeroData.aidl
new file mode 100644
index 0000000..6f326d1
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeZeroData.aidl
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 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.bluetooth.ranging;
+
+/**
+ * Mode 0 data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable ModeZeroData {
+ const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
+ const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
+ const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
+ const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF; // bit 3 is reserved
+ const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
+ /**
+ * bits 0 to 3:
+ * ** 0x0 = CS Access Address check is successful, and all bits match the expected sequence
+ * ** 0x1 = CS Access Address check contains one or more bit errors
+ * ** 0x2 = CS Access Address not found
+ * bits 4 to 7: Number of bit errors being reported on the payload with a random or sounding
+ * sequence. Value 0 may indicate zero bit errors or no report available.
+ * Value 15 may indicate 15 or more bit errors.
+ */
+ byte packetQuality;
+ const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
+ /**
+ * Range: -127 to +20
+ * Unit: dBm
+ * Value: 0x7F - RSSI is not available
+ */
+ byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE;
+ /**
+ * Antenna identifier used for the RTT packet
+ * Value: 0x01 to 0x04
+ */
+ byte packetAntenna;
+ const int MEASURED_FREQ_OFFSET_UNAVAILABLE = 0xFFFFC000;
+ /**
+ * Measured frequency offset in units of 0.01 ppm (15-bit signed integer, it had been converted
+ * as int here.) for initiator, this should be ignored for relector.
+ * Range: -100 ppm (0x58F0) to +100 ppm (0x2710)
+ * Unit: 0.01 ppm
+ * Value: 0xFFFFC000 - Frequency offset is not available
+ */
+ int initiatorMeasuredFreqOffset = MEASURED_FREQ_OFFSET_UNAVAILABLE;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/PctIQSample.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/PctIQSample.aidl
new file mode 100644
index 0000000..81da870
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/PctIQSample.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * I and Q sample data of PCT.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ *
+ * BT core defines the I and Q sample as following, they were converted to 2 integers here.
+ * ** bits 0 to 11 are the I sample with type sint12
+ * ** bits 12 to 23 are the Q sample with type sint12
+ */
+@VintfStability
+parcelable PctIQSample {
+ const int SAMPLE_UNAVAILABLE = 0xFFFFFFFF;
+
+ int iSample = SAMPLE_UNAVAILABLE;
+ int qSample = SAMPLE_UNAVAILABLE;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl
new file mode 100644
index 0000000..e8b520a
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureAbortReason.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * Procedure abort reason of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+@Backing(type="byte")
+enum ProcedureAbortReason {
+ SUCCESS = 0x0,
+ LOCAL_OR_REMOTE_REQUEST = 0x01,
+ FILTERED_CHANNEL_MAP_LESS_THAN_15 = 0x02,
+ CHANNEL_MAP_UPDATE_INSTANT_PASSED = 0x03,
+ UNSPECIFIED = 0x0F,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl
new file mode 100644
index 0000000..b97f394
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ProcedureEnableConfig.aidl
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * LE CS Procedure Enable Complete data
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable ProcedureEnableConfig {
+ /**
+ * Antenna Configuration Index as described in [Vol 6] Part A, Section 5.3
+ * Value: 0x00 to 0x07
+ */
+ byte toneAntennaConfigSelection;
+ /**
+ * Duration for each CS subevent in microseconds
+ * Value: 1250 μs to 4 s
+ */
+ int subeventLenUs;
+ /**
+ * Number of CS subevents anchored off the same ACL connection event
+ * Value: 0x01 to 0x20
+ */
+ byte subeventsPerEvent;
+ /**
+ * Time between consecutive CS subevents anchored off the same ACL connection event.
+ * Unit: 0.625 ms
+ */
+ int subeventInterval;
+ /**
+ * Number of ACL connection events between consecutive CS event anchor points
+ */
+ int eventInterval;
+ /**
+ * Number of ACL connection events between consecutive CS procedure anchor points
+ */
+ int procedureInterval;
+ /**
+ * Number of CS procedures to be scheduled.
+ * Value: 0x0000 to 0xFFFF
+ * Value 0: CS procedures to continue until disabled
+ */
+ int procedureCount;
+ /**
+ * Maximum duration for each CS procedure
+ * Range: 0x0001 to 0xFFFF
+ * unit: 0.625 ms
+ * Time range: 0.625 ms to 40.959375 s
+ */
+ int maxProcedureLen;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResult.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResult.aidl
index 65907dd..0962527 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResult.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResult.aidl
@@ -17,6 +17,7 @@
package android.hardware.bluetooth.ranging;
import android.hardware.bluetooth.ranging.Nadm;
+import android.hardware.bluetooth.ranging.RangingResultStatus;
/**
* Generic structure to return the ranging result
@@ -90,4 +91,13 @@
* Parameter for vendors to place vendor-specific ranging results data.
*/
@nullable byte[] vendorSpecificCsRangingResultsData;
+ /**
+ * If the result is valid, for e.g. the result was gotten from an aborted procedure.
+ */
+ RangingResultStatus rangingResultStatus;
+ /**
+ * The timestamp of the first subevent with the measured procedure.
+ * see SubeventResultData#timestampNanos
+ */
+ long timestampNanos;
}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResultStatus.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResultStatus.aidl
new file mode 100644
index 0000000..b877af8
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RangingResultStatus.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+@VintfStability
+@Backing(type="byte")
+enum RangingResultStatus {
+ SUCCESS = 0x00,
+ /**
+ * The procedure of the initiator was aborted
+ */
+ FAIL_INITIATOR_ABORT = 0x01,
+ /**
+ * The procedure of the reflector was aborted
+ */
+ FAIL_REFLECTOR_ABORT = 0x02,
+ /**
+ * The procedure of both the initiator and the reflector were aborted
+ */
+ FAIL_BOTH_ABORT = 0x03,
+ FAIL_UNSPECIFIED = 0xFFu8,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RttToaTodData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RttToaTodData.aidl
new file mode 100644
index 0000000..c2a48e4
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/RttToaTodData.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * The ToA/ToD data for the initator or reflector.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+union RttToaTodData {
+ const int TOA_TOD_UNAVAILABLE = 0xFFFF8000;
+ /**
+ * Time difference in units of 0.5 nanoseconds between the time of arrival and
+ * the time of departure of the CS packets at the initiator during a CS step
+ * (16-bit signed integer, it had been converted to 'int' here), where the known
+ * nominal offsets are excluded.
+ * value: 0xFFFF8000 (0x8000 as signed 16-bit) - Time difference is not available
+ */
+ int toaTodInitiator = TOA_TOD_UNAVAILABLE;
+ /**
+ * Time difference in units of 0.5 nanoseconds between the time of departure
+ * and the time of arrival of the CS packets at the reflector during a CS step
+ * (16-bit signed integer, it had been converted to 'int' here), where the known
+ * nominal offsets are excluded.
+ * value: 0xFFFF8000 (0x8000 as signed 16-bit) - Time difference is not available
+ */
+ int todToaReflector = TOA_TOD_UNAVAILABLE;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepData.aidl
new file mode 100644
index 0000000..4006415
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepData.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.ModeData;
+import android.hardware.bluetooth.ranging.ModeType;
+
+/**
+ * The data for a CS step of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable StepData {
+ /**
+ * CS channel index
+ * Value: 0x00 to 0x4E
+ */
+ byte stepChannel;
+ ModeType stepMode;
+ ModeData stepModeData;
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepTonePct.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepTonePct.aidl
index 4650861..af25a11 100644
--- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepTonePct.aidl
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/StepTonePct.aidl
@@ -20,6 +20,7 @@
/**
* Tone PCT data with quality indicator from a mode-2 or mode-3 step.
+ * @deprecated use ModeTwoData
*/
@VintfStability
parcelable StepTonePct {
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl
new file mode 100644
index 0000000..bef87e8
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventAbortReason.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+/**
+ * The subevent abort reason of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+@Backing(type="byte")
+enum SubeventAbortReason {
+ SUCCESS = 0x0,
+ LOCAL_OR_REMOTE_REQUEST = 0x01,
+ NO_CS_SYNC_RECEIVED = 0x02,
+ SCHEDULING_CONFLICTS_OR_LIMITED_RESOURCES = 0x03,
+ UNSPECIFIED = 0x0F,
+}
diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventResultData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventResultData.aidl
new file mode 100644
index 0000000..102d217
--- /dev/null
+++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubeventResultData.aidl
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.ranging;
+
+import android.hardware.bluetooth.ranging.StepData;
+import android.hardware.bluetooth.ranging.SubeventAbortReason;
+
+/**
+ * The subevent data within a CS procedure of Channel Sounding.
+ * See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
+ *
+ * Specification: https://www.bluetooth.com/specifications/specs/core60-html/
+ */
+@VintfStability
+parcelable SubeventResultData {
+ /**
+ * Starting ACL connection event counter for the results reported in the event
+ */
+ int startAclConnEventCounter;
+ const int FREQ_COMPENSATION_UNAVAILABLE = 0xFFFFC000;
+ /**
+ * Frequency compensation value in units of 0.01 ppm (15-bit signed integer, it had been
+ * converted as int here.)
+ * Unit: 0.01 ppm
+ * 0xFFFFC000 - Frequency compensation value is not available, or the role is not initiator
+ */
+ int frequencyCompensation = FREQ_COMPENSATION_UNAVAILABLE;
+ /**
+ * Reference power level
+ * Range: -127 to 20
+ * Unit: dBm
+ */
+ byte referencePowerLevelDbm;
+ /**
+ * 0x00 Ignored because phase measurement does not occur during the CS step
+ * 0x01 to 0x04 Number of antenna paths used during the phase measurement stage of the CS step
+ */
+ byte numAntennaPaths;
+ /**
+ * Indicates the abort reason
+ */
+ SubeventAbortReason subeventAbortReason;
+ /**
+ * The measured data for all steps
+ */
+ StepData[] stepData;
+ /**
+ * Timestamp when all subevent data are received by the host; Not defined by the spec.
+ * Using epoch time in nano seconds (e.g., 1697673127175).
+ */
+ long timestampNanos;
+}
diff --git a/bluetooth/ranging/aidl/default/Android.bp b/bluetooth/ranging/aidl/default/Android.bp
index 5072a43..0912a4f 100644
--- a/bluetooth/ranging/aidl/default/Android.bp
+++ b/bluetooth/ranging/aidl/default/Android.bp
@@ -14,7 +14,7 @@
"service.cpp",
],
shared_libs: [
- "android.hardware.bluetooth.ranging-V1-ndk",
+ "android.hardware.bluetooth.ranging-V2-ndk",
"libbase",
"libbinder_ndk",
"libhidlbase",
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
index 3807d4f..e2a8693 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
@@ -55,4 +55,11 @@
*_aidl_return = session;
return ::ndk::ScopedAStatus::ok();
}
+
+ndk::ScopedAStatus BluetoothChannelSounding::getSupportedCsSecurityLevels(
+ std::vector<CsSecurityLevel>* _aidl_return) {
+ std::vector<CsSecurityLevel> supported_security_levels = {};
+ *_aidl_return = supported_security_levels;
+ return ::ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
index d6b5c03..43232fa 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
@@ -47,6 +47,8 @@
const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>&
in_callback,
std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override;
+ ndk::ScopedAStatus getSupportedCsSecurityLevels(
+ std::vector<CsSecurityLevel>* _aidl_return) override;
};
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
index 6c58a07..bfdd5b6 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
@@ -52,4 +52,20 @@
callback_->onClose(in_reason);
return ::ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::writeProcedureData(
+ const ChannelSoundingProcedureData& /*in_procedureData*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateChannelSoundingConfig(
+ const Config& /*in_config*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateProcedureEnableConfig(
+ const ProcedureEnableConfig& /*in_procedureEnableConfig*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateBleConnInterval(
+ int /*in_bleConnInterval*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
index 6703f7f..ae66c7c 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
@@ -22,6 +22,10 @@
namespace aidl::android::hardware::bluetooth::ranging::impl {
using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData;
+using ::aidl::android::hardware::bluetooth::ranging::
+ ChannelSoundingProcedureData;
+using ::aidl::android::hardware::bluetooth::ranging::Config;
+using ::aidl::android::hardware::bluetooth::ranging::ProcedureEnableConfig;
using ::aidl::android::hardware::bluetooth::ranging::Reason;
using ::aidl::android::hardware::bluetooth::ranging::ResultType;
using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
@@ -42,6 +46,13 @@
ndk::ScopedAStatus writeRawData(
const ChannelSoudingRawData& in_rawData) override;
ndk::ScopedAStatus close(Reason in_reason) override;
+ ndk::ScopedAStatus writeProcedureData(
+ const ChannelSoundingProcedureData& in_procedureData) override;
+ ndk::ScopedAStatus updateChannelSoundingConfig(
+ const Config& in_config) override;
+ ndk::ScopedAStatus updateProcedureEnableConfig(
+ const ProcedureEnableConfig& in_procedureEnableConfig) override;
+ ndk::ScopedAStatus updateBleConnInterval(int in_bleConnInterval) override;
private:
std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
diff --git a/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml b/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
index fe3613d..87adf2c 100644
--- a/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
+++ b/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.bluetooth.ranging</name>
- <version>1</version>
+ <version>2</version>
<fqname>IBluetoothChannelSounding/default</fqname>
</hal>
</manifest>
diff --git a/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h b/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h
index 184c16e..d92a409 100644
--- a/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h
+++ b/camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h
@@ -109,7 +109,7 @@
static const int kMaxProcessedStream = 2;
static const int kMaxStallStream = 1;
- static const uint32_t kMaxBytesPerPixel = 2;
+ static const uint32_t kMaxBytesPerPixel = 3;
class OutputThread : public android::Thread {
public:
diff --git a/camera/device/default/ExternalCameraDeviceSession.h b/camera/device/default/ExternalCameraDeviceSession.h
index 1c6ed06..ed84931 100644
--- a/camera/device/default/ExternalCameraDeviceSession.h
+++ b/camera/device/default/ExternalCameraDeviceSession.h
@@ -122,7 +122,7 @@
static const int kMaxProcessedStream = 2;
static const int kMaxStallStream = 1;
- static const uint32_t kMaxBytesPerPixel = 2;
+ static const uint32_t kMaxBytesPerPixel = 3;
class BufferRequestThread : public SimpleThread {
public:
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 9e4a6c3..e019902 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -132,7 +132,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.bluetooth.ranging</name>
- <version>1</version>
+ <version>1-2</version>
<interface>
<name>IBluetoothChannelSounding</name>
<instance>default</instance>
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
index 91fb847..53e5446 100644
--- a/light/2.0/vts/functional/Android.bp
+++ b/light/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/light/aidl/vts/functional/Android.bp b/light/aidl/vts/functional/Android.bp
index 16804ea..ba05e2b 100644
--- a/light/aidl/vts/functional/Android.bp
+++ b/light/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/neuralnetworks/1.0/vts/functional/Android.bp b/neuralnetworks/1.0/vts/functional/Android.bp
index 8048e62..ed0e72b 100644
--- a/neuralnetworks/1.0/vts/functional/Android.bp
+++ b/neuralnetworks/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/neuralnetworks/1.1/vts/functional/Android.bp b/neuralnetworks/1.1/vts/functional/Android.bp
index 7c1c118..e65735f 100644
--- a/neuralnetworks/1.1/vts/functional/Android.bp
+++ b/neuralnetworks/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/neuralnetworks/1.2/vts/functional/Android.bp b/neuralnetworks/1.2/vts/functional/Android.bp
index 7e4b5bb..0a3c577 100644
--- a/neuralnetworks/1.2/vts/functional/Android.bp
+++ b/neuralnetworks/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/neuralnetworks/aidl/vts/functional/Android.bp b/neuralnetworks/aidl/vts/functional/Android.bp
index 04b4a45..20686c1 100644
--- a/neuralnetworks/aidl/vts/functional/Android.bp
+++ b/neuralnetworks/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_kernel",
// 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"
diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/ProtocolDiscoveryConfig.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
index 021dfe2..2df0d35 100644
--- a/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
+++ b/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
@@ -43,4 +43,5 @@
byte discoveryPollKovio;
byte discoveryPollBPrime;
byte discoveryListenBPrime;
+ byte protocolChineseId;
}
diff --git a/nfc/aidl/android/hardware/nfc/ProtocolDiscoveryConfig.aidl b/nfc/aidl/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
index f8e3228..021e307 100644
--- a/nfc/aidl/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
+++ b/nfc/aidl/android/hardware/nfc/ProtocolDiscoveryConfig.aidl
@@ -33,4 +33,5 @@
byte discoveryPollKovio;
byte discoveryPollBPrime;
byte discoveryListenBPrime;
+ byte protocolChineseId;
}
diff --git a/oemlock/1.0/vts/functional/Android.bp b/oemlock/1.0/vts/functional/Android.bp
index f1b8d2f..80b4fdb 100644
--- a/oemlock/1.0/vts/functional/Android.bp
+++ b/oemlock/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_pixel_watch_system_software",
// 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"
diff --git a/oemlock/aidl/vts/Android.bp b/oemlock/aidl/vts/Android.bp
index eb999a9..e19bc6a 100644
--- a/oemlock/aidl/vts/Android.bp
+++ b/oemlock/aidl/vts/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_pixel_watch_system_software",
// 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"
diff --git a/power/OWNERS b/power/OWNERS
index 7229b22..95778a4 100644
--- a/power/OWNERS
+++ b/power/OWNERS
@@ -3,3 +3,4 @@
# ADPF virtual team
lpy@google.com
wvw@google.com
+file:platform/frameworks/base:/ADPF_OWNERS
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index eca9a27..01c09d8 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -14,6 +14,7 @@
host_supported: true,
srcs: ["android/hardware/radio/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -48,6 +49,7 @@
srcs: ["android/hardware/radio/config/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -82,6 +84,7 @@
srcs: ["android/hardware/radio/data/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -115,6 +118,7 @@
srcs: ["android/hardware/radio/messaging/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -148,6 +152,7 @@
srcs: ["android/hardware/radio/modem/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -181,6 +186,7 @@
srcs: ["android/hardware/radio/network/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -213,6 +219,7 @@
host_supported: true,
srcs: ["android/hardware/radio/sap/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -241,6 +248,7 @@
host_supported: true,
srcs: ["android/hardware/radio/sim/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
imports: [
"android.hardware.radio-V4",
"android.hardware.radio.config-V4",
@@ -287,6 +295,7 @@
srcs: ["android/hardware/radio/voice/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -322,6 +331,7 @@
"android.hardware.radio-V4",
"android.hardware.radio.data-V4",
],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: false,
@@ -356,6 +366,7 @@
srcs: ["android/hardware/radio/ims/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: false,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
index bc1c292..bba6bdd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
@@ -17,9 +17,10 @@
* This interface is used by telephony and telecom to talk to cellular radio for the purpose of
* radio configuration, and it is not associated with any specific modem or slot.
* All the functions have minimum one parameter:
- * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
- * duration of a method call. If clients provide colliding serials (including passing the same
- * serial to different methods), multiple responses (one for each method call) must still be served.
+ * serial: which corresponds to the serial number of the request. Serial numbers must only be
+ * memorized for the duration of a method call. If clients provide colliding serials (including
+ * passing the same serial to different methods), multiple responses (one for each method call) must
+ * still be served.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
index 009b428..a0ca4bf 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum DataCallFailCause {
NONE = 0,
OPERATOR_BARRED = 0x08,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
index 7f3fdc7..d68a9d7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
@@ -37,9 +37,9 @@
parcelable DataProfileInfo {
int profileId;
String apn;
- android.hardware.radio.data.PdpProtocolType protocol;
- android.hardware.radio.data.PdpProtocolType roamingProtocol;
- android.hardware.radio.data.ApnAuthType authType;
+ android.hardware.radio.data.PdpProtocolType protocol = android.hardware.radio.data.PdpProtocolType.IP;
+ android.hardware.radio.data.PdpProtocolType roamingProtocol = android.hardware.radio.data.PdpProtocolType.IP;
+ android.hardware.radio.data.ApnAuthType authType = android.hardware.radio.data.ApnAuthType.NO_PAP_NO_CHAP;
String user;
String password;
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
index e1fedb8..f5fae50 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
+@Backing(type="byte") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum DataThrottlingAction {
NO_DATA_THROTTLING,
THROTTLE_SECONDARY_CARRIER,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
index bef4c73..67d679f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable LinkAddress {
String address;
int addressProperties;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
index 45e2dc9..e428f1a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable PortRange {
int start;
int end;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index 8864c24..80c055e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable RouteSelectionDescriptor {
byte precedence;
- android.hardware.radio.data.PdpProtocolType sessionType;
+ android.hardware.radio.data.PdpProtocolType sessionType = android.hardware.radio.data.PdpProtocolType.IP;
byte sscMode;
android.hardware.radio.data.SliceInfo[] sliceInfo;
String[] dnn;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
index 6ae626e..699cc4d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -33,13 +33,13 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SetupDataCallResult {
- android.hardware.radio.data.DataCallFailCause cause;
+ android.hardware.radio.data.DataCallFailCause cause = android.hardware.radio.data.DataCallFailCause.NONE;
long suggestedRetryTime;
int cid;
int active;
- android.hardware.radio.data.PdpProtocolType type;
+ android.hardware.radio.data.PdpProtocolType type = android.hardware.radio.data.PdpProtocolType.IP;
String ifname;
android.hardware.radio.data.LinkAddress[] addresses;
String[] dnses;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
index 36a538c..3b38e19 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum AmrMode {
+ INVALID = 0,
AMR_MODE_0 = (1 << 0) /* 1 */,
AMR_MODE_1 = (1 << 1) /* 2 */,
AMR_MODE_2 = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
index dcf0dd1..eb65eb1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable AmrParams {
- android.hardware.radio.ims.media.AmrMode amrMode;
+ android.hardware.radio.ims.media.AmrMode amrMode = android.hardware.radio.ims.media.AmrMode.INVALID;
boolean octetAligned;
int maxRedundancyMillis;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
index 6eefb34..1c80f7a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CodecParams {
- android.hardware.radio.ims.media.CodecType codecType;
+ android.hardware.radio.ims.media.CodecType codecType = android.hardware.radio.ims.media.CodecType.INVALID;
byte rxPayloadTypeNumber;
byte txPayloadTypeNumber;
byte samplingRateKHz;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
index 98463b1..e97a647 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
@@ -35,6 +35,7 @@
/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CodecType {
+ INVALID = 0,
AMR = (1 << 0) /* 1 */,
AMR_WB = (1 << 1) /* 2 */,
EVS = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
index 1a59389..ae0e1f7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EvsMode {
+ INVALID = 0,
EVS_MODE_0 = (1 << 0) /* 1 */,
EVS_MODE_1 = (1 << 1) /* 2 */,
EVS_MODE_2 = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
index deb53af..90d2204 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EvsParams {
- android.hardware.radio.ims.media.EvsBandwidth bandwidth;
- android.hardware.radio.ims.media.EvsMode evsMode;
+ android.hardware.radio.ims.media.EvsBandwidth bandwidth = android.hardware.radio.ims.media.EvsBandwidth.NONE;
+ android.hardware.radio.ims.media.EvsMode evsMode = android.hardware.radio.ims.media.EvsMode.INVALID;
byte channelAwareMode;
boolean useHeaderFullOnly;
boolean useEvsModeSwitch;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 714442c..b9cc15c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RtcpXrReportBlockType {
RTCPXR_NONE = 0,
RTCPXR_LOSS_RLE_REPORT_BLOCK = (1 << 0) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
index 472ec35..6af5523 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable RtpConfig {
int direction;
- android.hardware.radio.AccessNetwork accessNetwork;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
android.hardware.radio.ims.media.RtpAddress remoteAddress;
android.hardware.radio.ims.media.RtpSessionParams sessionParams;
android.hardware.radio.ims.media.RtcpConfig rtcpConfig;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index 421f752..ae3bbac 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -35,11 +35,12 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ConnectionFailureInfo {
- android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason failureReason;
+ android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason failureReason = android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason.INVALID;
int causeCode;
int waitTimeMillis;
- @Backing(type="int") @VintfStability
+ @Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ConnectionFailureReason {
+ INVALID = 0,
REASON_ACCESS_DENIED = 1,
REASON_NAS_FAILURE = 2,
REASON_RACH_FAILURE = 3,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
index 3895d75..73d987a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
@@ -36,10 +36,10 @@
@JavaDerive(toString=true) @VintfStability
parcelable ImsCall {
int index;
- android.hardware.radio.ims.ImsCall.CallType callType;
- android.hardware.radio.AccessNetwork accessNetwork;
- android.hardware.radio.ims.ImsCall.CallState callState;
- android.hardware.radio.ims.ImsCall.Direction direction;
+ android.hardware.radio.ims.ImsCall.CallType callType = android.hardware.radio.ims.ImsCall.CallType.NORMAL;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.ims.ImsCall.CallState callState = android.hardware.radio.ims.ImsCall.CallState.ACTIVE;
+ android.hardware.radio.ims.ImsCall.Direction direction = android.hardware.radio.ims.ImsCall.Direction.INCOMING;
boolean isHeldByRemote;
@Backing(type="int")
enum CallType {
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index 5b5bd40..62dc69b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.ims;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ImsDeregistrationReason {
REASON_SIM_REMOVED = 1,
REASON_SIM_REFRESH = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
index 66d8165..73cfd07 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
@@ -33,11 +33,11 @@
package android.hardware.radio.ims;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable ImsRegistration {
- android.hardware.radio.ims.ImsRegistrationState regState;
- android.hardware.radio.AccessNetwork accessNetworkType;
- android.hardware.radio.ims.SuggestedAction suggestedAction;
+ android.hardware.radio.ims.ImsRegistrationState regState = android.hardware.radio.ims.ImsRegistrationState.NOT_REGISTERED;
+ android.hardware.radio.AccessNetwork accessNetworkType = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.ims.SuggestedAction suggestedAction = android.hardware.radio.ims.SuggestedAction.NONE;
int capabilities;
const int IMS_MMTEL_CAPABILITY_NONE = 0;
const int IMS_MMTEL_CAPABILITY_VOICE = (1 << 0) /* 1 */;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
index 21645da..a2e2ae5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
@@ -36,10 +36,10 @@
@JavaDerive(toString=true) @VintfStability
parcelable SrvccCall {
int index;
- android.hardware.radio.ims.SrvccCall.CallType callType;
+ android.hardware.radio.ims.SrvccCall.CallType callType = android.hardware.radio.ims.SrvccCall.CallType.NORMAL;
int callState;
- android.hardware.radio.ims.SrvccCall.CallSubState callSubstate;
- android.hardware.radio.ims.SrvccCall.ToneType ringbackToneType;
+ android.hardware.radio.ims.SrvccCall.CallSubState callSubstate = android.hardware.radio.ims.SrvccCall.CallSubState.NONE;
+ android.hardware.radio.ims.SrvccCall.ToneType ringbackToneType = android.hardware.radio.ims.SrvccCall.ToneType.NONE;
boolean isMpty;
boolean isMT;
String number;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index a0e3991..9982395 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.messaging;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaSmsSubaddress {
int subaddressType;
boolean odd;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
index 40b9ddb..ff4a111 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsSmsMessage {
- android.hardware.radio.RadioTechnologyFamily tech;
+ android.hardware.radio.RadioTechnologyFamily tech = android.hardware.radio.RadioTechnologyFamily.THREE_GPP;
boolean retry;
int messageRef;
android.hardware.radio.messaging.CdmaSmsMessage[] cdmaMessage;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
index b44ab71..080a877 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ActivityStatsTechSpecificInfo {
- android.hardware.radio.AccessNetwork rat;
+ android.hardware.radio.AccessNetwork rat = android.hardware.radio.AccessNetwork.UNKNOWN;
int frequencyRange;
int[] txmModetimeMs;
int rxModeTimeMs;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
index 1159f93..023658c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.modem;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum DeviceStateType {
POWER_SAVE_MODE,
CHARGING_STATE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
index d453cb0..7d5537f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable HardwareConfigModem {
int rilModel;
- android.hardware.radio.RadioTechnology rat;
+ android.hardware.radio.RadioTechnology rat = android.hardware.radio.RadioTechnology.UNKNOWN;
int maxVoiceCalls;
int maxDataCalls;
int maxStandby;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
index a2df30d..96fb5a8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
@@ -35,11 +35,12 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImeiInfo {
- android.hardware.radio.modem.ImeiInfo.ImeiType type;
+ android.hardware.radio.modem.ImeiInfo.ImeiType type = android.hardware.radio.modem.ImeiInfo.ImeiType.INVALID;
String imei;
String svn;
@Backing(type="int") @VintfStability
enum ImeiType {
+ INVALID = 0,
PRIMARY = 1,
SECONDARY = 2,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
index f97b9a2..bafcd19 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
@@ -32,51 +32,175 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
-/**
- * @hide
- * @deprecated NV APIs are deprecated starting from Android U.
- */
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum NvItem {
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
+ INVALID = 0,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_MEID = 1,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_MIN = 2,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_MDN = 3,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_ACCOLC = 4,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
DEVICE_MSL = 11,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_RECONDITIONED_STATUS = 12,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_ACTIVATION_DATE = 13,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_LIFE_TIMER = 14,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_LIFE_CALLS = 15,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_LIFE_DATA_TX = 16,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
RTN_LIFE_DATA_RX = 17,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
OMADM_HFA_LEVEL = 18,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_NAI = 31,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_HOME_ADDRESS = 32,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_AAA_AUTH = 33,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_HA_AUTH = 34,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_PRI_HA_ADDR = 35,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_SEC_HA_ADDR = 36,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_REV_TUN_PREF = 37,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_HA_SPI = 38,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_AAA_SPI = 39,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_MN_HA_SS = 40,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
MIP_PROFILE_MN_AAA_SS = 41,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_PRL_VERSION = 51,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_BC10 = 52,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_BC14 = 53,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_SO68 = 54,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_SO73_COP0 = 55,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_SO73_COP1TO7 = 56,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_1X_ADVANCED_ENABLED = 57,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_EHRPD_ENABLED = 58,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
CDMA_EHRPD_FORCED = 59,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_BAND_ENABLE_25 = 71,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_BAND_ENABLE_26 = 72,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_BAND_ENABLE_41 = 73,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_SCAN_PRIORITY_25 = 74,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_SCAN_PRIORITY_26 = 75,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_SCAN_PRIORITY_41 = 76,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_HIDDEN_BAND_PRIORITY_25 = 77,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_HIDDEN_BAND_PRIORITY_26 = 78,
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
LTE_HIDDEN_BAND_PRIORITY_41 = 79,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
index c38ceb7..c941246 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
@@ -32,12 +32,15 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
-/**
- * @hide
- * @deprecated NV APIs are deprecated starting from Android U.
- */
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NvWriteItem {
- android.hardware.radio.modem.NvItem itemId;
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
+ android.hardware.radio.modem.NvItem itemId = android.hardware.radio.modem.NvItem.INVALID;
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
String value;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
index b4208b7..e9937f0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.modem;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ResetNvType {
RELOAD,
ERASE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
index 67c9349..3c812c0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable BarringInfo {
int serviceType;
int barringType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
index 6bb31b0..53d485a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
@@ -36,6 +36,6 @@
@JavaDerive(toString=true) @VintfStability
parcelable CellInfo {
boolean registered;
- android.hardware.radio.network.CellConnectionStatus connectionStatus;
+ android.hardware.radio.network.CellConnectionStatus connectionStatus = android.hardware.radio.network.CellConnectionStatus.NONE;
android.hardware.radio.network.CellInfoRatSpecificInfo ratSpecificInfo;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
index cb542e8..540dc1e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable CellularIdentifierDisclosure {
String plmn;
- android.hardware.radio.network.CellularIdentifier identifier;
- android.hardware.radio.network.NasProtocolMessage protocolMessage;
+ android.hardware.radio.network.CellularIdentifier identifier = android.hardware.radio.network.CellularIdentifier.UNKNOWN;
+ android.hardware.radio.network.NasProtocolMessage protocolMessage = android.hardware.radio.network.NasProtocolMessage.UNKNOWN;
boolean isEmergency;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
index 0de7e20..81c286a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
@@ -35,6 +35,7 @@
/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum Domain {
+ INVALID = 0,
CS = (1 << 0) /* 1 */,
PS = (1 << 1) /* 2 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
index c5b067e..93c32fb 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EmergencyMode {
EMERGENCY_WWAN = 1,
EMERGENCY_WLAN = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index 471c7a0..7273a94 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -36,5 +36,5 @@
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyNetworkScanTrigger {
android.hardware.radio.AccessNetwork[] accessNetwork;
- android.hardware.radio.network.EmergencyScanType scanType;
+ android.hardware.radio.network.EmergencyScanType scanType = android.hardware.radio.network.EmergencyScanType.NO_PREFERENCE;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
index 3b8083d..47940f3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -35,9 +35,9 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyRegResult {
- android.hardware.radio.AccessNetwork accessNetwork;
- android.hardware.radio.network.RegState regState;
- android.hardware.radio.network.Domain emcDomain;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.network.RegState regState = android.hardware.radio.network.RegState.NOT_REG_MT_NOT_SEARCHING_OP;
+ android.hardware.radio.network.Domain emcDomain = android.hardware.radio.network.Domain.INVALID;
boolean isVopsSupported;
boolean isEmcBearerSupported;
byte nwProvidedEmc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
index bb34fe1..2ff454c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -37,7 +37,7 @@
parcelable EutranRegistrationInfo {
android.hardware.radio.network.LteVopsInfo lteVopsInfo;
android.hardware.radio.network.NrIndicators nrIndicators;
- android.hardware.radio.network.EutranRegistrationInfo.AttachResultType lteAttachResultType;
+ android.hardware.radio.network.EutranRegistrationInfo.AttachResultType lteAttachResultType = android.hardware.radio.network.EutranRegistrationInfo.AttachResultType.NONE;
int extraInfo;
const int EXTRA_CSFB_NOT_PREFERRED = (1 << 0) /* 1 */;
const int EXTRA_SMS_ONLY = (1 << 1) /* 2 */;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
index 60eaf77..cdac0be 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NetworkScanRequest {
int type;
int interval;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
index 695a194..518a378 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
@@ -33,10 +33,10 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NetworkScanResult {
int status;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
android.hardware.radio.network.CellInfo[] networkInfos;
const int SCAN_STATUS_PARTIAL = 1;
const int SCAN_STATUS_COMPLETE = 2;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
index 61146aa..1b5b669 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NrVopsInfo {
byte vopsSupported;
byte emcSupported;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
index 7d64f7e..f58e5ed 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhysicalChannelConfig {
- android.hardware.radio.network.CellConnectionStatus status;
- android.hardware.radio.RadioTechnology rat;
+ android.hardware.radio.network.CellConnectionStatus status = android.hardware.radio.network.CellConnectionStatus.NONE;
+ android.hardware.radio.RadioTechnology rat = android.hardware.radio.RadioTechnology.UNKNOWN;
int downlinkChannelNumber;
int uplinkChannelNumber;
int cellBandwidthDownlinkKhz;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
index 8229207..9a018f7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioAccessSpecifier {
- android.hardware.radio.AccessNetwork accessNetwork;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
android.hardware.radio.network.RadioAccessSpecifierBands bands;
int[] channels;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
index 6058e30..cbf37b2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RadioBandMode {
BAND_MODE_UNSPECIFIED,
BAND_MODE_EURO,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
index f11b911..5e40813 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RegState {
NOT_REG_MT_NOT_SEARCHING_OP = 0,
REG_HOME = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
index 625d970..814cde8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
@@ -35,9 +35,9 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RegStateResult {
- android.hardware.radio.network.RegState regState;
- android.hardware.radio.RadioTechnology rat;
- android.hardware.radio.network.RegistrationFailCause reasonForDenial;
+ android.hardware.radio.network.RegState regState = android.hardware.radio.network.RegState.NOT_REG_MT_NOT_SEARCHING_OP;
+ android.hardware.radio.RadioTechnology rat = android.hardware.radio.RadioTechnology.UNKNOWN;
+ android.hardware.radio.network.RegistrationFailCause reasonForDenial = android.hardware.radio.network.RegistrationFailCause.NONE;
android.hardware.radio.network.CellIdentity cellIdentity;
String registeredPlmn;
android.hardware.radio.network.AccessTechnologySpecificInfo accessTechnologySpecificInfo;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
index 73ad180..8613f19 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SecurityAlgorithmUpdate {
- android.hardware.radio.network.ConnectionEvent connectionEvent;
- android.hardware.radio.network.SecurityAlgorithm encryption;
- android.hardware.radio.network.SecurityAlgorithm integrity;
+ android.hardware.radio.network.ConnectionEvent connectionEvent = android.hardware.radio.network.ConnectionEvent.CS_SIGNALLING_GSM;
+ android.hardware.radio.network.SecurityAlgorithm encryption = android.hardware.radio.network.SecurityAlgorithm.A50;
+ android.hardware.radio.network.SecurityAlgorithm integrity = android.hardware.radio.network.SecurityAlgorithm.A50;
boolean isUnprotectedEmergency;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
index 77b4831..2041bad 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -33,14 +33,14 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SignalThresholdInfo {
int signalMeasurement;
int hysteresisMs;
int hysteresisDb;
int[] thresholds;
boolean isEnabled;
- android.hardware.radio.AccessNetwork ran;
+ android.hardware.radio.AccessNetwork ran = android.hardware.radio.AccessNetwork.UNKNOWN;
const int SIGNAL_MEASUREMENT_TYPE_RSSI = 1;
const int SIGNAL_MEASUREMENT_TYPE_RSCP = 2;
const int SIGNAL_MEASUREMENT_TYPE_RSRP = 3;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
index 898b616..a3e6d3a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
@@ -33,16 +33,16 @@
package android.hardware.radio.sim;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable AppStatus {
int appType;
int appState;
- android.hardware.radio.sim.PersoSubstate persoSubstate;
+ android.hardware.radio.sim.PersoSubstate persoSubstate = android.hardware.radio.sim.PersoSubstate.UNKNOWN;
String aidPtr;
String appLabelPtr;
boolean pin1Replaced;
- android.hardware.radio.sim.PinState pin1;
- android.hardware.radio.sim.PinState pin2;
+ android.hardware.radio.sim.PinState pin1 = android.hardware.radio.sim.PinState.UNKNOWN;
+ android.hardware.radio.sim.PinState pin2 = android.hardware.radio.sim.PinState.UNKNOWN;
const int APP_STATE_UNKNOWN = 0;
const int APP_STATE_DETECTED = 1;
const int APP_STATE_PIN = 2;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
index 066777a..6a908c4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum CardPowerState {
POWER_DOWN,
POWER_UP,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
index 1a9d621..0d7e48a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable CardStatus {
int cardState;
- android.hardware.radio.sim.PinState universalPinState;
+ android.hardware.radio.sim.PinState universalPinState = android.hardware.radio.sim.PinState.UNKNOWN;
int gsmUmtsSubscriptionAppIndex;
int cdmaSubscriptionAppIndex;
int imsSubscriptionAppIndex;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
index a5b8dc9..8f5672f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -44,7 +44,7 @@
*/
android.hardware.radio.sim.Carrier[] excludedCarriers;
boolean allowedCarriersPrioritized;
- android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus status;
+ android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus status = android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus.UNKNOWN;
android.hardware.radio.sim.CarrierInfo[] allowedCarrierInfoList = {};
android.hardware.radio.sim.CarrierInfo[] excludedCarrierInfoList = {};
@Backing(type="int") @VintfStability
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
index aaf9f3e..5070ff2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
+@Backing(type="byte") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum PbReceivedStatus {
PB_RECEIVED_OK = 1,
PB_RECEIVED_ERROR = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index 8cfe417..75b8f6b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum SimLockMultiSimPolicy {
NO_MULTISIM_POLICY,
ONE_VALID_SIM_MUST_BE_PRESENT,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
index 81ba510..c546565 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SimRefreshResult {
int type;
int efId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
index b45a45b..27130b4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
@@ -48,7 +48,7 @@
String name;
int namePresentation;
android.hardware.radio.voice.UusInfo[] uusInfo;
- android.hardware.radio.voice.AudioQuality audioQuality;
+ android.hardware.radio.voice.AudioQuality audioQuality = android.hardware.radio.voice.AudioQuality.UNSPECIFIED;
String forwardedNumber;
const int PRESENTATION_ALLOWED = 0;
const int PRESENTATION_RESTRICTED = 1;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index 300b03f..0142792 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaDisplayInfoRecord {
String alphaBuf;
const int CDMA_ALPHA_INFO_BUFFER_LENGTH = 64;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
index 2f7f5f0..c71a8be 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaInformationRecord {
int name;
android.hardware.radio.voice.CdmaDisplayInfoRecord[] display;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
index c3b0d5a..974e795 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaNumberInfoRecord {
String number;
byte numberType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
index 93c7c6b..818d107 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaRedirectingNumberInfoRecord {
android.hardware.radio.voice.CdmaNumberInfoRecord redirectingNumber;
int redirectingReason;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
index c38c801..3153e0a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ClipStatus {
CLIP_PROVISIONED,
CLIP_UNPROVISIONED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
index 3099a20..a45f388 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EmergencyCallRouting {
UNKNOWN,
EMERGENCY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
index 0cac135..17a039f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum LastCallFailCause {
+ INVALID = 0,
UNOBTAINABLE_NUMBER = 1,
NO_ROUTE_TO_DESTINATION = 3,
CHANNEL_UNACCEPTABLE = 6,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 151adf2..c36a934 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -35,6 +35,6 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LastCallFailCauseInfo {
- android.hardware.radio.voice.LastCallFailCause causeCode;
+ android.hardware.radio.voice.LastCallFailCause causeCode = android.hardware.radio.voice.LastCallFailCause.INVALID;
String vendorCause;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
index 24365dc..2af38fe 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SsInfoData {
int[] ssInfo;
const int SS_INFO_MAX = 4;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 999f47c..d265374 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -39,7 +39,7 @@
int requestType;
int teleserviceType;
int serviceClass;
- android.hardware.radio.RadioError result;
+ android.hardware.radio.RadioError result = android.hardware.radio.RadioError.NONE;
android.hardware.radio.voice.SsInfoData[] ssInfo;
android.hardware.radio.voice.CfData[] cfData;
const int REQUEST_TYPE_ACTIVATION = 0;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
index 3c84c8d..79c77ee 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable UusInfo {
int uusType;
int uusDcs;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
index 02c5370..e782e73 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RadioError {
NONE = 0,
RADIO_NOT_AVAILABLE = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
index f03a73b..bfab0c5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfo {
- android.hardware.radio.RadioResponseType type;
+ android.hardware.radio.RadioResponseType type = android.hardware.radio.RadioResponseType.SOLICITED;
int serial;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
index 2e0c315..c445fec 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfoModem {
- android.hardware.radio.RadioResponseType type;
+ android.hardware.radio.RadioResponseType type = android.hardware.radio.RadioResponseType.SOLICITED;
int serial;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
boolean isEnabled;
}
diff --git a/radio/aidl/android/hardware/radio/RadioError.aidl b/radio/aidl/android/hardware/radio/RadioError.aidl
index 9c39bc4..6ce8f67 100644
--- a/radio/aidl/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/android/hardware/radio/RadioError.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RadioError {
/**
* Success
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
index 25195aa..926ccf6 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
@@ -26,7 +26,7 @@
/**
* Response type
*/
- RadioResponseType type;
+ RadioResponseType type = RadioResponseType.SOLICITED;
/**
* Serial number of the request
*/
@@ -34,5 +34,5 @@
/**
* Response error
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
}
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
index 286f397..3e76a93 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -26,7 +26,7 @@
/**
* Response type
*/
- RadioResponseType type;
+ RadioResponseType type = RadioResponseType.SOLICITED;
/**
* Serial number of the request
*/
@@ -34,7 +34,7 @@
/**
* Response error
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
/**
* Whether the modem is enabled or not
*/
diff --git a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
index e015e8e..6f043d9 100644
--- a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum DataCallFailCause {
/**
* An integer cause code defined in TS 24.008 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
diff --git a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
index d01f8ff..f067fb4 100644
--- a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
@@ -66,15 +66,15 @@
/**
* PDP_type values.
*/
- PdpProtocolType protocol;
+ PdpProtocolType protocol = PdpProtocolType.IP;
/**
* PDP_type values used on roaming network.
*/
- PdpProtocolType roamingProtocol;
+ PdpProtocolType roamingProtocol = PdpProtocolType.IP;
/**
* APN authentication type.
*/
- ApnAuthType authType;
+ ApnAuthType authType = ApnAuthType.NO_PAP_NO_CHAP;
/**
* The username for APN, or empty string.
*/
diff --git a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
index a762e34..03c3481 100644
--- a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="byte")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum DataThrottlingAction {
/*
* Clear all existing data throttling.
diff --git a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
index 7ac560f..f5d6553 100644
--- a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
@@ -22,6 +22,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable LinkAddress {
const int ADDRESS_PROPERTY_NONE = 0;
/**
diff --git a/radio/aidl/android/hardware/radio/data/PortRange.aidl b/radio/aidl/android/hardware/radio/data/PortRange.aidl
index 7326966..1d436fa 100644
--- a/radio/aidl/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/android/hardware/radio/data/PortRange.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable PortRange {
const int PORT_RANGE_MIN = 20;
const int PORT_RANGE_MAX = 65535;
diff --git a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index 4e9e954..4d4b6d5 100644
--- a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -38,7 +38,7 @@
/**
* Valid values are IP, IPV6, IPV4V6, and UNKNOWN.
*/
- PdpProtocolType sessionType;
+ PdpProtocolType sessionType = PdpProtocolType.IP;
/**
* Session and service continuity mode as defined in 3GPP TS 23.501.
* Valid values are SSC_MODE_
diff --git a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
index 31fb14c..687982a 100644
--- a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -27,6 +27,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SetupDataCallResult {
/**
* Indicates the data connection is inactive.
@@ -64,7 +65,7 @@
/**
* Data call fail cause. DataCallFailCause.NONE if no error.
*/
- DataCallFailCause cause;
+ DataCallFailCause cause = DataCallFailCause.NONE;
/**
* If cause is not DataCallFailCause.NONE, this field indicates the network suggested data
* retry back-off time in milliseconds. Negative value indicates network does not give any
@@ -87,7 +88,7 @@
* PDP protocol type. If cause is DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this is the
* protocol type supported, such as "IP" or "IPV6".
*/
- PdpProtocolType type;
+ PdpProtocolType type = PdpProtocolType.IP;
/**
* The network interface name.
*/
diff --git a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index c96f59f..92024ac 100644
--- a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -22,7 +22,10 @@
parcelable ConnectionFailureInfo {
@VintfStability
@Backing(type="int")
+ @SuppressWarnings(value={"redundant-name"})
enum ConnectionFailureReason {
+ /** Do not use. */
+ INVALID = 0,
/** Access class check failed */
REASON_ACCESS_DENIED = 1,
/** 3GPP Non-access stratum failure */
@@ -47,7 +50,7 @@
/**
* Values are REASON_* constants
*/
- ConnectionFailureReason failureReason;
+ ConnectionFailureReason failureReason = ConnectionFailureReason.INVALID;
/**
* Failure cause code from network or modem specific to the failure
diff --git a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
index 427c1f5..49fd62c 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
@@ -50,16 +50,16 @@
int index;
/** The type of the call */
- CallType callType;
+ CallType callType = CallType.NORMAL;
/** The access network where the call is in progress */
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/** The state of the call */
- CallState callState;
+ CallState callState = CallState.ACTIVE;
/** The direction of the call */
- Direction direction;
+ Direction direction = Direction.INCOMING;
/** True if the call is put on HOLD by the other party */
boolean isHeldByRemote;
diff --git a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index acfe51c..bee8276 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -20,6 +20,7 @@
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
+@SuppressWarnings(value={"redundant-name"})
enum ImsDeregistrationReason {
/**
* Radio shall send this reason to IMS stack to perform graceful de-registration
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
index 5158386..9018273 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
@@ -23,6 +23,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable ImsRegistration {
/** Default value */
const int IMS_MMTEL_CAPABILITY_NONE = 0;
@@ -36,15 +37,15 @@
const int IMS_RCS_CAPABILITIES = 1 << 3;
/** Indicates the current IMS registration state. */
- ImsRegistrationState regState;
+ ImsRegistrationState regState = ImsRegistrationState.NOT_REGISTERED;
/**
* Indicates the type of the radio access network where IMS is registered.
*/
- AccessNetwork accessNetworkType;
+ AccessNetwork accessNetworkType = AccessNetwork.UNKNOWN;
/** Indicates the expected action for the radio to do. */
- SuggestedAction suggestedAction;
+ SuggestedAction suggestedAction = SuggestedAction.NONE;
/**
* Values are bitwise ORs of IMS_MMTEL_CAPABILITY_* constants and IMS_RCS_CAPABILITIES.
diff --git a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
index 16858f9..4fdfed0 100644
--- a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
@@ -47,16 +47,16 @@
int index;
/** The type of the call */
- CallType callType;
+ CallType callType = CallType.NORMAL;
/** Values are android.hardware.radio.voice.Call.STATE_* constants */
int callState;
/** The substate of the call */
- CallSubState callSubstate;
+ CallSubState callSubstate = CallSubState.NONE;
/** The type of the ringback tone */
- ToneType ringbackToneType;
+ ToneType ringbackToneType = ToneType.NONE;
/** true if is mpty call */
boolean isMpty;
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
index dc2a162..94070db 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
@@ -23,7 +23,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum AmrMode {
+ /** Do not use. */
+ INVALID = 0,
/** 4.75 kbps for AMR / 6.6 kbps for AMR-WB */
AMR_MODE_0 = 1 << 0,
/** 5.15 kbps for AMR / 8.855 kbps for AMR-WB */
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
index 9d7ab05..dbf38c2 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
@@ -23,7 +23,7 @@
@JavaDerive(toString=true)
parcelable AmrParams {
/** mode-set: AMR codec mode to represent the bit rate */
- AmrMode amrMode;
+ AmrMode amrMode = AmrMode.INVALID;
/**
* octet-align: If it's set to true then all fields in the AMR/AMR-WB header
* shall be aligned to octet boundaries by adding padding bits.
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
index 74de6ec..6da8087 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
@@ -24,7 +24,7 @@
@JavaDerive(toString=true)
parcelable CodecParams {
/** Negotiated codec type */
- CodecType codecType;
+ CodecType codecType = CodecType.INVALID;
/**
* Static or dynamic payload type number negotiated through the SDP for
* the incoming RTP packets. This value shall be matched with the PT value
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
index 99fbac4..cf9dba4 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
@@ -21,6 +21,8 @@
@Backing(type="int")
@JavaDerive(toString=true)
enum CodecType {
+ /** Do not use. */
+ INVALID = 0,
/** Adaptive Multi-Rate */
AMR = 1 << 0,
/** Adaptive Multi-Rate Wide Band */
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
index 12d981b..899f05a 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
@@ -23,7 +23,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EvsMode {
+ /** Do not use. */
+ INVALID = 0,
/** 6.6 kbps for EVS AMR-WB IO */
EVS_MODE_0 = 1 << 0,
/** 8.855 kbps for AMR-WB IO */
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
index 52c3bf9..37c7d4b 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
@@ -24,10 +24,10 @@
@JavaDerive(toString=true)
parcelable EvsParams {
/** EVS codec bandwidth */
- EvsBandwidth bandwidth;
+ EvsBandwidth bandwidth = EvsBandwidth.NONE;
/** mode-set: EVS codec mode to represent the bit rate */
- EvsMode evsMode;
+ EvsMode evsMode = EvsMode.INVALID;
/**
* ch-aw-recv: Channel aware mode for the receive direction. Permissible values
* are -1, 0, 2, 3, 5, and 7. If -1, channel-aware mode is disabled in the
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 88180d7..c7ee147 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RtcpXrReportBlockType {
/** Disable RTCP XR */
RTCPXR_NONE = 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
index 3c5c4dd..9aca292 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -29,7 +29,7 @@
/** Media flow direction. The bitfield of MediaDirection(s) */
int direction;
/** Radio Access Network */
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/** IP address and port number of the other party for RTP media */
RtpAddress remoteAddress;
/** Negotiated session parameters */
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index 19d84ff..8c494bb 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaSmsSubaddress {
/**
* CCITT X.213 or ISO 8348 AD2
diff --git a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
index 5f9f82b..bbcd1cb 100644
--- a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -24,7 +24,7 @@
@VintfStability
@JavaDerive(toString=true)
parcelable ImsSmsMessage {
- RadioTechnologyFamily tech;
+ RadioTechnologyFamily tech = RadioTechnologyFamily.THREE_GPP;
/**
* Retry if true
*/
diff --git a/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
index 7ca4021..6ad47fc 100644
--- a/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
@@ -36,7 +36,7 @@
* Radio access technology. Set UNKNOWN if the Activity statistics
* is RAT independent.
*/
- AccessNetwork rat;
+ AccessNetwork rat = AccessNetwork.UNKNOWN;
/**
* Frequency range. Values are FREQUENCY_RANGE_
* Set FREQUENCY_RANGE_UNKNOWN if the Activity statistics when frequency range
diff --git a/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl b/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
index c1f4cd6..86df920 100644
--- a/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum DeviceStateType {
/**
* Device power save mode (provided by PowerManager). True indicates the device is in
diff --git a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
index 1ba3562..4818c9e 100644
--- a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
@@ -34,7 +34,7 @@
/**
* Bitset value, based on RadioTechnology.
*/
- RadioTechnology rat;
+ RadioTechnology rat = RadioTechnology.UNKNOWN;
/**
* Maximum number of concurrent active voice calls.
*/
diff --git a/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl b/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
index 6d33505..82fade5 100644
--- a/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
@@ -29,6 +29,8 @@
* ImeiType enum is used identify the IMEI as primary or secondary as mentioned in GSMA TS.37
*/
enum ImeiType {
+ /** Must not be used. */
+ INVALID = 0,
/**
* This is the primary IMEI of the device as mentioned in the GSMA TS.37. In a multi-SIM
* device the modem must set one IMEI with this type as mentioned in GSMA TS37_2.2_REQ_8.
@@ -40,7 +42,7 @@
}
/** Primary or secondary IMEI as mentioned in GSMA spec TS.37 */
- ImeiType type;
+ ImeiType type = ImeiType.INVALID;
/**
* IMEI value, see 3gpp spec 23.003 section 6. Note: This primary IMEI mapping must be
* permanent throughout the lifetime of the device irrespective of the factory data reset,
diff --git a/radio/aidl/android/hardware/radio/modem/NvItem.aidl b/radio/aidl/android/hardware/radio/modem/NvItem.aidl
index b405137..d646ff7 100644
--- a/radio/aidl/android/hardware/radio/modem/NvItem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/NvItem.aidl
@@ -17,7 +17,6 @@
package android.hardware.radio.modem;
/**
- * @deprecated NV APIs are deprecated starting from Android U.
* @hide
*/
@VintfStability
@@ -25,172 +24,217 @@
@JavaDerive(toString=true)
enum NvItem {
/**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
+ INVALID = 0,
+ /**
* CDMA radio and account information (items 1-10)
* CDMA MEID (hex)
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_MEID = 1,
/**
* CDMA MIN (MSID)
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_MIN = 2,
/**
* CDMA MDN
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_MDN = 3,
/**
* CDMA access overload control
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_ACCOLC = 4,
/**
* Carrier device provisioning (items 11-30)
* Device MSL
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
DEVICE_MSL = 11,
/**
* RTN reconditioned status
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_RECONDITIONED_STATUS = 12,
/**
* RTN activation date
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_ACTIVATION_DATE = 13,
/**
* RTN life timer
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_LIFE_TIMER = 14,
/**
* RTN life calls
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_LIFE_CALLS = 15,
/**
* RTN life data TX
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_LIFE_DATA_TX = 16,
/**
* RTN life data RX
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
RTN_LIFE_DATA_RX = 17,
/**
* HFA in progress
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
OMADM_HFA_LEVEL = 18,
/**
* Mobile IP profile information (items 31-50)
* NAI realm
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_NAI = 31,
/**
* MIP home address
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_HOME_ADDRESS = 32,
/**
* AAA auth
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_AAA_AUTH = 33,
/**
* HA auth
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_HA_AUTH = 34,
/**
* Primary HA address
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_PRI_HA_ADDR = 35,
/**
* Secondary HA address
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_SEC_HA_ADDR = 36,
/**
* Reverse TUN preference
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_REV_TUN_PREF = 37,
/**
* HA SPI
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_HA_SPI = 38,
/**
* AAA SPI
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_AAA_SPI = 39,
/**
* HA shared secret
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_MN_HA_SS = 40,
/**
* AAA shared secret
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
MIP_PROFILE_MN_AAA_SS = 41,
/**
* CDMA network and band config (items 51-70)
* CDMA PRL version
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_PRL_VERSION = 51,
/**
* CDMA band class 10
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_BC10 = 52,
/**
* CDMA band class 14
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_BC14 = 53,
/**
* CDMA SO68
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_SO68 = 54,
/**
* CDMA SO73 COP0
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_SO73_COP0 = 55,
/**
* CDMA SO73 COP1-7
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_SO73_COP1TO7 = 56,
/**
* CDMA 1X Advanced enabled
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_1X_ADVANCED_ENABLED = 57,
/**
* CDMA eHRPD enabled
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_EHRPD_ENABLED = 58,
/**
* CDMA eHRPD forced
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
CDMA_EHRPD_FORCED = 59,
/**
* LTE network and band config (items 71-90)
* LTE band 25 enabled
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_BAND_ENABLE_25 = 71,
/**
* LTE band 26 enabled
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_BAND_ENABLE_26 = 72,
/**
* LTE band 41 enabled
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_BAND_ENABLE_41 = 73,
/**
* LTE band 25 scan priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_SCAN_PRIORITY_25 = 74,
/**
* LTE band 26 scan priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_SCAN_PRIORITY_26 = 75,
/**
* LTE band 41 scan priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_SCAN_PRIORITY_41 = 76,
/**
* LTE hidden band 25 priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_HIDDEN_BAND_PRIORITY_25 = 77,
/**
* LTE hidden band 26 priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_HIDDEN_BAND_PRIORITY_26 = 78,
/**
* LTE hidden band 41 priority
+ * @deprecated NV APIs are deprecated starting from Android U.
*/
LTE_HIDDEN_BAND_PRIORITY_41 = 79,
}
diff --git a/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl b/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
index c57253b..482126a 100644
--- a/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
@@ -19,12 +19,17 @@
import android.hardware.radio.modem.NvItem;
/**
- * @deprecated NV APIs are deprecated starting from Android U.
* @hide
*/
@VintfStability
@JavaDerive(toString=true)
parcelable NvWriteItem {
- NvItem itemId;
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
+ NvItem itemId = NvItem.INVALID;
+ /**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ */
String value;
}
diff --git a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
index e290a52..b6be54d 100644
--- a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum ResetNvType {
/**
* Reload all NV items
diff --git a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
index f12e35c..7be3987 100644
--- a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable BarringInfo {
/**
* Device is not barred for the given service
diff --git a/radio/aidl/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
index 4895326..808a407 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
@@ -30,6 +30,6 @@
/**
* Connection status for the cell.
*/
- CellConnectionStatus connectionStatus;
+ CellConnectionStatus connectionStatus = CellConnectionStatus.NONE;
CellInfoRatSpecificInfo ratSpecificInfo;
}
diff --git a/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl b/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
index 52b4116..c851b43 100644
--- a/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
@@ -31,9 +31,9 @@
// The PLMN-ID to which the UE transmitted the cellular identifier
String plmn;
// The type of cellular identifier that was disclosed
- CellularIdentifier identifier;
+ CellularIdentifier identifier = CellularIdentifier.UNKNOWN;
// The NAS protocol message within which the cellular identifier was transmitted.
- NasProtocolMessage protocolMessage;
+ NasProtocolMessage protocolMessage = NasProtocolMessage.UNKNOWN;
// Whether or not this cellular identifier disclosure is in service of an emergency call.
boolean isEmergency;
}
diff --git a/radio/aidl/android/hardware/radio/network/Domain.aidl b/radio/aidl/android/hardware/radio/network/Domain.aidl
index bb169bd..e420e7b 100644
--- a/radio/aidl/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/android/hardware/radio/network/Domain.aidl
@@ -21,6 +21,8 @@
@Backing(type="int")
@JavaDerive(toString=true)
enum Domain {
+ /** Do not use. */
+ INVALID = 0,
/**
* Circuit-switched
*/
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
index 7a2ed9c..bd36494 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EmergencyMode {
/**
* Mode Type Emergency WWAN, indicates that the current domain selected for the Emergency call
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index ea4bfeb..572d1e2 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -32,5 +32,5 @@
* Scan type indicates the type of scans to be performed i.e. limited scan, full service scan or
* any scan.
*/
- EmergencyScanType scanType;
+ EmergencyScanType scanType = EmergencyScanType.NO_PREFERENCE;
}
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
index af2750e..7fc4d26 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -26,17 +26,17 @@
/**
* Indicates the cellular access network of the current emergency capable system.
*/
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/**
* Registration state of the current emergency capable system.
*/
- RegState regState;
+ RegState regState = RegState.NOT_REG_MT_NOT_SEARCHING_OP;
/**
* EMC domain indicates the current domain of the acquired system.
*/
- Domain emcDomain;
+ Domain emcDomain = Domain.INVALID;
/**
* This indicates whether the network supports voice over PS network.
diff --git a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
index fb319c1..15fabf3 100644
--- a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -54,7 +54,7 @@
* The type of network attachment. This info is valid only on LTE network and must be present
* when device has attached to the network.
*/
- AttachResultType lteAttachResultType;
+ AttachResultType lteAttachResultType = AttachResultType.NONE;
/** Values are bitwise ORs of EXTRA_* constants */
int extraInfo;
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index a4f97e3..81d21e1 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -503,7 +503,7 @@
*
* This is available when android.hardware.telephony is defined.
*/
- oneway void setUsageSetting(in int serial, in UsageSetting usageSetting);
+ void setUsageSetting(in int serial, in UsageSetting usageSetting);
/**
* Get the UE usage setting for data/voice centric usage.
@@ -514,7 +514,7 @@
*
* This is available when android.hardware.telephony is defined.
*/
- oneway void getUsageSetting(in int serial);
+ void getUsageSetting(in int serial);
/**
* Set the Emergency Mode
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index b67e8e0..5dcdb69 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -603,7 +603,7 @@
* RadioError:INTERNAL_ERR
* RadioError:SIM_ABSENT
*/
- oneway void setUsageSettingResponse(in RadioResponseInfo info);
+ void setUsageSettingResponse(in RadioResponseInfo info);
/**
* @param info Response info struct containing response type, serial no. and error.
@@ -617,7 +617,7 @@
* RadioError:INTERNAL_ERR
* RadioError:SIM_ABSENT
*/
- oneway void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
+ void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
/**
* Response of setEmergencyMode.
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
index 37f2cf1..30977f8 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NetworkScanRequest {
const int RADIO_ACCESS_SPECIFIER_MAX_SIZE = 8;
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
index 4465046..700c5e2 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
@@ -22,6 +22,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NetworkScanResult {
/**
* The result contains a part of the scan results.
@@ -40,7 +41,7 @@
/**
* The error code of the incremental result.
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
/**
* List of network information as CellInfo.
*/
diff --git a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
index 71961a3..6fe1d27 100644
--- a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
@@ -23,6 +23,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NrVopsInfo {
/**
* Emergency services not supported
diff --git a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
index ecb9463..b648ef8 100644
--- a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -27,11 +27,11 @@
/**
* Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING
*/
- CellConnectionStatus status;
+ CellConnectionStatus status = CellConnectionStatus.NONE;
/**
* The radio technology for this physical channel
*/
- RadioTechnology rat;
+ RadioTechnology rat = RadioTechnology.UNKNOWN;
/**
* Downlink Absolute Radio Frequency Channel Number
*/
diff --git a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
index b3cee47..8bb4fe0 100644
--- a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -26,7 +26,7 @@
/**
* The type of network to scan.
*/
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/**
* The frequency bands to scan. Maximum length of the vector is 8.
*/
diff --git a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
index 364a562..bd83b7d 100644
--- a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RadioBandMode {
/**
* "Unspecified" (selected by baseband automatically)
diff --git a/radio/aidl/android/hardware/radio/network/RegState.aidl b/radio/aidl/android/hardware/radio/network/RegState.aidl
index de2d5f6..15e7160 100644
--- a/radio/aidl/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegState.aidl
@@ -25,6 +25,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RegState {
/**
* Not registered, MT is not currently searching for a new operator to register
diff --git a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
index 57a73c0..a7857ef 100644
--- a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
@@ -32,7 +32,7 @@
* EUTRAN, NGRAN, or another technology that does not support circuit-switched services, this
* value reports registration in the Packet-switched domain.
*/
- RegState regState;
+ RegState regState = RegState.NOT_REG_MT_NOT_SEARCHING_OP;
/**
* Indicates the radio technology, which must not be UNKNOWN if regState is REG_HOME,
* REG_ROAMING, NOT_REG_MT_NOT_SEARCHING_OP_EM, NOT_REG_MT_SEARCHING_OP_EM, REG_DENIED_EM,
@@ -40,12 +40,12 @@
* When the device is on carrier aggregation, vendor RIL service must properly report multiple
* PhysicalChannelConfig elements through IRadioNetwork::currentPhysicalChannelConfigs.
*/
- RadioTechnology rat;
+ RadioTechnology rat = RadioTechnology.UNKNOWN;
/**
* Cause code reported by the network in case registration fails. This will be a mobility
* management cause code defined for MM, GMM, MME or equivalent as appropriate for the RAT.
*/
- RegistrationFailCause reasonForDenial;
+ RegistrationFailCause reasonForDenial = RegistrationFailCause.NONE;
/**
* CellIdentity
*/
diff --git a/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl b/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
index e945d3b..ab48148 100644
--- a/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
+++ b/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
@@ -31,15 +31,15 @@
/**
* Type of connection event which is being reported on
*/
- ConnectionEvent connectionEvent;
+ ConnectionEvent connectionEvent = ConnectionEvent.CS_SIGNALLING_GSM;
/**
* Encryption algorithm which was used
*/
- SecurityAlgorithm encryption;
+ SecurityAlgorithm encryption = SecurityAlgorithm.A50;
/**
* Integrity algorithm which was used
*/
- SecurityAlgorithm integrity;
+ SecurityAlgorithm integrity = SecurityAlgorithm.A50;
/**
* Whether or not this connection event is associated with an
* unauthenticated / unencrypted emergency session
diff --git a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
index e440a64..3933889 100644
--- a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SignalThresholdInfo {
/**
* Received Signal Strength Indication.
@@ -121,5 +122,5 @@
/**
* The Radio Access Network for current threshold info.
*/
- AccessNetwork ran;
+ AccessNetwork ran = AccessNetwork.UNKNOWN;
}
diff --git a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
index 7fe8e40..602c8c5 100644
--- a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
@@ -22,6 +22,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable AppStatus {
const int APP_STATE_UNKNOWN = 0;
const int APP_STATE_DETECTED = 1;
@@ -57,7 +58,7 @@
/**
* Applicable only if appState == SUBSCRIPTION_PERSO
*/
- PersoSubstate persoSubstate;
+ PersoSubstate persoSubstate = PersoSubstate.UNKNOWN;
/**
* e.g., from 0xA0, 0x00 -> 0x41, 0x30, 0x30, 0x30
*/
@@ -67,6 +68,6 @@
* Applicable to USIM, CSIM and ISIM
*/
boolean pin1Replaced;
- PinState pin1;
- PinState pin2;
+ PinState pin1 = PinState.UNKNOWN;
+ PinState pin2 = PinState.UNKNOWN;
}
diff --git a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
index 2598dcb..0d5db2a 100644
--- a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum CardPowerState {
POWER_DOWN,
POWER_UP,
diff --git a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
index 043bfa4..90aa8e0 100644
--- a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
@@ -48,7 +48,7 @@
/**
* Applicable to USIM and CSIM
*/
- PinState universalPinState;
+ PinState universalPinState = PinState.UNKNOWN;
/**
* Value < RadioConst:CARD_MAX_APPS, -1 if none
*/
diff --git a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
index 0002d5a..69c618f 100644
--- a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -61,7 +61,7 @@
*/
boolean allowedCarriersPrioritized;
/** Current restriction status as defined in CarrierRestrictionStatus enum */
- CarrierRestrictionStatus status;
+ CarrierRestrictionStatus status = CarrierRestrictionStatus.UNKNOWN;
/** Allowed carriers. */
CarrierInfo[] allowedCarrierInfoList = {};
@@ -71,5 +71,5 @@
* excludedCarriers has same mcc/mnc and gid1 is ABCD. It means except the carrier whose gid1
* is ABCD, all carriers with the same mcc/mnc are allowed.
*/
- CarrierInfo[] excludedCarrierInfoList = {};
-}
\ No newline at end of file
+ CarrierInfo[] excludedCarrierInfoList = {};
+}
diff --git a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
index f9414a8..c75a4ef 100644
--- a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="byte")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum PbReceivedStatus {
/**
* Indicates that retrieval is fine.
diff --git a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index 89d85a9..7ec5141 100644
--- a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum SimLockMultiSimPolicy {
/**
diff --git a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
index 943f1d2..618ac32 100644
--- a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SimRefreshResult {
/**
* A file on SIM has been updated.
diff --git a/radio/aidl/android/hardware/radio/voice/Call.aidl b/radio/aidl/android/hardware/radio/voice/Call.aidl
index ee0b025..9990f28 100644
--- a/radio/aidl/android/hardware/radio/voice/Call.aidl
+++ b/radio/aidl/android/hardware/radio/voice/Call.aidl
@@ -99,7 +99,7 @@
* Vector of User-User Signaling Information
*/
UusInfo[] uusInfo;
- AudioQuality audioQuality;
+ AudioQuality audioQuality = AudioQuality.UNSPECIFIED;
/**
* Forwarded number. It can set only one forwarded number based on 3GPP rule of the CS.
* Reference: 3GPP TS 24.008 section 10.5.4.21b
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index 7e5a68d..90b2715 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -26,6 +26,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaDisplayInfoRecord {
const int CDMA_ALPHA_INFO_BUFFER_LENGTH = 64;
/**
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
index f5c656b..19903c6 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -30,6 +30,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaInformationRecord {
const int CDMA_MAX_NUMBER_OF_INFO_RECS = 10;
/**
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
index b04e273..3a00cae 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaNumberInfoRecord {
const int CDMA_NUMBER_INFO_BUFFER_LENGTH = 81;
/**
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
index 691712e..cb30da8 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaRedirectingNumberInfoRecord {
/**
* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11
diff --git a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
index 0a2ea2c..070aff7 100644
--- a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum ClipStatus {
/**
* CLIP provisioned
diff --git a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
index 9f8993d..36e0bc0 100644
--- a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EmergencyCallRouting {
/**
* Indicates Android does not require how to handle the corresponding emergency call; it is
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
index 9a38197..7737e94 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -20,7 +20,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum LastCallFailCause {
+ /** Do not use. */
+ INVALID = 0,
UNOBTAINABLE_NUMBER = 1,
NO_ROUTE_TO_DESTINATION = 3,
CHANNEL_UNACCEPTABLE = 6,
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 4ed17d2..6af38bb 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -22,6 +22,6 @@
@VintfStability
@JavaDerive(toString=true)
parcelable LastCallFailCauseInfo {
- LastCallFailCause causeCode;
+ LastCallFailCause causeCode = LastCallFailCause.INVALID;
String vendorCause;
}
diff --git a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
index c965a7d..9c9dcff 100644
--- a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SsInfoData {
const int SS_INFO_MAX = 4;
/**
diff --git a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 9fe4024..641994e 100644
--- a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -84,7 +84,7 @@
* Values are a bitfield of SUPP_SERVICE_CLASS_
*/
int serviceClass;
- RadioError result;
+ RadioError result = RadioError.NONE;
/**
* Valid only for all serviceType except SERVICE_TYPE_CF_* else empty.
* Only one of ssInfo and cfData may contain values and the other must be empty.
diff --git a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
index 5d499ca..3760ac6 100644
--- a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
@@ -22,6 +22,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable UusInfo {
/**
* User specified protocol
diff --git a/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl b/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
index 294c205..6ff66e7 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
@@ -125,9 +125,9 @@
* straightforward translation of the KeyMint tag/value parameter lists to ASN.1.
*
* KeyDescription ::= SEQUENCE {
- * attestationVersion INTEGER, # Value 300
+ * attestationVersion INTEGER, # Value 400
* attestationSecurityLevel SecurityLevel, # See below
- * keyMintVersion INTEGER, # Value 300
+ * keyMintVersion INTEGER, # Value 400
* keymintSecurityLevel SecurityLevel, # See below
* attestationChallenge OCTET_STRING, # Tag::ATTESTATION_CHALLENGE from attestParams
* uniqueId OCTET_STRING, # Empty unless key has Tag::INCLUDE_UNIQUE_ID
@@ -145,9 +145,9 @@
* verifiedBootKey OCTET_STRING,
* deviceLocked BOOLEAN,
* verifiedBootState VerifiedBootState,
- * # verifiedBootHash must contain 32-byte value that represents the state of all binaries
- * # or other components validated by verified boot. Updating any verified binary or
- * # component must cause this value to change.
+ * # verifiedBootHash must contain a SHA-256 digest of all binaries and components validated
+ * # by Verified Boot. Updating any verified binary or component must cause this value to
+ * # change.
* verifiedBootHash OCTET_STRING,
* }
*
@@ -158,6 +158,17 @@
* Failed (3),
* }
*
+ * # Modules contains version info about APEX modules that have been updated after the last OTA.
+ * # Note that the Modules information is DER-encoded before being hashed, which requires a
+ * # specific ordering (lexicographic by encoded value) for the constituent Module entries. This
+ * # ensures that the ordering of Module entries is predictable and that the resulting SHA-256
+ * # hash value is identical for the same set of modules.
+ * Modules ::= SET OF Module
+ * Module ::= SEQUENCE {
+ * packageName OCTET_STRING,
+ * version INTEGER, # As determined at boot time
+ * }
+ *
* -- Note that the AuthorizationList SEQUENCE is also used in IKeyMintDevice::importWrappedKey
* -- as a way of describing the authorizations associated with a key that is being securely
* -- imported. As such, it includes the ability to describe tags that are only relevant for
@@ -210,6 +221,7 @@
* bootPatchLevel [719] EXPLICIT INTEGER OPTIONAL,
* deviceUniqueAttestation [720] EXPLICIT NULL OPTIONAL,
* attestationIdSecondImei [723] EXPLICIT OCTET_STRING OPTIONAL,
+ * moduleHash [724] EXPLICIT OCTET_STRING OPTIONAL, -- SHA-256 hash of DER-encoded `Modules`
* }
*/
Certificate[] certificateChain;
diff --git a/security/keymint/aidl/default/Android.bp b/security/keymint/aidl/default/Android.bp
index a7066de..ff2393c 100644
--- a/security/keymint/aidl/default/Android.bp
+++ b/security/keymint/aidl/default/Android.bp
@@ -111,6 +111,13 @@
src: "android.hardware.hardware_keystore.xml",
}
+prebuilt_etc {
+ name: "android.hardware.hardware_keystore_V3.xml",
+ sub_dir: "permissions",
+ vendor: true,
+ src: "android.hardware.hardware_keystore_V3.xml",
+}
+
rust_library {
name: "libkmr_hal_nonsecure",
crate_name: "kmr_hal_nonsecure",
diff --git a/security/keymint/aidl/default/android.hardware.hardware_keystore_V3.xml b/security/keymint/aidl/default/android.hardware.hardware_keystore_V3.xml
new file mode 100644
index 0000000..4c75596
--- /dev/null
+++ b/security/keymint/aidl/default/android.hardware.hardware_keystore_V3.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2021 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.
+-->
+<permissions>
+ <feature name="android.hardware.hardware_keystore" version="300" />
+</permissions>
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index cfe9fa7..51afa12 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -149,7 +149,7 @@
// The multiplier should never be higher than the AIDL version, but can be less
// (for example, if the implementation is from an earlier version but the HAL service
// uses the default libraries and so reports the current AIDL version).
- EXPECT_TRUE((attestation_version / 100) <= aidl_version);
+ EXPECT_LE((attestation_version / 100), aidl_version);
}
bool avb_verification_enabled() {
@@ -160,12 +160,13 @@
char nibble2hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
-// Attestations don't contain everything in key authorization lists, so we need to filter the key
-// lists to produce the lists that we expect to match the attestations.
+// Attestations don't completely align with key authorization lists, so we need to filter the lists
+// to include only the tags that are in both.
auto kTagsToFilter = {
Tag::CREATION_DATETIME,
Tag::HARDWARE_TYPE,
Tag::INCLUDE_UNIQUE_ID,
+ Tag::MODULE_HASH,
};
AuthorizationSet filtered_tags(const AuthorizationSet& set) {
@@ -234,6 +235,83 @@
return boot_patch_level(key_characteristics_);
}
+std::optional<vector<uint8_t>> KeyMintAidlTestBase::getModuleHash() {
+ if (AidlVersion() < 4) {
+ // The `MODULE_HASH` tag was introduced in v4 of the HAL; earlier versions should never
+ // expect to encounter it.
+ return std::nullopt;
+ }
+
+ // The KeyMint instance should already have been informed of the `MODULE_HASH` value for the
+ // currently running system. Generate a single attestation so we can find out what the value
+ // is.
+ auto challenge = "hello";
+ auto app_id = "foo";
+ auto params = AuthorizationSetBuilder()
+ .EcdsaSigningKey(EcCurve::P_256)
+ .Digest(Digest::NONE)
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .AttestationChallenge(challenge)
+ .AttestationApplicationId(app_id)
+ .SetDefaultValidity();
+ vector<uint8_t> key_blob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> chain;
+ auto result = GenerateKey(params, &key_blob, &key_characteristics, &chain);
+ if (result != ErrorCode::OK) {
+ ADD_FAILURE() << "Failed to generate attestation:" << result;
+ return std::nullopt;
+ }
+ KeyBlobDeleter deleter(keymint_, key_blob);
+ if (chain.empty()) {
+ ADD_FAILURE() << "No attestation cert";
+ return std::nullopt;
+ }
+
+ // Parse the attestation record in the leaf cert.
+ X509_Ptr cert(parse_cert_blob(chain[0].encodedCertificate));
+ if (cert.get() == nullptr) {
+ ADD_FAILURE() << "Failed to parse attestation cert";
+ return std::nullopt;
+ }
+ ASN1_OCTET_STRING* attest_rec = get_attestation_record(cert.get());
+ if (attest_rec == nullptr) {
+ ADD_FAILURE() << "Failed to find attestation extension";
+ return std::nullopt;
+ }
+ AuthorizationSet att_sw_enforced;
+ AuthorizationSet att_hw_enforced;
+ uint32_t att_attestation_version;
+ uint32_t att_keymint_version;
+ SecurityLevel att_attestation_security_level;
+ SecurityLevel att_keymint_security_level;
+ vector<uint8_t> att_challenge;
+ vector<uint8_t> att_unique_id;
+ vector<uint8_t> att_app_id;
+
+ auto error = parse_attestation_record(attest_rec->data, //
+ attest_rec->length, //
+ &att_attestation_version, //
+ &att_attestation_security_level, //
+ &att_keymint_version, //
+ &att_keymint_security_level, //
+ &att_challenge, //
+ &att_sw_enforced, //
+ &att_hw_enforced, //
+ &att_unique_id);
+ if (error != ErrorCode::OK) {
+ ADD_FAILURE() << "Failed to parse attestation extension";
+ return std::nullopt;
+ }
+
+ // The module hash should be present in the software-enforced list.
+ if (!att_sw_enforced.Contains(TAG_MODULE_HASH)) {
+ ADD_FAILURE() << "No TAG_MODULE_HASH in attestation extension";
+ return std::nullopt;
+ }
+ return att_sw_enforced.GetTagValue(TAG_MODULE_HASH);
+}
+
/**
* An API to determine device IDs attestation is required or not,
* which is mandatory for KeyMint version 2 and first_api_level 33 or greater.
@@ -270,12 +348,7 @@
}
// Curve 25519 was included in version 2 of the KeyMint interface.
- int32_t version = 0;
- auto status = keymint_->getInterfaceVersion(&version);
- if (!status.isOk()) {
- ADD_FAILURE() << "Failed to determine interface version";
- }
- return version >= 2;
+ return AidlVersion() >= 2;
}
void KeyMintAidlTestBase::InitializeKeyMint(std::shared_ptr<IKeyMintDevice> keyMint) {
@@ -293,6 +366,20 @@
os_version_ = getOsVersion();
os_patch_level_ = getOsPatchlevel();
vendor_patch_level_ = getVendorPatchlevel();
+
+ // TODO(b/369375199): temporary code, remove when apexd -> keystore2 -> KeyMint transmission
+ // of module info happens.
+ {
+ GTEST_LOG_(INFO) << "Setting MODULE_HASH to fake value as fallback";
+ // Ensure that a MODULE_HASH value is definitely present in KeyMint (if it's >= v4).
+ vector<uint8_t> fakeModuleHash = {
+ 0xf3, 0xf1, 0x1f, 0xe5, 0x13, 0x05, 0xfe, 0xfa, 0xe9, 0xc3, 0x53,
+ 0xef, 0x69, 0xdf, 0x9f, 0xd7, 0x0c, 0x1e, 0xcc, 0x2c, 0x2c, 0x62,
+ 0x1f, 0x5e, 0x2c, 0x1d, 0x19, 0xa1, 0xfd, 0xac, 0xa1, 0xb4,
+ };
+ vector<KeyParameter> info = {Authorization(TAG_MODULE_HASH, fakeModuleHash)};
+ keymint_->setAdditionalAttestationInfo(info);
+ }
}
int32_t KeyMintAidlTestBase::AidlVersion() const {
@@ -320,6 +407,13 @@
ErrorCode KeyMintAidlTestBase::GenerateKey(const AuthorizationSet& key_desc,
vector<uint8_t>* key_blob,
vector<KeyCharacteristics>* key_characteristics) {
+ return GenerateKey(key_desc, key_blob, key_characteristics, &cert_chain_);
+}
+
+ErrorCode KeyMintAidlTestBase::GenerateKey(const AuthorizationSet& key_desc,
+ vector<uint8_t>* key_blob,
+ vector<KeyCharacteristics>* key_characteristics,
+ vector<Certificate>* cert_chain) {
std::optional<AttestationKey> attest_key = std::nullopt;
vector<Certificate> attest_cert_chain;
// If an attestation is requested, but the system is RKP-only, we need to supply an explicit
@@ -340,11 +434,10 @@
attest_key.value().issuerSubjectName = make_name_from_str("Android Keystore Key");
}
- ErrorCode error =
- GenerateKey(key_desc, attest_key, key_blob, key_characteristics, &cert_chain_);
+ ErrorCode error = GenerateKey(key_desc, attest_key, key_blob, key_characteristics, cert_chain);
if (error == ErrorCode::OK && attest_cert_chain.size() > 0) {
- cert_chain_.push_back(attest_cert_chain[0]);
+ cert_chain->push_back(attest_cert_chain[0]);
}
return error;
@@ -1049,13 +1142,12 @@
int openssl_padding = RSA_NO_PADDING;
switch (padding) {
case PaddingMode::NONE:
- ASSERT_TRUE(data_size <= key_len);
+ ASSERT_LE(data_size, key_len);
ASSERT_EQ(key_len, signature.size());
openssl_padding = RSA_NO_PADDING;
break;
case PaddingMode::RSA_PKCS1_1_5_SIGN:
- ASSERT_TRUE(data_size + kPkcs1UndigestedSignaturePaddingOverhead <=
- key_len);
+ ASSERT_LE(data_size + kPkcs1UndigestedSignaturePaddingOverhead, key_len);
openssl_padding = RSA_PKCS1_PADDING;
break;
default:
@@ -1812,7 +1904,7 @@
}
}
- // Verified boot key should be all 0's if the boot state is not verified or self signed
+ // Verified Boot key should be all zeroes if the boot state is "orange".
std::string empty_boot_key(32, '\0');
std::string verified_boot_key_str((const char*)verified_boot_key.data(),
verified_boot_key.size());
@@ -2271,7 +2363,7 @@
// ATTESTATION_IDS_NOT_PROVISIONED in this case.
ASSERT_TRUE((tag == TAG_ATTESTATION_ID_IMEI || tag == TAG_ATTESTATION_ID_MEID ||
tag == TAG_ATTESTATION_ID_SECOND_IMEI))
- << "incorrect error code on attestation ID mismatch";
+ << "incorrect error code on attestation ID mismatch for " << tag;
} else {
ADD_FAILURE() << "Error code " << result
<< " returned on attestation ID mismatch, should be CANNOT_ATTEST_IDS";
@@ -2353,7 +2445,7 @@
FILE* pipe = popen(command.c_str(), "r");
if (!pipe) {
- LOG(ERROR) << "popen failed.";
+ GTEST_LOG_(ERROR) << "popen failed.";
return result;
}
@@ -2379,7 +2471,7 @@
std::string output = exec_command(cmd);
if (output.empty()) {
- LOG(ERROR) << "Command failed. Cmd: " << cmd;
+ GTEST_LOG_(ERROR) << "Command failed. Cmd: " << cmd;
return "";
}
@@ -2387,13 +2479,14 @@
::android::base::Tokenize(::android::base::Trim(output), "Device IMEI:");
if (out.size() != 1) {
- LOG(ERROR) << "Error in parsing the command output. Cmd: " << cmd;
+ GTEST_LOG_(ERROR) << "Error in parsing the command output. Cmd: " << cmd;
return "";
}
std::string imei = ::android::base::Trim(out[0]);
if (imei.compare("null") == 0) {
- LOG(WARNING) << "Failed to get IMEI from Telephony service: value is null. Cmd: " << cmd;
+ GTEST_LOG_(WARNING) << "Failed to get IMEI from Telephony service: value is null. Cmd: "
+ << cmd;
return "";
}
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 85ae93d..1c12136 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -103,6 +103,7 @@
uint32_t vendor_patch_level() { return vendor_patch_level_; }
uint32_t boot_patch_level(const vector<KeyCharacteristics>& key_characteristics);
uint32_t boot_patch_level();
+ std::optional<vector<uint8_t>> getModuleHash();
bool isDeviceIdAttestationRequired();
bool isSecondImeiIdAttestationRequired();
std::optional<bool> isRkpOnly();
@@ -114,6 +115,10 @@
ErrorCode GenerateKey(const AuthorizationSet& key_desc, vector<uint8_t>* key_blob,
vector<KeyCharacteristics>* key_characteristics);
+ ErrorCode GenerateKey(const AuthorizationSet& key_desc, vector<uint8_t>* key_blob,
+ vector<KeyCharacteristics>* key_characteristics,
+ vector<Certificate>* cert_chain);
+
ErrorCode GenerateKey(const AuthorizationSet& key_desc,
const optional<AttestationKey>& attest_key, vector<uint8_t>* key_blob,
vector<KeyCharacteristics>* key_characteristics,
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 527b5e0..067db78 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -643,6 +643,7 @@
// Verify that App data, ROT and auth timeout are NOT included.
EXPECT_FALSE(auths.Contains(TAG_ROOT_OF_TRUST));
EXPECT_FALSE(auths.Contains(TAG_APPLICATION_DATA));
+ EXPECT_FALSE(auths.Contains(TAG_MODULE_HASH));
EXPECT_FALSE(auths.Contains(TAG_AUTH_TIMEOUT, 301U));
// None of the tests specify CREATION_DATETIME so check that the KeyMint implementation
@@ -2583,7 +2584,8 @@
auto result = GenerateKey(
AuthorizationSetBuilder().EcdsaKey(256).Digest(Digest::NONE).SetDefaultValidity());
ASSERT_TRUE(result == ErrorCode::UNSUPPORTED_KEY_SIZE ||
- result == ErrorCode::UNSUPPORTED_EC_CURVE);
+ result == ErrorCode::UNSUPPORTED_EC_CURVE)
+ << "unexpected result " << result;
}
/*
@@ -2604,7 +2606,7 @@
.SigningKey()
.Digest(Digest::NONE)
.SetDefaultValidity());
- ASSERT_TRUE(result == ErrorCode::INVALID_ARGUMENT);
+ ASSERT_EQ(result, ErrorCode::INVALID_ARGUMENT);
}
/*
@@ -3183,7 +3185,8 @@
string result;
ErrorCode finish_error_code = Finish(message, &result);
EXPECT_TRUE(finish_error_code == ErrorCode::INVALID_INPUT_LENGTH ||
- finish_error_code == ErrorCode::INVALID_ARGUMENT);
+ finish_error_code == ErrorCode::INVALID_ARGUMENT)
+ << "unexpected error code " << finish_error_code;
// Very large message that should exceed the transfer buffer size of any reasonable TEE.
message = string(128 * 1024, 'a');
@@ -3193,7 +3196,8 @@
.Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
finish_error_code = Finish(message, &result);
EXPECT_TRUE(finish_error_code == ErrorCode::INVALID_INPUT_LENGTH ||
- finish_error_code == ErrorCode::INVALID_ARGUMENT);
+ finish_error_code == ErrorCode::INVALID_ARGUMENT)
+ << "unexpected error code " << finish_error_code;
}
/*
@@ -3247,7 +3251,8 @@
.Digest(Digest::NONE)
.Digest(Digest::SHA1)
.Padding(PaddingMode::RSA_PKCS1_1_5_SIGN));
- ASSERT_TRUE(result == ErrorCode::UNSUPPORTED_DIGEST || result == ErrorCode::INVALID_ARGUMENT);
+ ASSERT_TRUE(result == ErrorCode::UNSUPPORTED_DIGEST || result == ErrorCode::INVALID_ARGUMENT)
+ << "unexpected result " << result;
ASSERT_EQ(ErrorCode::UNSUPPORTED_DIGEST,
Begin(KeyPurpose::SIGN,
@@ -3420,7 +3425,8 @@
}
auto rc = DeleteKey();
- ASSERT_TRUE(rc == ErrorCode::OK || rc == ErrorCode::UNIMPLEMENTED);
+ ASSERT_TRUE(rc == ErrorCode::OK || rc == ErrorCode::UNIMPLEMENTED)
+ << "unexpected result " << rc;
}
}
@@ -5704,7 +5710,8 @@
// is checked against those values, and found absent.
auto result = Begin(KeyPurpose::DECRYPT, params);
EXPECT_TRUE(result == ErrorCode::UNSUPPORTED_MGF_DIGEST ||
- result == ErrorCode::INCOMPATIBLE_MGF_DIGEST);
+ result == ErrorCode::INCOMPATIBLE_MGF_DIGEST)
+ << "unexpected result " << result;
}
/*
@@ -5969,14 +5976,16 @@
.BlockMode(BlockMode::ECB)
.Padding(PaddingMode::NONE));
EXPECT_TRUE(result == ErrorCode::INCOMPATIBLE_BLOCK_MODE ||
- result == ErrorCode::UNSUPPORTED_BLOCK_MODE);
+ result == ErrorCode::UNSUPPORTED_BLOCK_MODE)
+ << "unexpected result " << result;
result = Begin(KeyPurpose::ENCRYPT, AuthorizationSetBuilder()
.BlockMode(BlockMode::ECB)
.Padding(PaddingMode::NONE)
.Padding(PaddingMode::PKCS7));
EXPECT_TRUE(result == ErrorCode::INCOMPATIBLE_PADDING_MODE ||
- result == ErrorCode::UNSUPPORTED_PADDING_MODE);
+ result == ErrorCode::UNSUPPORTED_PADDING_MODE)
+ << "unexpected result " << result;
}
/*
@@ -8759,7 +8768,8 @@
// Re-enable and run at your own risk.
TEST_P(DestroyAttestationIdsTest, DISABLED_DestroyTest) {
auto result = DestroyAttestationIds();
- EXPECT_TRUE(result == ErrorCode::OK || result == ErrorCode::UNIMPLEMENTED);
+ EXPECT_TRUE(result == ErrorCode::OK || result == ErrorCode::UNIMPLEMENTED)
+ << "unexpected result " << result;
}
INSTANTIATE_KEYMINT_AIDL_TEST(DestroyAttestationIdsTest);
@@ -8892,6 +8902,49 @@
INSTANTIATE_KEYMINT_AIDL_TEST(EarlyBootKeyTest);
+using ModuleHashTest = KeyMintAidlTestBase;
+
+TEST_P(ModuleHashTest, SetSameValue) {
+ if (AidlVersion() < 4) {
+ GTEST_SKIP() << "Module hash only available for >= v4, this device is v" << AidlVersion();
+ }
+ auto module_hash = getModuleHash();
+ ASSERT_TRUE(module_hash.has_value());
+
+ // Setting the same value that's already there should work.
+ vector<KeyParameter> info = {Authorization(TAG_MODULE_HASH, module_hash.value())};
+ EXPECT_TRUE(keymint_->setAdditionalAttestationInfo(info).isOk());
+}
+
+TEST_P(ModuleHashTest, SetDifferentValue) {
+ if (AidlVersion() < 4) {
+ GTEST_SKIP() << "Module hash only available for >= v4, this device is v" << AidlVersion();
+ }
+ auto module_hash = getModuleHash();
+ ASSERT_TRUE(module_hash.has_value());
+ vector<uint8_t> wrong_hash = module_hash.value();
+ ASSERT_EQ(wrong_hash.size(), 32);
+
+ // Setting a slightly different value should fail.
+ wrong_hash[0] ^= 0x01;
+ vector<KeyParameter> info = {Authorization(TAG_MODULE_HASH, wrong_hash)};
+ EXPECT_EQ(GetReturnErrorCode(keymint_->setAdditionalAttestationInfo(info)),
+ ErrorCode::MODULE_HASH_ALREADY_SET);
+}
+
+TEST_P(ModuleHashTest, SetUnrelatedTag) {
+ if (AidlVersion() < 4) {
+ GTEST_SKIP() << "Module hash only available for >= v4, this device is v" << AidlVersion();
+ }
+
+ // Trying to set an unexpected tag should be silently ignored..
+ vector<uint8_t> data = {0, 1, 2, 3, 4};
+ vector<KeyParameter> info = {Authorization(TAG_ROOT_OF_TRUST, data)};
+ EXPECT_EQ(GetReturnErrorCode(keymint_->setAdditionalAttestationInfo(info)), ErrorCode::OK);
+}
+
+INSTANTIATE_KEYMINT_AIDL_TEST(ModuleHashTest);
+
using VsrRequirementTest = KeyMintAidlTestBase;
// @VsrTest = VSR-3.10-008
@@ -8912,6 +8965,18 @@
EXPECT_GE(AidlVersion(), 3) << "VSR 14+ requires KeyMint version 3";
}
+// @VsrTest = GMS-VSR-3.10-019
+TEST_P(VsrRequirementTest, Vsr16Test) {
+ int vsr_api_level = get_vsr_api_level();
+ if (vsr_api_level <= __ANDROID_API_V__) {
+ GTEST_SKIP() << "Applies only to VSR API level > 35, this device is: " << vsr_api_level;
+ }
+ if (SecLevel() == SecurityLevel::STRONGBOX) {
+ GTEST_SKIP() << "Applies only to TEE KeyMint, not StrongBox KeyMint";
+ }
+ EXPECT_GE(AidlVersion(), 4) << "VSR 16+ requires KeyMint version 4 in TEE";
+}
+
INSTANTIATE_KEYMINT_AIDL_TEST(VsrRequirementTest);
class InstanceTest : public testing::Test {
diff --git a/security/keymint/support/Android.bp b/security/keymint/support/Android.bp
index f313cf3..7050141 100644
--- a/security/keymint/support/Android.bp
+++ b/security/keymint/support/Android.bp
@@ -30,6 +30,7 @@
"-Wall",
"-Wextra",
"-Werror",
+ "-DKEYMINT_HAL_V4",
],
srcs: [
"attestation_record.cpp",
@@ -114,6 +115,7 @@
cc_test {
name: "libkeymint_remote_prov_support_test",
+ cpp_std: "c++20",
srcs: ["remote_prov_utils_test.cpp"],
static_libs: [
"android.hardware.security.rkp-V3-ndk",
diff --git a/security/keymint/support/attestation_record.cpp b/security/keymint/support/attestation_record.cpp
index 5a26611..d2cbf88 100644
--- a/security/keymint/support/attestation_record.cpp
+++ b/security/keymint/support/attestation_record.cpp
@@ -106,6 +106,7 @@
ASN1_NULL* device_unique_attestation;
ASN1_NULL* identity_credential;
ASN1_OCTET_STRING* attestation_id_second_imei;
+ ASN1_OCTET_STRING* module_hash;
} KM_AUTH_LIST;
ASN1_SEQUENCE(KM_AUTH_LIST) = {
@@ -173,6 +174,7 @@
TAG_IDENTITY_CREDENTIAL_KEY.maskedTag()),
ASN1_EXP_OPT(KM_AUTH_LIST, attestation_id_second_imei, ASN1_OCTET_STRING,
TAG_ATTESTATION_ID_SECOND_IMEI.maskedTag()),
+ ASN1_EXP_OPT(KM_AUTH_LIST, module_hash, ASN1_OCTET_STRING, TAG_MODULE_HASH.maskedTag()),
} ASN1_SEQUENCE_END(KM_AUTH_LIST);
IMPLEMENT_ASN1_FUNCTIONS(KM_AUTH_LIST);
@@ -327,6 +329,7 @@
copyAuthTag(record->device_unique_attestation, TAG_DEVICE_UNIQUE_ATTESTATION, auth_list);
copyAuthTag(record->identity_credential, TAG_IDENTITY_CREDENTIAL_KEY, auth_list);
copyAuthTag(record->attestation_id_second_imei, TAG_ATTESTATION_ID_SECOND_IMEI, auth_list);
+ copyAuthTag(record->module_hash, TAG_MODULE_HASH, auth_list);
return ErrorCode::OK;
}
diff --git a/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp b/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
index 9b74fbb..ebccf25 100644
--- a/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
+++ b/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
@@ -74,16 +74,20 @@
uint8_t challengeSize = mFdp.ConsumeIntegralInRange<uint8_t>(kMinSize, kChallengeSize);
std::vector<uint8_t> challenge = mFdp.ConsumeBytes<uint8_t>(challengeSize);
+ RpcHardwareInfo rpcHardwareInfo;
+ gRPC->getHardwareInfo(&rpcHardwareInfo);
+
std::vector<uint8_t> csr;
gRPC->generateCertificateRequestV2(keysToSign, challenge, &csr);
while (mFdp.remaining_bytes()) {
auto invokeProvAPI = mFdp.PickValueInArray<const std::function<void()>>({
[&]() {
- verifyFactoryCsr(cborKeysToSign, csr, gRPC.get(), kServiceName, challenge);
+ verifyFactoryCsr(cborKeysToSign, csr, rpcHardwareInfo, kServiceName, challenge);
},
[&]() {
- verifyProductionCsr(cborKeysToSign, csr, gRPC.get(), kServiceName, challenge);
+ verifyProductionCsr(cborKeysToSign, csr, rpcHardwareInfo, kServiceName,
+ challenge);
},
[&]() { isCsrWithProperDiceChain(csr, kServiceName); },
});
diff --git a/security/keymint/support/include/keymint_support/keymint_tags.h b/security/keymint/support/include/keymint_support/keymint_tags.h
index 823899a..89c9c0b 100644
--- a/security/keymint/support/include/keymint_support/keymint_tags.h
+++ b/security/keymint/support/include/keymint_support/keymint_tags.h
@@ -103,6 +103,15 @@
DECLARE_TYPED_TAG(MAX_USES_PER_BOOT);
DECLARE_TYPED_TAG(MIN_MAC_LENGTH);
DECLARE_TYPED_TAG(MIN_SECONDS_BETWEEN_OPS);
+// TODO: remove special case macro once v4 HAL is frozen
+#ifdef KEYMINT_HAL_V4
+DECLARE_TYPED_TAG(MODULE_HASH);
+#else
+// When building for previous frozen HAL, the `Tag::MODULE_NAME` constant is not available.
+static const Tag Tag_MODULE_HASH = static_cast<Tag>(-1879047468);
+typedef typename Tag2TypedTag<Tag_MODULE_HASH>::type TAG_MODULE_HASH_t;
+static TAG_MODULE_HASH_t TAG_MODULE_HASH;
+#endif
DECLARE_TYPED_TAG(NONCE);
DECLARE_TYPED_TAG(NO_AUTH_REQUIRED);
DECLARE_TYPED_TAG(ORIGIN);
diff --git a/security/keymint/support/include/remote_prov/MockIRemotelyProvisionedComponent.h b/security/keymint/support/include/remote_prov/MockIRemotelyProvisionedComponent.h
deleted file mode 100644
index 4fa39c2..0000000
--- a/security/keymint/support/include/remote_prov/MockIRemotelyProvisionedComponent.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h>
-#include <aidl/android/hardware/security/keymint/RpcHardwareInfo.h>
-#include <android-base/properties.h>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include <cstdint>
-
-namespace aidl::android::hardware::security::keymint::remote_prov {
-
-using ::ndk::ScopedAStatus;
-
-class MockIRemotelyProvisionedComponent : public IRemotelyProvisionedComponentDefault {
- public:
- MOCK_METHOD(ScopedAStatus, getHardwareInfo, (RpcHardwareInfo * _aidl_return), (override));
- MOCK_METHOD(ScopedAStatus, generateEcdsaP256KeyPair,
- (bool in_testMode, MacedPublicKey* out_macedPublicKey,
- std::vector<uint8_t>* _aidl_return),
- (override));
- MOCK_METHOD(ScopedAStatus, generateCertificateRequest,
- (bool in_testMode, const std::vector<MacedPublicKey>& in_keysToSign,
- const std::vector<uint8_t>& in_endpointEncryptionCertChain,
- const std::vector<uint8_t>& in_challenge, DeviceInfo* out_deviceInfo,
- ProtectedData* out_protectedData, std::vector<uint8_t>* _aidl_return),
- (override));
- MOCK_METHOD(ScopedAStatus, generateCertificateRequestV2,
- (const std::vector<MacedPublicKey>& in_keysToSign,
- const std::vector<uint8_t>& in_challenge, std::vector<uint8_t>* _aidl_return),
- (override));
- MOCK_METHOD(ScopedAStatus, getInterfaceVersion, (int32_t* _aidl_return), (override));
- MOCK_METHOD(ScopedAStatus, getInterfaceHash, (std::string * _aidl_return), (override));
-};
-
-} // namespace aidl::android::hardware::security::keymint::remote_prov
\ No newline at end of file
diff --git a/security/keymint/support/include/remote_prov/remote_prov_utils.h b/security/keymint/support/include/remote_prov/remote_prov_utils.h
index caeb7ff..6cb00f2 100644
--- a/security/keymint/support/include/remote_prov/remote_prov_utils.h
+++ b/security/keymint/support/include/remote_prov/remote_prov_utils.h
@@ -99,7 +99,7 @@
* e.g. for "android.hardware.security.keymint.IRemotelyProvisionedComponent/avf",
* it returns "avf".
*/
-std::string deviceSuffix(const std::string& name);
+std::string_view deviceSuffix(std::string_view name);
struct EekChain {
bytevec chain;
@@ -153,7 +153,7 @@
* is parsed in the manufacturing process.
*/
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateFactoryDeviceInfo(
- const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable);
+ const std::vector<uint8_t>& deviceInfoBytes, const RpcHardwareInfo& info);
/**
* Parses a DeviceInfo structure from the given CBOR data. The parsed data is then validated to
@@ -162,7 +162,7 @@
* suitable for the end user.
*/
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateProductionDeviceInfo(
- const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable);
+ const std::vector<uint8_t>& deviceInfoBytes, const RpcHardwareInfo& info);
/**
* Verify the protected data as if the device is still early in the factory process and may not
@@ -171,36 +171,39 @@
ErrMsgOr<std::vector<BccEntryData>> verifyFactoryProtectedData(
const DeviceInfo& deviceInfo, const cppbor::Array& keysToSign,
const std::vector<uint8_t>& keysToSignMac, const ProtectedData& protectedData,
- const EekChain& eekChain, const std::vector<uint8_t>& eekId, int32_t supportedEekCurve,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
- const std::vector<uint8_t>& challenge);
+ const EekChain& eekChain, const std::vector<uint8_t>& eekId, const RpcHardwareInfo& info,
+ const std::string& instanceName, const std::vector<uint8_t>& challenge);
/**
* Verify the protected data as if the device is a final production sample.
*/
ErrMsgOr<std::vector<BccEntryData>> verifyProductionProtectedData(
const DeviceInfo& deviceInfo, const cppbor::Array& keysToSign,
const std::vector<uint8_t>& keysToSignMac, const ProtectedData& protectedData,
- const EekChain& eekChain, const std::vector<uint8_t>& eekId, int32_t supportedEekCurve,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
- const std::vector<uint8_t>& challenge, bool allowAnyMode = false);
+ const EekChain& eekChain, const std::vector<uint8_t>& eekId, const RpcHardwareInfo& info,
+ const std::string& instanceName, const std::vector<uint8_t>& challenge,
+ bool allowAnyMode = false);
/**
* Verify the CSR as if the device is still early in the factory process and may not
* have all device identifiers provisioned yet.
*/
-ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
- const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
- const std::vector<uint8_t>& challenge, bool allowDegenerate = true,
- bool requireUdsCerts = false);
+ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(const cppbor::Array& keysToSign,
+ const std::vector<uint8_t>& csr,
+ const RpcHardwareInfo& info,
+ const std::string& instanceName,
+ const std::vector<uint8_t>& challenge,
+ bool allowDegenerate = true,
+ bool requireUdsCerts = false);
/**
* Verify the CSR as if the device is a final production sample.
*/
-ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(
- const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
- const std::vector<uint8_t>& challenge, bool allowAnyMode = false);
+ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(const cppbor::Array& keysToSign,
+ const std::vector<uint8_t>& csr,
+ const RpcHardwareInfo& info,
+ const std::string& instanceName,
+ const std::vector<uint8_t>& challenge,
+ bool allowAnyMode = false);
/** Checks whether the CSR has a proper DICE chain. */
ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr,
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 6a5b608..e11f021 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -52,8 +52,8 @@
using X509_Ptr = bssl::UniquePtr<X509>;
using CRYPTO_BUFFER_Ptr = bssl::UniquePtr<CRYPTO_BUFFER>;
-std::string deviceSuffix(const std::string& name) {
- size_t pos = name.rfind('/');
+std::string_view deviceSuffix(std::string_view name) {
+ auto pos = name.rfind('/');
if (pos == std::string::npos) {
return name;
}
@@ -483,7 +483,7 @@
}
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateDeviceInfo(
- const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable,
+ const std::vector<uint8_t>& deviceInfoBytes, const RpcHardwareInfo& rpcHardwareInfo,
bool isFactory) {
const cppbor::Array kValidVbStates = {"green", "yellow", "orange"};
const cppbor::Array kValidBootloaderStates = {"locked", "unlocked"};
@@ -530,9 +530,7 @@
return "DeviceInfo ordering is non-canonical.";
}
- RpcHardwareInfo info;
- provisionable->getHardwareInfo(&info);
- if (info.versionNumber < 3) {
+ if (rpcHardwareInfo.versionNumber < 3) {
const std::unique_ptr<cppbor::Item>& version = parsed->get("version");
if (!version) {
return "Device info is missing version";
@@ -540,10 +538,10 @@
if (!version->asUint()) {
return "version must be an unsigned integer";
}
- if (version->asUint()->value() != info.versionNumber) {
+ if (version->asUint()->value() != rpcHardwareInfo.versionNumber) {
return "DeviceInfo version (" + std::to_string(version->asUint()->value()) +
") does not match the remotely provisioned component version (" +
- std::to_string(info.versionNumber) + ").";
+ std::to_string(rpcHardwareInfo.versionNumber) + ").";
}
}
// Bypasses the device info validation since the device info in AVF is currently
@@ -552,14 +550,14 @@
// TODO(b/300911665): This check is temporary and will be replaced once the markers
// on the DICE chain become available. We need to determine if the CSR is from the
// RKP VM using the markers on the DICE chain.
- if (info.uniqueId == "AVF Remote Provisioning 1") {
+ if (rpcHardwareInfo.uniqueId == "AVF Remote Provisioning 1") {
return std::move(parsed);
}
std::string error;
std::string tmp;
std::set<std::string_view> previousKeys;
- switch (info.versionNumber) {
+ switch (rpcHardwareInfo.versionNumber) {
case 3:
if (isTeeDeviceInfo(*parsed) && parsed->size() != kNumTeeDeviceInfoEntries) {
error += fmt::format(
@@ -626,7 +624,7 @@
kValidAttIdStates);
break;
default:
- return "Unrecognized version: " + std::to_string(info.versionNumber);
+ return "Unrecognized version: " + std::to_string(rpcHardwareInfo.versionNumber);
}
if (!error.empty()) {
@@ -637,13 +635,13 @@
}
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateFactoryDeviceInfo(
- const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable) {
- return parseAndValidateDeviceInfo(deviceInfoBytes, provisionable, /*isFactory=*/true);
+ const std::vector<uint8_t>& deviceInfoBytes, const RpcHardwareInfo& rpcHardwareInfo) {
+ return parseAndValidateDeviceInfo(deviceInfoBytes, rpcHardwareInfo, /*isFactory=*/true);
}
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateProductionDeviceInfo(
- const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable) {
- return parseAndValidateDeviceInfo(deviceInfoBytes, provisionable, /*isFactory=*/false);
+ const std::vector<uint8_t>& deviceInfoBytes, const RpcHardwareInfo& rpcHardwareInfo) {
+ return parseAndValidateDeviceInfo(deviceInfoBytes, rpcHardwareInfo, /*isFactory=*/false);
}
ErrMsgOr<bytevec> getSessionKey(ErrMsgOr<std::pair<bytevec, bytevec>>& senderPubkey,
@@ -661,8 +659,8 @@
ErrMsgOr<std::vector<BccEntryData>> verifyProtectedData(
const DeviceInfo& deviceInfo, const cppbor::Array& keysToSign,
const std::vector<uint8_t>& keysToSignMac, const ProtectedData& protectedData,
- const EekChain& eekChain, const std::vector<uint8_t>& eekId, int32_t supportedEekCurve,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const EekChain& eekChain, const std::vector<uint8_t>& eekId,
+ const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge, bool isFactory, bool allowAnyMode = false) {
auto [parsedProtectedData, _, protDataErrMsg] = cppbor::parse(protectedData.protectedData);
if (!parsedProtectedData) {
@@ -685,7 +683,7 @@
return "The COSE_encrypt recipient does not match the expected EEK identifier";
}
- auto sessionKey = getSessionKey(senderPubkey, eekChain, supportedEekCurve);
+ auto sessionKey = getSessionKey(senderPubkey, eekChain, rpcHardwareInfo.supportedEekCurve);
if (!sessionKey) {
return sessionKey.message();
}
@@ -726,7 +724,7 @@
}
auto deviceInfoResult =
- parseAndValidateDeviceInfo(deviceInfo.deviceInfo, provisionable, isFactory);
+ parseAndValidateDeviceInfo(deviceInfo.deviceInfo, rpcHardwareInfo, isFactory);
if (!deviceInfoResult) {
return deviceInfoResult.message();
}
@@ -762,22 +760,22 @@
ErrMsgOr<std::vector<BccEntryData>> verifyFactoryProtectedData(
const DeviceInfo& deviceInfo, const cppbor::Array& keysToSign,
const std::vector<uint8_t>& keysToSignMac, const ProtectedData& protectedData,
- const EekChain& eekChain, const std::vector<uint8_t>& eekId, int32_t supportedEekCurve,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const EekChain& eekChain, const std::vector<uint8_t>& eekId,
+ const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge) {
return verifyProtectedData(deviceInfo, keysToSign, keysToSignMac, protectedData, eekChain,
- eekId, supportedEekCurve, provisionable, instanceName, challenge,
+ eekId, rpcHardwareInfo, instanceName, challenge,
/*isFactory=*/true);
}
ErrMsgOr<std::vector<BccEntryData>> verifyProductionProtectedData(
const DeviceInfo& deviceInfo, const cppbor::Array& keysToSign,
const std::vector<uint8_t>& keysToSignMac, const ProtectedData& protectedData,
- const EekChain& eekChain, const std::vector<uint8_t>& eekId, int32_t supportedEekCurve,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const EekChain& eekChain, const std::vector<uint8_t>& eekId,
+ const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge, bool allowAnyMode) {
return verifyProtectedData(deviceInfo, keysToSign, keysToSignMac, protectedData, eekChain,
- eekId, supportedEekCurve, provisionable, instanceName, challenge,
+ eekId, rpcHardwareInfo, instanceName, challenge,
/*isFactory=*/false, allowAnyMode);
}
@@ -912,7 +910,7 @@
ErrMsgOr<std::unique_ptr<cppbor::Array>> parseAndValidateCsrPayload(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csrPayload,
- IRemotelyProvisionedComponent* provisionable, bool isFactory) {
+ const RpcHardwareInfo& rpcHardwareInfo, bool isFactory) {
auto [parsedCsrPayload, _, errMsg] = cppbor::parse(csrPayload);
if (!parsedCsrPayload) {
return errMsg;
@@ -949,7 +947,8 @@
return "Keys must be an Array.";
}
- auto result = parseAndValidateDeviceInfo(signedDeviceInfo->encode(), provisionable, isFactory);
+ auto result =
+ parseAndValidateDeviceInfo(signedDeviceInfo->encode(), rpcHardwareInfo, isFactory);
if (!result) {
return result.message();
}
@@ -1100,13 +1099,12 @@
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge, bool isFactory, bool allowAnyMode = false,
bool allowDegenerate = true, bool requireUdsCerts = false) {
- RpcHardwareInfo info;
- provisionable->getHardwareInfo(&info);
- if (info.versionNumber != 3) {
- return "Remotely provisioned component version (" + std::to_string(info.versionNumber) +
+ if (rpcHardwareInfo.versionNumber != 3) {
+ return "Remotely provisioned component version (" +
+ std::to_string(rpcHardwareInfo.versionNumber) +
") does not match expected version (3).";
}
@@ -1117,22 +1115,24 @@
return csrPayload.message();
}
- return parseAndValidateCsrPayload(keysToSign, *csrPayload, provisionable, isFactory);
+ return parseAndValidateCsrPayload(keysToSign, *csrPayload, rpcHardwareInfo, isFactory);
}
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const RpcHardwareInfo& rpcHardwareInfo, const std::string& instanceName,
const std::vector<uint8_t>& challenge, bool allowDegenerate, bool requireUdsCerts) {
- return verifyCsr(keysToSign, csr, provisionable, instanceName, challenge, /*isFactory=*/true,
+ return verifyCsr(keysToSign, csr, rpcHardwareInfo, instanceName, challenge, /*isFactory=*/true,
/*allowAnyMode=*/false, allowDegenerate, requireUdsCerts);
}
-ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(
- const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
- const std::vector<uint8_t>& challenge, bool allowAnyMode) {
- return verifyCsr(keysToSign, csr, provisionable, instanceName, challenge, /*isFactory=*/false,
+ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(const cppbor::Array& keysToSign,
+ const std::vector<uint8_t>& csr,
+ const RpcHardwareInfo& rpcHardwareInfo,
+ const std::string& instanceName,
+ const std::vector<uint8_t>& challenge,
+ bool allowAnyMode) {
+ return verifyCsr(keysToSign, csr, rpcHardwareInfo, instanceName, challenge, /*isFactory=*/false,
allowAnyMode);
}
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 58f1fc5..6f6a2d6 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -25,7 +25,6 @@
#include <keymaster/logger.h>
#include <keymaster/remote_provisioning_utils.h>
#include <openssl/curve25519.h>
-#include <remote_prov/MockIRemotelyProvisionedComponent.h>
#include <remote_prov/remote_prov_utils.h>
#include <algorithm>
@@ -398,6 +397,8 @@
0xa7, 0xb6, 0xc2, 0x40, 0x06, 0x65, 0xc5, 0xff, 0x19, 0xc5, 0xcd, 0x1c, 0xd5, 0x78, 0x01,
0xd4, 0xb8};
+const RpcHardwareInfo kRpcHardwareInfo = {.versionNumber = 3};
+
inline bool equal_byte_views(const byte_view& view1, const byte_view& view2) {
return std::equal(view1.begin(), view1.end(), view2.begin(), view2.end());
}
@@ -643,15 +644,10 @@
auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithUdsCerts);
ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
- auto mockRpc = SharedRefBase::make<MockIRemotelyProvisionedComponent>();
- EXPECT_CALL(*mockRpc, getHardwareInfo(NotNull())).WillRepeatedly([](RpcHardwareInfo* hwInfo) {
- hwInfo->versionNumber = 3;
- return ScopedAStatus::ok();
- });
-
const auto keysToSign = keysToSignPtr->asArray();
- auto csr = verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, mockRpc.get(), "default", kChallenge,
- /*allowDegenerate=*/false, /*requireUdsCerts=*/true);
+ auto csr =
+ verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, kRpcHardwareInfo, "default", kChallenge,
+ /*allowDegenerate=*/false, /*requireUdsCerts=*/true);
ASSERT_TRUE(csr) << csr.message();
}
@@ -659,27 +655,15 @@
auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithUdsCerts);
ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
- auto mockRpc = SharedRefBase::make<MockIRemotelyProvisionedComponent>();
- EXPECT_CALL(*mockRpc, getHardwareInfo(NotNull())).WillRepeatedly([](RpcHardwareInfo* hwInfo) {
- hwInfo->versionNumber = 3;
- return ScopedAStatus::ok();
- });
-
const auto* keysToSign = keysToSignPtr->asArray();
- auto csr = verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, mockRpc.get(), DEFAULT_INSTANCE_NAME,
- kChallenge,
+ auto csr = verifyFactoryCsr(*keysToSign, kCsrWithUdsCerts, kRpcHardwareInfo,
+ DEFAULT_INSTANCE_NAME, kChallenge,
/*allowDegenerate=*/false, /*requireUdsCerts=*/false);
ASSERT_TRUE(csr) << csr.message();
}
TEST(RemoteProvUtilsTest, requireUdsCertsWhenNotPresent) {
- auto mockRpc = SharedRefBase::make<MockIRemotelyProvisionedComponent>();
- EXPECT_CALL(*mockRpc, getHardwareInfo(NotNull())).WillRepeatedly([](RpcHardwareInfo* hwInfo) {
- hwInfo->versionNumber = 3;
- return ScopedAStatus::ok();
- });
-
- auto csr = verifyFactoryCsr(/*keysToSign=*/Array(), kCsrWithoutUdsCerts, mockRpc.get(),
+ auto csr = verifyFactoryCsr(/*keysToSign=*/Array(), kCsrWithoutUdsCerts, kRpcHardwareInfo,
DEFAULT_INSTANCE_NAME, kChallenge, /*allowDegenerate=*/false,
/*requireUdsCerts=*/true);
ASSERT_FALSE(csr);
@@ -692,14 +676,8 @@
kKeysToSignForCsrWithoutUdsCerts.data() + kKeysToSignForCsrWithoutUdsCerts.size());
ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
- auto mockRpc = SharedRefBase::make<MockIRemotelyProvisionedComponent>();
- EXPECT_CALL(*mockRpc, getHardwareInfo(NotNull())).WillRepeatedly([](RpcHardwareInfo* hwInfo) {
- hwInfo->versionNumber = 3;
- return ScopedAStatus::ok();
- });
-
const auto* keysToSign = keysToSignPtr->asArray();
- auto csr = verifyFactoryCsr(*keysToSign, kCsrWithoutUdsCerts, mockRpc.get(),
+ auto csr = verifyFactoryCsr(*keysToSign, kCsrWithoutUdsCerts, kRpcHardwareInfo,
DEFAULT_INSTANCE_NAME, kChallenge,
/*allowDegenerate=*/false, /*requireUdsCerts=*/false);
ASSERT_TRUE(csr) << csr.message();
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 8f918af..5467679 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -35,6 +35,7 @@
#include <remote_prov/remote_prov_utils.h>
#include <optional>
#include <set>
+#include <string_view>
#include <vector>
#include "KeyMintAidlTestBase.h"
@@ -150,22 +151,14 @@
return corruptChain.encode();
}
-string device_suffix(const string& name) {
- size_t pos = name.find('/');
- if (pos == string::npos) {
- return name;
- }
- return name.substr(pos + 1);
-}
-
bool matching_keymint_device(const string& rp_name, std::shared_ptr<IKeyMintDevice>* keyMint) {
- string rp_suffix = device_suffix(rp_name);
+ auto rp_suffix = deviceSuffix(rp_name);
vector<string> km_names = ::android::getAidlHalInstanceNames(IKeyMintDevice::descriptor);
for (const string& km_name : km_names) {
// If the suffix of the KeyMint instance equals the suffix of the
// RemotelyProvisionedComponent instance, assume they match.
- if (device_suffix(km_name) == rp_suffix && AServiceManager_isDeclared(km_name.c_str())) {
+ if (deviceSuffix(km_name) == rp_suffix && AServiceManager_isDeclared(km_name.c_str())) {
::ndk::SpAIBinder binder(AServiceManager_waitForService(km_name.c_str()));
*keyMint = IKeyMintDevice::fromBinder(binder);
return true;
@@ -489,9 +482,9 @@
&protectedData, &keysToSignMac);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionProtectedData(
- deviceInfo, cppbor::Array(), keysToSignMac, protectedData, testEekChain_, eekId_,
- rpcHardwareInfo.supportedEekCurve, provisionable_.get(), GetParam(), challenge_);
+ auto result = verifyProductionProtectedData(deviceInfo, cppbor::Array(), keysToSignMac,
+ protectedData, testEekChain_, eekId_,
+ rpcHardwareInfo, GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -516,8 +509,7 @@
auto firstBcc = verifyProductionProtectedData(deviceInfo, /*keysToSign=*/cppbor::Array(),
keysToSignMac, protectedData, testEekChain_,
- eekId_, rpcHardwareInfo.supportedEekCurve,
- provisionable_.get(), GetParam(), challenge_);
+ eekId_, rpcHardwareInfo, GetParam(), challenge_);
ASSERT_TRUE(firstBcc) << firstBcc.message();
status = provisionable_->generateCertificateRequest(
@@ -527,8 +519,7 @@
auto secondBcc = verifyProductionProtectedData(deviceInfo, /*keysToSign=*/cppbor::Array(),
keysToSignMac, protectedData, testEekChain_,
- eekId_, rpcHardwareInfo.supportedEekCurve,
- provisionable_.get(), GetParam(), challenge_);
+ eekId_, rpcHardwareInfo, GetParam(), challenge_);
ASSERT_TRUE(secondBcc) << secondBcc.message();
// Verify that none of the keys in the first BCC are repeated in the second one.
@@ -576,9 +567,9 @@
&keysToSignMac);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionProtectedData(
- deviceInfo, cborKeysToSign_, keysToSignMac, protectedData, testEekChain_, eekId_,
- rpcHardwareInfo.supportedEekCurve, provisionable_.get(), GetParam(), challenge_);
+ auto result = verifyProductionProtectedData(deviceInfo, cborKeysToSign_, keysToSignMac,
+ protectedData, testEekChain_, eekId_,
+ rpcHardwareInfo, GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -766,7 +757,7 @@
provisionable_->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), GetParam(),
+ auto result = verifyProductionCsr(cppbor::Array(), csr, rpcHardwareInfo, GetParam(),
challenge, isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
@@ -788,7 +779,7 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ auto result = verifyProductionCsr(cborKeysToSign_, csr, rpcHardwareInfo, GetParam(),
challenge, isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
@@ -819,14 +810,14 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge_, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto firstCsr = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ auto firstCsr = verifyProductionCsr(cborKeysToSign_, csr, rpcHardwareInfo, GetParam(),
challenge_, isRkpVmInstance_);
ASSERT_TRUE(firstCsr) << firstCsr.message();
status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge_, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto secondCsr = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ auto secondCsr = verifyProductionCsr(cborKeysToSign_, csr, rpcHardwareInfo, GetParam(),
challenge_, isRkpVmInstance_);
ASSERT_TRUE(secondCsr) << secondCsr.message();
@@ -845,8 +836,8 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge_, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
- challenge_, isRkpVmInstance_);
+ auto result = verifyProductionCsr(cborKeysToSign_, csr, rpcHardwareInfo, GetParam(), challenge_,
+ isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
@@ -977,7 +968,7 @@
ASSERT_TRUE(irpcStatus.isOk()) << irpcStatus.getDescription();
auto result =
- verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), GetParam(), challenge_);
+ verifyProductionCsr(cppbor::Array(), csr, rpcHardwareInfo, GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
std::unique_ptr<cppbor::Array> csrPayload = std::move(*result);
@@ -1002,7 +993,7 @@
ASSERT_TRUE(bootPatchLevel);
ASSERT_TRUE(securityLevel);
- auto kmDeviceName = device_suffix(GetParam());
+ auto kmDeviceName = deviceSuffix(GetParam());
// Compare DeviceInfo against IDs attested by KeyMint.
ASSERT_TRUE((securityLevel->value() == "tee" && kmDeviceName == "default") ||
diff --git a/staging/security/see/Android.bp b/staging/security/see/Android.bp
new file mode 100644
index 0000000..a83b65d
--- /dev/null
+++ b/staging/security/see/Android.bp
@@ -0,0 +1,5 @@
+dirgroup {
+ name: "trusty_dirgroup_hardware_interfaces_staging_security_see",
+ dirs: ["."],
+ visibility: ["//trusty/vendor/google/aosp/scripts"],
+}
diff --git a/staging/security/see/hwcrypto/aidl/Android.bp b/staging/security/see/hwcrypto/aidl/Android.bp
index 0a7e8be..2da59a4 100644
--- a/staging/security/see/hwcrypto/aidl/Android.bp
+++ b/staging/security/see/hwcrypto/aidl/Android.bp
@@ -28,4 +28,5 @@
enabled: true,
},
},
+ frozen: false,
}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
index 3763f0a..5b34572 100644
--- a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
@@ -38,10 +38,16 @@
android.hardware.security.see.hwcrypto.IHwCryptoKey.DerivedKey deriveKey(in android.hardware.security.see.hwcrypto.IHwCryptoKey.DerivedKeyParameters parameters);
android.hardware.security.see.hwcrypto.IHwCryptoOperations getHwCryptoOperations();
android.hardware.security.see.hwcrypto.IOpaqueKey importClearKey(in android.hardware.security.see.hwcrypto.types.ExplicitKeyMaterial keyMaterial, in android.hardware.security.see.hwcrypto.KeyPolicy newKeyPolicy);
+ byte[] getCurrentDicePolicy();
+ android.hardware.security.see.hwcrypto.IOpaqueKey keyTokenImport(in android.hardware.security.see.hwcrypto.types.OpaqueKeyToken requestedKey, in byte[] sealingDicePolicy);
+ android.hardware.security.see.hwcrypto.IOpaqueKey getKeyslotData(android.hardware.security.see.hwcrypto.IHwCryptoKey.KeySlot slotId);
enum DeviceKeyId {
DEVICE_BOUND_KEY,
BATCH_KEY,
}
+ enum KeySlot {
+ KEYMINT_SHARED_HMAC_KEY,
+ }
union DiceBoundDerivationKey {
android.hardware.security.see.hwcrypto.IOpaqueKey opaqueKey;
android.hardware.security.see.hwcrypto.IHwCryptoKey.DeviceKeyId keyId;
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
index 9cbf272..88dbdf1 100644
--- a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
@@ -36,4 +36,6 @@
byte[] exportWrappedKey(in android.hardware.security.see.hwcrypto.IOpaqueKey wrappingKey);
android.hardware.security.see.hwcrypto.KeyPolicy getKeyPolicy();
byte[] getPublicKey();
+ android.hardware.security.see.hwcrypto.types.OpaqueKeyToken getShareableToken(in byte[] sealingDicePolicy);
+ void setProtectionId(in android.hardware.security.see.hwcrypto.types.ProtectionId protectionId, in android.hardware.security.see.hwcrypto.types.OperationType[] allowedOperations);
}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/OperationParameters.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/OperationParameters.aidl
index 017e51c..e069610 100644
--- a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/OperationParameters.aidl
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/OperationParameters.aidl
@@ -35,4 +35,5 @@
union OperationParameters {
android.hardware.security.see.hwcrypto.types.SymmetricAuthOperationParameters symmetricAuthCrypto;
android.hardware.security.see.hwcrypto.types.SymmetricOperationParameters symmetricCrypto;
+ android.hardware.security.see.hwcrypto.types.HmacOperationParameters hmac;
}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
index 933fb67..9970678 100644
--- a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
@@ -34,4 +34,5 @@
package android.hardware.security.see.hwcrypto.types;
union ExplicitKeyMaterial {
android.hardware.security.see.hwcrypto.types.AesKey aes;
+ android.hardware.security.see.hwcrypto.types.HmacKey hmac;
}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
index cd8b3c6..742314c 100644
--- a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
@@ -41,4 +41,5 @@
const int ALLOCATION_ERROR = (-5) /* -5 */;
const int INVALID_KEY = (-6) /* -6 */;
const int BAD_PARAMETER = (-7) /* -7 */;
+ const int UNAUTHORIZED = (-8) /* -8 */;
}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacKey.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacKey.aidl
new file mode 100644
index 0000000..f8de94a
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacKey.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.security.see.hwcrypto.types;
+union HmacKey {
+ byte[32] sha256 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ byte[64] sha512;
+}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl
new file mode 100644
index 0000000..532cd8d
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.security.see.hwcrypto.types;
+parcelable HmacOperationParameters {
+ android.hardware.security.see.hwcrypto.IOpaqueKey key;
+}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl
new file mode 100644
index 0000000..fc2dd63
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.security.see.hwcrypto.types;
+parcelable OpaqueKeyToken {
+ byte[] keyToken;
+}
diff --git a/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl
new file mode 100644
index 0000000..1e304ab
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/aidl_api/android.hardware.security.see/current/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.security.see.hwcrypto.types;
+enum ProtectionId {
+ WIDEVINE_OUTPUT_BUFFER = 1,
+}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
index b5e7e9d..bb194a3 100644
--- a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IHwCryptoKey.aidl
@@ -19,6 +19,7 @@
import android.hardware.security.see.hwcrypto.IOpaqueKey;
import android.hardware.security.see.hwcrypto.KeyPolicy;
import android.hardware.security.see.hwcrypto.types.ExplicitKeyMaterial;
+import android.hardware.security.see.hwcrypto.types.OpaqueKeyToken;
/*
* Higher level interface to access and generate keys.
@@ -36,6 +37,19 @@
DEVICE_BOUND_KEY,
BATCH_KEY,
}
+
+ /*
+ * Identifier for the requested key slot. The currently supported identifiers are:
+ *
+ * KEYMINT_SHARED_HMAC_KEY:
+ * This is the shared HMAC key that will now be computed by HwCryptoKey after participating
+ * in the ISharedSecret protocol that can be shared with KeyMint and authenticators. See
+ * ISharedSecret.aidl for more information.
+ */
+ enum KeySlot {
+ KEYMINT_SHARED_HMAC_KEY,
+ }
+
union DiceBoundDerivationKey {
/*
* Opaque to be used to derive the DICE bound key.
@@ -217,4 +231,59 @@
* otherwise.
*/
IOpaqueKey importClearKey(in ExplicitKeyMaterial keyMaterial, in KeyPolicy newKeyPolicy);
+
+ /*
+ * getCurrentDicePolicy() - Returns the client current DICE policy. This policy is encrypted and
+ * considered opaque from the client perspective. This policy is the
+ * same used to create DICE bound keys and will also be used to seal
+ * secrets that can only be retrieved by the DICE policy owner. The
+ * first use of this seal operation will be
+ * <code>IOpaqueKey::getShareableToken</code> and
+ * <code>IHwCryptoKey::keyTokenImport</code>. To start this process,
+ * the intended key receiver will call this function and then pass the
+ * generated DICE policy to the owner of the key that the receiver
+ * wants to import. The key owner will then call
+ * <code>IOpaqueKey::getShareableToken</code> passing the receiver DICE
+ * policy to insure that only that receiver can import the key.
+ *
+ * Return:
+ * byte[] on success, which is the caller encrypted DICE policy.
+ */
+ byte[] getCurrentDicePolicy();
+
+ /*
+ * key_token_import() - Imports a key from a different client service instance. Because
+ * IOpaqueKey are binder objects that cannot be directly shared between
+ * binder rpc clients, this method provide a way to send a key to another
+ * client. Keys to be imported by the receiver are represented by a token
+ * created using <code>IOpaqueKey::getShareableToken</code>. The flow
+ * to create this token is described in
+ * <code>IHwCryptoKey::getCurrentDicePolicy</code>.
+ *
+ * @requested_key:
+ * Handle to the key to be imported to the caller service.
+ * @sealingDicePolicy:
+ * DICE policy used to seal the exported key.
+ * Return:
+ * A IOpaqueKey that can be directly be used on the local HWCrypto service on
+ * success, service specific error based on <code>HalErrorCode</code> otherwise.
+ */
+ IOpaqueKey keyTokenImport(in OpaqueKeyToken requestedKey, in byte[] sealingDicePolicy);
+
+ /*
+ * getKeyslotData() - Gets the keyslot key material referenced by slotId.
+ *
+ * @slotId:
+ * Identifier for the requested keyslot
+ *
+ * This interface is used to access device specific keys with known types and uses. Because the
+ * returned key is opaque, it can only be used through the different HwCrypto interfaces.
+ * Because the keys live in a global namespace the identity of the caller needs to be
+ * checked to verify that it has permission to accesses the requested key.
+ *
+ * Return:
+ * Ok(IOpaqueKey) on success, UNAUTHORIZED if the caller cannot access the requested key,
+ * another specific error code otherwise.
+ */
+ IOpaqueKey getKeyslotData(KeySlot slotId);
}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
index 0d0f613..9a72639 100644
--- a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/IOpaqueKey.aidl
@@ -16,7 +16,9 @@
package android.hardware.security.see.hwcrypto;
import android.hardware.security.see.hwcrypto.KeyPolicy;
+import android.hardware.security.see.hwcrypto.types.OpaqueKeyToken;
import android.hardware.security.see.hwcrypto.types.OperationType;
+import android.hardware.security.see.hwcrypto.types.ProtectionId;
interface IOpaqueKey {
/*
@@ -52,4 +54,37 @@
* <code>HalErrorCode</code> otherwise. Format used for the returned public key is COSE.
*/
byte[] getPublicKey();
+
+ /*
+ * getShareableToken() - Returns a token that can shared with another HWCrypto client.
+ *
+ * @sealingDicePolicy:
+ * Token to be used to protect the returned OpaqueKeyToken. It will be used so only
+ * the owner of the sealingDicePolicy can import the key.
+ * Return:
+ * <code>OpaqueKeyMaterial</code> token on success, service specific error based on
+ * <code>HalErrorCode</code> otherwise.
+ */
+ OpaqueKeyToken getShareableToken(in byte[] sealingDicePolicy);
+
+ /*
+ * setProtectionId() - Sets the protectionID associated with the buffers where the operation
+ * will be performed. A protection ID serves as a limitation on the key so
+ * it can only operate on buffers with a matching protection ID.
+ * The client calling this functions needs to have the necessary permissions
+ * to read and/or write to this buffer. Setting this parameter means that
+ * if the key is shared with a different client, the client receiving the
+ * key will be limited in which buffers can be used to read/write data for
+ * this operation.
+ *
+ * @protectionId:
+ * ID of the given use case to provide protection for. The method of protecting the buffer
+ * will be platform dependent.
+ * @allowedOperations:
+ * array of allowed operations. Allowed operations are either READ or WRITE.
+ *
+ * Return:
+ * service specific error based on <code>HalErrorCode</code> on failure.
+ */
+ void setProtectionId(in ProtectionId protectionId, in OperationType[] allowedOperations);
}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/OperationParameters.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/OperationParameters.aidl
index 9e2fc6c..a977f56 100644
--- a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/OperationParameters.aidl
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/OperationParameters.aidl
@@ -15,6 +15,7 @@
*/
package android.hardware.security.see.hwcrypto;
+import android.hardware.security.see.hwcrypto.types.HmacOperationParameters;
import android.hardware.security.see.hwcrypto.types.SymmetricAuthOperationParameters;
import android.hardware.security.see.hwcrypto.types.SymmetricOperationParameters;
@@ -31,4 +32,9 @@
* Parameters for non-authenticated symmetric cryptography (AES/TDES).
*/
SymmetricOperationParameters symmetricCrypto;
+
+ /*
+ * Parameters for hash based message authenticated code operations.
+ */
+ HmacOperationParameters hmac;
}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
index 4298ba9..3aa5611 100644
--- a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ExplicitKeyMaterial.aidl
@@ -16,10 +16,12 @@
package android.hardware.security.see.hwcrypto.types;
import android.hardware.security.see.hwcrypto.types.AesKey;
+import android.hardware.security.see.hwcrypto.types.HmacKey;
/*
* Type encapsulating a clear key.
*/
union ExplicitKeyMaterial {
AesKey aes;
+ HmacKey hmac;
}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
index e8e8539..f536c0e 100644
--- a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HalErrorCode.aidl
@@ -42,4 +42,7 @@
/* Bad parameter supplied for the desired operation */
const int BAD_PARAMETER = -7;
+
+ /* Caller is not authorized to make this call */
+ const int UNAUTHORIZED = -8;
}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacKey.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacKey.aidl
new file mode 100644
index 0000000..a0b6ba7
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacKey.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.security.see.hwcrypto.types;
+
+/*
+ * Type that represents an Hmac key.
+ */
+union HmacKey {
+ /*
+ * Raw Hmac key for use with sha256.
+ */
+ byte[32] sha256 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0};
+
+ /*
+ * Raw Hmac key for use with sha512.
+ */
+ byte[64] sha512;
+}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl
new file mode 100644
index 0000000..da09a2c
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/HmacOperationParameters.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.security.see.hwcrypto.types;
+
+import android.hardware.security.see.hwcrypto.IOpaqueKey;
+/*
+ * Data needed to perform HMAC operations.
+ */
+parcelable HmacOperationParameters {
+ /*
+ * Key to be used for the HMAC operation.
+ */
+ IOpaqueKey key;
+}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl
new file mode 100644
index 0000000..db95c18
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/OpaqueKeyToken.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.security.see.hwcrypto.types;
+
+/*
+ * Implementation defined structure that represents a key and its associated metadata. It is only
+ * valid on the current boot, and its reuse after a session is closed (or between sessions) is not
+ * guaranteed.
+ */
+parcelable OpaqueKeyToken {
+ /*
+ * Opaque type used to send IOpaqueKeys keys to different clients. Its format is implementation
+ * dependant.
+ */
+ byte[] keyToken;
+}
diff --git a/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl
new file mode 100644
index 0000000..8686882
--- /dev/null
+++ b/staging/security/see/hwcrypto/aidl/android/hardware/security/see/hwcrypto/types/ProtectionId.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.security.see.hwcrypto.types;
+
+/*
+ * Enum describing the different types of protected buffers. Protected buffers are named by its
+ * corresponding use case and its underlaying implementation is platform dependant.
+ */
+enum ProtectionId {
+ /*
+ * ProtectionID used by HwCrypto to enable Keys that can be used for Widevine video buffers.
+ * These buffers should not be readable by non-trusted entities and HwCrypto should not allow
+ * any read access to them through its interface.
+ */
+ WIDEVINE_OUTPUT_BUFFER = 1,
+}
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl b/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
index 022de9a..1841bf5 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
+++ b/staging/security/see/storage/aidl/android/hardware/security/see/storage/ISecureStorage.aidl
@@ -34,6 +34,13 @@
/**
* Starts a storage session for a filesystem.
*
+ * Clients should be prepared for `startSession` and any methods called on the `IStorageSession`
+ * or its sub-interfaces to return `WOULD_BLOCK` (a `binder::Status` with an exception code of
+ * `EX_TRANSACTION_FAILED` and a transaction error code of `android::WOULD_BLOCK`), which
+ * indicates that the requested storage is not currently available. Possible cases that might
+ * cause this return code might be accessing the data partition during boot stages where it
+ * isn't yet mounted or attempting to commit changes while an A/B update is in progress.
+ *
* @filesystem:
* The minimum filesystem properties requested.
*
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl b/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
index 1b70a0e..dc1e6a8 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
+++ b/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
@@ -44,6 +44,21 @@
void commitChanges();
/**
+ * If an A/B update is in progress, stages any pending changes made through this session to be
+ * committed when the A/B update completes successfully. If the update fails, the changes will
+ * be discarded.
+ *
+ * If no A/B update is in progess, behaves identically to `commitChanges`.
+ *
+ * After this call returns successfully, the session will no longer have pending changes. Files
+ * may then still be modified through this session to create another commit.
+ *
+ * May return service-specific errors:
+ * - ERR_BAD_TRANSACTION
+ */
+ void stageChangesForCommitOnAbUpdateComplete();
+
+ /**
* Abandons any pending changes made through this session.
*
* The session can then be reused to make new changes.
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
index 09cdc26..d0f1ed9 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
@@ -36,6 +36,7 @@
enum UwbVendorCapabilityTlvTypes {
SUPPORTED_POWER_STATS_QUERY = 0xC0,
SUPPORTED_ANTENNA_MODES = 0xC1,
+ SUPPORTED_MAX_SESSION_COUNT = 0xEB,
CCC_SUPPORTED_CHAPS_PER_SLOT = 0xA0,
CCC_SUPPORTED_SYNC_CODES = 0xA1,
CCC_SUPPORTED_HOPPING_CONFIG_MODES_AND_SEQUENCES = 0xA2,
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
index 28e44ef..2d81ed2 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorCapabilityTlvTypes.aidl
@@ -48,6 +48,11 @@
*/
SUPPORTED_ANTENNA_MODES = 0xC1,
+ /**
+ * Int value to indicate max supported session count
+ */
+ SUPPORTED_MAX_SESSION_COUNT = 0xEB,
+
/*********************************************
* CCC specific
********************************************/