Merge "Add proposed trendy teams for VTS modules" into main
diff --git a/Android.bp b/Android.bp
index baf3291..68115aa 100644
--- a/Android.bp
+++ b/Android.bp
@@ -86,3 +86,9 @@
"VtsHalHidlTargetTestBase",
],
}
+
+dirgroup {
+ name: "trusty_dirgroup_hardware_interfaces",
+ dirs: ["."],
+ visibility: ["//trusty/vendor/google/aosp/scripts"],
+}
diff --git a/atrace/1.0/vts/functional/Android.bp b/atrace/1.0/vts/functional/Android.bp
index 9681aa2..16fbaa2 100644
--- a/atrace/1.0/vts/functional/Android.bp
+++ b/atrace/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/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index de66293..3d7f30c 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -937,9 +937,12 @@
}
StreamInHwGainHelper::StreamInHwGainHelper(const StreamContext* context)
- : mChannelCount(getChannelCount(context->getChannelLayout())), mHwGains(mChannelCount, 0.0f) {}
+ : mChannelCount(getChannelCount(context->getChannelLayout())) {}
ndk::ScopedAStatus StreamInHwGainHelper::getHwGainImpl(std::vector<float>* _aidl_return) {
+ if (mHwGains.empty()) {
+ mHwGains.resize(mChannelCount, 0.0f);
+ }
*_aidl_return = mHwGains;
LOG(DEBUG) << __func__ << ": returning " << ::android::internal::ToString(*_aidl_return);
return ndk::ScopedAStatus::ok();
@@ -1068,10 +1071,12 @@
}
StreamOutHwVolumeHelper::StreamOutHwVolumeHelper(const StreamContext* context)
- : mChannelCount(getChannelCount(context->getChannelLayout())),
- mHwVolumes(mChannelCount, 0.0f) {}
+ : mChannelCount(getChannelCount(context->getChannelLayout())) {}
ndk::ScopedAStatus StreamOutHwVolumeHelper::getHwVolumeImpl(std::vector<float>* _aidl_return) {
+ if (mHwVolumes.empty()) {
+ mHwVolumes.resize(mChannelCount, 0.0f);
+ }
*_aidl_return = mHwVolumes;
LOG(DEBUG) << __func__ << ": returning " << ::android::internal::ToString(*_aidl_return);
return ndk::ScopedAStatus::ok();
diff --git a/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h b/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h
index e78e8b7..5e52ad0 100644
--- a/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h
+++ b/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h
@@ -16,18 +16,19 @@
#pragma once
-#include <atomic>
-#include <mutex>
#include <vector>
#include "core-impl/Stream.h"
+#include "deprecated/StreamSwitcher.h"
#include "r_submix/SubmixRoute.h"
namespace aidl::android::hardware::audio::core {
class StreamRemoteSubmix : public StreamCommonImpl {
public:
- StreamRemoteSubmix(StreamContext* context, const Metadata& metadata);
+ StreamRemoteSubmix(
+ StreamContext* context, const Metadata& metadata,
+ const ::aidl::android::media::audio::common::AudioDeviceAddress& deviceAddress);
~StreamRemoteSubmix();
// Methods of 'DriverInterface'.
@@ -44,18 +45,17 @@
// Overridden methods of 'StreamCommonImpl', called on a Binder thread.
ndk::ScopedAStatus prepareToClose() override;
- ndk::ScopedAStatus setConnectedDevices(const ConnectedDevices& devices) override;
private:
long getDelayInUsForFrameCount(size_t frameCount);
- ::aidl::android::media::audio::common::AudioDeviceAddress getDeviceAddress() const {
- std::lock_guard guard(mLock);
- return mDeviceAddress;
- }
size_t getStreamPipeSizeInFrames();
- ::android::status_t inRead(void* buffer, size_t frameCount, size_t* actualFrameCount);
::android::status_t outWrite(void* buffer, size_t frameCount, size_t* actualFrameCount);
- ::android::status_t setCurrentRoute();
+ ::android::status_t inRead(void* buffer, size_t frameCount, size_t* actualFrameCount);
+
+ const ::aidl::android::media::audio::common::AudioDeviceAddress mDeviceAddress;
+ const bool mIsInput;
+ r_submix::AudioConfig mStreamConfig;
+ std::shared_ptr<r_submix::SubmixRoute> mCurrentRoute = nullptr;
// Limit for the number of error log entries to avoid spamming the logs.
static constexpr int kMaxErrorLogs = 5;
@@ -66,15 +66,6 @@
// 5ms between two read attempts when pipe is empty
static constexpr int kReadAttemptSleepUs = 5000;
- const bool mIsInput;
- const r_submix::AudioConfig mStreamConfig;
-
- mutable std::mutex mLock;
- ::aidl::android::media::audio::common::AudioDeviceAddress mDeviceAddress GUARDED_BY(mLock);
- std::atomic<bool> mDeviceAddressUpdated = false;
-
- // Used by the worker thread only.
- std::shared_ptr<r_submix::SubmixRoute> mCurrentRoute = nullptr;
int64_t mStartTimeNs = 0;
long mFramesSinceStart = 0;
int mReadErrorCount = 0;
@@ -82,7 +73,7 @@
int mWriteShutdownCount = 0;
};
-class StreamInRemoteSubmix final : public StreamIn, public StreamRemoteSubmix {
+class StreamInRemoteSubmix final : public StreamIn, public deprecated::StreamSwitcher {
public:
friend class ndk::SharedRefBase;
StreamInRemoteSubmix(
@@ -91,13 +82,19 @@
const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
private:
+ DeviceSwitchBehavior switchCurrentStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices)
+ override;
+ std::unique_ptr<deprecated::StreamCommonInterfaceEx> createNewStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices,
+ StreamContext* context, const Metadata& metadata) override;
void onClose(StreamDescriptor::State) override { defaultOnClose(); }
ndk::ScopedAStatus getActiveMicrophones(
std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return)
override;
};
-class StreamOutRemoteSubmix final : public StreamOut, public StreamRemoteSubmix {
+class StreamOutRemoteSubmix final : public StreamOut, public deprecated::StreamSwitcher {
public:
friend class ndk::SharedRefBase;
StreamOutRemoteSubmix(
@@ -107,6 +104,12 @@
offloadInfo);
private:
+ DeviceSwitchBehavior switchCurrentStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices)
+ override;
+ std::unique_ptr<deprecated::StreamCommonInterfaceEx> createNewStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices,
+ StreamContext* context, const Metadata& metadata) override;
void onClose(StreamDescriptor::State) override { defaultOnClose(); }
};
diff --git a/audio/aidl/default/primary/StreamPrimary.cpp b/audio/aidl/default/primary/StreamPrimary.cpp
index c1c1f03..46e384e 100644
--- a/audio/aidl/default/primary/StreamPrimary.cpp
+++ b/audio/aidl/default/primary/StreamPrimary.cpp
@@ -218,11 +218,12 @@
if (isStubStream()) {
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
- float gain;
- RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getMicGain(&gain));
- _aidl_return->resize(0);
- _aidl_return->resize(mChannelCount, gain);
- RETURN_STATUS_IF_ERROR(setHwGainImpl(*_aidl_return));
+ if (mHwGains.empty()) {
+ float gain;
+ RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getMicGain(&gain));
+ _aidl_return->resize(mChannelCount, gain);
+ RETURN_STATUS_IF_ERROR(setHwGainImpl(*_aidl_return));
+ }
return getHwGainImpl(_aidl_return);
}
@@ -241,6 +242,14 @@
mHwGains = currentGains;
return status;
}
+ float gain;
+ RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getMicGain(&gain));
+ // Due to rounding errors, round trip conversions between percents and indexed values may not
+ // match.
+ if (gain != in_channelGains[0]) {
+ LOG(WARNING) << __func__ << ": unmatched gain: set: " << in_channelGains[0]
+ << ", from mixer: " << gain;
+ }
return ndk::ScopedAStatus::ok();
}
@@ -254,9 +263,11 @@
if (isStubStream()) {
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
- RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getVolumes(_aidl_return));
- _aidl_return->resize(mChannelCount);
- RETURN_STATUS_IF_ERROR(setHwVolumeImpl(*_aidl_return));
+ if (mHwVolumes.empty()) {
+ RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getVolumes(_aidl_return));
+ _aidl_return->resize(mChannelCount);
+ RETURN_STATUS_IF_ERROR(setHwVolumeImpl(*_aidl_return));
+ }
return getHwVolumeImpl(_aidl_return);
}
@@ -272,6 +283,15 @@
mHwVolumes = currentVolumes;
return status;
}
+ std::vector<float> volumes;
+ RETURN_STATUS_IF_ERROR(primary::PrimaryMixer::getInstance().getVolumes(&volumes));
+ // Due to rounding errors, round trip conversions between percents and indexed values may not
+ // match.
+ if (volumes != in_channelVolumes) {
+ LOG(WARNING) << __func__ << ": unmatched volumes: set: "
+ << ::android::internal::ToString(in_channelVolumes)
+ << ", from mixer: " << ::android::internal::ToString(volumes);
+ }
return ndk::ScopedAStatus::ok();
}
diff --git a/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp b/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp
index 93fe028..ea59771 100644
--- a/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp
+++ b/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp
@@ -26,106 +26,132 @@
using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::hardware::audio::core::r_submix::SubmixRoute;
using aidl::android::media::audio::common::AudioDeviceAddress;
-using aidl::android::media::audio::common::AudioDeviceType;
using aidl::android::media::audio::common::AudioOffloadInfo;
using aidl::android::media::audio::common::MicrophoneDynamicInfo;
using aidl::android::media::audio::common::MicrophoneInfo;
namespace aidl::android::hardware::audio::core {
-StreamRemoteSubmix::StreamRemoteSubmix(StreamContext* context, const Metadata& metadata)
+using deprecated::InnerStreamWrapper;
+using deprecated::StreamCommonInterfaceEx;
+using deprecated::StreamSwitcher;
+
+StreamRemoteSubmix::StreamRemoteSubmix(StreamContext* context, const Metadata& metadata,
+ const AudioDeviceAddress& deviceAddress)
: StreamCommonImpl(context, metadata),
- mIsInput(isInput(metadata)),
- mStreamConfig{.sampleRate = context->getSampleRate(),
- .format = context->getFormat(),
- .channelLayout = context->getChannelLayout(),
- .frameSize = context->getFrameSize()} {}
+ mDeviceAddress(deviceAddress),
+ mIsInput(isInput(metadata)) {
+ mStreamConfig.frameSize = context->getFrameSize();
+ mStreamConfig.format = context->getFormat();
+ mStreamConfig.channelLayout = context->getChannelLayout();
+ mStreamConfig.sampleRate = context->getSampleRate();
+}
StreamRemoteSubmix::~StreamRemoteSubmix() {
cleanupWorker();
}
::android::status_t StreamRemoteSubmix::init() {
+ mCurrentRoute = SubmixRoute::findOrCreateRoute(mDeviceAddress, mStreamConfig);
+ if (mCurrentRoute == nullptr) {
+ return ::android::NO_INIT;
+ }
+ if (!mCurrentRoute->isStreamConfigValid(mIsInput, mStreamConfig)) {
+ LOG(ERROR) << __func__ << ": invalid stream config";
+ return ::android::NO_INIT;
+ }
+ sp<MonoPipe> sink = mCurrentRoute->getSink();
+ if (sink == nullptr) {
+ LOG(ERROR) << __func__ << ": nullptr sink when opening stream";
+ return ::android::NO_INIT;
+ }
+ if ((!mIsInput || mCurrentRoute->isStreamInOpen()) && sink->isShutdown()) {
+ LOG(DEBUG) << __func__ << ": Shut down sink when opening stream";
+ if (::android::OK != mCurrentRoute->resetPipe()) {
+ LOG(ERROR) << __func__ << ": reset pipe failed";
+ return ::android::NO_INIT;
+ }
+ }
+ mCurrentRoute->openStream(mIsInput);
return ::android::OK;
}
::android::status_t StreamRemoteSubmix::drain(StreamDescriptor::DrainMode) {
+ usleep(1000);
return ::android::OK;
}
::android::status_t StreamRemoteSubmix::flush() {
+ usleep(1000);
return ::android::OK;
}
::android::status_t StreamRemoteSubmix::pause() {
+ usleep(1000);
return ::android::OK;
}
::android::status_t StreamRemoteSubmix::standby() {
- if (mCurrentRoute) mCurrentRoute->standby(mIsInput);
+ mCurrentRoute->standby(mIsInput);
return ::android::OK;
}
::android::status_t StreamRemoteSubmix::start() {
- if (mDeviceAddressUpdated.load(std::memory_order_acquire)) {
- LOG(DEBUG) << __func__ << ": device address updated, reset current route";
- shutdown();
- mDeviceAddressUpdated.store(false, std::memory_order_release);
- }
- if (!mCurrentRoute) {
- RETURN_STATUS_IF_ERROR(setCurrentRoute());
- LOG(DEBUG) << __func__ << ": have current route? " << (mCurrentRoute != nullptr);
- }
- if (mCurrentRoute) mCurrentRoute->exitStandby(mIsInput);
+ mCurrentRoute->exitStandby(mIsInput);
mStartTimeNs = ::android::uptimeNanos();
mFramesSinceStart = 0;
return ::android::OK;
}
+ndk::ScopedAStatus StreamRemoteSubmix::prepareToClose() {
+ if (!mIsInput) {
+ std::shared_ptr<SubmixRoute> route = SubmixRoute::findRoute(mDeviceAddress);
+ if (route != nullptr) {
+ sp<MonoPipe> sink = route->getSink();
+ if (sink == nullptr) {
+ ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ LOG(DEBUG) << __func__ << ": shutting down MonoPipe sink";
+
+ sink->shutdown(true);
+ // The client already considers this stream as closed, release the output end.
+ route->closeStream(mIsInput);
+ } else {
+ LOG(DEBUG) << __func__ << ": stream already closed.";
+ ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
// Remove references to the specified input and output streams. When the device no longer
// references input and output streams destroy the associated pipe.
void StreamRemoteSubmix::shutdown() {
- if (!mCurrentRoute) return;
mCurrentRoute->closeStream(mIsInput);
// If all stream instances are closed, we can remove route information for this port.
if (!mCurrentRoute->hasAtleastOneStreamOpen()) {
mCurrentRoute->releasePipe();
LOG(DEBUG) << __func__ << ": pipe destroyed";
- SubmixRoute::removeRoute(getDeviceAddress());
+ SubmixRoute::removeRoute(mDeviceAddress);
}
mCurrentRoute.reset();
}
::android::status_t StreamRemoteSubmix::transfer(void* buffer, size_t frameCount,
size_t* actualFrameCount, int32_t* latencyMs) {
- if (mDeviceAddressUpdated.load(std::memory_order_acquire)) {
- // 'setConnectedDevices' was called. I/O will be restarted.
- return ::android::OK;
- }
-
*latencyMs = getDelayInUsForFrameCount(getStreamPipeSizeInFrames()) / 1000;
LOG(VERBOSE) << __func__ << ": Latency " << *latencyMs << "ms";
- ::android::status_t status = ::android::OK;
- if (mCurrentRoute) {
- mCurrentRoute->exitStandby(mIsInput);
- status = mIsInput ? inRead(buffer, frameCount, actualFrameCount)
- : outWrite(buffer, frameCount, actualFrameCount);
- if ((status != ::android::OK && mIsInput) ||
- ((status != ::android::OK && status != ::android::DEAD_OBJECT) && !mIsInput)) {
- return status;
- }
- } else {
- LOG(WARNING) << __func__ << ": no current route";
- if (mIsInput) {
- memset(buffer, 0, mStreamConfig.frameSize * frameCount);
- }
- *actualFrameCount = frameCount;
+ mCurrentRoute->exitStandby(mIsInput);
+ ::android::status_t status = mIsInput ? inRead(buffer, frameCount, actualFrameCount)
+ : outWrite(buffer, frameCount, actualFrameCount);
+ if ((status != ::android::OK && mIsInput) ||
+ ((status != ::android::OK && status != ::android::DEAD_OBJECT) && !mIsInput)) {
+ return status;
}
mFramesSinceStart += *actualFrameCount;
- // If there is no route, always block, otherwise:
- // - Input streams always need to block, output streams need to block when there is no sink.
- // - When the sink exists, more sophisticated blocking algorithm is implemented by MonoPipe.
- if (mCurrentRoute && !mIsInput && status != ::android::DEAD_OBJECT) return ::android::OK;
+ if (!mIsInput && status != ::android::DEAD_OBJECT) return ::android::OK;
+ // Input streams always need to block, output streams need to block when there is no sink.
+ // When the sink exists, more sophisticated blocking algorithm is implemented by MonoPipe.
const long bufferDurationUs =
(*actualFrameCount) * MICROS_PER_SECOND / mContext.getSampleRate();
const auto totalDurationUs = (::android::uptimeNanos() - mStartTimeNs) / NANOS_PER_MICROSECOND;
@@ -141,10 +167,6 @@
}
::android::status_t StreamRemoteSubmix::refinePosition(StreamDescriptor::Position* position) {
- if (!mCurrentRoute) {
- RETURN_STATUS_IF_ERROR(setCurrentRoute());
- if (!mCurrentRoute) return ::android::OK;
- }
sp<MonoPipeReader> source = mCurrentRoute->getSource();
if (source == nullptr) {
return ::android::NO_INIT;
@@ -168,7 +190,6 @@
// Calculate the maximum size of the pipe buffer in frames for the specified stream.
size_t StreamRemoteSubmix::getStreamPipeSizeInFrames() {
- if (!mCurrentRoute) return r_submix::kDefaultPipeSizeInFrames;
auto pipeConfig = mCurrentRoute->getPipeConfig();
const size_t maxFrameSize = std::max(mStreamConfig.frameSize, pipeConfig.frameSize);
return (pipeConfig.frameCount * pipeConfig.frameSize) / maxFrameSize;
@@ -192,7 +213,7 @@
}
mWriteShutdownCount = 0;
- LOG(VERBOSE) << __func__ << ": " << getDeviceAddress().toString() << ", " << frameCount
+ LOG(VERBOSE) << __func__ << ": " << mDeviceAddress.toString() << ", " << frameCount
<< " frames";
const bool shouldBlockWrite = mCurrentRoute->shouldBlockWrite();
@@ -266,9 +287,8 @@
}
mReadErrorCount = 0;
- LOG(VERBOSE) << __func__ << ": " << getDeviceAddress().toString() << ", " << frameCount
+ LOG(VERBOSE) << __func__ << ": " << mDeviceAddress.toString() << ", " << frameCount
<< " frames";
-
// read the data from the pipe
char* buff = (char*)buffer;
size_t actuallyRead = 0;
@@ -308,91 +328,10 @@
return ::android::OK;
}
-::android::status_t StreamRemoteSubmix::setCurrentRoute() {
- const auto address = getDeviceAddress();
- if (address == AudioDeviceAddress{}) {
- return ::android::OK;
- }
- mCurrentRoute = SubmixRoute::findOrCreateRoute(address, mStreamConfig);
- if (mCurrentRoute == nullptr) {
- return ::android::NO_INIT;
- }
- if (!mCurrentRoute->isStreamConfigValid(mIsInput, mStreamConfig)) {
- LOG(ERROR) << __func__ << ": invalid stream config";
- return ::android::NO_INIT;
- }
- sp<MonoPipe> sink = mCurrentRoute->getSink();
- if (sink == nullptr) {
- LOG(ERROR) << __func__ << ": nullptr sink when opening stream";
- return ::android::NO_INIT;
- }
- if ((!mIsInput || mCurrentRoute->isStreamInOpen()) && sink->isShutdown()) {
- LOG(DEBUG) << __func__ << ": Shut down sink when opening stream";
- if (::android::OK != mCurrentRoute->resetPipe()) {
- LOG(ERROR) << __func__ << ": reset pipe failed";
- return ::android::NO_INIT;
- }
- }
- mCurrentRoute->openStream(mIsInput);
- return ::android::OK;
-}
-
-ndk::ScopedAStatus StreamRemoteSubmix::prepareToClose() {
- if (!mIsInput) {
- const auto address = getDeviceAddress();
- if (address == AudioDeviceAddress{}) return ndk::ScopedAStatus::ok();
- std::shared_ptr<SubmixRoute> route = SubmixRoute::findRoute(address);
- if (route != nullptr) {
- sp<MonoPipe> sink = route->getSink();
- if (sink == nullptr) {
- ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
- }
- LOG(DEBUG) << __func__ << ": shutting down MonoPipe sink";
-
- sink->shutdown(true);
- // The client already considers this stream as closed, release the output end.
- route->closeStream(mIsInput);
- } else {
- LOG(DEBUG) << __func__ << ": stream already closed.";
- ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
- }
- }
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus StreamRemoteSubmix::setConnectedDevices(const ConnectedDevices& devices) {
- if (devices.size() > 1) {
- LOG(ERROR) << __func__ << ": Only single device supported, got " << devices.size();
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
- }
- AudioDeviceAddress newAddress;
- if (!devices.empty()) {
- if (auto deviceDesc = devices.front().type;
- (mIsInput && deviceDesc.type != AudioDeviceType::IN_SUBMIX) ||
- (!mIsInput && deviceDesc.type != AudioDeviceType::OUT_SUBMIX)) {
- LOG(ERROR) << __func__ << ": Device type " << toString(deviceDesc.type)
- << " not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
- }
- newAddress = devices.front().address;
- LOG(DEBUG) << __func__ << ": connected to " << newAddress.toString();
- } else {
- LOG(DEBUG) << __func__ << ": disconnected";
- }
- RETURN_STATUS_IF_ERROR(StreamCommonImpl::setConnectedDevices(devices));
- std::lock_guard guard(mLock);
- if (mDeviceAddress != newAddress) {
- mDeviceAddress = newAddress;
- mDeviceAddressUpdated.store(true, std::memory_order_release);
- }
- return ndk::ScopedAStatus::ok();
-}
-
StreamInRemoteSubmix::StreamInRemoteSubmix(StreamContext&& context,
const SinkMetadata& sinkMetadata,
const std::vector<MicrophoneInfo>& microphones)
- : StreamIn(std::move(context), microphones),
- StreamRemoteSubmix(&mContextInstance, sinkMetadata) {}
+ : StreamIn(std::move(context), microphones), StreamSwitcher(&mContextInstance, sinkMetadata) {}
ndk::ScopedAStatus StreamInRemoteSubmix::getActiveMicrophones(
std::vector<MicrophoneDynamicInfo>* _aidl_return) {
@@ -401,10 +340,66 @@
return ndk::ScopedAStatus::ok();
}
+StreamSwitcher::DeviceSwitchBehavior StreamInRemoteSubmix::switchCurrentStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
+ // This implementation effectively postpones stream creation until
+ // receiving the first call to 'setConnectedDevices' with a non-empty list.
+ if (isStubStream()) {
+ if (devices.size() == 1) {
+ auto deviceDesc = devices.front().type;
+ if (deviceDesc.type ==
+ ::aidl::android::media::audio::common::AudioDeviceType::IN_SUBMIX) {
+ return DeviceSwitchBehavior::CREATE_NEW_STREAM;
+ }
+ LOG(ERROR) << __func__ << ": Device type " << toString(deviceDesc.type)
+ << " not supported";
+ } else {
+ LOG(ERROR) << __func__ << ": Only single device supported.";
+ }
+ return DeviceSwitchBehavior::UNSUPPORTED_DEVICES;
+ }
+ return DeviceSwitchBehavior::USE_CURRENT_STREAM;
+}
+
+std::unique_ptr<StreamCommonInterfaceEx> StreamInRemoteSubmix::createNewStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices,
+ StreamContext* context, const Metadata& metadata) {
+ return std::unique_ptr<StreamCommonInterfaceEx>(
+ new InnerStreamWrapper<StreamRemoteSubmix>(context, metadata, devices.front().address));
+}
+
StreamOutRemoteSubmix::StreamOutRemoteSubmix(StreamContext&& context,
const SourceMetadata& sourceMetadata,
const std::optional<AudioOffloadInfo>& offloadInfo)
: StreamOut(std::move(context), offloadInfo),
- StreamRemoteSubmix(&mContextInstance, sourceMetadata) {}
+ StreamSwitcher(&mContextInstance, sourceMetadata) {}
+
+StreamSwitcher::DeviceSwitchBehavior StreamOutRemoteSubmix::switchCurrentStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
+ // This implementation effectively postpones stream creation until
+ // receiving the first call to 'setConnectedDevices' with a non-empty list.
+ if (isStubStream()) {
+ if (devices.size() == 1) {
+ auto deviceDesc = devices.front().type;
+ if (deviceDesc.type ==
+ ::aidl::android::media::audio::common::AudioDeviceType::OUT_SUBMIX) {
+ return DeviceSwitchBehavior::CREATE_NEW_STREAM;
+ }
+ LOG(ERROR) << __func__ << ": Device type " << toString(deviceDesc.type)
+ << " not supported";
+ } else {
+ LOG(ERROR) << __func__ << ": Only single device supported.";
+ }
+ return DeviceSwitchBehavior::UNSUPPORTED_DEVICES;
+ }
+ return DeviceSwitchBehavior::USE_CURRENT_STREAM;
+}
+
+std::unique_ptr<StreamCommonInterfaceEx> StreamOutRemoteSubmix::createNewStream(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices,
+ StreamContext* context, const Metadata& metadata) {
+ return std::unique_ptr<StreamCommonInterfaceEx>(
+ new InnerStreamWrapper<StreamRemoteSubmix>(context, metadata, devices.front().address));
+}
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/r_submix/SubmixRoute.h b/audio/aidl/default/r_submix/SubmixRoute.h
index 0097f39..5425f12 100644
--- a/audio/aidl/default/r_submix/SubmixRoute.h
+++ b/audio/aidl/default/r_submix/SubmixRoute.h
@@ -25,12 +25,10 @@
#include <media/nbaio/MonoPipe.h>
#include <media/nbaio/MonoPipeReader.h>
-#include <Utils.h>
#include <aidl/android/media/audio/common/AudioChannelLayout.h>
#include <aidl/android/media/audio/common/AudioDeviceAddress.h>
#include <aidl/android/media/audio/common/AudioFormatDescription.h>
-using aidl::android::hardware::audio::common::getFrameSizeInBytes;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioFormatDescription;
using aidl::android::media::audio::common::AudioFormatType;
@@ -58,8 +56,8 @@
AudioChannelLayout channelLayout =
AudioChannelLayout::make<AudioChannelLayout::Tag::layoutMask>(
AudioChannelLayout::LAYOUT_STEREO);
- size_t frameSize = getFrameSizeInBytes(format, channelLayout);
- size_t frameCount = 0;
+ size_t frameSize;
+ size_t frameCount;
};
class SubmixRoute {
diff --git a/authsecret/aidl/Android.bp b/authsecret/aidl/Android.bp
index 90e128d..b5e4e3d 100644
--- a/authsecret/aidl/Android.bp
+++ b/authsecret/aidl/Android.bp
@@ -10,6 +10,7 @@
aidl_interface {
name: "android.hardware.authsecret",
vendor_available: true,
+ frozen: true,
srcs: ["android/hardware/authsecret/*.aidl"],
stability: "vintf",
backend: {
diff --git a/automotive/audiocontrol/1.0/vts/functional/Android.bp b/automotive/audiocontrol/1.0/vts/functional/Android.bp
index 15c480a..fe5be81 100644
--- a/automotive/audiocontrol/1.0/vts/functional/Android.bp
+++ b/automotive/audiocontrol/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_automotive",
// 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/audiocontrol/2.0/vts/functional/Android.bp b/automotive/audiocontrol/2.0/vts/functional/Android.bp
index cb7a54d..597aaa3 100644
--- a/automotive/audiocontrol/2.0/vts/functional/Android.bp
+++ b/automotive/audiocontrol/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_automotive",
// 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/vts/functional/Android.bp b/automotive/can/1.0/vts/functional/Android.bp
index 1d51492..b13ec3b 100644
--- a/automotive/can/1.0/vts/functional/Android.bp
+++ b/automotive/can/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_connectivity_telemetry",
// 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/aidl/vts/functional/Android.bp b/automotive/can/aidl/vts/functional/Android.bp
index b816a49..d90164c 100644
--- a/automotive/can/aidl/vts/functional/Android.bp
+++ b/automotive/can/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_connectivity_telemetry",
// 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/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp b/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
index 81f18b2..4166fdc 100644
--- a/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
+++ b/automotive/ivn_android_device/impl/default/src/IvnAndroidDeviceService.cpp
@@ -48,7 +48,8 @@
}
bool IvnAndroidDeviceService::init() {
- std::ifstream configStream(mConfigPath);
+ std::string configPathStr(mConfigPath);
+ std::ifstream configStream(configPathStr);
if (!configStream) {
LOG(ERROR) << "couldn't open " << mConfigPath << " for parsing.";
return false;
diff --git a/automotive/occupant_awareness/aidl/Android.bp b/automotive/occupant_awareness/aidl/Android.bp
index 1a8124c..33406ba 100644
--- a/automotive/occupant_awareness/aidl/Android.bp
+++ b/automotive/occupant_awareness/aidl/Android.bp
@@ -14,6 +14,7 @@
"android/hardware/automotive/occupant_awareness/*.aidl",
],
stability: "vintf",
+ frozen: true,
backend: {
java: {
sdk_version: "module_current",
diff --git a/automotive/remoteaccess/vts/Android.bp b/automotive/remoteaccess/vts/Android.bp
index 8acd6a1..043cafa 100644
--- a/automotive/remoteaccess/vts/Android.bp
+++ b/automotive/remoteaccess/vts/Android.bp
@@ -15,6 +15,7 @@
*/
package {
+ default_team: "trendy_team_aaos_framework",
// 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/vehicle/vts/Android.bp b/automotive/vehicle/vts/Android.bp
index 40aec59..303e5a6 100644
--- a/automotive/vehicle/vts/Android.bp
+++ b/automotive/vehicle/vts/Android.bp
@@ -15,6 +15,7 @@
*/
package {
+ default_team: "trendy_team_aaos_framework",
// 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/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
index fcf1649..4d90058 100644
--- a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
+++ b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
@@ -72,11 +72,9 @@
static constexpr uint8_t kMinLeResolvingListForBt5 = 8;
static constexpr size_t kNumHciCommandsBandwidth = 100;
-static constexpr size_t kNumScoPacketsBandwidth = 100;
static constexpr size_t kNumAclPacketsBandwidth = 100;
static constexpr std::chrono::milliseconds kWaitForInitTimeout(2000);
static constexpr std::chrono::milliseconds kWaitForHciEventTimeout(2000);
-static constexpr std::chrono::milliseconds kWaitForScoDataTimeout(1000);
static constexpr std::chrono::milliseconds kWaitForAclDataTimeout(1000);
static constexpr std::chrono::milliseconds kInterfaceCloseDelayMs(200);
@@ -216,7 +214,6 @@
// Functions called from within tests in loopback mode
void sendAndCheckHci(int num_packets);
- void sendAndCheckSco(int num_packets, size_t size, uint16_t handle);
void sendAndCheckAcl(int num_packets, size_t size, uint16_t handle);
// Helper functions to try to get a handle on verbosity
@@ -563,38 +560,6 @@
logger.setTotalBytes(command_size * num_packets * 2);
}
-// Send a SCO data packet (in Loopback mode) and check the response.
-void BluetoothAidlTest::sendAndCheckSco(int num_packets, size_t size,
- uint16_t handle) {
- ThroughputLogger logger{__func__};
- for (int n = 0; n < num_packets; n++) {
- // Send a SCO packet
- std::vector<uint8_t> sco_packet;
- std::vector<uint8_t> payload;
- for (size_t i = 0; i < size; i++) {
- payload.push_back(static_cast<uint8_t>(i + n));
- }
- ::bluetooth::packet::BitInserter bi{sco_packet};
- ::bluetooth::hci::ScoBuilder::Create(
- handle, ::bluetooth::hci::PacketStatusFlag::CORRECTLY_RECEIVED, payload)
- ->Serialize(bi);
- hci->sendScoData(sco_packet);
-
- // Check the loopback of the SCO packet
- std::vector<uint8_t> sco_loopback;
- ASSERT_TRUE(
- sco_queue.tryPopWithTimeout(sco_loopback, kWaitForScoDataTimeout));
-
- if (sco_loopback.size() < size) {
- // The packets may have been split for USB. Reassemble before checking.
- reassemble_sco_loopback_pkt(sco_loopback, size);
- }
-
- ASSERT_EQ(sco_packet, sco_loopback);
- }
- logger.setTotalBytes(num_packets * size * 2);
-}
-
// Send an ACL data packet (in Loopback mode) and check the response.
void BluetoothAidlTest::sendAndCheckAcl(int num_packets, size_t size,
uint16_t handle) {
@@ -724,22 +689,6 @@
wait_for_command_complete_event(view.GetOpCode(), cmd_complete));
}
-// Handle the loopback packet.
-void BluetoothAidlTest::reassemble_sco_loopback_pkt(std::vector<uint8_t>& scoPackets,
- size_t size) {
- std::vector<uint8_t> sco_packet_whole;
- sco_packet_whole.assign(scoPackets.begin(), scoPackets.end());
- while (size + 3 > sco_packet_whole.size()) {
- std::vector<uint8_t> sco_packets;
- ASSERT_TRUE(
- sco_queue.tryPopWithTimeout(sco_packets, kWaitForScoDataTimeout));
- sco_packet_whole.insert(sco_packet_whole.end(), sco_packets.begin() + 3,
- sco_packets.end());
- }
- scoPackets.assign(sco_packet_whole.begin(), sco_packet_whole.end());
- scoPackets[2] = size;
-}
-
// Empty test: Initialize()/Close() are called in SetUp()/TearDown().
TEST_P(BluetoothAidlTest, InitializeAndClose) {}
@@ -829,26 +778,6 @@
sendAndCheckHci(1);
}
-// Enter loopback mode and send a single SCO packet.
-TEST_P(BluetoothAidlTest, LoopbackModeSingleSco) {
- setBufferSizes();
- setSynchronousFlowControlEnable();
-
- enterLoopbackMode();
-
- if (!sco_connection_handles.empty()) {
- ASSERT_LT(0, max_sco_data_packet_length);
- sendAndCheckSco(1, max_sco_data_packet_length, sco_connection_handles[0]);
- int sco_packets_sent = 1;
- int completed_packets =
- wait_for_completed_packets_event(sco_connection_handles[0]);
- if (sco_packets_sent != completed_packets) {
- ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
- sco_packets_sent, completed_packets);
- }
- }
-}
-
// Enter loopback mode and send a single ACL packet.
TEST_P(BluetoothAidlTest, LoopbackModeSingleAcl) {
setBufferSizes();
@@ -879,27 +808,6 @@
sendAndCheckHci(kNumHciCommandsBandwidth);
}
-// Enter loopback mode and send SCO packets for bandwidth measurements.
-TEST_P(BluetoothAidlTest, LoopbackModeScoBandwidth) {
- setBufferSizes();
- setSynchronousFlowControlEnable();
-
- enterLoopbackMode();
-
- if (!sco_connection_handles.empty()) {
- ASSERT_LT(0, max_sco_data_packet_length);
- sendAndCheckSco(kNumScoPacketsBandwidth, max_sco_data_packet_length,
- sco_connection_handles[0]);
- int sco_packets_sent = kNumScoPacketsBandwidth;
- int completed_packets =
- wait_for_completed_packets_event(sco_connection_handles[0]);
- if (sco_packets_sent != completed_packets) {
- ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
- sco_packets_sent, completed_packets);
- }
- }
-}
-
// Enter loopback mode and send packets for ACL bandwidth measurements.
TEST_P(BluetoothAidlTest, LoopbackModeAclBandwidth) {
setBufferSizes();
diff --git a/boot/aidl/client/BootControlClient.cpp b/boot/aidl/client/BootControlClient.cpp
index dca98c6..5cca183 100644
--- a/boot/aidl/client/BootControlClient.cpp
+++ b/boot/aidl/client/BootControlClient.cpp
@@ -37,6 +37,17 @@
using aidl::android::hardware::boot::MergeStatus;
+#define TEST_OP(_x, _y, op) \
+ do { \
+ const auto& x = _x; \
+ const auto& y = _y; \
+ if (!(x op y)) { \
+ LOG(ERROR) << #_x " " #op " " #_y << " failed: " << x << " " #op " " << y; \
+ return {}; \
+ } \
+ } while (0)
+#define TEST_NE(_x, _y) TEST_OP(_x, _y, !=)
+
std::ostream& operator<<(std::ostream& os, MergeStatus status) {
switch (status) {
case MergeStatus::NONE:
@@ -69,8 +80,8 @@
explicit BootControlClientAidl(std::shared_ptr<IBootControl> module)
: module_(module),
boot_control_death_recipient(AIBinder_DeathRecipient_new(onBootControlServiceDied)) {
- binder_status_t status = AIBinder_linkToDeath(module->asBinder().get(),
- boot_control_death_recipient, nullptr);
+ binder_status_t status =
+ AIBinder_linkToDeath(module->asBinder().get(), boot_control_death_recipient, this);
if (status != STATUS_OK) {
LOG(ERROR) << "Could not link to binder death";
return;
@@ -79,31 +90,64 @@
BootControlVersion GetVersion() const override { return BootControlVersion::BOOTCTL_AIDL; }
- ~BootControlClientAidl() {
- if (boot_control_death_recipient) {
- AIBinder_unlinkToDeath(module_->asBinder().get(), boot_control_death_recipient, this);
+ void onBootControlServiceDied() {
+ LOG(ERROR) << "boot control service AIDL died. Attempting to reconnect...";
+ const auto instance_name =
+ std::string(::aidl::android::hardware::boot::IBootControl::descriptor) + "/default";
+ if (AServiceManager_isDeclared(instance_name.c_str())) {
+ module_ = ::aidl::android::hardware::boot::IBootControl::fromBinder(
+ ndk::SpAIBinder(AServiceManager_waitForService(instance_name.c_str())));
+ if (module_ == nullptr) {
+ LOG(ERROR) << "AIDL " << instance_name
+ << " is declared but waitForService returned nullptr when trying to "
+ "reconnect boot control service";
+ return;
+ }
+ LOG(INFO) << "Reconnected to AIDL version of IBootControl";
+ binder_status_t status = AIBinder_linkToDeath(module_->asBinder().get(),
+ boot_control_death_recipient, this);
+ if (status != STATUS_OK) {
+ LOG(ERROR) << "Could not link to binder death";
+ return;
+ }
+
+ } else {
+ LOG(ERROR) << "Failed to get service manager for: " << instance_name;
}
}
- void onBootControlServiceDied() { LOG(ERROR) << "boot control service AIDL died"; }
-
int32_t GetNumSlots() const override {
int32_t ret = -1;
+ if (!module_) {
+ LOG(ERROR) << "bootctl module not set";
+ return ret;
+ }
LOG_NDK_STATUS(module_->getNumberSlots(&ret));
return ret;
}
int32_t GetCurrentSlot() const override {
int32_t ret = -1;
+ if (!module_) {
+ LOG(ERROR) << "bootctl module not set";
+ return ret;
+ }
LOG_NDK_STATUS(module_->getCurrentSlot(&ret));
return ret;
}
+
MergeStatus getSnapshotMergeStatus() const override {
MergeStatus status = MergeStatus::UNKNOWN;
+ if (!module_) {
+ LOG(ERROR) << "bootctl module not set";
+ return status;
+ }
LOG_NDK_STATUS(module_->getSnapshotMergeStatus(&status));
return status;
}
+
std::string GetSuffix(int32_t slot) const override {
+ TEST_NE(module_, nullptr);
std::string ret;
const auto status = module_->getSuffix(slot, &ret);
if (!status.isOk()) {
@@ -115,6 +159,7 @@
}
std::optional<bool> IsSlotBootable(int32_t slot) const override {
+ TEST_NE(module_, nullptr);
bool ret = false;
const auto status = module_->isSlotBootable(slot, &ret);
if (!status.isOk()) {
@@ -126,6 +171,7 @@
}
CommandResult MarkSlotUnbootable(int32_t slot) override {
+ TEST_NE(module_, nullptr);
const auto status = module_->setSlotAsUnbootable(slot);
if (!status.isOk()) {
LOG(ERROR) << __FUNCTION__ << "(" << slot << ")" << " failed "
@@ -135,6 +181,7 @@
}
CommandResult SetActiveBootSlot(int slot) override {
+ TEST_NE(module_, nullptr);
const auto status = module_->setActiveBootSlot(slot);
if (!status.isOk()) {
LOG(ERROR) << __FUNCTION__ << "(" << slot << ")" << " failed "
@@ -142,14 +189,20 @@
}
return {.success = status.isOk(), .errMsg = status.getDescription()};
}
+
int GetActiveBootSlot() const {
int ret = -1;
+ if (!module_) {
+ LOG(ERROR) << "bootctl module not set";
+ return ret;
+ }
LOG_NDK_STATUS(module_->getActiveBootSlot(&ret));
return ret;
}
// Check if |slot| is marked boot successfully.
std::optional<bool> IsSlotMarkedSuccessful(int slot) const override {
+ TEST_NE(module_, nullptr);
bool ret = false;
const auto status = module_->isSlotMarkedSuccessful(slot, &ret);
if (!status.isOk()) {
@@ -161,6 +214,7 @@
}
CommandResult MarkBootSuccessful() override {
+ TEST_NE(module_, nullptr);
const auto status = module_->markBootSuccessful();
if (!status.isOk()) {
LOG(ERROR) << __FUNCTION__ << " failed " << status.getDescription();
@@ -170,6 +224,7 @@
CommandResult SetSnapshotMergeStatus(
aidl::android::hardware::boot::MergeStatus merge_status) override {
+ TEST_NE(module_, nullptr);
const auto status = module_->setSnapshotMergeStatus(merge_status);
if (!status.isOk()) {
LOG(ERROR) << __FUNCTION__ << "(" << merge_status << ")" << " failed "
@@ -179,7 +234,7 @@
}
private:
- const std::shared_ptr<IBootControl> module_;
+ std::shared_ptr<IBootControl> module_;
AIBinder_DeathRecipient* boot_control_death_recipient;
static void onBootControlServiceDied(void* client) {
BootControlClientAidl* self = static_cast<BootControlClientAidl*>(client);
diff --git a/broadcastradio/1.0/vts/functional/Android.bp b/broadcastradio/1.0/vts/functional/Android.bp
index 623ff78..5a42fe4 100644
--- a/broadcastradio/1.0/vts/functional/Android.bp
+++ b/broadcastradio/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_aaos_framework",
// 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/broadcastradio/1.1/vts/functional/Android.bp b/broadcastradio/1.1/vts/functional/Android.bp
index 0fb4eb0..9d3db88 100644
--- a/broadcastradio/1.1/vts/functional/Android.bp
+++ b/broadcastradio/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_aaos_framework",
// 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/broadcastradio/2.0/vts/functional/Android.bp b/broadcastradio/2.0/vts/functional/Android.bp
index cb50c5e..03bec77 100644
--- a/broadcastradio/2.0/vts/functional/Android.bp
+++ b/broadcastradio/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_aaos_framework",
// 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/cas/1.0/vts/functional/Android.bp b/cas/1.0/vts/functional/Android.bp
index 6d06cab..560230b 100644
--- a/cas/1.0/vts/functional/Android.bp
+++ b/cas/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_codec_framework",
// 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/cas/1.1/vts/functional/Android.bp b/cas/1.1/vts/functional/Android.bp
index a598554..b267f53 100644
--- a/cas/1.1/vts/functional/Android.bp
+++ b/cas/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_codec_framework",
// 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/cas/1.2/default/Android.bp b/cas/1.2/default/Android.bp
index 38561fd..5bc8bad 100644
--- a/cas/1.2/default/Android.bp
+++ b/cas/1.2/default/Android.bp
@@ -46,6 +46,7 @@
vintf_fragments: ["android.hardware.cas@1.2-service.xml"],
defaults: ["cas_service_defaults@1.2"],
init_rc: ["android.hardware.cas@1.2-service.rc"],
+ overrides: ["com.android.hardware.cas"],
}
cc_binary {
diff --git a/cas/1.2/vts/functional/Android.bp b/cas/1.2/vts/functional/Android.bp
index 21f791b..0a83ad4 100644
--- a/cas/1.2/vts/functional/Android.bp
+++ b/cas/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_codec_framework",
// 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/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 6a3fa32..825c931 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -21,6 +21,65 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
+// Device framework compatibility matrix (common to all FCM versions)
+// Reference: https://source.android.com/docs/core/architecture/vintf/comp-matrices
+vintf_compatibility_matrix {
+ name: "framework_compatibility_matrix.device.xml",
+ stem: "compatibility_matrix.device.xml",
+ type: "device_fcm",
+}
+
+// Phony target that installs all system compatibility matrix files
+SYSTEM_MATRIX_DEPS = [
+ "framework_compatibility_matrix.5.xml",
+ "framework_compatibility_matrix.6.xml",
+ "framework_compatibility_matrix.7.xml",
+ "framework_compatibility_matrix.8.xml",
+ "framework_compatibility_matrix.202404.xml",
+ "framework_compatibility_matrix.device.xml",
+]
+
+phony {
+ name: "system_compatibility_matrix.xml",
+ required: SYSTEM_MATRIX_DEPS,
+ product_variables: {
+ release_aidl_use_unfrozen: {
+ required: [
+ "framework_compatibility_matrix.202504.xml",
+ ],
+ },
+ },
+}
+
+// Product Compatibility Matrix
+vintf_compatibility_matrix {
+ name: "product_compatibility_matrix.xml",
+ stem: "compatibility_matrix.xml",
+ product_specific: true,
+ type: "product_fcm",
+}
+
+// Phony target that installs all framework compatibility matrix files (system + product)
+FRAMEWORK_MATRIX_DEPS = SYSTEM_MATRIX_DEPS + ["product_compatibility_matrix.xml"]
+
+phony {
+ name: "framework_compatibility_matrix.xml",
+ required: FRAMEWORK_MATRIX_DEPS,
+ product_variables: {
+ release_aidl_use_unfrozen: {
+ required: [
+ "framework_compatibility_matrix.202504.xml",
+ ],
+ },
+ },
+}
+
+////////////////////////////////////////////
+// AUTO GENERATED MODULES
+// DO NOT ADD MORE MODULES BELOW THIS LINE
+////////////////////////////////////////////
+
+// System compatibility matrices
vintf_compatibility_matrix {
name: "framework_compatibility_matrix.5.xml",
stem: "compatibility_matrix.5.xml",
@@ -88,60 +147,6 @@
stem: "compatibility_matrix.202504.xml",
srcs: ["compatibility_matrix.202504.xml"],
kernel_configs: [
- "kernel_config_w_6.next",
+ "kernel_config_w_6.12",
],
-
-}
-
-// Device framework compatibility matrix (common to all FCM versions)
-// Reference: https://source.android.com/docs/core/architecture/vintf/comp-matrices
-vintf_compatibility_matrix {
- name: "framework_compatibility_matrix.device.xml",
- stem: "compatibility_matrix.device.xml",
- type: "device_fcm",
-}
-
-// Phony target that installs all system compatibility matrix files
-SYSTEM_MATRIX_DEPS = [
- "framework_compatibility_matrix.5.xml",
- "framework_compatibility_matrix.6.xml",
- "framework_compatibility_matrix.7.xml",
- "framework_compatibility_matrix.8.xml",
- "framework_compatibility_matrix.202404.xml",
- "framework_compatibility_matrix.device.xml",
-]
-
-phony {
- name: "system_compatibility_matrix.xml",
- required: SYSTEM_MATRIX_DEPS,
- product_variables: {
- release_aidl_use_unfrozen: {
- required: [
- "framework_compatibility_matrix.202504.xml",
- ],
- },
- },
-}
-
-// Product Compatibility Matrix
-vintf_compatibility_matrix {
- name: "product_compatibility_matrix.xml",
- stem: "compatibility_matrix.xml",
- product_specific: true,
- type: "product_fcm",
-}
-
-// Phony target that installs all framework compatibility matrix files (system + product)
-FRAMEWORK_MATRIX_DEPS = SYSTEM_MATRIX_DEPS + ["product_compatibility_matrix.xml"]
-
-phony {
- name: "framework_compatibility_matrix.xml",
- required: FRAMEWORK_MATRIX_DEPS,
- product_variables: {
- release_aidl_use_unfrozen: {
- required: [
- "framework_compatibility_matrix.202504.xml",
- ],
- },
- },
}
diff --git a/confirmationui/1.0/vts/functional/Android.bp b/confirmationui/1.0/vts/functional/Android.bp
index 6c6488b..2fbd851 100644
--- a/confirmationui/1.0/vts/functional/Android.bp
+++ b/confirmationui/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_platform_security",
// 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/confirmationui/aidl/vts/functional/Android.bp b/confirmationui/aidl/vts/functional/Android.bp
index ac2d53a..2403185 100644
--- a/confirmationui/aidl/vts/functional/Android.bp
+++ b/confirmationui/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_platform_security",
// See: http://go/android-license-faq
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/drm/1.0/vts/functional/Android.bp b/drm/1.0/vts/functional/Android.bp
index e0c6fa5..73612df 100644
--- a/drm/1.0/vts/functional/Android.bp
+++ b/drm/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/drm/1.1/vts/functional/Android.bp b/drm/1.1/vts/functional/Android.bp
index b539fa2..aeb0443 100644
--- a/drm/1.1/vts/functional/Android.bp
+++ b/drm/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/drm/1.2/vts/functional/Android.bp b/drm/1.2/vts/functional/Android.bp
index 9ceb1a3..f6fb528 100644
--- a/drm/1.2/vts/functional/Android.bp
+++ b/drm/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/drm/1.3/vts/functional/Android.bp b/drm/1.3/vts/functional/Android.bp
index 3db23e3..a9ebd80 100644
--- a/drm/1.3/vts/functional/Android.bp
+++ b/drm/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/drm/1.4/vts/functional/Android.bp b/drm/1.4/vts/functional/Android.bp
index 89edab7..0662a0f 100644
--- a/drm/1.4/vts/functional/Android.bp
+++ b/drm/1.4/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/drm/aidl/Android.bp b/drm/aidl/Android.bp
index afcb603..c42e723 100644
--- a/drm/aidl/Android.bp
+++ b/drm/aidl/Android.bp
@@ -12,6 +12,7 @@
vendor_available: true,
srcs: ["android/hardware/drm/*.aidl"],
stability: "vintf",
+ frozen: true,
imports: [
"android.hardware.common-V2",
],
diff --git a/drm/aidl/vts/Android.bp b/drm/aidl/vts/Android.bp
index 5139036..e813bd1 100644
--- a/drm/aidl/vts/Android.bp
+++ b/drm/aidl/vts/Android.bp
@@ -14,6 +14,7 @@
// limitations under the License.
//
package {
+ default_team: "trendy_team_android_media_drm",
// 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/dumpstate/1.0/vts/functional/Android.bp b/dumpstate/1.0/vts/functional/Android.bp
index cc0a9cd..a7ee2d8 100644
--- a/dumpstate/1.0/vts/functional/Android.bp
+++ b/dumpstate/1.0/vts/functional/Android.bp
@@ -14,6 +14,7 @@
// limitations under the License.
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/dumpstate/1.1/vts/functional/Android.bp b/dumpstate/1.1/vts/functional/Android.bp
index 17b412e..b2692f6 100644
--- a/dumpstate/1.1/vts/functional/Android.bp
+++ b/dumpstate/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/dumpstate/aidl/Android.bp b/dumpstate/aidl/Android.bp
index 1eb8b32..45c992a 100644
--- a/dumpstate/aidl/Android.bp
+++ b/dumpstate/aidl/Android.bp
@@ -26,6 +26,7 @@
vendor_available: true,
srcs: ["android/hardware/dumpstate/*.aidl"],
stability: "vintf",
+ frozen: true,
backend: {
cpp: {
enabled: false,
diff --git a/dumpstate/aidl/vts/functional/Android.bp b/dumpstate/aidl/vts/functional/Android.bp
index 5e516cf..9aa62e0 100644
--- a/dumpstate/aidl/vts/functional/Android.bp
+++ b/dumpstate/aidl/vts/functional/Android.bp
@@ -13,6 +13,7 @@
// limitations under the License.
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/gatekeeper/1.0/vts/functional/Android.bp b/gatekeeper/1.0/vts/functional/Android.bp
index 64b3505..16e2970 100644
--- a/gatekeeper/1.0/vts/functional/Android.bp
+++ b/gatekeeper/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/gatekeeper/aidl/vts/functional/Android.bp b/gatekeeper/aidl/vts/functional/Android.bp
index 008f25c..801ee56 100644
--- a/gatekeeper/aidl/vts/functional/Android.bp
+++ b/gatekeeper/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// See: http://go/android-license-faq
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/gnss/1.0/vts/functional/Android.bp b/gnss/1.0/vts/functional/Android.bp
index f27732a..b1093a6 100644
--- a/gnss/1.0/vts/functional/Android.bp
+++ b/gnss/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_location_time",
// 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/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp
index f9fcbf1..65c752c 100644
--- a/gnss/1.1/vts/functional/Android.bp
+++ b/gnss/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_location_time",
// 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/gnss/2.0/vts/functional/Android.bp b/gnss/2.0/vts/functional/Android.bp
index 0b54308..4ca3063 100644
--- a/gnss/2.0/vts/functional/Android.bp
+++ b/gnss/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_location_time",
// 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/gnss/2.1/vts/functional/Android.bp b/gnss/2.1/vts/functional/Android.bp
index 9906b27..af66037 100644
--- a/gnss/2.1/vts/functional/Android.bp
+++ b/gnss/2.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_location_time",
// 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/gnss/aidl/vts/Android.bp b/gnss/aidl/vts/Android.bp
index fd1d853..2bd6f07 100644
--- a/gnss/aidl/vts/Android.bp
+++ b/gnss/aidl/vts/Android.bp
@@ -13,6 +13,7 @@
// limitations under the License.
package {
+ default_team: "trendy_team_location_time",
// 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/graphics/common/aidl/Android.bp b/graphics/common/aidl/Android.bp
index c28da4c..3c75d7b 100644
--- a/graphics/common/aidl/Android.bp
+++ b/graphics/common/aidl/Android.bp
@@ -43,7 +43,7 @@
enabled: true,
},
},
- frozen: true,
+ frozen: false,
versions_with_info: [
{
version: "1",
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
index ed84a44..54a9d8d 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
@@ -68,4 +68,5 @@
R_16_UINT = 0x39,
RG_1616_UINT = 0x3a,
RGBA_10101010 = 0x3b,
+ YCBCR_P210 = 0x3c,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/PixelFormat.aidl b/graphics/common/aidl/android/hardware/graphics/common/PixelFormat.aidl
index 1117504..55be4d2 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/PixelFormat.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/PixelFormat.aidl
@@ -531,4 +531,26 @@
* interpretation is defined by the dataspace.
*/
RGBA_10101010 = 0x3b,
+
+ /**
+ * YCBCR_P210 is a 4:2:2 YCbCr semiplanar format comprised of a WxH Y plane
+ * followed by a WxH CbCr plane. Each sample is represented by a 16-bit
+ * little-endian value, with the lower 6 bits set to zero.
+ *
+ * This format must be accepted by the allocator when used with the
+ * following usage flags:
+ *
+ * - BufferUsage::VIDEO_*
+ * - BufferUsage::CPU_*
+ * - BufferUsage::GPU_TEXTURE
+ *
+ * The component values are unsigned normalized to the range [0, 1], whose
+ * interpretation is defined by the dataspace.
+ *
+ * This format is appropriate for 10bit video content.
+ *
+ * Buffers with this format must be locked with IMapper::lockYCbCr
+ * or with IMapper::lock.
+ */
+ YCBCR_P210 = 0x3c,
}
diff --git a/health/storage/OWNERS b/health/storage/OWNERS
index 7af8d99..ec1fd8f 100644
--- a/health/storage/OWNERS
+++ b/health/storage/OWNERS
@@ -1,6 +1,9 @@
# Bug component: 30545
+# Don't inherit owners from hardware/interfaces/health/
set noparent
+# But inherit from hardware/interfaces
+include platform/hardware/interfaces:/OWNERS
jaegeuk@google.com
elsk@google.com
diff --git a/health/storage/aidl/Android.bp b/health/storage/aidl/Android.bp
index c614efb..44484d6 100644
--- a/health/storage/aidl/Android.bp
+++ b/health/storage/aidl/Android.bp
@@ -26,6 +26,7 @@
vendor_available: true,
srcs: ["android/hardware/health/storage/*.aidl"],
stability: "vintf",
+ frozen: true,
backend: {
cpp: {
enabled: false,
diff --git a/health/utils/libhealthloop/Android.bp b/health/utils/libhealthloop/Android.bp
index 4ebc575..08b3180 100644
--- a/health/utils/libhealthloop/Android.bp
+++ b/health/utils/libhealthloop/Android.bp
@@ -22,6 +22,12 @@
}
bpf {
+ name: "filterPowerSupplyEvents.o_non_vendor",
+ srcs: ["filterPowerSupplyEvents.c"],
+ visibility: ["//visibility:private"],
+}
+
+bpf {
name: "filterPowerSupplyEvents.o",
srcs: ["filterPowerSupplyEvents.c"],
// "vendor: true" because all binaries that use this BPF filter are vendor
@@ -55,10 +61,10 @@
],
}
-genrule {
+cc_genrule {
name: "filterPowerSupplyEvents.h",
out: ["filterPowerSupplyEvents.h"],
- srcs: [":filterPowerSupplyEvents.o"],
+ srcs: [":filterPowerSupplyEvents.o_non_vendor"],
cmd: "cat $(in) | od -v -tx1 | cut -c9- | grep -v '^$$' | sed 's/^/0x/;s/ /, 0x/g;s/^, //;s/$$/,/' > $(out)",
}
@@ -76,8 +82,10 @@
"libgmock",
],
generated_headers: [
- "filterPowerSupplyEvents.h",
"libbpf_headers",
],
+ device_first_generated_headers: [
+ "filterPowerSupplyEvents.h",
+ ],
compile_multilib: "64",
}
diff --git a/identity/aidl/vts/Android.bp b/identity/aidl/vts/Android.bp
index 8ff2382..1ce4f0c 100644
--- a/identity/aidl/vts/Android.bp
+++ b/identity/aidl/vts/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/input/common/aidl/Android.bp b/input/common/aidl/Android.bp
index 0759d2e..8721e5d 100644
--- a/input/common/aidl/Android.bp
+++ b/input/common/aidl/Android.bp
@@ -14,6 +14,7 @@
vendor_available: true,
srcs: ["android/hardware/input/common/*.aidl"],
stability: "vintf",
+ frozen: true,
backend: {
cpp: {
enabled: false,
diff --git a/input/processor/aidl/Android.bp b/input/processor/aidl/Android.bp
index 68adf32..6855b08 100644
--- a/input/processor/aidl/Android.bp
+++ b/input/processor/aidl/Android.bp
@@ -12,6 +12,7 @@
name: "android.hardware.input.processor",
host_supported: true,
vendor_available: true,
+ frozen: true,
srcs: ["android/hardware/input/processor/*.aidl"],
imports: [
"android.hardware.input.common-V1",
diff --git a/ir/aidl/Android.bp b/ir/aidl/Android.bp
index 25f6c8f..c561c52 100644
--- a/ir/aidl/Android.bp
+++ b/ir/aidl/Android.bp
@@ -26,6 +26,7 @@
vendor_available: true,
srcs: ["android/hardware/ir/*.aidl"],
stability: "vintf",
+ frozen: true,
backend: {
cpp: {
enabled: false,
diff --git a/keymaster/3.0/vts/functional/Android.bp b/keymaster/3.0/vts/functional/Android.bp
index fde32a7..4aa0692 100644
--- a/keymaster/3.0/vts/functional/Android.bp
+++ b/keymaster/3.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/keymaster/4.0/vts/functional/Android.bp b/keymaster/4.0/vts/functional/Android.bp
index e1dfcfc..cd12319 100644
--- a/keymaster/4.0/vts/functional/Android.bp
+++ b/keymaster/4.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/keymaster/4.0/vts/performance/Android.bp b/keymaster/4.0/vts/performance/Android.bp
index d7342ad..8f26871 100644
--- a/keymaster/4.0/vts/performance/Android.bp
+++ b/keymaster/4.0/vts/performance/Android.bp
@@ -33,6 +33,5 @@
"android.hardware.keymaster@4.0",
"libkeymaster4support",
"libsoftkeymasterdevice",
- "libchrome"
],
}
diff --git a/keymaster/4.0/vts/performance/Benchmark.cpp b/keymaster/4.0/vts/performance/Benchmark.cpp
index e5fdff2..723b543 100644
--- a/keymaster/4.0/vts/performance/Benchmark.cpp
+++ b/keymaster/4.0/vts/performance/Benchmark.cpp
@@ -16,6 +16,8 @@
#define LOG_TAG "keymaster_benchmark"
+#include <getopt.h>
+
#include <android/hardware/keymaster/4.0/IKeymasterDevice.h>
#include <android/hardware/keymaster/4.0/types.h>
#include <keymaster/keymaster_configuration.h>
@@ -36,8 +38,6 @@
#include <benchmark/benchmark.h>
#include <hidl/Status.h>
-#include <base/command_line.h>
-
namespace android {
namespace hardware {
namespace keymaster {
@@ -700,14 +700,26 @@
} // namespace hardware
} // namespace android
+namespace {
+
+std::string ParseCommandLineFlags(int argc, char** argv) {
+ std::string service_name = "default";
+ static struct option long_options[] = {{"service_name", required_argument, 0, 's'},
+ {0, 0, 0, 0}};
+ int opt;
+ while ((opt = getopt_long(argc, argv, "s:", long_options, nullptr)) != -1) {
+ if (opt == 's') {
+ service_name = optarg;
+ }
+ }
+ return service_name;
+}
+
+} // namespace
+
int main(int argc, char** argv) {
::benchmark::Initialize(&argc, argv);
- base::CommandLine::Init(argc, argv);
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- auto service_name = command_line->GetSwitchValueASCII("service_name");
- if (service_name.empty()) {
- service_name = "default";
- }
+ std::string service_name = ParseCommandLineFlags(argc, argv);
android::hardware::keymaster::V4_0::test::keymaster =
android::hardware::keymaster::V4_0::test::KeymasterWrapper::newInstance(service_name);
if (!android::hardware::keymaster::V4_0::test::keymaster) {
diff --git a/keymaster/4.1/vts/functional/Android.bp b/keymaster/4.1/vts/functional/Android.bp
index 547ce38..04fc2d3 100644
--- a/keymaster/4.1/vts/functional/Android.bp
+++ b/keymaster/4.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/Android.bp b/light/aidl/Android.bp
index c9fba95..142be6d 100644
--- a/light/aidl/Android.bp
+++ b/light/aidl/Android.bp
@@ -14,6 +14,7 @@
"android/hardware/light/*.aidl",
],
stability: "vintf",
+ frozen: true,
backend: {
java: {
sdk_version: "module_current",
diff --git a/macsec/aidl/vts/functional/Android.bp b/macsec/aidl/vts/functional/Android.bp
index 0c8f43d..faf0d15 100644
--- a/macsec/aidl/vts/functional/Android.bp
+++ b/macsec/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_aaos_security",
// 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/memtrack/1.0/vts/functional/Android.bp b/memtrack/1.0/vts/functional/Android.bp
index 852cd15..924fc27 100644
--- a/memtrack/1.0/vts/functional/Android.bp
+++ b/memtrack/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/memtrack/aidl/vts/Android.bp b/memtrack/aidl/vts/Android.bp
index f54388a..523c903 100644
--- a/memtrack/aidl/vts/Android.bp
+++ b/memtrack/aidl/vts/Android.bp
@@ -1,4 +1,5 @@
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/Android.bp b/neuralnetworks/aidl/Android.bp
index 145604c..c9242ca 100644
--- a/neuralnetworks/aidl/Android.bp
+++ b/neuralnetworks/aidl/Android.bp
@@ -11,6 +11,7 @@
name: "android.hardware.neuralnetworks",
host_supported: true,
vendor_available: true,
+ frozen: true,
srcs: [
"android/hardware/neuralnetworks/*.aidl",
],
diff --git a/nfc/aidl/Android.bp b/nfc/aidl/Android.bp
index ae68f17..b34e4f2 100644
--- a/nfc/aidl/Android.bp
+++ b/nfc/aidl/Android.bp
@@ -27,6 +27,7 @@
vendor_available: true,
srcs: ["android/hardware/nfc/*.aidl"],
stability: "vintf",
+ frozen: false,
backend: {
cpp: {
enabled: false,
diff --git a/oemlock/aidl/Android.bp b/oemlock/aidl/Android.bp
index 1c19bb1..f4533ed 100644
--- a/oemlock/aidl/Android.bp
+++ b/oemlock/aidl/Android.bp
@@ -10,6 +10,7 @@
aidl_interface {
name: "android.hardware.oemlock",
vendor_available: true,
+ frozen: true,
srcs: ["android/hardware/oemlock/*.aidl"],
stability: "vintf",
backend: {
diff --git a/power/aidl/default/Android.bp b/power/aidl/default/Android.bp
index 4926b91..e934bc5 100644
--- a/power/aidl/default/Android.bp
+++ b/power/aidl/default/Android.bp
@@ -26,7 +26,7 @@
defaults: ["android.hardware.power-ndk_shared"],
relative_install_path: "hw",
init_rc: [":android.hardware.power.rc"],
- vintf_fragments: [":android.hardware.power.xml"],
+ vintf_fragments: ["power-default.xml"],
vendor: true,
shared_libs: [
"android.hardware.common-V2-ndk",
diff --git a/power/stats/aidl/default/Android.bp b/power/stats/aidl/default/Android.bp
index cc0fbf6..4c59d98 100644
--- a/power/stats/aidl/default/Android.bp
+++ b/power/stats/aidl/default/Android.bp
@@ -25,7 +25,7 @@
name: "android.hardware.power.stats-service.example",
relative_install_path: "hw",
init_rc: [":android.hardware.power.stats.rc"],
- vintf_fragments: [":android.hardware.power.stats.xml"],
+ vintf_fragments: ["power.stats-default.xml"],
vendor: true,
shared_libs: [
"libbase",
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 2c0e70a..4ff5c2c 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.1/vts/functional/Android.bp b/radio/1.1/vts/functional/Android.bp
index b3def8e..dc50cfb 100644
--- a/radio/1.1/vts/functional/Android.bp
+++ b/radio/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.2/vts/functional/Android.bp b/radio/1.2/vts/functional/Android.bp
index a62000f..6bc0594 100644
--- a/radio/1.2/vts/functional/Android.bp
+++ b/radio/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.3/vts/functional/Android.bp b/radio/1.3/vts/functional/Android.bp
index d96d391..9a0996b 100644
--- a/radio/1.3/vts/functional/Android.bp
+++ b/radio/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.4/vts/functional/Android.bp b/radio/1.4/vts/functional/Android.bp
index 167dec8..de2ed2c 100644
--- a/radio/1.4/vts/functional/Android.bp
+++ b/radio/1.4/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.5/vts/functional/Android.bp b/radio/1.5/vts/functional/Android.bp
index 4549d3c..83a2568 100644
--- a/radio/1.5/vts/functional/Android.bp
+++ b/radio/1.5/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/1.6/vts/functional/Android.bp b/radio/1.6/vts/functional/Android.bp
index 2bc6af3..b78330e 100644
--- a/radio/1.6/vts/functional/Android.bp
+++ b/radio/1.6/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_telephony",
// 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/radio/aidl/android/hardware/radio/data/ApnTypes.aidl b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
index f44c636..2a0c263 100644
--- a/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
+++ b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
@@ -90,5 +90,17 @@
/**
* APN type for RCS (Rich Communication Services)
*/
- RCS = 1 << 15
+ RCS = 1 << 15,
+
+ /**
+ * APN type for OEM_PAID networks (Automotive PANS)
+ */
+ // TODO(b/366194627): enable once HAL unfreezes
+ // OEM_PAID = 1 << 16,
+
+ /**
+ * APN type for OEM_PRIVATE networks (Automotive PANS)
+ */
+ // TODO(b/366194627): enable once HAL unfreezes
+ // OEM_PRIVATE = 1 << 17,
}
diff --git a/rebootescrow/aidl/Android.bp b/rebootescrow/aidl/Android.bp
index 39aaa07..3d5b827 100644
--- a/rebootescrow/aidl/Android.bp
+++ b/rebootescrow/aidl/Android.bp
@@ -10,6 +10,7 @@
aidl_interface {
name: "android.hardware.rebootescrow",
vendor_available: true,
+ frozen: true,
srcs: [
"android/hardware/rebootescrow/IRebootEscrow.aidl",
],
diff --git a/rebootescrow/aidl/vts/functional/Android.bp b/rebootescrow/aidl/vts/functional/Android.bp
index 76b6784..ba15cca 100644
--- a/rebootescrow/aidl/vts/functional/Android.bp
+++ b/rebootescrow/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_platform_security",
// 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/secure_element/1.0/vts/functional/Android.bp b/secure_element/1.0/vts/functional/Android.bp
index 735d7c9..25ce050 100644
--- a/secure_element/1.0/vts/functional/Android.bp
+++ b/secure_element/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_pixel_connectivity_nfc",
// 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/secure_element/1.1/vts/functional/Android.bp b/secure_element/1.1/vts/functional/Android.bp
index d63e7c4..ad7f97c 100644
--- a/secure_element/1.1/vts/functional/Android.bp
+++ b/secure_element/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_pixel_connectivity_nfc",
// 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/secure_element/1.2/vts/functional/Android.bp b/secure_element/1.2/vts/functional/Android.bp
index 63a0a19..5a01851 100644
--- a/secure_element/1.2/vts/functional/Android.bp
+++ b/secure_element/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_pixel_connectivity_nfc",
// 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/secure_element/aidl/Android.bp b/secure_element/aidl/Android.bp
index 655487d..1145305 100644
--- a/secure_element/aidl/Android.bp
+++ b/secure_element/aidl/Android.bp
@@ -1,4 +1,5 @@
package {
+ default_team: "trendy_team_pixel_connectivity_nfc",
// 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/security/authgraph/aidl/vts/functional/Android.bp b/security/authgraph/aidl/vts/functional/Android.bp
index 28a70e2..e40525c 100644
--- a/security/authgraph/aidl/vts/functional/Android.bp
+++ b/security/authgraph/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/security/keymint/aidl/vts/functional/Android.bp b/security/keymint/aidl/vts/functional/Android.bp
index 7a135e1..1414220 100644
--- a/security/keymint/aidl/vts/functional/Android.bp
+++ b/security/keymint/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/security/keymint/support/Android.bp b/security/keymint/support/Android.bp
index 608d328..c6e35ab 100644
--- a/security/keymint/support/Android.bp
+++ b/security/keymint/support/Android.bp
@@ -55,6 +55,35 @@
}
cc_library {
+ name: "libkeymint_support_V3",
+ vendor_available: true,
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+ srcs: [
+ "attestation_record.cpp",
+ "authorization_set.cpp",
+ "keymint_utils.cpp",
+ "key_param_output.cpp",
+ ],
+ export_include_dirs: [
+ "include",
+ ],
+ header_libs: [
+ "libhardware_headers",
+ ],
+ shared_libs: [
+ "android.hardware.security.keymint-V3-ndk",
+ "libbase",
+ "libcrypto",
+ "libutils",
+ "libhardware",
+ ],
+}
+
+cc_library {
name: "libkeymint_remote_prov_support",
vendor_available: true,
srcs: [
diff --git a/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp b/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
index 6bd986c..9b74fbb 100644
--- a/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
+++ b/security/keymint/support/fuzzer/keymint_remote_prov_fuzzer.cpp
@@ -79,9 +79,13 @@
while (mFdp.remaining_bytes()) {
auto invokeProvAPI = mFdp.PickValueInArray<const std::function<void()>>({
- [&]() { verifyFactoryCsr(cborKeysToSign, csr, gRPC.get(), challenge); },
- [&]() { verifyProductionCsr(cborKeysToSign, csr, gRPC.get(), challenge); },
- [&]() { isCsrWithProperDiceChain(csr); },
+ [&]() {
+ verifyFactoryCsr(cborKeysToSign, csr, gRPC.get(), kServiceName, challenge);
+ },
+ [&]() {
+ verifyProductionCsr(cborKeysToSign, csr, gRPC.get(), kServiceName, challenge);
+ },
+ [&]() { isCsrWithProperDiceChain(csr, kServiceName); },
});
invokeProvAPI();
}
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 141f243..b56c90a 100644
--- a/security/keymint/support/include/remote_prov/remote_prov_utils.h
+++ b/security/keymint/support/include/remote_prov/remote_prov_utils.h
@@ -89,6 +89,11 @@
*/
bytevec randomBytes(size_t numBytes);
+const std::string DEFAULT_INSTANCE_NAME =
+ "android.hardware.security.keymint.IRemotelyProvisionedComponent/default";
+const std::string RKPVM_INSTANCE_NAME =
+ "android.hardware.security.keymint.IRemotelyProvisionedComponent/avf";
+
struct EekChain {
bytevec chain;
bytevec last_pubkey;
@@ -160,7 +165,8 @@
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::vector<uint8_t>& challenge);
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge);
/**
* Verify the protected data as if the device is a final production sample.
*/
@@ -168,8 +174,8 @@
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::vector<uint8_t>& challenge,
- bool allowAnyMode = false);
+ IRemotelyProvisionedComponent* provisionable, 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
@@ -177,22 +183,24 @@
*/
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge,
- bool allowDegenerate = true);
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge, bool allowDegenerate = true);
/**
* 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::vector<uint8_t>& challenge,
- bool allowAnyMode = false);
+ IRemotelyProvisionedComponent* provisionable, 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);
+ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr,
+ const std::string& instanceName);
/** Verify the DICE chain. */
ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
hwtrust::DiceChain::Kind kind, bool allowAnyMode,
- bool allowDegenerate);
+ bool allowDegenerate,
+ const std::string& instanceName);
} // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index a679340..497f478 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -52,6 +52,14 @@
using X509_Ptr = bssl::UniquePtr<X509>;
using CRYPTO_BUFFER_Ptr = bssl::UniquePtr<CRYPTO_BUFFER>;
+std::string device_suffix(const std::string& name) {
+ size_t pos = name.find('/');
+ if (pos == std::string::npos) {
+ return name;
+ }
+ return name.substr(pos + 1);
+}
+
ErrMsgOr<bytevec> ecKeyGetPrivateKey(const EC_KEY* ecKey) {
// Extract private key.
const BIGNUM* bignum = EC_KEY_get0_private_key(ecKey);
@@ -325,7 +333,8 @@
ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
hwtrust::DiceChain::Kind kind, bool allowAnyMode,
- bool allowDegenerate) {
+ bool allowDegenerate,
+ const std::string& instanceName) {
auto encodedBcc = bcc->encode();
// Use ro.build.type instead of ro.debuggable because ro.debuggable=1 for VTS testing
@@ -334,7 +343,8 @@
allowAnyMode = true;
}
- auto chain = hwtrust::DiceChain::Verify(encodedBcc, kind, allowAnyMode);
+ auto chain =
+ hwtrust::DiceChain::Verify(encodedBcc, kind, allowAnyMode, device_suffix(instanceName));
if (!chain.ok()) return chain.error().message();
if (!allowDegenerate && !chain->IsProper()) {
@@ -649,8 +659,8 @@
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::vector<uint8_t>& challenge,
- bool isFactory, bool allowAnyMode = false) {
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge, bool isFactory, bool allowAnyMode = false) {
auto [parsedProtectedData, _, protDataErrMsg] = cppbor::parse(protectedData.protectedData);
if (!parsedProtectedData) {
return protDataErrMsg;
@@ -707,7 +717,7 @@
// BCC is [ pubkey, + BccEntry]
auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr13, allowAnyMode,
- /*allowDegenerate=*/true);
+ /*allowDegenerate=*/true, instanceName);
if (!bccContents) {
return bccContents.message() + "\n" + prettyPrint(bcc.get());
}
@@ -750,9 +760,10 @@
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::vector<uint8_t>& challenge) {
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge) {
return verifyProtectedData(deviceInfo, keysToSign, keysToSignMac, protectedData, eekChain,
- eekId, supportedEekCurve, provisionable, challenge,
+ eekId, supportedEekCurve, provisionable, instanceName, challenge,
/*isFactory=*/true);
}
@@ -760,10 +771,10 @@
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::vector<uint8_t>& challenge,
- bool allowAnyMode) {
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge, bool allowAnyMode) {
return verifyProtectedData(deviceInfo, keysToSign, keysToSignMac, protectedData, eekChain,
- eekId, supportedEekCurve, provisionable, challenge,
+ eekId, supportedEekCurve, provisionable, instanceName, challenge,
/*isFactory=*/false, allowAnyMode);
}
@@ -1003,6 +1014,7 @@
ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequest(const std::vector<uint8_t>& request,
const std::vector<uint8_t>& challenge,
+ const std::string& instanceName,
bool allowAnyMode = false,
bool allowDegenerate = true) {
auto [parsedRequest, _, csrErrMsg] = cppbor::parse(request);
@@ -1042,7 +1054,8 @@
return diceChainKind.message();
}
- auto diceContents = validateBcc(diceCertChain, *diceChainKind, allowAnyMode, allowDegenerate);
+ auto diceContents =
+ validateBcc(diceCertChain, *diceChainKind, allowAnyMode, allowDegenerate, instanceName);
if (!diceContents) {
return diceContents.message() + "\n" + prettyPrint(diceCertChain);
}
@@ -1071,6 +1084,7 @@
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyCsr(const cppbor::Array& keysToSign,
const std::vector<uint8_t>& csr,
IRemotelyProvisionedComponent* provisionable,
+ const std::string& instanceName,
const std::vector<uint8_t>& challenge,
bool isFactory, bool allowAnyMode = false,
bool allowDegenerate = true) {
@@ -1081,8 +1095,8 @@
") does not match expected version (3).";
}
- auto csrPayload =
- parseAndValidateAuthenticatedRequest(csr, challenge, allowAnyMode, allowDegenerate);
+ auto csrPayload = parseAndValidateAuthenticatedRequest(csr, challenge, instanceName,
+ allowAnyMode, allowDegenerate);
if (!csrPayload) {
return csrPayload.message();
}
@@ -1092,20 +1106,22 @@
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyFactoryCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge,
- bool allowDegenerate) {
- return verifyCsr(keysToSign, csr, provisionable, challenge, /*isFactory=*/true,
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge, bool allowDegenerate) {
+ return verifyCsr(keysToSign, csr, provisionable, instanceName, challenge, /*isFactory=*/true,
/*allowAnyMode=*/false, allowDegenerate);
}
ErrMsgOr<std::unique_ptr<cppbor::Array>> verifyProductionCsr(
const cppbor::Array& keysToSign, const std::vector<uint8_t>& csr,
- IRemotelyProvisionedComponent* provisionable, const std::vector<uint8_t>& challenge,
- bool allowAnyMode) {
- return verifyCsr(keysToSign, csr, provisionable, challenge, /*isFactory=*/false, allowAnyMode);
+ IRemotelyProvisionedComponent* provisionable, const std::string& instanceName,
+ const std::vector<uint8_t>& challenge, bool allowAnyMode) {
+ return verifyCsr(keysToSign, csr, provisionable, instanceName, challenge, /*isFactory=*/false,
+ allowAnyMode);
}
-ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr) {
+ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr,
+ const std::string& instanceName) {
auto [parsedRequest, _, csrErrMsg] = cppbor::parse(csr);
if (!parsedRequest) {
return csrErrMsg;
@@ -1136,8 +1152,8 @@
}
auto encodedDiceChain = diceCertChain->encode();
- auto chain =
- hwtrust::DiceChain::Verify(encodedDiceChain, *diceChainKind, /*allowAnyMode=*/false);
+ auto chain = hwtrust::DiceChain::Verify(encodedDiceChain, *diceChainKind,
+ /*allowAnyMode=*/false, device_suffix(instanceName));
if (!chain.ok()) return chain.error().message();
return chain->IsProper();
}
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 82121cb..8b18b29 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -298,9 +298,11 @@
ASSERT_TRUE(bcc) << "Error: " << errMsg;
EXPECT_TRUE(validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr16,
- /*allowAnyMode=*/false, /*allowDegenerate=*/true));
+ /*allowAnyMode=*/false, /*allowDegenerate=*/true,
+ DEFAULT_INSTANCE_NAME));
EXPECT_FALSE(validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr16,
- /*allowAnyMode=*/false, /*allowDegenerate=*/false));
+ /*allowAnyMode=*/false, /*allowDegenerate=*/false,
+ DEFAULT_INSTANCE_NAME));
}
} // namespace
} // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/security/rkp/README.md b/security/rkp/README.md
index 67cf72e..43a00fb 100644
--- a/security/rkp/README.md
+++ b/security/rkp/README.md
@@ -31,12 +31,13 @@
1. (Preferred, recommended) The device OEM extracts the UDS\_pub from each
device they manufacture and uploads the public keys to a backend server.
-1. The device OEM signs the UDS\_pub and stores the certificates on the device
- rather than uploading a UDS\_pub for every device immediately. However,
- there are many disadvantages and costs associated with this option as the
- OEM will need to pass a security audit of their factory's physical security,
- CA and HSM configuration, and incident response processes before the OEM's
- public key is registered with the provisioning server.
+1. The device OEM certifies the UDS\_pub using an x.509 certificate chain
+ then stores the chain on the device rather than uploading a UDS\_pub for
+ every device immediately. However, there are many disadvantages and costs
+ associated with this option as the OEM will need to pass a security audit
+ of their factory's physical security, CA and HSM configuration, and
+ incident response processes before the OEM's public key is registered with
+ the provisioning server.
Note that in the full elaboration of this plan, UDS\_pub is not the key used to
sign certificate requests. Instead, UDS\_pub is just the first public key in a
@@ -124,6 +125,53 @@
choice for algorithm implies the implementor should also choose the P256 public
key group further down in the COSE structure.
+## UDS certificates
+
+As noted in the section [General approach](#general-approach), the UDS\_pub may
+be authenticated by an OEM using an x.509 certificate chain. Additionally,
+[RKP Phase 3](#phases) depends on the chip vendor signing the UDS\_pub and
+issuing an x.509 certificate chain. This section describes the requirements for
+both the signing keys and the resulting certificate chain.
+
+### X.509 Certificates
+
+X.509v3 public key certificates are the only supported mechanism for
+authenticating a UDS\_pub. Certificates must be formatted according to
+[RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280), and certificate
+chains must satisfy the certificate path validation described in the RFC. RFC
+5280 covers most requirements for the chain, but this specification has some
+additional requirements that must be met for the certificates:
+
+* [`BasicConstraints`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.9)
+ * All CA certificates must include this as a critical extension.
+ * `pathLenConstraint` must be set correctly in each CA certificate to
+ limit the maximum chain length.
+ * `cA` must be set to true for all certificates except the leaf
+ certificate.
+ * `BasicConstraints` must be absent for the leaf/UDS certificate.
+ * Consider the chain `root -> intermediate -> UDS_pub`. In such a chain,
+ `BasicConstraints` must be:
+ * `{ cA: TRUE, pathLenConstraint: 1}` for the root certificate
+ * `{ cA: TRUE, pathLenConstraint: 0}` for the intermediate certificate
+ * Absent for the UDS certificate
+* [`KeyUsage`](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3)
+ * All certificates in a UDS certificate chain must include this as a
+ critical extension.
+ * CA certificates must set `KeyUsage` to only `keyCertSign`.
+ * The UDS certificate must set `KeyUsage` to only `digitalSignature`.
+
+### Supported Algorithms
+
+UDS certificates must be signed using one of the following allowed algorithms:
+
+* `ecdsa-with-SHA256`
+ ([RFC 5758](https://www.rfc-editor.org/rfc/rfc5758#section-3.2))
+ * Note: this algorithm is only usable with ECDSA P-256 keys
+* `ecdsa-with-SHA384`
+ ([RFC 5758](https://www.rfc-editor.org/rfc/rfc5758#section-3.2))
+ * Note: this algorithm is only usable with ECDSA P-384 keys
+* `id-Ed25519` ([RFC 8410](https://www.rfc-editor.org/rfc/rfc8410#section-3))
+
## Design
### Certificate provisioning flow
diff --git a/security/rkp/aidl/android/hardware/security/keymint/generateCertificateRequestV2.cddl b/security/rkp/aidl/android/hardware/security/keymint/generateCertificateRequestV2.cddl
index 7a02ff5..c519086 100644
--- a/security/rkp/aidl/android/hardware/security/keymint/generateCertificateRequestV2.cddl
+++ b/security/rkp/aidl/android/hardware/security/keymint/generateCertificateRequestV2.cddl
@@ -52,7 +52,8 @@
; example, this could be provided by the hardware vendor, who certifies all of their chips.
; The SignerName is a free-form string describing who generated the signature. The root
; certificate will need to be communicated to the verifier out of band, along with the
-; SignerName that is expected for the given root certificate.
+; SignerName that is expected for the given root certificate. UDS certificate
+; requirements are defined in https://android.googlesource.com/platform/hardware/interfaces/+/main/security/rkp/README.md#uds-certificates.
UdsCerts = {
* SignerName => UdsCertChain
}
diff --git a/security/rkp/aidl/vts/functional/Android.bp b/security/rkp/aidl/vts/functional/Android.bp
index 2cce8db..3bc8c9e 100644
--- a/security/rkp/aidl/vts/functional/Android.bp
+++ b/security/rkp/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// See: http://go/android-license-faq
default_applicable_licenses: ["hardware_interfaces_license"],
}
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index f68ff91..8f918af 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -55,10 +55,7 @@
constexpr uint8_t MIN_CHALLENGE_SIZE = 0;
constexpr uint8_t MAX_CHALLENGE_SIZE = 64;
-const string DEFAULT_INSTANCE_NAME =
- "android.hardware.security.keymint.IRemotelyProvisionedComponent/default";
-const string RKP_VM_INSTANCE_NAME =
- "android.hardware.security.keymint.IRemotelyProvisionedComponent/avf";
+
const string KEYMINT_STRONGBOX_INSTANCE_NAME =
"android.hardware.security.keymint.IKeyMintDevice/strongbox";
@@ -188,7 +185,7 @@
}
ASSERT_NE(provisionable_, nullptr);
auto status = provisionable_->getHardwareInfo(&rpcHardwareInfo);
- isRkpVmInstance_ = GetParam() == RKP_VM_INSTANCE_NAME;
+ isRkpVmInstance_ = GetParam() == RKPVM_INSTANCE_NAME;
if (isRkpVmInstance_) {
if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "The RKP VM is not supported on this system.";
@@ -227,7 +224,7 @@
RpcHardwareInfo hwInfo;
auto status = rpc->getHardwareInfo(&hwInfo);
- if (hal == RKP_VM_INSTANCE_NAME && status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+ if (hal == RKPVM_INSTANCE_NAME && status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "The RKP VM is not supported on this system.";
}
ASSERT_TRUE(status.isOk());
@@ -268,7 +265,7 @@
auto status = rpc->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
EXPECT_TRUE(status.isOk()) << status.getDescription();
- auto result = isCsrWithProperDiceChain(csr);
+ auto result = isCsrWithProperDiceChain(csr, DEFAULT_INSTANCE_NAME);
ASSERT_TRUE(result) << result.message();
ASSERT_TRUE(*result);
}
@@ -494,7 +491,7 @@
auto result = verifyProductionProtectedData(
deviceInfo, cppbor::Array(), keysToSignMac, protectedData, testEekChain_, eekId_,
- rpcHardwareInfo.supportedEekCurve, provisionable_.get(), challenge_);
+ rpcHardwareInfo.supportedEekCurve, provisionable_.get(), GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -517,9 +514,10 @@
&protectedData, &keysToSignMac);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto firstBcc = verifyProductionProtectedData(
- deviceInfo, /*keysToSign=*/cppbor::Array(), keysToSignMac, protectedData, testEekChain_,
- eekId_, rpcHardwareInfo.supportedEekCurve, provisionable_.get(), challenge_);
+ auto firstBcc = verifyProductionProtectedData(deviceInfo, /*keysToSign=*/cppbor::Array(),
+ keysToSignMac, protectedData, testEekChain_,
+ eekId_, rpcHardwareInfo.supportedEekCurve,
+ provisionable_.get(), GetParam(), challenge_);
ASSERT_TRUE(firstBcc) << firstBcc.message();
status = provisionable_->generateCertificateRequest(
@@ -527,9 +525,10 @@
&protectedData, &keysToSignMac);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto secondBcc = verifyProductionProtectedData(
- deviceInfo, /*keysToSign=*/cppbor::Array(), keysToSignMac, protectedData, testEekChain_,
- eekId_, rpcHardwareInfo.supportedEekCurve, provisionable_.get(), challenge_);
+ auto secondBcc = verifyProductionProtectedData(deviceInfo, /*keysToSign=*/cppbor::Array(),
+ keysToSignMac, protectedData, testEekChain_,
+ eekId_, rpcHardwareInfo.supportedEekCurve,
+ provisionable_.get(), GetParam(), challenge_);
ASSERT_TRUE(secondBcc) << secondBcc.message();
// Verify that none of the keys in the first BCC are repeated in the second one.
@@ -579,7 +578,7 @@
auto result = verifyProductionProtectedData(
deviceInfo, cborKeysToSign_, keysToSignMac, protectedData, testEekChain_, eekId_,
- rpcHardwareInfo.supportedEekCurve, provisionable_.get(), challenge_);
+ rpcHardwareInfo.supportedEekCurve, provisionable_.get(), GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -767,8 +766,8 @@
provisionable_->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), challenge,
- isRkpVmInstance_);
+ auto result = verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), GetParam(),
+ challenge, isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -789,8 +788,8 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), challenge,
- isRkpVmInstance_);
+ auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ challenge, isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
}
@@ -820,15 +819,15 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge_, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto firstCsr = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), challenge_,
- isRkpVmInstance_);
+ auto firstCsr = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), 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(), challenge_,
- isRkpVmInstance_);
+ auto secondCsr = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ challenge_, isRkpVmInstance_);
ASSERT_TRUE(secondCsr) << secondCsr.message();
ASSERT_EQ(**firstCsr, **secondCsr);
@@ -846,8 +845,8 @@
auto status = provisionable_->generateCertificateRequestV2(keysToSign_, challenge_, &csr);
ASSERT_TRUE(status.isOk()) << status.getDescription();
- auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), challenge_,
- isRkpVmInstance_);
+ auto result = verifyProductionCsr(cborKeysToSign_, csr, provisionable_.get(), GetParam(),
+ challenge_, isRkpVmInstance_);
ASSERT_TRUE(result) << result.message();
}
@@ -977,7 +976,8 @@
provisionable_->generateCertificateRequestV2({} /* keysToSign */, challenge_, &csr);
ASSERT_TRUE(irpcStatus.isOk()) << irpcStatus.getDescription();
- auto result = verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), challenge_);
+ auto result =
+ verifyProductionCsr(cppbor::Array(), csr, provisionable_.get(), GetParam(), challenge_);
ASSERT_TRUE(result) << result.message();
std::unique_ptr<cppbor::Array> csrPayload = std::move(*result);
diff --git a/security/secureclock/aidl/Android.bp b/security/secureclock/aidl/Android.bp
index 853ad89..d7e7b43 100644
--- a/security/secureclock/aidl/Android.bp
+++ b/security/secureclock/aidl/Android.bp
@@ -10,6 +10,7 @@
aidl_interface {
name: "android.hardware.security.secureclock",
vendor_available: true,
+ frozen: true,
srcs: [
"android/hardware/security/secureclock/*.aidl",
],
diff --git a/security/secureclock/aidl/vts/functional/Android.bp b/security/secureclock/aidl/vts/functional/Android.bp
index a34668b..4e54561 100644
--- a/security/secureclock/aidl/vts/functional/Android.bp
+++ b/security/secureclock/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/security/sharedsecret/aidl/Android.bp b/security/sharedsecret/aidl/Android.bp
index fe77c10..adf33d3 100644
--- a/security/sharedsecret/aidl/Android.bp
+++ b/security/sharedsecret/aidl/Android.bp
@@ -10,6 +10,7 @@
aidl_interface {
name: "android.hardware.security.sharedsecret",
vendor_available: true,
+ frozen: true,
srcs: [
"android/hardware/security/sharedsecret/*.aidl",
],
diff --git a/security/sharedsecret/aidl/vts/functional/Android.bp b/security/sharedsecret/aidl/vts/functional/Android.bp
index 1f0f6a6..eedd325 100644
--- a/security/sharedsecret/aidl/vts/functional/Android.bp
+++ b/security/sharedsecret/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_hardware_backed_security",
// 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/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
index 403fa9b..dde1aa1 100644
--- a/soundtrigger/2.0/vts/functional/Android.bp
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_audio_framework",
// 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/soundtrigger/2.1/vts/functional/Android.bp b/soundtrigger/2.1/vts/functional/Android.bp
index b013350..3e475e6 100644
--- a/soundtrigger/2.1/vts/functional/Android.bp
+++ b/soundtrigger/2.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_audio_framework",
// 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/soundtrigger/2.2/vts/functional/Android.bp b/soundtrigger/2.2/vts/functional/Android.bp
index faf6d58..3502545 100644
--- a/soundtrigger/2.2/vts/functional/Android.bp
+++ b/soundtrigger/2.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_audio_framework",
// 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/soundtrigger/2.3/vts/functional/Android.bp b/soundtrigger/2.3/vts/functional/Android.bp
index e613db5..23cbe85 100644
--- a/soundtrigger/2.3/vts/functional/Android.bp
+++ b/soundtrigger/2.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_android_media_audio_framework",
// 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/tests/libhwbinder/aidl/android/tests/binder/IBenchmark.aidl b/tests/libhwbinder/aidl/android/tests/binder/IBenchmark.aidl
index be91fb9..bc44e95 100644
--- a/tests/libhwbinder/aidl/android/tests/binder/IBenchmark.aidl
+++ b/tests/libhwbinder/aidl/android/tests/binder/IBenchmark.aidl
@@ -1,5 +1,6 @@
package android.tests.binder;
interface IBenchmark {
- byte[] sendVec(in byte[] data);
-}
\ No newline at end of file
+ byte[] sendVec(in byte[] data);
+ IBinder[] sendBinderVec(in IBinder[] data);
+}
diff --git a/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.xml b/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.xml
index 0525876..b5eb843 100644
--- a/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.xml
+++ b/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.xml
@@ -13,11 +13,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<configuration description="Runs VtsHalThreadNetworkTargetTest.">
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
- <option name="run-command" value="cmd thread_network force-stop-ot-daemon enabled" />
+ <option name="run-command" value="if pm list features |grep 'android.hardware.thread_network'; then cmd thread_network force-stop-ot-daemon enabled; fi" />
<option name="run-command" value="cmd bluetooth_manager enable" />
- <option name="teardown-command" value="cmd thread_network force-stop-ot-daemon disabled" />
+ <option name="teardown-command" value="if pm list features |grep 'android.hardware.thread_network'; then cmd thread_network force-stop-ot-daemon disabled; fi" />
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
diff --git a/uwb/aidl/Android.bp b/uwb/aidl/Android.bp
index abd6a23..655d8a2 100755
--- a/uwb/aidl/Android.bp
+++ b/uwb/aidl/Android.bp
@@ -16,6 +16,7 @@
srcs: ["android/hardware/uwb/*.aidl"],
stability: "vintf",
host_supported: true,
+ frozen: true,
backend: {
java: {
sdk_version: "module_Tiramisu",
@@ -56,6 +57,7 @@
vendor_available: true,
srcs: ["android/hardware/uwb/fira_android/*.aidl"],
stability: "vintf",
+ frozen: false,
backend: {
java: {
sdk_version: "module_Tiramisu",
diff --git a/vibrator/1.0/vts/functional/Android.bp b/vibrator/1.0/vts/functional/Android.bp
index 83377e7..c62dc42 100644
--- a/vibrator/1.0/vts/functional/Android.bp
+++ b/vibrator/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_haptics_framework",
// 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/vibrator/1.1/vts/functional/Android.bp b/vibrator/1.1/vts/functional/Android.bp
index f97a343..c7dadc5 100644
--- a/vibrator/1.1/vts/functional/Android.bp
+++ b/vibrator/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_haptics_framework",
// 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/vibrator/1.2/vts/functional/Android.bp b/vibrator/1.2/vts/functional/Android.bp
index 40171ae..4d5de1f 100644
--- a/vibrator/1.2/vts/functional/Android.bp
+++ b/vibrator/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_haptics_framework",
// 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/vibrator/1.3/vts/functional/Android.bp b/vibrator/1.3/vts/functional/Android.bp
index 0fcbf07..3221fa2 100644
--- a/vibrator/1.3/vts/functional/Android.bp
+++ b/vibrator/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_haptics_framework",
// 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/vibrator/aidl/default/Android.bp b/vibrator/aidl/default/Android.bp
index 0f342db..596c1a6 100644
--- a/vibrator/aidl/default/Android.bp
+++ b/vibrator/aidl/default/Android.bp
@@ -44,7 +44,7 @@
name: "android.hardware.vibrator-service.example",
relative_install_path: "hw",
init_rc: ["vibrator-default.rc"],
- vintf_fragments: [":android.hardware.vibrator.xml"],
+ vintf_fragments: ["android.hardware.vibrator.xml"],
vendor: true,
shared_libs: [
"libbase",
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index ebfa164..e3c269d 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.1/vts/functional/Android.bp b/wifi/1.1/vts/functional/Android.bp
index a8f3470..123c8a3 100644
--- a/wifi/1.1/vts/functional/Android.bp
+++ b/wifi/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.2/vts/functional/Android.bp b/wifi/1.2/vts/functional/Android.bp
index f43892b..2b85d0c 100644
--- a/wifi/1.2/vts/functional/Android.bp
+++ b/wifi/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.3/vts/functional/Android.bp b/wifi/1.3/vts/functional/Android.bp
index 16f84ef..a171ba8 100644
--- a/wifi/1.3/vts/functional/Android.bp
+++ b/wifi/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.4/vts/functional/Android.bp b/wifi/1.4/vts/functional/Android.bp
index cac8c0b..a1be952 100644
--- a/wifi/1.4/vts/functional/Android.bp
+++ b/wifi/1.4/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.5/vts/functional/Android.bp b/wifi/1.5/vts/functional/Android.bp
index d906d06..9dba217 100644
--- a/wifi/1.5/vts/functional/Android.bp
+++ b/wifi/1.5/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/1.6/vts/functional/Android.bp b/wifi/1.6/vts/functional/Android.bp
index 92e6d13..188c67c 100644
--- a/wifi/1.6/vts/functional/Android.bp
+++ b/wifi/1.6/vts/functional/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_wifi_hal",
// 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/wifi/netlinkinterceptor/aidl/Android.bp b/wifi/netlinkinterceptor/aidl/Android.bp
index 8c04e31..bc02125 100644
--- a/wifi/netlinkinterceptor/aidl/Android.bp
+++ b/wifi/netlinkinterceptor/aidl/Android.bp
@@ -29,6 +29,7 @@
vendor_available: true,
srcs: ["android/hardware/net/nlinterceptor/*.aidl"],
stability: "vintf",
+ frozen: true,
backend: {
java: {
enabled: false,