audio: Set connectedProfiles for non-attached device ports. am: f7492518c7 am: 6788dcd1f8 am: abcc5cd2c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2794108
Change-Id: Ia00d4ea2e89d6fcb2ab4436d0daca57957ce673c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 2116e21..de7aa35 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -10,3 +10,4 @@
aosp_hook_confirmationui = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} confirmationui
aosp_hook_gatekeeper = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} gatekeeper
aosp_hook_keymaster = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} keymaster
+generate_vehicle_property_enums = ${REPO_ROOT}/hardware/interfaces/automotive/vehicle/tools/generate_annotation_enums.py --android_build_top ${REPO_ROOT} --preupload_files ${PREUPLOAD_FILES} --check_only
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 9aa86b5..112d3e2 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -52,11 +52,20 @@
"SoundDose.cpp",
],
shared_libs: [
+ "libaudio_aidl_conversion_common_ndk",
+ "libaudioutils",
"libbase",
"libbinder_ndk",
"libcutils",
"libutils",
],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wthread-safety",
+ "-DBACKEND_NDK",
+ ],
visibility: [
"//hardware/interfaces/audio/aidl/sounddose/default",
],
@@ -118,8 +127,12 @@
shared_libs: [
"android.hardware.bluetooth.audio-V3-ndk",
"libaudio_aidl_conversion_common_ndk",
+ "libaudioutils",
+ "libaudioutils_nonvndk",
"libbluetooth_audio_session_aidl",
+ "liblog",
"libmedia_helper",
+ "libmediautils_vendor",
"libstagefright_foundation",
],
export_shared_lib_headers: [
@@ -150,8 +163,10 @@
],
shared_libs: [
"android.hardware.bluetooth.audio-V3-ndk",
+ "libaudioutils_nonvndk",
"libaudio_aidl_conversion_common_ndk",
"libbluetooth_audio_session_aidl",
+ "liblog",
"libmedia_helper",
"libstagefright_foundation",
],
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 1045009..1ec171a 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -235,6 +235,11 @@
StreamContext::DebugParameters params{mDebug.streamTransientStateDelayMs,
mVendorDebug.forceTransientBurst,
mVendorDebug.forceSynchronousDrain};
+ std::shared_ptr<ISoundDose> soundDose;
+ if (!getSoundDose(&soundDose).isOk()) {
+ LOG(ERROR) << __func__ << ": could not create sound dose instance";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
StreamContext temp(
std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
@@ -242,7 +247,7 @@
portConfigIt->channelMask.value(), portConfigIt->sampleRate.value().value, flags,
portConfigIt->ext.get<AudioPortExt::mix>().handle,
std::make_unique<StreamContext::DataMQ>(frameSize * in_bufferSizeFrames),
- asyncCallback, outEventCallback, params);
+ asyncCallback, outEventCallback, mSoundDose.getInstance(), params);
if (temp.isValid()) {
*out_context = std::move(temp);
} else {
diff --git a/audio/aidl/default/SoundDose.cpp b/audio/aidl/default/SoundDose.cpp
index f12ce5d..1c9e081 100644
--- a/audio/aidl/default/SoundDose.cpp
+++ b/audio/aidl/default/SoundDose.cpp
@@ -18,7 +18,15 @@
#include "core-impl/SoundDose.h"
+#include <aidl/android/hardware/audio/core/sounddose/ISoundDose.h>
#include <android-base/logging.h>
+#include <media/AidlConversionCppNdk.h>
+#include <utils/Timers.h>
+
+using aidl::android::hardware::audio::core::sounddose::ISoundDose;
+using aidl::android::media::audio::common::AudioDevice;
+using aidl::android::media::audio::common::AudioDeviceDescription;
+using aidl::android::media::audio::common::AudioFormatDescription;
namespace aidl::android::hardware::audio::core::sounddose {
@@ -28,11 +36,16 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
+ ::android::audio_utils::lock_guard l(mMutex);
mRs2Value = in_rs2ValueDbA;
+ if (mMelProcessor != nullptr) {
+ mMelProcessor->setOutputRs2UpperBound(in_rs2ValueDbA);
+ }
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus SoundDose::getOutputRs2UpperBound(float* _aidl_return) {
+ ::android::audio_utils::lock_guard l(mMutex);
*_aidl_return = mRs2Value;
LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
return ndk::ScopedAStatus::ok();
@@ -44,6 +57,8 @@
LOG(ERROR) << __func__ << ": Callback is nullptr";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
+
+ ::android::audio_utils::lock_guard l(mCbMutex);
if (mCallback != nullptr) {
LOG(ERROR) << __func__ << ": Sound dose callback was already registered";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
@@ -51,7 +66,81 @@
mCallback = in_callback;
LOG(DEBUG) << __func__ << ": Registered sound dose callback ";
+
return ndk::ScopedAStatus::ok();
}
+void SoundDose::setAudioDevice(const AudioDevice& audioDevice) {
+ ::android::audio_utils::lock_guard l(mCbMutex);
+ mAudioDevice = audioDevice;
+}
+
+void SoundDose::startDataProcessor(uint32_t sampleRate, uint32_t channelCount,
+ const AudioFormatDescription& aidlFormat) {
+ ::android::audio_utils::lock_guard l(mMutex);
+ const auto result = aidl2legacy_AudioFormatDescription_audio_format_t(aidlFormat);
+ const audio_format_t format = result.value_or(AUDIO_FORMAT_INVALID);
+
+ if (mMelProcessor == nullptr) {
+ // we don't have the deviceId concept on the vendor side so just pass 0
+ mMelProcessor = ::android::sp<::android::audio_utils::MelProcessor>::make(
+ sampleRate, channelCount, format, mMelCallback, /*deviceId=*/0, mRs2Value);
+ } else {
+ mMelProcessor->updateAudioFormat(sampleRate, channelCount, format);
+ }
+}
+
+void SoundDose::process(const void* buffer, size_t bytes) {
+ ::android::audio_utils::lock_guard l(mMutex);
+ if (mMelProcessor != nullptr) {
+ mMelProcessor->process(buffer, bytes);
+ }
+}
+
+void SoundDose::onNewMelValues(const std::vector<float>& mels, size_t offset, size_t length,
+ audio_port_handle_t deviceId __attribute__((__unused__))) const {
+ ::android::audio_utils::lock_guard l(mCbMutex);
+ if (!mAudioDevice.has_value()) {
+ LOG(WARNING) << __func__ << ": New mel values without a registered device";
+ return;
+ }
+ if (mCallback == nullptr) {
+ LOG(ERROR) << __func__ << ": New mel values without a registered callback";
+ return;
+ }
+
+ ISoundDose::IHalSoundDoseCallback::MelRecord melRecord;
+ melRecord.timestamp = nanoseconds_to_seconds(systemTime());
+ melRecord.melValues = std::vector<float>(mels.begin() + offset, mels.begin() + offset + length);
+
+ mCallback->onNewMelValues(melRecord, mAudioDevice.value());
+}
+
+void SoundDose::MelCallback::onNewMelValues(const std::vector<float>& mels, size_t offset,
+ size_t length,
+ audio_port_handle_t deviceId
+ __attribute__((__unused__))) const {
+ mSoundDose.onNewMelValues(mels, offset, length, deviceId);
+}
+
+void SoundDose::onMomentaryExposure(float currentMel, audio_port_handle_t deviceId
+ __attribute__((__unused__))) const {
+ ::android::audio_utils::lock_guard l(mCbMutex);
+ if (!mAudioDevice.has_value()) {
+ LOG(WARNING) << __func__ << ": Momentary exposure without a registered device";
+ return;
+ }
+ if (mCallback == nullptr) {
+ LOG(ERROR) << __func__ << ": Momentary exposure without a registered callback";
+ return;
+ }
+
+ mCallback->onMomentaryExposureWarning(currentMel, mAudioDevice.value());
+}
+
+void SoundDose::MelCallback::onMomentaryExposure(float currentMel, audio_port_handle_t deviceId
+ __attribute__((__unused__))) const {
+ mSoundDose.onMomentaryExposure(currentMel, deviceId);
+}
+
} // namespace aidl::android::hardware::audio::core::sounddose
diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index f7298c0..f00e358 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -90,6 +90,14 @@
return true;
}
+void StreamContext::startStreamDataProcessor() {
+ auto streamDataProcessor = mStreamDataProcessor.lock();
+ if (streamDataProcessor != nullptr) {
+ streamDataProcessor->startDataProcessor(mSampleRate, getChannelCount(mChannelLayout),
+ mFormat);
+ }
+}
+
void StreamContext::reset() {
mCommandMQ.reset();
mReplyMQ.reset();
@@ -593,6 +601,10 @@
fatal = true;
LOG(ERROR) << __func__ << ": write failed: " << status;
}
+ auto streamDataProcessor = mContext->getStreamDataProcessor().lock();
+ if (streamDataProcessor != nullptr) {
+ streamDataProcessor->process(mDataBuffer.get(), actualFrameCount * frameSize);
+ }
} else {
if (mContext->getAsyncCallback() == nullptr) {
usleep(3000); // Simulate blocking transfer delay.
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 718c07d..d92d54b 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -175,7 +175,7 @@
bool mMicMute = false;
bool mMasterMute = false;
float mMasterVolume = 1.0f;
- ChildInterface<sounddose::ISoundDose> mSoundDose;
+ ChildInterface<sounddose::SoundDose> mSoundDose;
std::optional<bool> mIsMmapSupported;
protected:
diff --git a/audio/aidl/default/include/core-impl/SoundDose.h b/audio/aidl/default/include/core-impl/SoundDose.h
index 2a069d9..82c1077 100644
--- a/audio/aidl/default/include/core-impl/SoundDose.h
+++ b/audio/aidl/default/include/core-impl/SoundDose.h
@@ -20,23 +20,68 @@
#include <aidl/android/hardware/audio/core/sounddose/BnSoundDose.h>
#include <aidl/android/media/audio/common/AudioDevice.h>
-
-using aidl::android::media::audio::common::AudioDevice;
+#include <aidl/android/media/audio/common/AudioFormatDescription.h>
+#include <audio_utils/MelProcessor.h>
+#include <audio_utils/mutex.h>
namespace aidl::android::hardware::audio::core::sounddose {
-class SoundDose : public BnSoundDose {
+// Interface used for processing the data received by a stream.
+class StreamDataProcessorInterface {
public:
- SoundDose() : mRs2Value(DEFAULT_MAX_RS2){};
+ virtual ~StreamDataProcessorInterface() = default;
+ virtual void startDataProcessor(
+ uint32_t samplerate, uint32_t channelCount,
+ const ::aidl::android::media::audio::common::AudioFormatDescription& format) = 0;
+ virtual void setAudioDevice(
+ const ::aidl::android::media::audio::common::AudioDevice& audioDevice) = 0;
+ virtual void process(const void* buffer, size_t size) = 0;
+};
+
+class SoundDose final : public BnSoundDose, public StreamDataProcessorInterface {
+ public:
+ SoundDose() : mMelCallback(::android::sp<MelCallback>::make(this)){};
+
+ // -------------------------------------- BnSoundDose ------------------------------------------
ndk::ScopedAStatus setOutputRs2UpperBound(float in_rs2ValueDbA) override;
ndk::ScopedAStatus getOutputRs2UpperBound(float* _aidl_return) override;
ndk::ScopedAStatus registerSoundDoseCallback(
const std::shared_ptr<ISoundDose::IHalSoundDoseCallback>& in_callback) override;
+ // ----------------------------- StreamDataProcessorInterface ----------------------------------
+ void setAudioDevice(
+ const ::aidl::android::media::audio::common::AudioDevice& audioDevice) override;
+ void startDataProcessor(
+ uint32_t samplerate, uint32_t channelCount,
+ const ::aidl::android::media::audio::common::AudioFormatDescription& format) override;
+ void process(const void* buffer, size_t size) override;
+
private:
- std::shared_ptr<ISoundDose::IHalSoundDoseCallback> mCallback;
- float mRs2Value;
+ class MelCallback : public ::android::audio_utils::MelProcessor::MelCallback {
+ public:
+ explicit MelCallback(SoundDose* soundDose) : mSoundDose(*soundDose) {}
+
+ // ------------------------------------ MelCallback ----------------------------------------
+ void onNewMelValues(const std::vector<float>& mels, size_t offset, size_t length,
+ audio_port_handle_t deviceId) const override;
+ void onMomentaryExposure(float currentMel, audio_port_handle_t deviceId) const override;
+
+ SoundDose& mSoundDose; // must outlive MelCallback, not owning
+ };
+
+ void onNewMelValues(const std::vector<float>& mels, size_t offset, size_t length,
+ audio_port_handle_t deviceId) const;
+ void onMomentaryExposure(float currentMel, audio_port_handle_t deviceId) const;
+
+ mutable ::android::audio_utils::mutex mCbMutex;
+ std::shared_ptr<ISoundDose::IHalSoundDoseCallback> mCallback GUARDED_BY(mCbMutex);
+ std::optional<::aidl::android::media::audio::common::AudioDevice> mAudioDevice
+ GUARDED_BY(mCbMutex);
+ mutable ::android::audio_utils::mutex mMutex;
+ float mRs2Value GUARDED_BY(mMutex) = DEFAULT_MAX_RS2;
+ ::android::sp<::android::audio_utils::MelProcessor> mMelProcessor GUARDED_BY(mMutex);
+ ::android::sp<MelCallback> mMelCallback GUARDED_BY(mMutex);
};
} // namespace aidl::android::hardware::audio::core::sounddose
diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index 88fddec..daa920d 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -44,6 +44,7 @@
#include <utils/Errors.h>
#include "core-impl/ChildInterface.h"
+#include "core-impl/SoundDose.h"
#include "core-impl/utils.h"
namespace aidl::android::hardware::audio::core {
@@ -87,6 +88,7 @@
int32_t mixPortHandle, std::unique_ptr<DataMQ> dataMQ,
std::shared_ptr<IStreamCallback> asyncCallback,
std::shared_ptr<IStreamOutEventCallback> outEventCallback,
+ std::weak_ptr<sounddose::StreamDataProcessorInterface> streamDataProcessor,
DebugParameters debugParameters)
: mCommandMQ(std::move(commandMQ)),
mInternalCommandCookie(std::rand()),
@@ -100,6 +102,7 @@
mDataMQ(std::move(dataMQ)),
mAsyncCallback(asyncCallback),
mOutEventCallback(outEventCallback),
+ mStreamDataProcessor(streamDataProcessor),
mDebugParameters(debugParameters) {}
StreamContext(StreamContext&& other)
: mCommandMQ(std::move(other.mCommandMQ)),
@@ -114,6 +117,7 @@
mDataMQ(std::move(other.mDataMQ)),
mAsyncCallback(std::move(other.mAsyncCallback)),
mOutEventCallback(std::move(other.mOutEventCallback)),
+ mStreamDataProcessor(std::move(other.mStreamDataProcessor)),
mDebugParameters(std::move(other.mDebugParameters)),
mFrameCount(other.mFrameCount) {}
StreamContext& operator=(StreamContext&& other) {
@@ -129,6 +133,7 @@
mDataMQ = std::move(other.mDataMQ);
mAsyncCallback = std::move(other.mAsyncCallback);
mOutEventCallback = std::move(other.mOutEventCallback);
+ mStreamDataProcessor = std::move(other.mStreamDataProcessor);
mDebugParameters = std::move(other.mDebugParameters);
mFrameCount = other.mFrameCount;
return *this;
@@ -154,6 +159,10 @@
std::shared_ptr<IStreamOutEventCallback> getOutEventCallback() const {
return mOutEventCallback;
}
+ std::weak_ptr<sounddose::StreamDataProcessorInterface> getStreamDataProcessor() const {
+ return mStreamDataProcessor;
+ }
+ void startStreamDataProcessor();
int getPortId() const { return mPortId; }
ReplyMQ* getReplyMQ() const { return mReplyMQ.get(); }
int getTransientStateDelayMs() const { return mDebugParameters.transientStateDelayMs; }
@@ -179,6 +188,7 @@
std::unique_ptr<DataMQ> mDataMQ;
std::shared_ptr<IStreamCallback> mAsyncCallback;
std::shared_ptr<IStreamOutEventCallback> mOutEventCallback; // Only used by output streams
+ std::weak_ptr<sounddose::StreamDataProcessorInterface> mStreamDataProcessor;
DebugParameters mDebugParameters;
long mFrameCount = 0;
};
diff --git a/audio/aidl/default/include/core-impl/StreamPrimary.h b/audio/aidl/default/include/core-impl/StreamPrimary.h
index b3ddd0b..b64b749 100644
--- a/audio/aidl/default/include/core-impl/StreamPrimary.h
+++ b/audio/aidl/default/include/core-impl/StreamPrimary.h
@@ -79,6 +79,10 @@
ndk::ScopedAStatus getHwVolume(std::vector<float>* _aidl_return) override;
ndk::ScopedAStatus setHwVolume(const std::vector<float>& in_channelVolumes) override;
+
+ ndk::ScopedAStatus setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices)
+ override;
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/primary/StreamPrimary.cpp b/audio/aidl/default/primary/StreamPrimary.cpp
index e01be8a..17de2ba 100644
--- a/audio/aidl/default/primary/StreamPrimary.cpp
+++ b/audio/aidl/default/primary/StreamPrimary.cpp
@@ -37,7 +37,9 @@
namespace aidl::android::hardware::audio::core {
StreamPrimary::StreamPrimary(StreamContext* context, const Metadata& metadata)
- : StreamAlsa(context, metadata, 3 /*readWriteRetries*/), mIsInput(isInput(metadata)) {}
+ : StreamAlsa(context, metadata, 3 /*readWriteRetries*/), mIsInput(isInput(metadata)) {
+ context->startStreamDataProcessor();
+}
std::vector<alsa::DeviceProfile> StreamPrimary::getDeviceProfiles() {
static const std::vector<alsa::DeviceProfile> kBuiltInSource{
@@ -183,4 +185,15 @@
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus StreamOutPrimary::setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
+ if (!devices.empty()) {
+ auto streamDataProcessor = mContextInstance.getStreamDataProcessor().lock();
+ if (streamDataProcessor != nullptr) {
+ streamDataProcessor->setAudioDevice(devices[0]);
+ }
+ }
+ return StreamSwitcher::setConnectedDevices(devices);
+}
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/effect/all-versions/default/Effect.cpp b/audio/effect/all-versions/default/Effect.cpp
index 5aecd32..4a9e144 100644
--- a/audio/effect/all-versions/default/Effect.cpp
+++ b/audio/effect/all-versions/default/Effect.cpp
@@ -315,7 +315,7 @@
Effect::~Effect() {
ATRACE_CALL();
- (void)close();
+ auto [_, handle] = closeImpl();
if (mProcessThread.get()) {
ATRACE_NAME("mProcessThread->join");
status_t status = mProcessThread->join();
@@ -328,11 +328,10 @@
mInBuffer.clear();
mOutBuffer.clear();
#if MAJOR_VERSION <= 5
- int status = EffectRelease(mHandle);
- ALOGW_IF(status, "Error releasing effect %p: %s", mHandle, strerror(-status));
+ int status = EffectRelease(handle);
+ ALOGW_IF(status, "Error releasing effect %p: %s", handle, strerror(-status));
#endif
- EffectMap::getInstance().remove(mHandle);
- mHandle = 0;
+ EffectMap::getInstance().remove(handle);
}
// static
@@ -459,7 +458,19 @@
}
}
-void Effect::getConfigImpl(int commandCode, const char* commandName, GetConfigCallback cb) {
+#define RETURN_IF_EFFECT_CLOSED() \
+ if (mHandle == kInvalidEffectHandle) { \
+ return Result::INVALID_STATE; \
+ }
+#define RETURN_RESULT_IF_EFFECT_CLOSED(result) \
+ if (mHandle == kInvalidEffectHandle) { \
+ _hidl_cb(Result::INVALID_STATE, result); \
+ return Void(); \
+ }
+
+Return<void> Effect::getConfigImpl(int commandCode, const char* commandName,
+ GetConfigCallback _hidl_cb) {
+ RETURN_RESULT_IF_EFFECT_CLOSED(EffectConfig());
uint32_t halResultSize = sizeof(effect_config_t);
effect_config_t halConfig{};
status_t status =
@@ -468,7 +479,8 @@
if (status == OK) {
status = EffectUtils::effectConfigFromHal(halConfig, mIsInput, &config);
}
- cb(analyzeCommandStatus(commandName, sContextCallToCommand, status), config);
+ _hidl_cb(analyzeCommandStatus(commandName, sContextCallToCommand, status), config);
+ return Void();
}
Result Effect::getCurrentConfigImpl(uint32_t featureId, uint32_t configSize,
@@ -530,6 +542,7 @@
}
Return<void> Effect::prepareForProcessing(prepareForProcessing_cb _hidl_cb) {
+ RETURN_RESULT_IF_EFFECT_CLOSED(StatusMQ::Descriptor());
status_t status;
// Create message queue.
if (mStatusMQ) {
@@ -576,6 +589,7 @@
Return<Result> Effect::setProcessBuffers(const AudioBuffer& inBuffer,
const AudioBuffer& outBuffer) {
+ RETURN_IF_EFFECT_CLOSED();
AudioBufferManager& manager = AudioBufferManager::getInstance();
sp<AudioBufferWrapper> tempInBuffer, tempOutBuffer;
if (!manager.wrap(inBuffer, &tempInBuffer)) {
@@ -600,6 +614,7 @@
}
Result Effect::sendCommand(int commandCode, const char* commandName, uint32_t size, void* data) {
+ RETURN_IF_EFFECT_CLOSED();
status_t status = (*mHandle)->command(mHandle, commandCode, size, data, 0, NULL);
return analyzeCommandStatus(commandName, sContextCallToCommand, status);
}
@@ -611,6 +626,7 @@
Result Effect::sendCommandReturningData(int commandCode, const char* commandName, uint32_t size,
void* data, uint32_t* replySize, void* replyData) {
+ RETURN_IF_EFFECT_CLOSED();
uint32_t expectedReplySize = *replySize;
status_t status = (*mHandle)->command(mHandle, commandCode, size, data, replySize, replyData);
if (status == OK && *replySize != expectedReplySize) {
@@ -635,6 +651,7 @@
uint32_t size, void* data, uint32_t* replySize,
void* replyData, uint32_t minReplySize,
CommandSuccessCallback onSuccess) {
+ RETURN_IF_EFFECT_CLOSED();
status_t status = (*mHandle)->command(mHandle, commandCode, size, data, replySize, replyData);
Result retval;
if (status == OK && minReplySize >= sizeof(uint32_t) && *replySize >= minReplySize) {
@@ -792,13 +809,11 @@
}
Return<void> Effect::getConfig(getConfig_cb _hidl_cb) {
- getConfigImpl(EFFECT_CMD_GET_CONFIG, "GET_CONFIG", _hidl_cb);
- return Void();
+ return getConfigImpl(EFFECT_CMD_GET_CONFIG, "GET_CONFIG", _hidl_cb);
}
Return<void> Effect::getConfigReverse(getConfigReverse_cb _hidl_cb) {
- getConfigImpl(EFFECT_CMD_GET_CONFIG_REVERSE, "GET_CONFIG_REVERSE", _hidl_cb);
- return Void();
+ return getConfigImpl(EFFECT_CMD_GET_CONFIG_REVERSE, "GET_CONFIG_REVERSE", _hidl_cb);
}
Return<void> Effect::getSupportedAuxChannelsConfigs(uint32_t maxConfigs,
@@ -845,6 +860,7 @@
}
Return<void> Effect::getDescriptor(getDescriptor_cb _hidl_cb) {
+ RETURN_RESULT_IF_EFFECT_CLOSED(EffectDescriptor());
effect_descriptor_t halDescriptor;
memset(&halDescriptor, 0, sizeof(effect_descriptor_t));
status_t status = (*mHandle)->get_descriptor(mHandle, &halDescriptor);
@@ -858,6 +874,10 @@
Return<void> Effect::command(uint32_t commandId, const hidl_vec<uint8_t>& data,
uint32_t resultMaxSize, command_cb _hidl_cb) {
+ if (mHandle == kInvalidEffectHandle) {
+ _hidl_cb(-ENODATA, hidl_vec<uint8_t>());
+ return Void();
+ }
uint32_t halDataSize;
std::unique_ptr<uint8_t[]> halData = hidlVecToHal(data, &halDataSize);
uint32_t halResultSize = resultMaxSize;
@@ -942,26 +962,33 @@
halCmd.size(), &halCmd[0]);
}
-Return<Result> Effect::close() {
+std::tuple<Result, effect_handle_t> Effect::closeImpl() {
if (mStopProcessThread.load(std::memory_order_relaxed)) { // only this thread modifies
- return Result::INVALID_STATE;
+ return {Result::INVALID_STATE, kInvalidEffectHandle};
}
mStopProcessThread.store(true, std::memory_order_release);
if (mEfGroup) {
mEfGroup->wake(static_cast<uint32_t>(MessageQueueFlagBits::REQUEST_QUIT));
}
+ effect_handle_t handle = mHandle;
+ mHandle = kInvalidEffectHandle;
#if MAJOR_VERSION <= 5
- return Result::OK;
+ return {Result::OK, handle};
#elif MAJOR_VERSION >= 6
// No need to join the processing thread, it is part of the API contract that the client
// must finish processing before closing the effect.
- Result retval =
- analyzeStatus("EffectRelease", "", sContextCallFunction, EffectRelease(mHandle));
- EffectMap::getInstance().remove(mHandle);
- return retval;
+ Result retval = analyzeStatus("EffectRelease", "", sContextCallFunction, EffectRelease(handle));
+ EffectMap::getInstance().remove(handle);
+ return {retval, handle};
#endif
}
+Return<Result> Effect::close() {
+ RETURN_IF_EFFECT_CLOSED();
+ auto [result, _] = closeImpl();
+ return result;
+}
+
Return<void> Effect::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& /* options */) {
if (fd.getNativeHandle() != nullptr && fd->numFds == 1) {
uint32_t cmdData = fd->data[0];
diff --git a/audio/effect/all-versions/default/Effect.h b/audio/effect/all-versions/default/Effect.h
index 5d8dccc..2bcecec 100644
--- a/audio/effect/all-versions/default/Effect.h
+++ b/audio/effect/all-versions/default/Effect.h
@@ -23,6 +23,7 @@
#include <atomic>
#include <memory>
+#include <tuple>
#include <vector>
#include <fmq/EventFlag.h>
@@ -186,6 +187,7 @@
// Sets the limit on the maximum size of vendor-provided data structures.
static constexpr size_t kMaxDataSize = 1 << 20;
+ static constexpr effect_handle_t kInvalidEffectHandle = nullptr;
static const char* sContextResultOfCommand;
static const char* sContextCallToCommand;
@@ -208,6 +210,7 @@
static size_t alignedSizeIn(size_t s);
template <typename T>
std::unique_ptr<uint8_t[]> hidlVecToHal(const hidl_vec<T>& vec, uint32_t* halDataSize);
+ std::tuple<Result, effect_handle_t> closeImpl();
void effectAuxChannelsConfigFromHal(const channel_config_t& halConfig,
EffectAuxChannelsConfig* config);
static void effectAuxChannelsConfigToHal(const EffectAuxChannelsConfig& config,
@@ -218,7 +221,8 @@
const void** valueData, std::vector<uint8_t>* halParamBuffer);
Result analyzeCommandStatus(const char* commandName, const char* context, status_t status);
- void getConfigImpl(int commandCode, const char* commandName, GetConfigCallback cb);
+ Return<void> getConfigImpl(int commandCode, const char* commandName,
+ GetConfigCallback _hidl_cb);
Result getCurrentConfigImpl(uint32_t featureId, uint32_t configSize,
GetCurrentConfigSuccessCallback onSuccess);
Result getSupportedConfigsImpl(uint32_t featureId, uint32_t maxConfigs, uint32_t configSize,
diff --git a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
index d95bb06..ff84f9d 100644
--- a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -169,13 +169,15 @@
0xfe3199be, 0xaed0, 0x413f, 0x87bb,
std::array<uint8_t, 6>{{0x11, 0x26, 0x0e, 0xb6, 0x3c, 0xf1}}};
-enum { PARAM_FACTORY_NAME, PARAM_EFFECT_UUID };
-using EffectParameter = std::tuple<std::string, Uuid>;
+enum { PARAM_FACTORY_NAME, PARAM_EFFECT_UUID, PARAM_USE_AFTER_CLOSE };
+using EffectParameter = std::tuple<std::string, Uuid, bool>;
static inline std::string EffectParameterToString(
const ::testing::TestParamInfo<EffectParameter>& info) {
- return ::android::hardware::PrintInstanceNameToString(::testing::TestParamInfo<std::string>{
- std::get<PARAM_FACTORY_NAME>(info.param), info.index});
+ std::string prefix = std::get<PARAM_USE_AFTER_CLOSE>(info.param) ? "UseAfterClose_" : "";
+ return prefix.append(
+ ::android::hardware::PrintInstanceNameToString(::testing::TestParamInfo<std::string>{
+ std::get<PARAM_FACTORY_NAME>(info.param), info.index}));
}
// The main test class for Audio Effect HIDL HAL.
@@ -191,6 +193,13 @@
Return<Result> ret = effect->init();
ASSERT_TRUE(ret.isOk());
ASSERT_EQ(Result::OK, ret);
+
+ useAfterClose = std::get<PARAM_USE_AFTER_CLOSE>(GetParam());
+ if (useAfterClose) {
+ Return<Result> ret = effect->close();
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(Result::OK, ret);
+ }
}
void TearDown() override {
@@ -205,14 +214,34 @@
Uuid getEffectType() const { return std::get<PARAM_EFFECT_UUID>(GetParam()); }
+ void checkResult(const Result& result);
+ void checkResultForUseAfterClose(const Result& result);
void findAndCreateEffect(const Uuid& type);
void findEffectInstance(const Uuid& type, Uuid* uuid);
void getChannelCount(uint32_t* channelCount);
sp<IEffectsFactory> effectsFactory;
sp<IEffect> effect;
+ bool useAfterClose;
};
+void AudioEffectHidlTest::checkResult(const Result& result) {
+ if (!useAfterClose) {
+ ASSERT_EQ(Result::OK, result);
+ } else {
+ ASSERT_NO_FATAL_FAILURE(checkResultForUseAfterClose(result));
+ }
+}
+
+void AudioEffectHidlTest::checkResultForUseAfterClose(const Result& result) {
+ if (useAfterClose) {
+ // The actual error does not matter. It's important that the effect did not crash
+ // while executing any command after a call to "close", and that the returned status
+ // is not OK.
+ ASSERT_NE(Result::OK, result);
+ }
+}
+
void AudioEffectHidlTest::findAndCreateEffect(const Uuid& type) {
Uuid effectUuid;
ASSERT_NO_FATAL_FAILURE(findEffectInstance(type, &effectUuid));
@@ -257,7 +286,11 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) {
+ *channelCount = 1;
+ return;
+ }
#if MAJOR_VERSION <= 6
ASSERT_TRUE(audio_channel_mask_is_valid(
static_cast<audio_channel_mask_t>(currentConfig.outputCfg.channels)));
@@ -276,7 +309,7 @@
description("Verify that an effect can be closed");
Return<Result> ret = effect->close();
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ ASSERT_NO_FATAL_FAILURE(checkResult(ret));
}
TEST_P(AudioEffectHidlTest, GetDescriptor) {
@@ -290,7 +323,8 @@
}
});
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) return;
EXPECT_EQ(getEffectType(), actualType);
}
@@ -307,7 +341,8 @@
}
});
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) return;
Return<Result> ret2 = effect->setConfig(currentConfig, nullptr, nullptr);
EXPECT_TRUE(ret2.isOk());
EXPECT_EQ(Result::OK, ret2);
@@ -336,7 +371,8 @@
}
});
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) return;
for (const auto& invalidInputCfg : generateInvalidConfigs(currentConfig.inputCfg)) {
EffectConfig invalidConfig = currentConfig;
invalidConfig.inputCfg = invalidInputCfg;
@@ -356,27 +392,35 @@
TEST_P(AudioEffectHidlTest, GetConfigReverse) {
description("Verify that GetConfigReverse does not crash");
- Return<void> ret = effect->getConfigReverse([&](Result, const EffectConfig&) {});
+ Result retval = Result::OK;
+ Return<void> ret = effect->getConfigReverse([&](Result r, const EffectConfig&) { retval = r; });
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(retval));
}
TEST_P(AudioEffectHidlTest, GetSupportedAuxChannelsConfigs) {
description("Verify that GetSupportedAuxChannelsConfigs does not crash");
+ Result retval = Result::OK;
Return<void> ret = effect->getSupportedAuxChannelsConfigs(
- 0, [&](Result, const hidl_vec<EffectAuxChannelsConfig>&) {});
+ 0, [&](Result r, const hidl_vec<EffectAuxChannelsConfig>&) { retval = r; });
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(retval));
}
TEST_P(AudioEffectHidlTest, GetAuxChannelsConfig) {
description("Verify that GetAuxChannelsConfig does not crash");
- Return<void> ret = effect->getAuxChannelsConfig([&](Result, const EffectAuxChannelsConfig&) {});
+ Result retval = Result::OK;
+ Return<void> ret = effect->getAuxChannelsConfig(
+ [&](Result r, const EffectAuxChannelsConfig&) { retval = r; });
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(retval));
}
TEST_P(AudioEffectHidlTest, SetAuxChannelsConfig) {
description("Verify that SetAuxChannelsConfig does not crash");
Return<Result> ret = effect->setAuxChannelsConfig(EffectAuxChannelsConfig());
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
// Not generated automatically because AudioBuffer contains
@@ -427,45 +471,56 @@
description("Verify that Reset preserves effect configuration");
Result retval = Result::NOT_INITIALIZED;
EffectConfig originalConfig;
- Return<void> ret = effect->getConfig([&](Result r, const EffectConfig& conf) {
- retval = r;
- if (r == Result::OK) {
- originalConfig = conf;
- }
- });
- ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ if (!useAfterClose) {
+ Return<void> ret = effect->getConfig([&](Result r, const EffectConfig& conf) {
+ retval = r;
+ if (r == Result::OK) {
+ originalConfig = conf;
+ }
+ });
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(Result::OK, retval);
+ }
Return<Result> ret2 = effect->reset();
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, ret2);
- EffectConfig configAfterReset;
- ret = effect->getConfig([&](Result r, const EffectConfig& conf) {
- retval = r;
- if (r == Result::OK) {
- configAfterReset = conf;
- }
- });
- EXPECT_EQ(originalConfig, configAfterReset);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret2));
+ if (!useAfterClose) {
+ EffectConfig configAfterReset;
+ Return<void> ret = effect->getConfig([&](Result r, const EffectConfig& conf) {
+ retval = r;
+ if (r == Result::OK) {
+ configAfterReset = conf;
+ }
+ });
+ EXPECT_EQ(originalConfig, configAfterReset);
+ }
}
TEST_P(AudioEffectHidlTest, DisableEnableDisable) {
description("Verify Disable -> Enable -> Disable sequence for an effect");
Return<Result> ret = effect->disable();
EXPECT_TRUE(ret.isOk());
- // Note: some legacy effects may return -EINVAL (INVALID_ARGUMENTS),
- // more canonical is to return -ENOSYS (NOT_SUPPORTED)
- EXPECT_TRUE(ret == Result::NOT_SUPPORTED || ret == Result::INVALID_ARGUMENTS);
+ if (!useAfterClose) {
+ // Note: some legacy effects may return -EINVAL (INVALID_ARGUMENTS),
+ // more canonical is to return -ENOSYS (NOT_SUPPORTED)
+ EXPECT_TRUE(ret == Result::NOT_SUPPORTED || ret == Result::INVALID_ARGUMENTS);
+ } else {
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
+ }
ret = effect->enable();
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
ret = effect->disable();
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
}
#if MAJOR_VERSION >= 7
TEST_P(AudioEffectHidlTest, SetDeviceInvalidDeviceAddress) {
description("Verify that invalid device address is rejected by SetDevice");
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
DeviceAddress device{.deviceType = "random_string"};
Return<Result> ret = effect->setDevice(device);
EXPECT_TRUE(ret.isOk());
@@ -482,13 +537,13 @@
Return<Result> ret = effect->setDevice(device);
#endif
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
}
TEST_P(AudioEffectHidlTest, SetAndGetVolume) {
description("Verify that SetAndGetVolume method works for an effect");
uint32_t channelCount;
- getChannelCount(&channelCount);
+ ASSERT_NO_FATAL_FAILURE(getChannelCount(&channelCount));
hidl_vec<uint32_t> volumes;
volumes.resize(channelCount);
for (uint32_t i = 0; i < channelCount; ++i) {
@@ -498,13 +553,13 @@
Return<void> ret =
effect->setAndGetVolume(volumes, [&](Result r, const hidl_vec<uint32_t>&) { retval = r; });
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
}
TEST_P(AudioEffectHidlTest, VolumeChangeNotification) {
description("Verify that effect accepts VolumeChangeNotification");
uint32_t channelCount;
- getChannelCount(&channelCount);
+ ASSERT_NO_FATAL_FAILURE(getChannelCount(&channelCount));
hidl_vec<uint32_t> volumes;
volumes.resize(channelCount);
for (uint32_t i = 0; i < channelCount; ++i) {
@@ -512,25 +567,29 @@
}
Return<Result> ret = effect->volumeChangeNotification(volumes);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
}
TEST_P(AudioEffectHidlTest, SetAudioMode) {
description("Verify that SetAudioMode works for an effect");
Return<Result> ret = effect->setAudioMode(AudioMode::NORMAL);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
}
TEST_P(AudioEffectHidlTest, SetConfigReverse) {
description("Verify that SetConfigReverse does not crash");
Return<Result> ret = effect->setConfigReverse(EffectConfig(), nullptr, nullptr);
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
#if MAJOR_VERSION >= 7
TEST_P(AudioEffectHidlTest, SetInputDeviceInvalidDeviceAddress) {
description("Verify that invalid device address is rejected by SetInputDevice");
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
DeviceAddress device{.deviceType = "random_string"};
Return<Result> ret = effect->setInputDevice(device);
EXPECT_TRUE(ret.isOk());
@@ -548,11 +607,15 @@
Return<Result> ret = effect->setInputDevice(device);
#endif
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
#if MAJOR_VERSION >= 7
TEST_P(AudioEffectHidlTest, SetInvalidAudioSource) {
description("Verify that an invalid audio source is rejected by SetAudioSource");
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
Return<Result> ret = effect->setAudioSource("random_string");
ASSERT_TRUE(ret.isOk());
EXPECT_TRUE(ret == Result::INVALID_ARGUMENTS || ret == Result::NOT_SUPPORTED)
@@ -568,12 +631,14 @@
Return<Result> ret = effect->setAudioSource(toString(xsd::AudioSource::AUDIO_SOURCE_MIC));
#endif
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
TEST_P(AudioEffectHidlTest, Offload) {
description("Verify that calling Offload method does not crash");
Return<Result> ret = effect->offload(EffectOffloadParameter{});
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
TEST_P(AudioEffectHidlTest, PrepareForProcessing) {
@@ -582,7 +647,7 @@
Return<void> ret = effect->prepareForProcessing(
[&](Result r, const MQDescriptorSync<Result>&) { retval = r; });
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
}
TEST_P(AudioEffectHidlTest, SetProcessBuffers) {
@@ -601,7 +666,7 @@
ASSERT_TRUE(success);
Return<Result> ret2 = effect->setProcessBuffers(buffer, buffer);
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, ret2);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret2));
}
TEST_P(AudioEffectHidlTest, Command) {
@@ -615,6 +680,7 @@
description("Verify that SetParameter does not crash");
Return<Result> ret = effect->setParameter(hidl_vec<uint8_t>(), hidl_vec<uint8_t>());
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(ret));
}
TEST_P(AudioEffectHidlTest, GetParameter) {
@@ -630,6 +696,9 @@
if (!isNewDeviceLaunchingOnTPlus) {
GTEST_SKIP() << "The test only applies to devices launching on T or later";
}
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
// Use a non-empty parameter to avoid being rejected by any earlier checks.
hidl_vec<uint8_t> parameter;
parameter.resize(16);
@@ -647,16 +716,20 @@
TEST_P(AudioEffectHidlTest, GetSupportedConfigsForFeature) {
description("Verify that GetSupportedConfigsForFeature does not crash");
+ Result retval = Result::OK;
Return<void> ret = effect->getSupportedConfigsForFeature(
- 0, 0, 0, [&](Result, uint32_t, const hidl_vec<uint8_t>&) {});
+ 0, 0, 0, [&](Result r, uint32_t, const hidl_vec<uint8_t>&) { retval = r; });
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(retval));
}
TEST_P(AudioEffectHidlTest, GetCurrentConfigForFeature) {
description("Verify that GetCurrentConfigForFeature does not crash");
- Return<void> ret =
- effect->getCurrentConfigForFeature(0, 0, [&](Result, const hidl_vec<uint8_t>&) {});
+ Result retval = Result::OK;
+ Return<void> ret = effect->getCurrentConfigForFeature(
+ 0, 0, [&](Result r, const hidl_vec<uint8_t>&) { retval = r; });
EXPECT_TRUE(ret.isOk());
+ EXPECT_NO_FATAL_FAILURE(checkResultForUseAfterClose(retval));
}
TEST_P(AudioEffectHidlTest, SetCurrentConfigForFeature) {
@@ -671,6 +744,9 @@
if (!isNewDeviceLaunchingOnTPlus) {
GTEST_SKIP() << "The test only applies to devices launching on T or later";
}
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
// Use very large size to ensure that the service does not crash.
const uint32_t veryLargeConfigSize = std::numeric_limits<uint32_t>::max() - 100;
Result retval = Result::OK;
@@ -687,6 +763,9 @@
if (!isNewDeviceLaunchingOnTPlus) {
GTEST_SKIP() << "The test only applies to devices launching on T or later";
}
+ if (useAfterClose) {
+ GTEST_SKIP() << "Does not make sense for the useAfterClose case";
+ }
// Use very large size to ensure that the service does not crash.
const uint32_t veryLargeConfigSize = std::numeric_limits<uint32_t>::max() - 100;
Result retval = Result::OK;
@@ -729,7 +808,8 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) *numBands = 1;
}
void EqualizerAudioEffectHidlTest::getLevelRange(int16_t* minLevel, int16_t* maxLevel) {
@@ -742,7 +822,11 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) {
+ *minLevel = 0;
+ *maxLevel = 255;
+ }
}
void EqualizerAudioEffectHidlTest::getBandFrequencyRange(uint16_t band, uint32_t* minFreq,
@@ -757,7 +841,7 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
ret = equalizer->getBandCenterFrequency(band, [&](Result r, uint32_t center) {
retval = r;
if (retval == Result::OK) {
@@ -765,7 +849,12 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) {
+ *minFreq = 20;
+ *centerFreq = 10000;
+ *maxFreq = 20000;
+ }
}
void EqualizerAudioEffectHidlTest::getPresetCount(size_t* count) {
@@ -777,37 +866,38 @@
}
});
ASSERT_TRUE(ret.isOk());
- ASSERT_EQ(Result::OK, retval);
+ ASSERT_NO_FATAL_FAILURE(checkResult(retval));
+ if (useAfterClose) *count = 1;
}
TEST_P(EqualizerAudioEffectHidlTest, GetNumBands) {
description("Verify that Equalizer effect reports at least one band");
uint16_t numBands = 0;
- getNumBands(&numBands);
+ ASSERT_NO_FATAL_FAILURE(getNumBands(&numBands));
EXPECT_GT(numBands, 0);
}
TEST_P(EqualizerAudioEffectHidlTest, GetLevelRange) {
description("Verify that Equalizer effect reports adequate band level range");
int16_t minLevel = 0x7fff, maxLevel = 0;
- getLevelRange(&minLevel, &maxLevel);
+ ASSERT_NO_FATAL_FAILURE(getLevelRange(&minLevel, &maxLevel));
EXPECT_GT(maxLevel, minLevel);
}
TEST_P(EqualizerAudioEffectHidlTest, GetSetBandLevel) {
description("Verify that manipulating band levels works for Equalizer effect");
uint16_t numBands = 0;
- getNumBands(&numBands);
+ ASSERT_NO_FATAL_FAILURE(getNumBands(&numBands));
ASSERT_GT(numBands, 0);
int16_t levels[3]{0x7fff, 0, 0};
- getLevelRange(&levels[0], &levels[2]);
+ ASSERT_NO_FATAL_FAILURE(getLevelRange(&levels[0], &levels[2]));
ASSERT_GT(levels[2], levels[0]);
levels[1] = (levels[2] + levels[0]) / 2;
for (uint16_t i = 0; i < numBands; ++i) {
for (size_t j = 0; j < ARRAY_SIZE(levels); ++j) {
Return<Result> ret = equalizer->setBandLevel(i, levels[j]);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
Result retval = Result::NOT_INITIALIZED;
int16_t actualLevel;
Return<void> ret2 = equalizer->getBandLevel(i, [&](Result r, int16_t l) {
@@ -817,8 +907,10 @@
}
});
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(levels[j], actualLevel);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(levels[j], actualLevel);
+ }
}
}
}
@@ -826,11 +918,11 @@
TEST_P(EqualizerAudioEffectHidlTest, GetBandCenterFrequencyAndRange) {
description("Verify that Equalizer effect reports adequate band frequency range");
uint16_t numBands = 0;
- getNumBands(&numBands);
+ ASSERT_NO_FATAL_FAILURE(getNumBands(&numBands));
ASSERT_GT(numBands, 0);
for (uint16_t i = 0; i < numBands; ++i) {
uint32_t minFreq = 0xffffffff, centerFreq = 0xffffffff, maxFreq = 0xffffffff;
- getBandFrequencyRange(i, &minFreq, ¢erFreq, &maxFreq);
+ ASSERT_NO_FATAL_FAILURE(getBandFrequencyRange(i, &minFreq, ¢erFreq, &maxFreq));
// Note: NXP legacy implementation reports "1" as upper bound for last band,
// so this check fails.
EXPECT_GE(maxFreq, centerFreq);
@@ -841,7 +933,7 @@
TEST_P(EqualizerAudioEffectHidlTest, GetBandForFrequency) {
description("Verify that Equalizer effect supports GetBandForFrequency correctly");
uint16_t numBands = 0;
- getNumBands(&numBands);
+ ASSERT_NO_FATAL_FAILURE(getNumBands(&numBands));
ASSERT_GT(numBands, 0);
for (uint16_t i = 0; i < numBands; ++i) {
uint32_t freqs[3]{0, 0, 0};
@@ -861,8 +953,10 @@
}
});
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(i, actualBand) << "Frequency: " << freqs[j];
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(i, actualBand) << "Frequency: " << freqs[j];
+ }
}
}
}
@@ -870,19 +964,19 @@
TEST_P(EqualizerAudioEffectHidlTest, GetPresetNames) {
description("Verify that Equalizer effect reports at least one preset");
size_t presetCount;
- getPresetCount(&presetCount);
+ ASSERT_NO_FATAL_FAILURE(getPresetCount(&presetCount));
EXPECT_GT(presetCount, 0u);
}
TEST_P(EqualizerAudioEffectHidlTest, GetSetCurrentPreset) {
description("Verify that manipulating the current preset for Equalizer effect");
size_t presetCount;
- getPresetCount(&presetCount);
+ ASSERT_NO_FATAL_FAILURE(getPresetCount(&presetCount));
ASSERT_GT(presetCount, 0u);
for (uint16_t i = 0; i < presetCount; ++i) {
Return<Result> ret = equalizer->setCurrentPreset(i);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
Result retval = Result::NOT_INITIALIZED;
uint16_t actualPreset = 0xffff;
Return<void> ret2 = equalizer->getCurrentPreset([&](Result r, uint16_t p) {
@@ -892,8 +986,10 @@
}
});
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(i, actualPreset);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(i, actualPreset);
+ }
}
}
@@ -904,7 +1000,7 @@
using AllProperties =
::android::hardware::audio::effect::CPP_VERSION::IEqualizerEffect::AllProperties;
uint16_t numBands = 0;
- getNumBands(&numBands);
+ ASSERT_NO_FATAL_FAILURE(getNumBands(&numBands));
ASSERT_GT(numBands, 0);
AllProperties props;
props.bandLevels.resize(numBands);
@@ -919,7 +1015,7 @@
props.curPreset = -1;
Return<Result> ret = equalizer->setAllProperties(props);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
Return<void> ret2 = equalizer->getAllProperties([&](Result r, AllProperties p) {
retval = r;
if (retval == Result::OK) {
@@ -927,14 +1023,16 @@
}
});
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(props.bandLevels, actualProps.bandLevels);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(props.bandLevels, actualProps.bandLevels);
+ }
// Verify setting of the current preset via properties.
props.curPreset = 0; // Assuming there is at least one preset.
ret = equalizer->setAllProperties(props);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
ret2 = equalizer->getAllProperties([&](Result r, AllProperties p) {
retval = r;
if (retval == Result::OK) {
@@ -942,8 +1040,10 @@
}
});
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(props.curPreset, actualProps.curPreset);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(props.curPreset, actualProps.curPreset);
+ }
}
// The main test class for Equalizer Audio Effect HIDL HAL.
@@ -971,7 +1071,7 @@
const int32_t gain = 100;
Return<Result> ret = enhancer->setTargetGain(gain);
EXPECT_TRUE(ret.isOk());
- EXPECT_EQ(Result::OK, ret);
+ EXPECT_NO_FATAL_FAILURE(checkResult(ret));
int32_t actualGain = 0;
Result retval;
Return<void> ret2 = enhancer->getTargetGain([&](Result r, int32_t g) {
@@ -981,8 +1081,10 @@
}
});
EXPECT_TRUE(ret2.isOk());
- EXPECT_EQ(Result::OK, retval);
- EXPECT_EQ(gain, actualGain);
+ EXPECT_NO_FATAL_FAILURE(checkResult(retval));
+ if (!useAfterClose) {
+ EXPECT_EQ(gain, actualGain);
+ }
}
INSTANTIATE_TEST_SUITE_P(EffectsFactory, AudioEffectsFactoryHidlTest,
@@ -993,25 +1095,29 @@
Equalizer_IEffect, AudioEffectHidlTest,
::testing::Combine(::testing::ValuesIn(::android::hardware::getAllHalInstanceNames(
IEffectsFactory::descriptor)),
- ::testing::Values(EQUALIZER_EFFECT_TYPE)),
+ ::testing::Values(EQUALIZER_EFFECT_TYPE),
+ ::testing::Values(false, true) /*useAfterClose*/),
EffectParameterToString);
INSTANTIATE_TEST_SUITE_P(
LoudnessEnhancer_IEffect, AudioEffectHidlTest,
::testing::Combine(::testing::ValuesIn(::android::hardware::getAllHalInstanceNames(
IEffectsFactory::descriptor)),
- ::testing::Values(LOUDNESS_ENHANCER_EFFECT_TYPE)),
+ ::testing::Values(LOUDNESS_ENHANCER_EFFECT_TYPE),
+ ::testing::Values(false, true) /*useAfterClose*/),
EffectParameterToString);
INSTANTIATE_TEST_SUITE_P(
Equalizer, EqualizerAudioEffectHidlTest,
::testing::Combine(::testing::ValuesIn(::android::hardware::getAllHalInstanceNames(
IEffectsFactory::descriptor)),
- ::testing::Values(EQUALIZER_EFFECT_TYPE)),
+ ::testing::Values(EQUALIZER_EFFECT_TYPE),
+ ::testing::Values(false, true) /*useAfterClose*/),
EffectParameterToString);
INSTANTIATE_TEST_SUITE_P(
LoudnessEnhancer, LoudnessEnhancerAudioEffectHidlTest,
::testing::Combine(::testing::ValuesIn(::android::hardware::getAllHalInstanceNames(
IEffectsFactory::descriptor)),
- ::testing::Values(LOUDNESS_ENHANCER_EFFECT_TYPE)),
+ ::testing::Values(LOUDNESS_ENHANCER_EFFECT_TYPE),
+ ::testing::Values(false, true) /*useAfterClose*/),
EffectParameterToString);
// When the VTS test runs on a device lacking the corresponding HAL version the parameter
// list is empty, this isn't a problem.
diff --git a/automotive/evs/aidl/Android.bp b/automotive/evs/aidl/Android.bp
index bafb4af..3bfe8f3 100644
--- a/automotive/evs/aidl/Android.bp
+++ b/automotive/evs/aidl/Android.bp
@@ -30,7 +30,7 @@
stability: "vintf",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
backend: {
java: {
@@ -53,14 +53,14 @@
version: "1",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
{
version: "2",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
diff --git a/automotive/evs/aidl/impl/default/Android.bp b/automotive/evs/aidl/impl/default/Android.bp
index 70c523b..6b638a3 100644
--- a/automotive/evs/aidl/impl/default/Android.bp
+++ b/automotive/evs/aidl/impl/default/Android.bp
@@ -21,9 +21,58 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
+cc_defaults {
+ name: "android.hardware.automotive.evs-aidl-default-service-default",
+ defaults: ["EvsHalDefaults"],
+ shared_libs: [
+ "android.hardware.graphics.bufferqueue@1.0",
+ "android.hardware.graphics.bufferqueue@2.0",
+ "android.hidl.token@1.0-utils",
+ "libEGL",
+ "libGLESv2",
+ "libbinder_ndk",
+ "libbufferqueueconverter",
+ "libcamera_metadata",
+ "libhardware_legacy",
+ "libhidlbase",
+ "libnativewindow",
+ "libtinyxml2",
+ "libui",
+ "libyuv",
+ ],
+}
+
+cc_library {
+ name: "android.hardware.automotive.evs-aidl-default-service-lib",
+ defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
+ vendor: true,
+ cflags: [
+ "-DGL_GLEXT_PROTOTYPES",
+ "-DEGL_EGLEXT_PROTOTYPES",
+ ],
+ srcs: [
+ ":libgui_frame_event_aidl",
+ "src/*.cpp",
+ ],
+ exclude_srcs: ["src/service.cpp"],
+ whole_static_libs: [
+ "android.frameworks.automotive.display-V2-ndk",
+ "android.hardware.automotive.evs-V2-ndk",
+ "android.hardware.common-V2-ndk",
+ "libaidlcommonsupport",
+ "libcutils",
+ ],
+ header_libs: [
+ "libgui_aidl_headers",
+ ],
+ local_include_dirs: ["include"],
+ include_dirs: ["frameworks/native/include/"],
+ export_include_dirs: ["include"],
+}
+
cc_binary {
name: "android.hardware.automotive.evs-aidl-default-service",
- defaults: ["EvsHalDefaults"],
+ defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
vintf_fragments: ["manifest_evs-default-service.xml"],
init_rc: ["evs-default-service.rc"],
vendor: true,
@@ -31,42 +80,11 @@
cflags: [
"-DGL_GLEXT_PROTOTYPES",
"-DEGL_EGLEXT_PROTOTYPES",
- "-Wall",
- "-Wextra",
- "-Werror",
- "-Wthread-safety",
],
- srcs: [
- ":libgui_frame_event_aidl",
- "src/*.cpp",
- ],
- shared_libs: [
- "android.hardware.graphics.bufferqueue@1.0",
- "android.hardware.graphics.bufferqueue@2.0",
- "android.hidl.token@1.0-utils",
- "libEGL",
- "libGLESv2",
- "libbase",
- "libbinder_ndk",
- "libbufferqueueconverter",
- "libcamera_metadata",
- "libhardware_legacy",
- "libhidlbase",
- "liblog",
- "libnativewindow",
- "libtinyxml2",
- "libui",
- "libutils",
- "libyuv",
- ],
+ srcs: ["src/service.cpp"],
static_libs: [
- "android.frameworks.automotive.display-V1-ndk",
- "android.hardware.automotive.evs-V2-ndk",
- "android.hardware.common-V2-ndk",
- "libaidlcommonsupport",
- "libcutils",
+ "android.hardware.automotive.evs-aidl-default-service-lib",
],
- local_include_dirs: ["include"],
include_dirs: ["frameworks/native/include/"],
required: ["evs_mock_hal_configuration.xml"],
}
@@ -77,3 +95,31 @@
src: "resources/evs_mock_configuration.xml",
sub_dir: "automotive/evs",
}
+
+cc_test {
+ name: "android.hardware.automotive.evs-aidl-default-service_cam_buffer_test",
+ defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
+ vendor: true,
+ srcs: ["tests/EvsCameraBufferTest.cpp"],
+ static_libs: [
+ "android.hardware.automotive.evs-aidl-default-service-lib",
+ "libgmock",
+ ],
+ test_suites: [
+ "general-tests",
+ ],
+}
+
+cc_test {
+ name: "android.hardware.automotive.evs-aidl-default-service_cam_state_test",
+ defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
+ vendor: true,
+ srcs: ["tests/EvsCameraStateTest.cpp"],
+ static_libs: [
+ "android.hardware.automotive.evs-aidl-default-service-lib",
+ "libgmock",
+ ],
+ test_suites: [
+ "general-tests",
+ ],
+}
diff --git a/automotive/evs/aidl/impl/default/include/ConfigManager.h b/automotive/evs/aidl/impl/default/include/ConfigManager.h
index 1d5fe77..37a17dc 100644
--- a/automotive/evs/aidl/impl/default/include/ConfigManager.h
+++ b/automotive/evs/aidl/impl/default/include/ConfigManager.h
@@ -25,8 +25,10 @@
#include <tinyxml2.h>
+#include <limits>
#include <string>
#include <string_view>
+#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -54,6 +56,15 @@
/* Camera device's capabilities and metadata */
class CameraInfo {
public:
+ enum class DeviceType : std::int32_t {
+ NONE = 0,
+ MOCK = 1,
+ V4L2 = 2,
+ VIDEO = 3,
+
+ UNKNOWN = std::numeric_limits<std::underlying_type_t<DeviceType>>::max(),
+ };
+
CameraInfo() : characteristics(nullptr) {}
virtual ~CameraInfo();
@@ -69,6 +80,10 @@
return characteristics != nullptr;
}
+ static DeviceType deviceTypeFromSV(const std::string_view sv);
+
+ DeviceType deviceType{DeviceType::NONE};
+
/*
* List of supported controls that the primary client can program.
* Paraemters are stored with its valid range
diff --git a/automotive/vehicle/aidl/impl/utils/test/Android.bp b/automotive/evs/aidl/impl/default/include/EvsAllCameras.h
similarity index 65%
copy from automotive/vehicle/aidl/impl/utils/test/Android.bp
copy to automotive/evs/aidl/impl/default/include/EvsAllCameras.h
index ad9954f..a76501d 100644
--- a/automotive/vehicle/aidl/impl/utils/test/Android.bp
+++ b/automotive/evs/aidl/impl/default/include/EvsAllCameras.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,13 +14,7 @@
* limitations under the License.
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
+#pragma once
-cc_library_headers {
- name: "VehicleHalTestUtilHeaders",
- vendor: true,
- header_libs: ["VehicleHalUtilHeaders"],
- export_include_dirs: ["include"],
-}
+#include "EvsMockCamera.h"
+#include "EvsVideoEmulatedCamera.h"
diff --git a/automotive/evs/aidl/impl/default/include/EvsCamera.h b/automotive/evs/aidl/impl/default/include/EvsCamera.h
new file mode 100644
index 0000000..539d5f6
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/include/EvsCamera.h
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "EvsCameraBase.h"
+
+#include <aidl/android/hardware/automotive/evs/IEvsCameraStream.h>
+#include <cutils/native_handle.h>
+
+#include <cstddef>
+#include <mutex>
+#include <utility>
+#include <vector>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+class EvsCamera : public EvsCameraBase {
+ private:
+ using Base = EvsCameraBase;
+ using Self = EvsCamera;
+
+ public:
+ using Base::Base;
+
+ ~EvsCamera() override;
+
+ // Methods from ::android::hardware::automotive::evs::IEvsCamera follow.
+ ndk::ScopedAStatus doneWithFrame(const std::vector<evs::BufferDesc>& buffers) override;
+
+ ndk::ScopedAStatus importExternalBuffers(const std::vector<evs::BufferDesc>& buffers,
+ int32_t* _aidl_return) override;
+
+ ndk::ScopedAStatus setMaxFramesInFlight(int32_t bufferCount) override;
+
+ ndk::ScopedAStatus startVideoStream(
+ const std::shared_ptr<evs::IEvsCameraStream>& receiver) override;
+
+ ndk::ScopedAStatus stopVideoStream() override;
+
+ ndk::ScopedAStatus pauseVideoStream() override;
+
+ ndk::ScopedAStatus resumeVideoStream() override;
+
+ protected:
+ virtual ::android::status_t allocateOneFrame(buffer_handle_t* handle) = 0;
+
+ virtual void freeOneFrame(const buffer_handle_t handle);
+
+ virtual bool preVideoStreamStart_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck);
+
+ virtual bool startVideoStreamImpl_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) = 0;
+
+ virtual bool postVideoStreamStart_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck);
+
+ virtual bool preVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck);
+
+ virtual bool stopVideoStreamImpl_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) = 0;
+
+ virtual bool postVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck);
+
+ void shutdown() override;
+
+ void closeAllBuffers_unsafe();
+
+ // Returns (ID, handle) if succeeds. (kInvalidBufferID, nullptr) otherwise.
+ [[nodiscard]] std::pair<std::size_t, buffer_handle_t> useBuffer_unsafe();
+
+ void returnBuffer_unsafe(const std::size_t id);
+
+ bool increaseAvailableFrames_unsafe(const buffer_handle_t handle);
+
+ bool decreaseAvailableFrames_unsafe();
+
+ bool setAvailableFrames_unsafe(const std::size_t bufferCount);
+
+ void swapBufferFrames_unsafe(const std::size_t pos1, const std::size_t pos2);
+
+ struct BufferRecord {
+ BufferRecord() = default;
+ BufferRecord(const BufferRecord&) = default;
+ BufferRecord(BufferRecord&&) = default;
+ BufferRecord& operator=(const BufferRecord&) = default;
+ BufferRecord& operator=(BufferRecord&&) = default;
+ ~BufferRecord() = default;
+
+ explicit BufferRecord(buffer_handle_t h) : handle(h) {}
+
+ buffer_handle_t handle{nullptr};
+ bool inUse{false};
+ };
+
+ enum class StreamState {
+ STOPPED = 0,
+ RUNNING = 1,
+ STOPPING = 2,
+ DEAD = 3,
+ };
+
+ StreamState mStreamState{StreamState::STOPPED};
+
+ std::mutex mMutex;
+
+ // Graphics buffers to transfer images, always in the order of:
+ // In use buffers ... available buffers ... unavailable (unallocated) buffers.
+ std::vector<BufferRecord> mBuffers;
+
+ // Double-mapping between buffer position and ID.
+ std::vector<std::size_t> mBufferPosToId;
+ std::vector<std::size_t> mBufferIdToPos;
+
+ std::size_t mAvailableFrames{0};
+ std::size_t mFramesInUse{0};
+
+ // We use all 1's as a reserved invalid buffer ID.
+ static constexpr std::size_t kInvalidBufferID = ~static_cast<std::size_t>(0);
+
+ public:
+ static bool IsBufferIDValid(const std::size_t bufferId) { return ~bufferId; }
+};
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/include/EvsCameraBase.h b/automotive/evs/aidl/impl/default/include/EvsCameraBase.h
new file mode 100644
index 0000000..c3e9dfc
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/include/EvsCameraBase.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <aidl/android/hardware/automotive/evs/BnEvsCamera.h>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+class EvsCameraBase : public evs::BnEvsCamera {
+ private:
+ using Base = evs::BnEvsCamera;
+ using Self = EvsCameraBase;
+
+ public:
+ using Base::Base;
+
+ ~EvsCameraBase() override = default;
+
+ virtual void shutdown() = 0;
+
+ protected:
+ // This is used for the derived classes and it prevents constructors from direct access
+ // while it allows this class to be instantiated via ndk::SharedRefBase::make<>.
+ struct Sigil {
+ explicit Sigil() = default;
+ };
+};
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/include/EvsEnumerator.h b/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
index 259c266..9dcc774 100644
--- a/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
+++ b/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
@@ -17,8 +17,8 @@
#pragma once
#include "ConfigManager.h"
+#include "EvsCameraBase.h"
#include "EvsGlDisplay.h"
-#include "EvsMockCamera.h"
#include <aidl/android/frameworks/automotive/display/ICarDisplayProxy.h>
#include <aidl/android/hardware/automotive/evs/BnEvsEnumerator.h>
@@ -27,6 +27,7 @@
#include <aidl/android/hardware/automotive/evs/IEvsCamera.h>
#include <aidl/android/hardware/automotive/evs/IEvsEnumeratorStatusCallback.h>
#include <aidl/android/hardware/automotive/evs/Stream.h>
+#include <android-base/thread_annotations.h>
#include <utils/Thread.h>
#include <atomic>
@@ -72,7 +73,7 @@
private:
struct CameraRecord {
evs::CameraDesc desc;
- std::weak_ptr<EvsMockCamera> activeInstance;
+ std::weak_ptr<EvsCameraBase> activeInstance;
CameraRecord(const char* cameraId) : desc() { desc.id = cameraId; }
};
diff --git a/automotive/evs/aidl/impl/default/include/EvsGlDisplay.h b/automotive/evs/aidl/impl/default/include/EvsGlDisplay.h
index ceabd9e..0865a04 100644
--- a/automotive/evs/aidl/impl/default/include/EvsGlDisplay.h
+++ b/automotive/evs/aidl/impl/default/include/EvsGlDisplay.h
@@ -23,6 +23,7 @@
#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
#include <aidl/android/hardware/automotive/evs/DisplayDesc.h>
#include <aidl/android/hardware/automotive/evs/DisplayState.h>
+#include <android-base/thread_annotations.h>
#include <thread>
diff --git a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
index 7e010a2..cd68532 100644
--- a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
+++ b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
@@ -17,36 +17,36 @@
#pragma once
#include "ConfigManager.h"
+#include "EvsCamera.h"
-#include <aidl/android/hardware/automotive/evs/BnEvsCamera.h>
-#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
#include <aidl/android/hardware/automotive/evs/CameraDesc.h>
#include <aidl/android/hardware/automotive/evs/CameraParam.h>
-#include <aidl/android/hardware/automotive/evs/EvsResult.h>
#include <aidl/android/hardware/automotive/evs/IEvsCameraStream.h>
#include <aidl/android/hardware/automotive/evs/IEvsDisplay.h>
#include <aidl/android/hardware/automotive/evs/ParameterRange.h>
#include <aidl/android/hardware/automotive/evs/Stream.h>
-// #include <android-base/result.h>
#include <android/hardware_buffer.h>
#include <ui/GraphicBuffer.h>
-#include <functional>
+#include <cstdint>
+#include <memory>
#include <thread>
+#include <unordered_map>
+#include <vector>
namespace aidl::android::hardware::automotive::evs::implementation {
-class EvsMockCamera : public evs::BnEvsCamera {
- // This prevents constructors from direct access while it allows this class to
- // be instantiated via ndk::SharedRefBase::make<>.
+class EvsMockCamera : public EvsCamera {
private:
- struct Sigil {
- explicit Sigil() = default;
- };
+ using Base = EvsCamera;
public:
+ EvsMockCamera(Sigil sigil, const char* deviceName,
+ std::unique_ptr<ConfigManager::CameraInfo>& camInfo);
+ EvsMockCamera(const EvsMockCamera&) = delete;
+ EvsMockCamera& operator=(const EvsMockCamera&) = delete;
+
// Methods from ::android::hardware::automotive::evs::IEvsCamera follow.
- ndk::ScopedAStatus doneWithFrame(const std::vector<evs::BufferDesc>& buffers) override;
ndk::ScopedAStatus forcePrimaryClient(
const std::shared_ptr<evs::IEvsDisplay>& display) override;
ndk::ScopedAStatus getCameraInfo(evs::CameraDesc* _aidl_return) override;
@@ -58,47 +58,37 @@
ndk::ScopedAStatus getParameterList(std::vector<evs::CameraParam>* _aidl_return) override;
ndk::ScopedAStatus getPhysicalCameraInfo(const std::string& deviceId,
evs::CameraDesc* _aidl_return) override;
- ndk::ScopedAStatus importExternalBuffers(const std::vector<evs::BufferDesc>& buffers,
- int32_t* _aidl_return) override;
- ndk::ScopedAStatus pauseVideoStream() override;
- ndk::ScopedAStatus resumeVideoStream() override;
ndk::ScopedAStatus setExtendedInfo(int32_t opaqueIdentifier,
const std::vector<uint8_t>& opaqueValue) override;
ndk::ScopedAStatus setIntParameter(evs::CameraParam id, int32_t value,
std::vector<int32_t>* effectiveValue) override;
ndk::ScopedAStatus setPrimaryClient() override;
- ndk::ScopedAStatus setMaxFramesInFlight(int32_t bufferCount) override;
- ndk::ScopedAStatus startVideoStream(
- const std::shared_ptr<evs::IEvsCameraStream>& receiver) override;
- ndk::ScopedAStatus stopVideoStream() override;
ndk::ScopedAStatus unsetPrimaryClient() override;
+ const evs::CameraDesc& getDesc() { return mDescription; }
+
static std::shared_ptr<EvsMockCamera> Create(const char* deviceName);
static std::shared_ptr<EvsMockCamera> Create(
const char* deviceName, std::unique_ptr<ConfigManager::CameraInfo>& camInfo,
const evs::Stream* streamCfg = nullptr);
- EvsMockCamera(const EvsMockCamera&) = delete;
- EvsMockCamera& operator=(const EvsMockCamera&) = delete;
-
- virtual ~EvsMockCamera() override;
- void shutdown();
-
- const evs::CameraDesc& getDesc() { return mDescription; }
-
- // Constructors
- EvsMockCamera(Sigil sigil, const char* deviceName,
- std::unique_ptr<ConfigManager::CameraInfo>& camInfo);
private:
- // These three functions are expected to be called while mAccessLock is held
- bool setAvailableFrames_Locked(unsigned bufferCount);
- unsigned increaseAvailableFrames_Locked(unsigned numToAdd);
- unsigned decreaseAvailableFrames_Locked(unsigned numToRemove);
-
void generateFrames();
void fillMockFrame(buffer_handle_t handle, const AHardwareBuffer_Desc* pDesc);
- void returnBufferLocked(const uint32_t bufferId);
- ndk::ScopedAStatus stopVideoStream_impl();
+
+ ::android::status_t allocateOneFrame(buffer_handle_t* handle) override;
+
+ bool startVideoStreamImpl_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override;
+
+ bool stopVideoStreamImpl_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override;
+
+ bool postVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override;
+
+ void initializeParameters();
CameraDesc mDescription = {}; // The properties of this camera
@@ -119,28 +109,6 @@
// Bytes per line in the buffers
uint32_t mStride = 0;
- struct BufferRecord {
- buffer_handle_t handle;
- bool inUse;
-
- explicit BufferRecord(buffer_handle_t h) : handle(h), inUse(false){};
- };
-
- std::vector<BufferRecord> mBuffers; // Graphics buffers to transfer images
- unsigned mFramesAllowed; // How many buffers are we currently using
- unsigned mFramesInUse; // How many buffers are currently outstanding
-
- enum StreamStateValues {
- STOPPED,
- RUNNING,
- STOPPING,
- DEAD,
- };
- StreamStateValues mStreamState;
-
- // Synchronization necessary to deconflict mCaptureThread from the main service thread
- std::mutex mAccessLock;
-
// Static camera module information
std::unique_ptr<ConfigManager::CameraInfo>& mCameraInfo;
@@ -160,7 +128,6 @@
int32_t value;
};
std::unordered_map<CameraParam, std::shared_ptr<CameraParameterDesc>> mParams;
- void initializeParameters();
};
} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h b/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h
new file mode 100644
index 0000000..356a42a
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "ConfigManager.h"
+#include "EvsCamera.h"
+
+#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
+#include <aidl/android/hardware/automotive/evs/CameraDesc.h>
+#include <aidl/android/hardware/automotive/evs/CameraParam.h>
+#include <aidl/android/hardware/automotive/evs/IEvsCameraStream.h>
+#include <aidl/android/hardware/automotive/evs/IEvsDisplay.h>
+#include <aidl/android/hardware/automotive/evs/ParameterRange.h>
+#include <aidl/android/hardware/automotive/evs/Stream.h>
+
+#include <cstdint>
+#include <memory>
+#include <unordered_map>
+#include <vector>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+class EvsVideoEmulatedCamera : public EvsCamera {
+ public:
+ EvsVideoEmulatedCamera(Sigil sigil, const char* deviceName,
+ std::unique_ptr<ConfigManager::CameraInfo>& camInfo);
+
+ ~EvsVideoEmulatedCamera() override;
+
+ // Methods from ::android::hardware::automotive::evs::IEvsCamera follow.
+ ndk::ScopedAStatus forcePrimaryClient(
+ const std::shared_ptr<evs::IEvsDisplay>& display) override;
+ ndk::ScopedAStatus getCameraInfo(evs::CameraDesc* _aidl_return) override;
+ ndk::ScopedAStatus getExtendedInfo(int32_t opaqueIdentifier,
+ std::vector<uint8_t>* value) override;
+ ndk::ScopedAStatus getIntParameter(evs::CameraParam id, std::vector<int32_t>* value) override;
+ ndk::ScopedAStatus getIntParameterRange(evs::CameraParam id,
+ evs::ParameterRange* _aidl_return) override;
+ ndk::ScopedAStatus getParameterList(std::vector<evs::CameraParam>* _aidl_return) override;
+ ndk::ScopedAStatus getPhysicalCameraInfo(const std::string& deviceId,
+ evs::CameraDesc* _aidl_return) override;
+ ndk::ScopedAStatus setExtendedInfo(int32_t opaqueIdentifier,
+ const std::vector<uint8_t>& opaqueValue) override;
+ ndk::ScopedAStatus setIntParameter(evs::CameraParam id, int32_t value,
+ std::vector<int32_t>* effectiveValue) override;
+ ndk::ScopedAStatus setPrimaryClient() override;
+ ndk::ScopedAStatus unsetPrimaryClient() override;
+
+ const evs::CameraDesc& getDesc() { return mDescription; }
+
+ static std::shared_ptr<EvsVideoEmulatedCamera> Create(const char* deviceName);
+ static std::shared_ptr<EvsVideoEmulatedCamera> Create(
+ const char* deviceName, std::unique_ptr<ConfigManager::CameraInfo>& camInfo,
+ const evs::Stream* streamCfg = nullptr);
+
+ private:
+ // For the camera parameters.
+ struct CameraParameterDesc {
+ CameraParameterDesc(int min = 0, int max = 0, int step = 0, int value = 0) {
+ this->range.min = min;
+ this->range.max = max;
+ this->range.step = step;
+ this->value = value;
+ }
+
+ ParameterRange range;
+ int32_t value;
+ };
+
+ void initializeParameters();
+
+ ::android::status_t allocateOneFrame(buffer_handle_t* handle) override;
+
+ bool startVideoStreamImpl_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override;
+
+ bool stopVideoStreamImpl_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override;
+
+ // The properties of this camera.
+ CameraDesc mDescription = {};
+
+ // Camera parameters.
+ std::unordered_map<CameraParam, std::shared_ptr<CameraParameterDesc>> mParams;
+
+ // Static camera module information
+ std::unique_ptr<ConfigManager::CameraInfo>& mCameraInfo;
+
+ // For the extended info
+ std::unordered_map<uint32_t, std::vector<uint8_t>> mExtInfo;
+};
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/include/GlWrapper.h b/automotive/evs/aidl/impl/default/include/GlWrapper.h
index adb250c..7ff6104 100644
--- a/automotive/evs/aidl/impl/default/include/GlWrapper.h
+++ b/automotive/evs/aidl/impl/default/include/GlWrapper.h
@@ -25,7 +25,7 @@
#include <aidl/android/frameworks/automotive/display/ICarDisplayProxy.h>
#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
#include <android-base/logging.h>
-#include <bufferqueueconverter/BufferQueueConverter.h>
+#include <cutils/native_handle.h>
namespace aidl::android::hardware::automotive::evs::implementation {
@@ -33,7 +33,6 @@
class GlWrapper {
public:
- GlWrapper() : mSurfaceHolder(::android::SurfaceHolderUniquePtr(nullptr, nullptr)) {}
bool initialize(const std::shared_ptr<automotivedisplay::ICarDisplayProxy>& svc,
uint64_t displayId);
void shutdown();
@@ -53,9 +52,6 @@
unsigned getHeight() { return mHeight; };
private:
- ::android::sp<::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer>
- mGfxBufferProducer;
-
EGLDisplay mDisplay;
EGLSurface mSurface;
EGLContext mContext;
@@ -71,9 +67,6 @@
// Opaque handle for a native hardware buffer defined in
// frameworks/native/opengl/include/EGL/eglplatform.h
ANativeWindow* mWindow;
-
- // Pointer to a Surface wrapper.
- ::android::SurfaceHolderUniquePtr mSurfaceHolder;
};
} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/src/ConfigManager.cpp b/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
index da791ed..ba4cdc0 100644
--- a/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
+++ b/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
@@ -40,6 +40,18 @@
std::string_view ConfigManager::sConfigOverridePath =
"/vendor/etc/automotive/evs/evs_configuration_override.xml";
+ConfigManager::CameraInfo::DeviceType ConfigManager::CameraInfo::deviceTypeFromSV(
+ const std::string_view sv) {
+ using namespace std::string_view_literals;
+ static const std::unordered_map<std::string_view, DeviceType> nameToType = {
+ {"mock"sv, DeviceType::MOCK},
+ {"v4l2"sv, DeviceType::V4L2},
+ {"video"sv, DeviceType::VIDEO},
+ };
+ const auto search = nameToType.find(sv);
+ return search == nameToType.end() ? DeviceType::UNKNOWN : search->second;
+}
+
void ConfigManager::printElementNames(const XMLElement* rootElem, const std::string& prefix) const {
const XMLElement* curElem = rootElem;
@@ -128,6 +140,10 @@
return false;
}
+ if (const auto typeAttr = aDeviceElem->FindAttribute("type")) {
+ aCamera->deviceType = CameraInfo::deviceTypeFromSV(typeAttr->Value());
+ }
+
/* size information to allocate camera_metadata_t */
size_t totalEntries = 0;
size_t totalDataSize = 0;
diff --git a/automotive/evs/aidl/impl/default/src/EvsCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsCamera.cpp
new file mode 100644
index 0000000..bc3bfdd
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/src/EvsCamera.cpp
@@ -0,0 +1,378 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "EvsCamera.h"
+
+#include <aidl/android/hardware/automotive/evs/EvsResult.h>
+#include <aidlcommonsupport/NativeHandle.h>
+#include <android-base/logging.h>
+#include <android/hardware_buffer.h>
+#include <ui/GraphicBufferAllocator.h>
+#include <ui/GraphicBufferMapper.h>
+
+#include <cstddef>
+#include <mutex>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+// Arbitrary limit on number of graphics buffers allowed to be allocated
+// Safeguards against unreasonable resource consumption and provides a testable limit
+constexpr std::size_t kMaxBuffersInFlight = 100;
+
+// Minimum number of buffers to run a video stream
+constexpr int kMinimumBuffersInFlight = 1;
+
+EvsCamera::~EvsCamera() {
+ shutdown();
+}
+
+ndk::ScopedAStatus EvsCamera::doneWithFrame(const std::vector<evs::BufferDesc>& buffers) {
+ std::lock_guard lck(mMutex);
+ for (const auto& desc : buffers) {
+ returnBuffer_unsafe(desc.bufferId);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsCamera::importExternalBuffers(const std::vector<evs::BufferDesc>& buffers,
+ int32_t* _aidl_return) {
+ if (buffers.empty()) {
+ LOG(DEBUG) << __func__
+ << ": Ignoring a request to import external buffers with an empty list.";
+ return ndk::ScopedAStatus::ok();
+ }
+ static auto& mapper = ::android::GraphicBufferMapper::get();
+ std::lock_guard lck(mMutex);
+ std::size_t numBuffersToAdd = std::min(buffers.size(), kMaxBuffersInFlight - mAvailableFrames);
+ if (numBuffersToAdd == 0) {
+ LOG(WARNING) << __func__ << ": The number of buffers has hit the upper limit ("
+ << kMaxBuffersInFlight << "). Stop importing.";
+ return ndk::ScopedAStatus::ok();
+ } else if (numBuffersToAdd < buffers.size()) {
+ LOG(WARNING) << "Exceeds the limit on the number of buffers. Only " << numBuffersToAdd
+ << " buffers will be imported. " << buffers.size() << " are asked.";
+ }
+ const size_t before = mAvailableFrames;
+ for (std::size_t idx = 0; idx < numBuffersToAdd; ++idx) {
+ auto& buffer = buffers[idx];
+ const AHardwareBuffer_Desc* pDesc =
+ reinterpret_cast<const AHardwareBuffer_Desc*>(&buffer.buffer.description);
+
+ buffer_handle_t handleToImport = ::android::dupFromAidl(buffer.buffer.handle);
+ buffer_handle_t handleToStore = nullptr;
+ if (handleToImport == nullptr) {
+ LOG(WARNING) << "Failed to duplicate a memory handle. Ignoring a buffer "
+ << buffer.bufferId;
+ continue;
+ }
+
+ ::android::status_t result =
+ mapper.importBuffer(handleToImport, pDesc->width, pDesc->height, pDesc->layers,
+ pDesc->format, pDesc->usage, pDesc->stride, &handleToStore);
+ if (result != ::android::NO_ERROR || handleToStore == nullptr ||
+ !increaseAvailableFrames_unsafe(handleToStore)) {
+ LOG(WARNING) << "Failed to import a buffer " << buffer.bufferId;
+ }
+ }
+ *_aidl_return = mAvailableFrames - before;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsCamera::setMaxFramesInFlight(int32_t bufferCount) {
+ std::lock_guard lock(mMutex);
+ if (bufferCount < 1) {
+ LOG(ERROR) << "Ignoring setMaxFramesInFlight with less than one buffer requested.";
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::INVALID_ARG));
+ }
+ if (!setAvailableFrames_unsafe(bufferCount)) {
+ LOG(ERROR) << "Failed to adjust the maximum number of frames in flight.";
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::BUFFER_NOT_AVAILABLE));
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+void EvsCamera::freeOneFrame(const buffer_handle_t handle) {
+ static auto& alloc = ::android::GraphicBufferAllocator::get();
+ alloc.free(handle);
+}
+
+bool EvsCamera::preVideoStreamStart_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& /* lck */) {
+ if (!receiver) {
+ LOG(ERROR) << __func__ << ": Null receiver.";
+ status = ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::INVALID_ARG));
+ return false;
+ }
+
+ // If we've been displaced by another owner of the camera, then we can't do anything else
+ if (mStreamState == StreamState::DEAD) {
+ LOG(ERROR) << __func__ << ": Ignoring when camera has been lost.";
+ status = ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::OWNERSHIP_LOST));
+ return false;
+ }
+
+ if (mStreamState != StreamState::STOPPED) {
+ LOG(ERROR) << __func__ << ": Ignoring when a stream is already running.";
+ status = ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::STREAM_ALREADY_RUNNING));
+ return false;
+ }
+
+ // If the client never indicated otherwise, configure ourselves for a single streaming buffer
+ if (mAvailableFrames < kMinimumBuffersInFlight &&
+ !setAvailableFrames_unsafe(kMinimumBuffersInFlight)) {
+ LOG(ERROR) << __func__ << "Failed to because we could not get a graphics buffer.";
+ status = ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::BUFFER_NOT_AVAILABLE));
+ return false;
+ }
+ mStreamState = StreamState::RUNNING;
+ return true;
+}
+
+bool EvsCamera::postVideoStreamStart_locked(
+ const std::shared_ptr<evs::IEvsCameraStream>& /* receiver */,
+ ndk::ScopedAStatus& /* status */, std::unique_lock<std::mutex>& /* lck */) {
+ return true;
+}
+
+bool EvsCamera::preVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& /* lck */) {
+ if (mStreamState != StreamState::RUNNING) {
+ // Terminate the stop process because a stream is not running.
+ status = ndk::ScopedAStatus::ok();
+ return false;
+ }
+ mStreamState = StreamState::STOPPING;
+ return true;
+}
+
+bool EvsCamera::postVideoStreamStop_locked(ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& /* lck */) {
+ mStreamState = StreamState::STOPPED;
+ return true;
+}
+
+ndk::ScopedAStatus EvsCamera::startVideoStream(
+ const std::shared_ptr<evs::IEvsCameraStream>& receiver) {
+ bool needShutdown = false;
+ auto status = ndk::ScopedAStatus::ok();
+ {
+ std::unique_lock lck(mMutex);
+ if (!preVideoStreamStart_locked(receiver, status, lck)) {
+ return status;
+ }
+
+ if ((!startVideoStreamImpl_locked(receiver, status, lck) ||
+ !postVideoStreamStart_locked(receiver, status, lck)) &&
+ !status.isOk()) {
+ needShutdown = true;
+ }
+ }
+ if (needShutdown) {
+ shutdown();
+ }
+ return status;
+}
+
+ndk::ScopedAStatus EvsCamera::stopVideoStream() {
+ bool needShutdown = false;
+ auto status = ndk::ScopedAStatus::ok();
+ {
+ std::unique_lock lck(mMutex);
+ if ((!preVideoStreamStop_locked(status, lck) || !stopVideoStreamImpl_locked(status, lck) ||
+ !postVideoStreamStop_locked(status, lck)) &&
+ !status.isOk()) {
+ needShutdown = true;
+ }
+ }
+ if (needShutdown) {
+ shutdown();
+ }
+ return status;
+}
+
+ndk::ScopedAStatus EvsCamera::pauseVideoStream() {
+ return ndk::ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+}
+
+ndk::ScopedAStatus EvsCamera::resumeVideoStream() {
+ return ndk::ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+}
+
+bool EvsCamera::setAvailableFrames_unsafe(const std::size_t bufferCount) {
+ if (bufferCount < 1) {
+ LOG(ERROR) << "Ignoring request to set buffer count to zero.";
+ return false;
+ }
+ if (bufferCount > kMaxBuffersInFlight) {
+ LOG(ERROR) << "Rejecting buffer request in excess of internal limit";
+ return false;
+ }
+
+ if (bufferCount > mAvailableFrames) {
+ bool success = true;
+ const std::size_t numBufferBeforeAlloc = mAvailableFrames;
+ for (int numBufferToAllocate = bufferCount - mAvailableFrames;
+ success && numBufferToAllocate > 0; --numBufferToAllocate) {
+ buffer_handle_t handle = nullptr;
+ const auto result = allocateOneFrame(&handle);
+ if (result != ::android::NO_ERROR || !handle) {
+ LOG(ERROR) << __func__ << ": Failed to allocate a graphics buffer. Error " << result
+ << ", handle: " << handle;
+ success = false;
+ break;
+ }
+ success &= increaseAvailableFrames_unsafe(handle);
+ }
+ if (!success) {
+ // Rollback when failure.
+ for (int numBufferToRelease = mAvailableFrames - numBufferBeforeAlloc;
+ numBufferToRelease > 0; --numBufferToRelease) {
+ decreaseAvailableFrames_unsafe();
+ }
+ return false;
+ }
+ } else {
+ for (int numBufferToRelease = mAvailableFrames - std::max(bufferCount, mFramesInUse);
+ numBufferToRelease > 0; --numBufferToRelease) {
+ decreaseAvailableFrames_unsafe();
+ }
+ if (mAvailableFrames > bufferCount) {
+ // This shouldn't happen with a properly behaving client because the client
+ // should only make this call after returning sufficient outstanding buffers
+ // to allow a clean resize.
+ LOG(ERROR) << "Buffer queue shrink failed, asked: " << bufferCount
+ << ", actual: " << mAvailableFrames
+ << " -- too many buffers currently in use?";
+ }
+ }
+ return true;
+}
+
+void EvsCamera::shutdown() {
+ stopVideoStream();
+ std::lock_guard lck(mMutex);
+ closeAllBuffers_unsafe();
+ mStreamState = StreamState::DEAD;
+}
+
+void EvsCamera::closeAllBuffers_unsafe() {
+ if (mFramesInUse > 0) {
+ LOG(WARNING) << __func__ << ": Closing while " << mFramesInUse
+ << " frame(s) are still in use.";
+ }
+ for (auto& buffer : mBuffers) {
+ freeOneFrame(buffer.handle);
+ buffer.handle = nullptr;
+ }
+ mBuffers.clear();
+ mBufferPosToId.clear();
+ mBufferIdToPos.clear();
+}
+
+std::pair<std::size_t, buffer_handle_t> EvsCamera::useBuffer_unsafe() {
+ if (mFramesInUse >= mAvailableFrames) {
+ DCHECK_EQ(mFramesInUse, mAvailableFrames);
+ return {kInvalidBufferID, nullptr};
+ }
+ const std::size_t pos = mFramesInUse++;
+ auto& buffer = mBuffers[pos];
+ DCHECK(!buffer.inUse);
+ DCHECK(buffer.handle);
+ buffer.inUse = true;
+ return {mBufferPosToId[pos], buffer.handle};
+}
+
+void EvsCamera::returnBuffer_unsafe(const std::size_t id) {
+ if (id >= mBuffers.size()) {
+ LOG(ERROR) << __func__ << ": ID out-of-bound. id: " << id
+ << " max: " << mBuffers.size() - 1;
+ return;
+ }
+ const std::size_t pos = mBufferIdToPos[id];
+
+ if (!mBuffers[pos].inUse) {
+ LOG(ERROR) << __func__ << ": Ignoring returning frame " << id << " which is already free.";
+ return;
+ }
+ DCHECK_LT(pos, mFramesInUse);
+ const std::size_t last_in_use_pos = --mFramesInUse;
+ swapBufferFrames_unsafe(pos, last_in_use_pos);
+ mBuffers[last_in_use_pos].inUse = false;
+}
+
+bool EvsCamera::increaseAvailableFrames_unsafe(const buffer_handle_t handle) {
+ if (mAvailableFrames >= kMaxBuffersInFlight) {
+ LOG(WARNING) << __func__ << ": The number of buffers has hit the upper limit ("
+ << kMaxBuffersInFlight << "). Stop increasing.";
+ return false;
+ }
+ const std::size_t pos = mAvailableFrames++;
+ if (mAvailableFrames > mBuffers.size()) {
+ const std::size_t oldBufferSize = mBuffers.size();
+ mBuffers.resize(mAvailableFrames);
+ mBufferPosToId.resize(mAvailableFrames);
+ mBufferIdToPos.resize(mAvailableFrames);
+ // Build position/ID mapping.
+ for (std::size_t idx = oldBufferSize; idx < mBuffers.size(); ++idx) {
+ mBufferPosToId[idx] = idx;
+ mBufferIdToPos[idx] = idx;
+ }
+ }
+ auto& buffer = mBuffers[pos];
+ DCHECK(!buffer.inUse);
+ DCHECK(!buffer.handle);
+ buffer.handle = handle;
+ return true;
+}
+
+bool EvsCamera::decreaseAvailableFrames_unsafe() {
+ if (mFramesInUse >= mAvailableFrames) {
+ DCHECK_EQ(mFramesInUse, mAvailableFrames);
+ return false;
+ }
+ const std::size_t pos = --mAvailableFrames;
+ auto& buffer = mBuffers[pos];
+ DCHECK(!buffer.inUse);
+ DCHECK(buffer.handle);
+ freeOneFrame(buffer.handle);
+ buffer.handle = nullptr;
+ return true;
+}
+
+void EvsCamera::swapBufferFrames_unsafe(const std::size_t pos1, const std::size_t pos2) {
+ if (pos1 == pos2) {
+ return;
+ }
+ if (pos1 >= mBuffers.size() || pos2 >= mBuffers.size()) {
+ LOG(ERROR) << __func__ << ": Index out-of-bound. pos1: " << pos1 << ", pos2: " << pos2
+ << ", buffer size: " << mBuffers.size();
+ return;
+ }
+ const std::size_t id1 = mBufferPosToId[pos1];
+ const std::size_t id2 = mBufferPosToId[pos2];
+ std::swap(mBufferPosToId[pos1], mBufferPosToId[pos2]);
+ std::swap(mBufferIdToPos[id1], mBufferIdToPos[id2]);
+ std::swap(mBuffers[pos1], mBuffers[pos2]);
+}
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp b/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
index 5178958..80e72a7 100644
--- a/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
@@ -17,8 +17,9 @@
#include "EvsEnumerator.h"
#include "ConfigManager.h"
+#include "EvsAllCameras.h"
+#include "EvsCameraBase.h"
#include "EvsGlDisplay.h"
-#include "EvsMockCamera.h"
#include <aidl/android/hardware/automotive/evs/EvsResult.h>
#include <aidl/android/hardware/graphics/common/BufferUsage.h>
@@ -243,7 +244,7 @@
}
// Has this camera already been instantiated by another caller?
- std::shared_ptr<EvsMockCamera> pActiveCamera = pRecord->activeInstance.lock();
+ std::shared_ptr<EvsCameraBase> pActiveCamera = pRecord->activeInstance.lock();
if (pActiveCamera) {
LOG(WARNING) << "Killing previous camera because of new caller";
closeCamera(pActiveCamera);
@@ -253,12 +254,31 @@
if (!sConfigManager) {
pActiveCamera = EvsMockCamera::Create(id.data());
} else {
- pActiveCamera = EvsMockCamera::Create(id.data(), sConfigManager->getCameraInfo(id), &cfg);
+ auto& cameraInfo = sConfigManager->getCameraInfo(id);
+ switch (cameraInfo->deviceType) {
+ using DeviceType = ConfigManager::CameraInfo::DeviceType;
+
+ // Default to MOCK for backward compatibility.
+ case DeviceType::NONE:
+ case DeviceType::MOCK:
+ pActiveCamera = EvsMockCamera::Create(id.data(), cameraInfo, &cfg);
+ break;
+
+ case DeviceType::VIDEO:
+ pActiveCamera = EvsVideoEmulatedCamera::Create(id.data(), cameraInfo, &cfg);
+ break;
+
+ default:
+ LOG(ERROR) << __func__ << ": camera device type "
+ << static_cast<std::int32_t>(cameraInfo->deviceType)
+ << " is not supported.";
+ break;
+ }
}
pRecord->activeInstance = pActiveCamera;
if (!pActiveCamera) {
- LOG(ERROR) << "Failed to create new EvsMockCamera object for " << id;
+ LOG(ERROR) << "Failed to create new EVS camera object for " << id;
return ScopedAStatus::fromServiceSpecificError(
static_cast<int>(EvsResult::UNDERLYING_SERVICE_ERROR));
}
@@ -445,7 +465,7 @@
if (!pRecord) {
LOG(ERROR) << "Asked to close a camera whose name isn't recognized";
} else {
- std::shared_ptr<EvsMockCamera> pActiveCamera = pRecord->activeInstance.lock();
+ std::shared_ptr<EvsCameraBase> pActiveCamera = pRecord->activeInstance.lock();
if (!pActiveCamera) {
LOG(WARNING) << "Somehow a camera is being destroyed "
<< "when the enumerator didn't know one existed";
diff --git a/automotive/evs/aidl/impl/default/src/EvsGlDisplay.cpp b/automotive/evs/aidl/impl/default/src/EvsGlDisplay.cpp
index e5f8e4c..5b5cbcc 100644
--- a/automotive/evs/aidl/impl/default/src/EvsGlDisplay.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsGlDisplay.cpp
@@ -352,8 +352,8 @@
BufferDesc bufferDescToSend = {
.buffer =
{
- .handle = std::move(::android::dupToAidl(mBuffer.handle)),
.description = mBuffer.description,
+ .handle = std::move(::android::dupToAidl(mBuffer.handle)),
},
.pixelSizeBytes = 4, // RGBA_8888 is 4-byte-per-pixel format
.bufferId = mBuffer.fingerprint,
diff --git a/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
index 797b221..ef43925 100644
--- a/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
@@ -15,28 +15,25 @@
*/
#include "EvsMockCamera.h"
-#include "ConfigManager.h"
-#include "EvsEnumerator.h"
+
+#include <aidl/android/hardware/automotive/evs/EvsResult.h>
#include <aidlcommonsupport/NativeHandle.h>
+#include <android-base/logging.h>
#include <ui/GraphicBufferAllocator.h>
#include <ui/GraphicBufferMapper.h>
#include <utils/SystemClock.h>
+#include <cstddef>
+#include <cstdint>
#include <memory>
+#include <tuple>
namespace {
using ::aidl::android::hardware::graphics::common::BufferUsage;
using ::ndk::ScopedAStatus;
-// Arbitrary limit on number of graphics buffers allowed to be allocated
-// Safeguards against unreasonable resource consumption and provides a testable limit
-constexpr unsigned kMaxBuffersInFlight = 100;
-
-// Minimum number of buffers to run a video stream
-constexpr int kMinimumBuffersInFlight = 1;
-
// Colors for the colorbar test pattern in ABGR format
constexpr uint32_t kColors[] = {
0xFFFFFFFF, // white
@@ -56,7 +53,7 @@
EvsMockCamera::EvsMockCamera([[maybe_unused]] Sigil sigil, const char* id,
std::unique_ptr<ConfigManager::CameraInfo>& camInfo)
- : mFramesAllowed(0), mFramesInUse(0), mStreamState(STOPPED), mCameraInfo(camInfo) {
+ : mCameraInfo(camInfo) {
LOG(DEBUG) << __FUNCTION__;
/* set a camera id */
@@ -73,11 +70,6 @@
initializeParameters();
}
-EvsMockCamera::~EvsMockCamera() {
- LOG(DEBUG) << __FUNCTION__;
- shutdown();
-}
-
void EvsMockCamera::initializeParameters() {
mParams.emplace(
CameraParam::BRIGHTNESS,
@@ -90,35 +82,6 @@
new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
}
-// This gets called if another caller "steals" ownership of the camera
-void EvsMockCamera::shutdown() {
- LOG(DEBUG) << __FUNCTION__;
-
- // Make sure our output stream is cleaned up
- // (It really should be already)
- stopVideoStream_impl();
-
- // Claim the lock while we work on internal state
- std::lock_guard lock(mAccessLock);
-
- // Drop all the graphics buffers we've been using
- if (mBuffers.size() > 0) {
- ::android::GraphicBufferAllocator& alloc(::android::GraphicBufferAllocator::get());
- for (auto&& rec : mBuffers) {
- if (rec.inUse) {
- LOG(WARNING) << "WARNING: releasing a buffer remotely owned.";
- }
- alloc.free(rec.handle);
- rec.handle = nullptr;
- }
- mBuffers.clear();
- }
-
- // Put this object into an unrecoverable error state since somebody else
- // is going to own the underlying camera now
- mStreamState = DEAD;
-}
-
// Methods from ::aidl::android::hardware::automotive::evs::IEvsCamera follow.
ScopedAStatus EvsMockCamera::getCameraInfo(CameraDesc* _aidl_return) {
LOG(DEBUG) << __FUNCTION__;
@@ -128,115 +91,6 @@
return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::setMaxFramesInFlight(int32_t bufferCount) {
- LOG(DEBUG) << __FUNCTION__ << ", bufferCount = " << bufferCount;
- ;
-
- std::lock_guard lock(mAccessLock);
-
- // If we've been displaced by another owner of the camera, then we can't do anything else
- if (mStreamState == DEAD) {
- LOG(ERROR) << "Ignoring setMaxFramesInFlight call when camera has been lost.";
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::OWNERSHIP_LOST));
- }
-
- // We cannot function without at least one video buffer to send data
- if (bufferCount < 1) {
- LOG(ERROR) << "Ignoring setMaxFramesInFlight with less than one buffer requested.";
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::INVALID_ARG));
- }
-
- // Update our internal state
- if (!setAvailableFrames_Locked(bufferCount)) {
- LOG(ERROR) << "Failed to adjust the maximum number of frames in flight.";
- return ScopedAStatus::fromServiceSpecificError(
- static_cast<int>(EvsResult::BUFFER_NOT_AVAILABLE));
- }
-
- return ScopedAStatus::ok();
-}
-
-ScopedAStatus EvsMockCamera::startVideoStream(const std::shared_ptr<IEvsCameraStream>& cb) {
- LOG(DEBUG) << __FUNCTION__;
-
- if (!cb) {
- LOG(ERROR) << "A given stream callback is invalid.";
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::INVALID_ARG));
- }
-
- std::lock_guard lock(mAccessLock);
-
- // If we've been displaced by another owner of the camera, then we can't do anything else
- if (mStreamState == DEAD) {
- LOG(ERROR) << "Ignoring startVideoStream call when camera has been lost.";
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::OWNERSHIP_LOST));
- }
-
- if (mStreamState != STOPPED) {
- LOG(ERROR) << "Ignoring startVideoStream call when a stream is already running.";
- return ScopedAStatus::fromServiceSpecificError(
- static_cast<int>(EvsResult::STREAM_ALREADY_RUNNING));
- }
-
- // If the client never indicated otherwise, configure ourselves for a single streaming buffer
- if (mFramesAllowed < kMinimumBuffersInFlight &&
- !setAvailableFrames_Locked(kMinimumBuffersInFlight)) {
- LOG(ERROR) << "Failed to start stream because we couldn't get a graphics buffer";
- return ScopedAStatus::fromServiceSpecificError(
- static_cast<int>(EvsResult::BUFFER_NOT_AVAILABLE));
- }
-
- // Record the user's callback for use when we have a frame ready
- mStream = cb;
-
- // Start the frame generation thread
- mStreamState = RUNNING;
- mCaptureThread = std::thread([this]() { generateFrames(); });
-
- return ScopedAStatus::ok();
-}
-
-ScopedAStatus EvsMockCamera::doneWithFrame(const std::vector<BufferDesc>& list) {
- std::lock_guard lock(mAccessLock);
- for (const auto& desc : list) {
- returnBufferLocked(desc.bufferId);
- }
-
- return ScopedAStatus::ok();
-}
-
-ScopedAStatus EvsMockCamera::stopVideoStream() {
- LOG(DEBUG) << __FUNCTION__;
- return stopVideoStream_impl();
-}
-
-ScopedAStatus EvsMockCamera::stopVideoStream_impl() {
- std::unique_lock lock(mAccessLock);
-
- if (mStreamState != RUNNING) {
- // Safely return here because a stream is not running.
- return ScopedAStatus::ok();
- }
-
- // Tell the GenerateFrames loop we want it to stop
- mStreamState = STOPPING;
-
- // Block outside the mutex until the "stop" flag has been acknowledged
- // We won't send any more frames, but the client might still get some already in flight
- LOG(DEBUG) << "Waiting for stream thread to end...";
- lock.unlock();
- if (mCaptureThread.joinable()) {
- mCaptureThread.join();
- }
- lock.lock();
-
- mStreamState = STOPPED;
- mStream = nullptr;
- LOG(DEBUG) << "Stream marked STOPPED.";
-
- return ScopedAStatus::ok();
-}
-
ScopedAStatus EvsMockCamera::getExtendedInfo(int32_t opaqueIdentifier,
std::vector<uint8_t>* opaqueValue) {
const auto it = mExtInfo.find(opaqueIdentifier);
@@ -264,14 +118,6 @@
return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::pauseVideoStream() {
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
-}
-
-ScopedAStatus EvsMockCamera::resumeVideoStream() {
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
-}
-
ScopedAStatus EvsMockCamera::setPrimaryClient() {
/* Because EVS HW module reference implementation expects a single client at
* a time, this returns a success code always.
@@ -346,232 +192,27 @@
return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::importExternalBuffers(const std::vector<BufferDesc>& buffers,
- int32_t* _aidl_return) {
- size_t numBuffersToAdd = buffers.size();
- if (numBuffersToAdd < 1) {
- LOG(DEBUG) << "Ignoring a request to import external buffers with an empty list.";
- return ScopedAStatus::ok();
- }
-
- std::lock_guard lock(mAccessLock);
- if (numBuffersToAdd > (kMaxBuffersInFlight - mFramesAllowed)) {
- numBuffersToAdd -= (kMaxBuffersInFlight - mFramesAllowed);
- LOG(WARNING) << "Exceed the limit on the number of buffers. " << numBuffersToAdd
- << " buffers will be imported only.";
- }
-
- ::android::GraphicBufferMapper& mapper = ::android::GraphicBufferMapper::get();
- const size_t before = mFramesAllowed;
- for (size_t i = 0; i < numBuffersToAdd; ++i) {
- auto& b = buffers[i];
- const AHardwareBuffer_Desc* pDesc =
- reinterpret_cast<const AHardwareBuffer_Desc*>(&b.buffer.description);
-
- buffer_handle_t handleToImport = ::android::dupFromAidl(b.buffer.handle);
- buffer_handle_t handleToStore = nullptr;
- if (handleToImport == nullptr) {
- LOG(WARNING) << "Failed to duplicate a memory handle. Ignoring a buffer " << b.bufferId;
- continue;
- }
-
- ::android::status_t result =
- mapper.importBuffer(handleToImport, pDesc->width, pDesc->height, pDesc->layers,
- pDesc->format, pDesc->usage, pDesc->stride, &handleToStore);
- if (result != ::android::NO_ERROR || handleToStore == nullptr) {
- LOG(WARNING) << "Failed to import a buffer " << b.bufferId;
- continue;
- }
-
- bool stored = false;
- for (auto&& rec : mBuffers) {
- if (rec.handle != nullptr) {
- continue;
- }
-
- // Use this existing entry.
- rec.handle = handleToStore;
- rec.inUse = false;
- stored = true;
- break;
- }
-
- if (!stored) {
- // Add a BufferRecord wrapping this handle to our set of available buffers.
- mBuffers.push_back(BufferRecord(handleToStore));
- }
- ++mFramesAllowed;
- }
-
- *_aidl_return = mFramesAllowed - before;
- return ScopedAStatus::ok();
-}
-
-bool EvsMockCamera::setAvailableFrames_Locked(unsigned bufferCount) {
- if (bufferCount < 1) {
- LOG(ERROR) << "Ignoring request to set buffer count to zero";
- return false;
- }
- if (bufferCount > kMaxBuffersInFlight) {
- LOG(ERROR) << "Rejecting buffer request in excess of internal limit";
- return false;
- }
-
- // Is an increase required?
- if (mFramesAllowed < bufferCount) {
- // An increase is required
- auto needed = bufferCount - mFramesAllowed;
- LOG(INFO) << "Allocating " << needed << " buffers for camera frames";
-
- auto added = increaseAvailableFrames_Locked(needed);
- if (added != needed) {
- // If we didn't add all the frames we needed, then roll back to the previous state
- LOG(ERROR) << "Rolling back to previous frame queue size";
- decreaseAvailableFrames_Locked(added);
- return false;
- }
- } else if (mFramesAllowed > bufferCount) {
- // A decrease is required
- auto framesToRelease = mFramesAllowed - bufferCount;
- LOG(INFO) << "Returning " << framesToRelease << " camera frame buffers";
-
- auto released = decreaseAvailableFrames_Locked(framesToRelease);
- if (released != framesToRelease) {
- // This shouldn't happen with a properly behaving client because the client
- // should only make this call after returning sufficient outstanding buffers
- // to allow a clean resize.
- LOG(ERROR) << "Buffer queue shrink failed -- too many buffers currently in use?";
- }
- }
-
- return true;
-}
-
-unsigned EvsMockCamera::increaseAvailableFrames_Locked(unsigned numToAdd) {
- // Acquire the graphics buffer allocator
- ::android::GraphicBufferAllocator& alloc(::android::GraphicBufferAllocator::get());
-
- unsigned added = 0;
- while (added < numToAdd) {
- unsigned pixelsPerLine = 0;
- buffer_handle_t memHandle = nullptr;
- auto result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, &memHandle,
- &pixelsPerLine, 0, "EvsMockCamera");
- if (result != ::android::NO_ERROR) {
- LOG(ERROR) << "Error " << result << " allocating " << mWidth << " x " << mHeight
- << " graphics buffer";
- break;
- }
- if (memHandle == nullptr) {
- LOG(ERROR) << "We didn't get a buffer handle back from the allocator";
- break;
- }
- if (mStride > 0) {
- if (mStride != pixelsPerLine) {
- LOG(ERROR) << "We did not expect to get buffers with different strides!";
- }
- } else {
- // Gralloc defines stride in terms of pixels per line
- mStride = pixelsPerLine;
- }
-
- // Find a place to store the new buffer
- auto stored = false;
- for (auto&& rec : mBuffers) {
- if (rec.handle == nullptr) {
- // Use this existing entry
- rec.handle = memHandle;
- rec.inUse = false;
- stored = true;
- break;
- }
- }
- if (!stored) {
- // Add a BufferRecord wrapping this handle to our set of available buffers
- mBuffers.push_back(BufferRecord(memHandle));
- }
-
- ++mFramesAllowed;
- ++added;
- }
-
- return added;
-}
-
-unsigned EvsMockCamera::decreaseAvailableFrames_Locked(unsigned numToRemove) {
- // Acquire the graphics buffer allocator
- ::android::GraphicBufferAllocator& alloc(::android::GraphicBufferAllocator::get());
-
- unsigned removed = 0;
- for (auto&& rec : mBuffers) {
- // Is this record not in use, but holding a buffer that we can free?
- if ((rec.inUse == false) && (rec.handle != nullptr)) {
- // Release buffer and update the record so we can recognize it as "empty"
- alloc.free(rec.handle);
- rec.handle = nullptr;
-
- --mFramesAllowed;
- ++removed;
-
- if (removed == numToRemove) {
- break;
- }
- }
- }
-
- return removed;
-}
-
// This is the asynchronous frame generation thread that runs in parallel with the
// main serving thread. There is one for each active camera instance.
void EvsMockCamera::generateFrames() {
LOG(DEBUG) << "Frame generation loop started.";
- unsigned idx = 0;
while (true) {
- bool timeForFrame = false;
const nsecs_t startTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // Lock scope for updating shared state
+ std::size_t bufferId = kInvalidBufferID;
+ buffer_handle_t bufferHandle = nullptr;
{
- std::lock_guard lock(mAccessLock);
-
- if (mStreamState != RUNNING) {
- // Break out of our main thread loop
+ std::lock_guard lock(mMutex);
+ if (mStreamState != StreamState::RUNNING) {
break;
}
-
- // Are we allowed to issue another buffer?
- if (mFramesInUse >= mFramesAllowed) {
- // Can't do anything right now -- skip this frame
- LOG(WARNING) << "Skipped a frame because too many are in flight.";
- } else {
- // Identify an available buffer to fill
- for (idx = 0; idx < mBuffers.size(); idx++) {
- if (!mBuffers[idx].inUse) {
- if (mBuffers[idx].handle != nullptr) {
- // Found an available record, so stop looking
- break;
- }
- }
- }
- if (idx >= mBuffers.size()) {
- // This shouldn't happen since we already checked mFramesInUse vs mFramesAllowed
- ALOGE("Failed to find an available buffer slot\n");
- } else {
- // We're going to make the frame busy
- mBuffers[idx].inUse = true;
- mFramesInUse++;
- timeForFrame = true;
- }
- }
+ std::tie(bufferId, bufferHandle) = useBuffer_unsafe();
}
- if (timeForFrame) {
+ if (bufferHandle != nullptr) {
using AidlPixelFormat = ::aidl::android::hardware::graphics::common::PixelFormat;
// Assemble the buffer description we'll transmit below
- buffer_handle_t memHandle = mBuffers[idx].handle;
BufferDesc newBuffer = {
.buffer =
{
@@ -584,39 +225,31 @@
.usage = static_cast<BufferUsage>(mUsage),
.stride = static_cast<int32_t>(mStride),
},
- .handle = ::android::dupToAidl(memHandle),
+ .handle = ::android::dupToAidl(bufferHandle),
},
- .bufferId = static_cast<int32_t>(idx),
+ .bufferId = static_cast<int32_t>(bufferId),
.deviceId = mDescription.id,
.timestamp = static_cast<int64_t>(::android::elapsedRealtimeNano() *
1e+3), // timestamps is in microseconds
};
// Write test data into the image buffer
- fillMockFrame(memHandle, reinterpret_cast<const AHardwareBuffer_Desc*>(
- &newBuffer.buffer.description));
+ fillMockFrame(bufferHandle, reinterpret_cast<const AHardwareBuffer_Desc*>(
+ &newBuffer.buffer.description));
+
+ std::vector<BufferDesc> frames;
+ frames.push_back(std::move(newBuffer));
// Issue the (asynchronous) callback to the client -- can't be holding the lock
- auto flag = false;
- if (mStream) {
- std::vector<BufferDesc> frames;
- frames.push_back(std::move(newBuffer));
- flag = mStream->deliverFrame(frames).isOk();
- }
-
- if (flag) {
- LOG(DEBUG) << "Delivered " << memHandle << ", id = " << mBuffers[idx].handle;
+ if (mStream && mStream->deliverFrame(frames).isOk()) {
+ LOG(DEBUG) << "Delivered " << bufferHandle << ", id = " << bufferId;
} else {
// This can happen if the client dies and is likely unrecoverable.
// To avoid consuming resources generating failing calls, we stop sending
// frames. Note, however, that the stream remains in the "STREAMING" state
// until cleaned up on the main thread.
LOG(ERROR) << "Frame delivery call failed in the transport layer.";
-
- // Since we didn't actually deliver it, mark the frame as available
- std::lock_guard<std::mutex> lock(mAccessLock);
- mBuffers[idx].inUse = false;
- mFramesInUse--;
+ doneWithFrame(frames);
}
}
@@ -671,34 +304,45 @@
mapper.unlock(handle);
}
-void EvsMockCamera::returnBufferLocked(const uint32_t bufferId) {
- if (bufferId >= mBuffers.size()) {
- ALOGE("ignoring doneWithFrame called with invalid bufferId %d (max is %zu)", bufferId,
- mBuffers.size() - 1);
- return;
+::android::status_t EvsMockCamera::allocateOneFrame(buffer_handle_t* handle) {
+ static auto& alloc = ::android::GraphicBufferAllocator::get();
+ unsigned pixelsPerLine = 0;
+ const auto result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, handle, &pixelsPerLine,
+ 0, "EvsMockCamera");
+ if (mStride < mWidth) {
+ // Gralloc defines stride in terms of pixels per line
+ mStride = pixelsPerLine;
+ } else if (mStride != pixelsPerLine) {
+ LOG(ERROR) << "We did not expect to get buffers with different strides!";
}
+ return result;
+}
- if (!mBuffers[bufferId].inUse) {
- ALOGE("ignoring doneWithFrame called on frame %d which is already free", bufferId);
- return;
+bool EvsMockCamera::startVideoStreamImpl_locked(
+ const std::shared_ptr<evs::IEvsCameraStream>& receiver, ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& /* lck */) {
+ mStream = receiver;
+ mCaptureThread = std::thread([this]() { generateFrames(); });
+ return true;
+}
+
+bool EvsMockCamera::stopVideoStreamImpl_locked(ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& lck) {
+ lck.unlock();
+ if (mCaptureThread.joinable()) {
+ mCaptureThread.join();
}
+ lck.lock();
+ return true;
+}
- // Mark the frame as available
- mBuffers[bufferId].inUse = false;
- mFramesInUse--;
-
- // If this frame's index is high in the array, try to move it down
- // to improve locality after mFramesAllowed has been reduced.
- if (bufferId >= mFramesAllowed) {
- // Find an empty slot lower in the array (which should always exist in this case)
- for (auto&& rec : mBuffers) {
- if (rec.handle == nullptr) {
- rec.handle = mBuffers[bufferId].handle;
- mBuffers[bufferId].handle = nullptr;
- break;
- }
- }
+bool EvsMockCamera::postVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) {
+ if (!Base::postVideoStreamStop_locked(status, lck)) {
+ return false;
}
+ mStream = nullptr;
+ return true;
}
std::shared_ptr<EvsMockCamera> EvsMockCamera::Create(const char* deviceName) {
diff --git a/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
new file mode 100644
index 0000000..f198a64
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "EvsVideoEmulatedCamera.h"
+
+#include <aidl/android/hardware/automotive/evs/EvsResult.h>
+
+#include <android-base/logging.h>
+
+#include <cstddef>
+#include <cstdint>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+EvsVideoEmulatedCamera::EvsVideoEmulatedCamera(Sigil, const char* deviceName,
+ std::unique_ptr<ConfigManager::CameraInfo>& camInfo)
+ : mCameraInfo(camInfo) {
+ mDescription.id = deviceName;
+
+ /* set camera metadata */
+ if (camInfo) {
+ uint8_t* ptr = reinterpret_cast<uint8_t*>(camInfo->characteristics);
+ const size_t len = get_camera_metadata_size(camInfo->characteristics);
+ mDescription.metadata.insert(mDescription.metadata.end(), ptr, ptr + len);
+ }
+
+ initializeParameters();
+}
+
+void EvsVideoEmulatedCamera::initializeParameters() {
+ mParams.emplace(
+ CameraParam::BRIGHTNESS,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+ mParams.emplace(
+ CameraParam::CONTRAST,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+ mParams.emplace(
+ CameraParam::SHARPNESS,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+}
+
+::android::status_t EvsVideoEmulatedCamera::allocateOneFrame(buffer_handle_t* /* handle */) {
+ LOG(FATAL) << __func__ << ": Not implemented yet.";
+ return ::android::UNKNOWN_ERROR;
+}
+
+bool EvsVideoEmulatedCamera::startVideoStreamImpl_locked(
+ const std::shared_ptr<evs::IEvsCameraStream>& /* receiver */,
+ ndk::ScopedAStatus& /* status */, std::unique_lock<std::mutex>& /* lck */) {
+ LOG(FATAL) << __func__ << ": Not implemented yet.";
+ return false;
+}
+
+bool EvsVideoEmulatedCamera::stopVideoStreamImpl_locked(ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& /* lck */) {
+ LOG(FATAL) << __func__ << ": Not implemented yet.";
+ return false;
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::forcePrimaryClient(
+ const std::shared_ptr<evs::IEvsDisplay>& /* display */) {
+ /* Because EVS HW module reference implementation expects a single client at
+ * a time, this returns a success code always.
+ */
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getCameraInfo(evs::CameraDesc* _aidl_return) {
+ *_aidl_return = mDescription;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getExtendedInfo(int32_t opaqueIdentifier,
+ std::vector<uint8_t>* value) {
+ const auto it = mExtInfo.find(opaqueIdentifier);
+ if (it == mExtInfo.end()) {
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::INVALID_ARG));
+ } else {
+ *value = mExtInfo[opaqueIdentifier];
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getIntParameter(evs::CameraParam id,
+ std::vector<int32_t>* value) {
+ const auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+ value->push_back(it->second->value);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getIntParameterRange(evs::CameraParam id,
+ evs::ParameterRange* _aidl_return) {
+ const auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+ _aidl_return->min = it->second->range.min;
+ _aidl_return->max = it->second->range.max;
+ _aidl_return->step = it->second->range.step;
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getParameterList(
+ std::vector<evs::CameraParam>* _aidl_return) {
+ if (mCameraInfo) {
+ _aidl_return->resize(mCameraInfo->controls.size());
+ std::size_t idx = 0;
+ for (const auto& [name, range] : mCameraInfo->controls) {
+ (*_aidl_return)[idx++] = name;
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::getPhysicalCameraInfo(const std::string& /* deviceId */,
+ evs::CameraDesc* _aidl_return) {
+ return getCameraInfo(_aidl_return);
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::setExtendedInfo(
+ int32_t opaqueIdentifier, const std::vector<uint8_t>& opaqueValue) {
+ mExtInfo.insert_or_assign(opaqueIdentifier, opaqueValue);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::setIntParameter(evs::CameraParam id, int32_t value,
+ std::vector<int32_t>* effectiveValue) {
+ const auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+ // Rounding down to the closest value.
+ int32_t candidate = value / it->second->range.step * it->second->range.step;
+ if (candidate < it->second->range.min || candidate > it->second->range.max) {
+ return ndk::ScopedAStatus::fromServiceSpecificError(
+ static_cast<int>(EvsResult::INVALID_ARG));
+ }
+ it->second->value = candidate;
+ effectiveValue->push_back(candidate);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::setPrimaryClient() {
+ /* Because EVS HW module reference implementation expects a single client at
+ * a time, this returns a success code always.
+ */
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus EvsVideoEmulatedCamera::unsetPrimaryClient() {
+ /* Because EVS HW module reference implementation expects a single client at
+ * a time, there is no chance that this is called by the secondary client and
+ * therefore returns a success code always.
+ */
+ return ndk::ScopedAStatus::ok();
+}
+
+std::shared_ptr<EvsVideoEmulatedCamera> EvsVideoEmulatedCamera::Create(const char* deviceName) {
+ std::unique_ptr<ConfigManager::CameraInfo> nullCamInfo = nullptr;
+ return Create(deviceName, nullCamInfo);
+}
+
+std::shared_ptr<EvsVideoEmulatedCamera> EvsVideoEmulatedCamera::Create(
+ const char* deviceName, std::unique_ptr<ConfigManager::CameraInfo>& camInfo,
+ const evs::Stream* /* streamCfg */) {
+ std::shared_ptr<EvsVideoEmulatedCamera> c =
+ ndk::SharedRefBase::make<EvsVideoEmulatedCamera>(Sigil{}, deviceName, camInfo);
+ if (!c) {
+ LOG(ERROR) << "Failed to instantiate EvsVideoEmulatedCamera.";
+ return nullptr;
+ }
+ c->mDescription.vendorFlags = 0xFFFFFFFF; // Arbitrary test value
+ return c;
+}
+
+EvsVideoEmulatedCamera::~EvsVideoEmulatedCamera() {}
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/src/GlWrapper.cpp b/automotive/evs/aidl/impl/default/src/GlWrapper.cpp
index 0ee5ecb..a9d0213 100644
--- a/automotive/evs/aidl/impl/default/src/GlWrapper.cpp
+++ b/automotive/evs/aidl/impl/default/src/GlWrapper.cpp
@@ -19,6 +19,7 @@
#include <aidl/android/frameworks/automotive/display/DisplayDesc.h>
#include <aidl/android/hardware/graphics/common/HardwareBufferDescription.h>
#include <aidlcommonsupport/NativeHandle.h>
+#include <gui/view/Surface.h>
#include <ui/DisplayMode.h>
#include <ui/DisplayState.h>
#include <ui/GraphicBuffer.h>
@@ -183,20 +184,6 @@
return program;
}
-::android::sp<HGraphicBufferProducer> convertNativeHandleToHGBP(const NativeHandle& aidlHandle) {
- native_handle_t* handle = ::android::dupFromAidl(aidlHandle);
- if (handle->numFds != 0 || handle->numInts < std::ceil(sizeof(size_t) / sizeof(int))) {
- LOG(ERROR) << "Invalid native handle";
- return nullptr;
- }
- ::android::hardware::hidl_vec<uint8_t> halToken;
- halToken.setToExternal(reinterpret_cast<uint8_t*>(const_cast<int*>(&(handle->data[1]))),
- handle->data[0]);
- ::android::sp<HGraphicBufferProducer> hgbp =
- HGraphicBufferProducer::castFrom(::android::retrieveHalInterface(halToken));
- return std::move(hgbp);
-}
-
} // namespace
namespace aidl::android::hardware::automotive::evs::implementation {
@@ -226,30 +213,19 @@
}
LOG(INFO) << "Display resolution is " << mWidth << "x" << mHeight;
- NativeHandle aidlHandle;
- status = pWindowProxy->getHGraphicBufferProducer(displayId, &aidlHandle);
+ aidl::android::view::Surface shimSurface;
+ status = pWindowProxy->getSurface(displayId, &shimSurface);
if (!status.isOk()) {
- LOG(ERROR) << "Failed to get IGraphicBufferProducer from ICarDisplayProxy.";
+ LOG(ERROR) << "Failed to obtain the surface.";
return false;
}
- mGfxBufferProducer = convertNativeHandleToHGBP(aidlHandle);
- if (!mGfxBufferProducer) {
- LOG(ERROR) << "Failed to convert a NativeHandle to HGBP.";
- return false;
- }
-
- mSurfaceHolder = getSurfaceFromHGBP(mGfxBufferProducer);
- if (mSurfaceHolder == nullptr) {
- LOG(ERROR) << "Failed to get a Surface from HGBP.";
- return false;
- }
-
- mWindow = getNativeWindow(mSurfaceHolder.get());
+ mWindow = shimSurface.get();
if (mWindow == nullptr) {
LOG(ERROR) << "Failed to get a native window from Surface.";
return false;
}
+ ANativeWindow_acquire(mWindow);
// Set up our OpenGL ES context associated with the default display
mDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
@@ -350,7 +326,12 @@
mDisplay = EGL_NO_DISPLAY;
// Release the window
- mSurfaceHolder = nullptr;
+ if (mWindow == nullptr) {
+ return;
+ }
+
+ ANativeWindow_release(mWindow);
+ mWindow = nullptr;
}
void GlWrapper::showWindow(const std::shared_ptr<ICarDisplayProxy>& pWindowProxy, uint64_t id) {
diff --git a/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp b/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp
new file mode 100644
index 0000000..8b4676e
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "EvsCamera.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include <cstdint>
+#include <unordered_set>
+#include <vector>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+class EvsCameraForTest : public EvsCamera {
+ public:
+ using EvsCamera::increaseAvailableFrames_unsafe;
+ using EvsCamera::returnBuffer_unsafe;
+ using EvsCamera::useBuffer_unsafe;
+
+ ~EvsCameraForTest() override { shutdown(); }
+
+ ::android::status_t allocateOneFrame(buffer_handle_t* handle) override {
+ static std::intptr_t handle_cnt = 0;
+ *handle = reinterpret_cast<buffer_handle_t>(++handle_cnt);
+ return ::android::OK;
+ }
+
+ void freeOneFrame(const buffer_handle_t /* handle */) override {
+ // Nothing to free because the handles are fake.
+ }
+
+ void checkBufferOrder() {
+ for (std::size_t idx = 0; idx < mBuffers.size(); ++idx) {
+ const auto& buffer = mBuffers[idx];
+ EXPECT_EQ(idx < mFramesInUse, buffer.inUse);
+ EXPECT_EQ(idx < mAvailableFrames, buffer.handle != nullptr);
+ EXPECT_LE(mFramesInUse, mAvailableFrames);
+ }
+ }
+
+ MOCK_METHOD(::ndk::ScopedAStatus, forcePrimaryClient,
+ (const std::shared_ptr<::aidl::android::hardware::automotive::evs::IEvsDisplay>&
+ in_display),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getCameraInfo,
+ (::aidl::android::hardware::automotive::evs::CameraDesc * _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getExtendedInfo,
+ (int32_t in_opaqueIdentifier, std::vector<uint8_t>* _aidl_return), (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getIntParameter,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id,
+ std::vector<int32_t>* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getIntParameterRange,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id,
+ ::aidl::android::hardware::automotive::evs::ParameterRange* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getParameterList,
+ (std::vector<::aidl::android::hardware::automotive::evs::CameraParam> *
+ _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getPhysicalCameraInfo,
+ (const std::string& in_deviceId,
+ ::aidl::android::hardware::automotive::evs::CameraDesc* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setExtendedInfo,
+ (int32_t in_opaqueIdentifier, const std::vector<uint8_t>& in_opaqueValue),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setIntParameter,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id, int32_t in_value,
+ std::vector<int32_t>* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setPrimaryClient, (), (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, unsetPrimaryClient, (), (override));
+ MOCK_METHOD(bool, startVideoStreamImpl_locked,
+ (const std::shared_ptr<evs::IEvsCameraStream>& receiver, ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck),
+ (override));
+ MOCK_METHOD(bool, stopVideoStreamImpl_locked,
+ (ndk::ScopedAStatus & status, std::unique_lock<std::mutex>& lck), (override));
+};
+
+TEST(EvsCameraBufferTest, ChangeBufferPoolSize) {
+ auto evsCam = ndk::SharedRefBase::make<EvsCameraForTest>();
+ EXPECT_TRUE(evsCam->setMaxFramesInFlight(100).isOk());
+ evsCam->checkBufferOrder();
+ EXPECT_TRUE(evsCam->setMaxFramesInFlight(50).isOk());
+ evsCam->checkBufferOrder();
+
+ // 2 buffers in use.
+ const auto [id1, handle1] = evsCam->useBuffer_unsafe();
+ const auto [id2, handle2] = evsCam->useBuffer_unsafe();
+ std::ignore = evsCam->useBuffer_unsafe();
+
+ // It allows you to set the buffer pool size to 1, but it will keep the space for the in use
+ // buffers.
+ EXPECT_TRUE(evsCam->setMaxFramesInFlight(1).isOk());
+ evsCam->checkBufferOrder();
+
+ evsCam->returnBuffer_unsafe(id1);
+ evsCam->checkBufferOrder();
+ evsCam->returnBuffer_unsafe(id2);
+ evsCam->checkBufferOrder();
+}
+
+TEST(EvsCameraBufferTest, UseAndReturn) {
+ constexpr std::size_t kNumOfHandles = 20;
+ auto evsCam = ndk::SharedRefBase::make<EvsCameraForTest>();
+
+ // Our "fake handles" of this test case is 1 to kNumOfHandles.
+ for (std::size_t i = 1; i <= kNumOfHandles; ++i) {
+ evsCam->increaseAvailableFrames_unsafe(reinterpret_cast<buffer_handle_t>(i));
+ }
+ evsCam->checkBufferOrder();
+
+ {
+ std::vector<std::pair<std::size_t, std::intptr_t>> inUseIDHandlePairs;
+ std::unordered_set<std::size_t> inUseIDs;
+ std::unordered_set<std::intptr_t> inUseHandles;
+ for (std::size_t i = 0; i < kNumOfHandles; ++i) {
+ const auto [id, handle] = evsCam->useBuffer_unsafe();
+ const std::size_t handleInt = reinterpret_cast<std::size_t>(handle);
+ EXPECT_TRUE(EvsCamera::IsBufferIDValid(id));
+ EXPECT_NE(handle, nullptr);
+ EXPECT_LT(id, kNumOfHandles);
+
+ // handleInt must be between [1, kNumOfHandles] as we "allocated" above.
+ EXPECT_LT(0u, handleInt);
+ EXPECT_LE(handleInt, kNumOfHandles);
+
+ inUseIDHandlePairs.push_back({id, handleInt});
+ EXPECT_TRUE(inUseIDs.insert(id).second);
+ EXPECT_TRUE(inUseHandles.insert(handleInt).second);
+ evsCam->checkBufferOrder();
+ }
+ // Return buffers in the order of acquiring.
+ for (const auto [id, handleInt] : inUseIDHandlePairs) {
+ evsCam->returnBuffer_unsafe(id);
+ evsCam->checkBufferOrder();
+ }
+ }
+
+ {
+ std::vector<std::pair<std::size_t, std::intptr_t>> inUseIDHandlePairs;
+ std::unordered_set<std::size_t> inUseIDs;
+ std::unordered_set<std::intptr_t> inUseHandles;
+ for (std::size_t i = 0; i < kNumOfHandles; ++i) {
+ const auto [id, handle] = evsCam->useBuffer_unsafe();
+ const std::size_t handleInt = reinterpret_cast<std::size_t>(handle);
+ EXPECT_TRUE(EvsCamera::IsBufferIDValid(id));
+ EXPECT_NE(handle, nullptr);
+ EXPECT_LT(id, kNumOfHandles);
+
+ // handleInt must be between [1, kNumOfHandles] as we "allocated" above.
+ EXPECT_LT(0u, handleInt);
+ EXPECT_LE(handleInt, kNumOfHandles);
+
+ inUseIDHandlePairs.push_back({id, handleInt});
+ EXPECT_TRUE(inUseIDs.insert(id).second);
+ EXPECT_TRUE(inUseHandles.insert(handleInt).second);
+ evsCam->checkBufferOrder();
+ }
+ // Return buffers in the reverse order of acquiring.
+ std::reverse(inUseIDHandlePairs.begin(), inUseIDHandlePairs.end());
+ for (const auto [id, handleInt] : inUseIDHandlePairs) {
+ evsCam->returnBuffer_unsafe(id);
+ evsCam->checkBufferOrder();
+ }
+ }
+
+ {
+ // Making sure the handles are still in [1, kNumOfHandles] and IDs are still [0,
+ // kNumOfHandles). The mapping may be different, though.
+ std::vector<std::pair<std::size_t, std::intptr_t>> inUseIDHandlePairs;
+ std::unordered_set<std::size_t> inUseIDs;
+ std::unordered_set<std::intptr_t> inUseHandles;
+ for (std::size_t i = 0; i < kNumOfHandles; ++i) {
+ const auto [id, handle] = evsCam->useBuffer_unsafe();
+ const std::size_t handleInt = reinterpret_cast<std::size_t>(handle);
+ EXPECT_TRUE(EvsCamera::IsBufferIDValid(id));
+ EXPECT_NE(handle, nullptr);
+ EXPECT_LT(id, kNumOfHandles);
+
+ // handleInt must be between [1, kNumOfHandles] as we "allocated" above.
+ EXPECT_LT(0u, handleInt);
+ EXPECT_LE(handleInt, kNumOfHandles);
+
+ inUseIDHandlePairs.push_back({id, handleInt});
+ EXPECT_TRUE(inUseIDs.insert(id).second);
+ EXPECT_TRUE(inUseHandles.insert(handleInt).second);
+ evsCam->checkBufferOrder();
+ }
+ }
+}
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp b/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp
new file mode 100644
index 0000000..1925c79
--- /dev/null
+++ b/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp
@@ -0,0 +1,202 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "EvsCamera.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include <cstdint>
+#include <unordered_set>
+#include <vector>
+
+namespace aidl::android::hardware::automotive::evs::implementation {
+
+class EvsCameraForTest : public EvsCamera {
+ private:
+ using Base = EvsCamera;
+
+ public:
+ using EvsCamera::mStreamState;
+ using EvsCamera::shutdown;
+ using EvsCamera::StreamState;
+
+ ~EvsCameraForTest() override { shutdown(); }
+
+ ::android::status_t allocateOneFrame(buffer_handle_t* handle) override {
+ static std::intptr_t handle_cnt = 0;
+ *handle = reinterpret_cast<buffer_handle_t>(++handle_cnt);
+ return ::android::OK;
+ }
+
+ void freeOneFrame(const buffer_handle_t /* handle */) override {
+ // Nothing to free because the handles are fake.
+ }
+
+ bool preVideoStreamStart_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override {
+ mPreStartCalled = true;
+ EXPECT_EQ(mStreamState, StreamState::STOPPED);
+ EXPECT_FALSE(mStreamStarted);
+ EXPECT_FALSE(mStreamStopped);
+ return Base::preVideoStreamStart_locked(receiver, status, lck);
+ }
+
+ bool startVideoStreamImpl_locked(const std::shared_ptr<evs::IEvsCameraStream>& /* receiver */,
+ ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& /* lck */) override {
+ EXPECT_EQ(mStreamState, StreamState::RUNNING);
+ EXPECT_FALSE(mStreamStarted);
+ EXPECT_FALSE(mStreamStopped);
+ mStreamStarted = true;
+ return true;
+ }
+
+ bool postVideoStreamStart_locked(const std::shared_ptr<evs::IEvsCameraStream>& receiver,
+ ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override {
+ mPostStartCalled = true;
+ EXPECT_EQ(mStreamState, StreamState::RUNNING);
+ EXPECT_TRUE(mStreamStarted);
+ EXPECT_FALSE(mStreamStopped);
+ return Base::postVideoStreamStart_locked(receiver, status, lck);
+ }
+
+ bool preVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override {
+ // Skip the check if stop was called before.
+ if (!mPreStopCalled) {
+ mPreStopCalled = true;
+ EXPECT_EQ(mStreamState, StreamState::RUNNING);
+ EXPECT_TRUE(mStreamStarted);
+ EXPECT_FALSE(mStreamStopped);
+ }
+ return Base::preVideoStreamStop_locked(status, lck);
+ }
+
+ bool stopVideoStreamImpl_locked(ndk::ScopedAStatus& /* status */,
+ std::unique_lock<std::mutex>& /* lck */) override {
+ EXPECT_EQ(mStreamState, StreamState::STOPPING);
+ EXPECT_TRUE(mStreamStarted);
+ EXPECT_FALSE(mStreamStopped);
+ mStreamStopped = true;
+ return true;
+ }
+
+ bool postVideoStreamStop_locked(ndk::ScopedAStatus& status,
+ std::unique_lock<std::mutex>& lck) override {
+ mPostStopCalled = true;
+ const auto ret = Base::postVideoStreamStop_locked(status, lck);
+ EXPECT_EQ(mStreamState, StreamState::STOPPED);
+ EXPECT_TRUE(mStreamStarted);
+ EXPECT_TRUE(mStreamStopped);
+ return ret;
+ }
+
+ MOCK_METHOD(::ndk::ScopedAStatus, forcePrimaryClient,
+ (const std::shared_ptr<::aidl::android::hardware::automotive::evs::IEvsDisplay>&
+ in_display),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getCameraInfo,
+ (::aidl::android::hardware::automotive::evs::CameraDesc * _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getExtendedInfo,
+ (int32_t in_opaqueIdentifier, std::vector<uint8_t>* _aidl_return), (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getIntParameter,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id,
+ std::vector<int32_t>* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getIntParameterRange,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id,
+ ::aidl::android::hardware::automotive::evs::ParameterRange* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getParameterList,
+ (std::vector<::aidl::android::hardware::automotive::evs::CameraParam> *
+ _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getPhysicalCameraInfo,
+ (const std::string& in_deviceId,
+ ::aidl::android::hardware::automotive::evs::CameraDesc* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setExtendedInfo,
+ (int32_t in_opaqueIdentifier, const std::vector<uint8_t>& in_opaqueValue),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setIntParameter,
+ (::aidl::android::hardware::automotive::evs::CameraParam in_id, int32_t in_value,
+ std::vector<int32_t>* _aidl_return),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, setPrimaryClient, (), (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, unsetPrimaryClient, (), (override));
+
+ bool mStreamStarted = false;
+ bool mStreamStopped = false;
+ bool mPreStartCalled = false;
+ bool mPostStartCalled = false;
+ bool mPreStopCalled = false;
+ bool mPostStopCalled = false;
+};
+
+class MockEvsCameraStream : public evs::IEvsCameraStream {
+ MOCK_METHOD(::ndk::SpAIBinder, asBinder, (), (override));
+ MOCK_METHOD(bool, isRemote, (), (override));
+ MOCK_METHOD(
+ ::ndk::ScopedAStatus, deliverFrame,
+ (const std::vector<::aidl::android::hardware::automotive::evs::BufferDesc>& in_buffer),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, notify,
+ (const ::aidl::android::hardware::automotive::evs::EvsEventDesc& in_event),
+ (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getInterfaceVersion, (int32_t * _aidl_return), (override));
+ MOCK_METHOD(::ndk::ScopedAStatus, getInterfaceHash, (std::string * _aidl_return), (override));
+};
+
+using StreamState = EvsCameraForTest::StreamState;
+
+TEST(EvsCameraStateTest, StateChangeHooks) {
+ auto evsCam = ndk::SharedRefBase::make<EvsCameraForTest>();
+ auto mockStream = ndk::SharedRefBase::make<MockEvsCameraStream>();
+ EXPECT_FALSE(evsCam->mPreStartCalled);
+ EXPECT_FALSE(evsCam->mPostStartCalled);
+ EXPECT_FALSE(evsCam->mPreStopCalled);
+ EXPECT_FALSE(evsCam->mPostStopCalled);
+ EXPECT_FALSE(evsCam->mStreamStarted);
+ EXPECT_FALSE(evsCam->mStreamStopped);
+ EXPECT_EQ(evsCam->mStreamState, StreamState::STOPPED);
+ evsCam->startVideoStream(mockStream);
+
+ EXPECT_TRUE(evsCam->mPreStartCalled);
+ EXPECT_TRUE(evsCam->mPostStartCalled);
+ EXPECT_FALSE(evsCam->mPreStopCalled);
+ EXPECT_FALSE(evsCam->mPostStopCalled);
+ EXPECT_TRUE(evsCam->mStreamStarted);
+ EXPECT_FALSE(evsCam->mStreamStopped);
+ EXPECT_EQ(evsCam->mStreamState, StreamState::RUNNING);
+ evsCam->stopVideoStream();
+
+ EXPECT_TRUE(evsCam->mPreStartCalled);
+ EXPECT_TRUE(evsCam->mPostStartCalled);
+ EXPECT_TRUE(evsCam->mPreStopCalled);
+ EXPECT_TRUE(evsCam->mPostStopCalled);
+ EXPECT_TRUE(evsCam->mStreamStarted);
+ EXPECT_TRUE(evsCam->mStreamStopped);
+ EXPECT_EQ(evsCam->mStreamState, StreamState::STOPPED);
+
+ evsCam->shutdown();
+ EXPECT_EQ(evsCam->mStreamState, StreamState::DEAD);
+}
+
+} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/remoteaccess/Android.bp b/automotive/remoteaccess/Android.bp
index 7cd6f60..e1e9041 100644
--- a/automotive/remoteaccess/Android.bp
+++ b/automotive/remoteaccess/Android.bp
@@ -42,6 +42,5 @@
imports: [],
},
],
- frozen: true,
-
+ frozen: false,
}
diff --git a/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
index b0935c2..ccfa22d 100644
--- a/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
+++ b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
@@ -40,4 +40,10 @@
void setRemoteTaskCallback(android.hardware.automotive.remoteaccess.IRemoteTaskCallback callback);
void clearRemoteTaskCallback();
void notifyApStateChange(in android.hardware.automotive.remoteaccess.ApState state);
+ boolean isTaskScheduleSupported();
+ void scheduleTask(in android.hardware.automotive.remoteaccess.ScheduleInfo scheduleInfo);
+ void unscheduleTask(String clientId, String scheduleId);
+ void unscheduleAllTasks(String clientId);
+ boolean isTaskScheduled(String clientId, String scheduleId);
+ List<android.hardware.automotive.remoteaccess.ScheduleInfo> getAllScheduledTasks(String clientId);
}
diff --git a/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl
new file mode 100644
index 0000000..a929e10
--- /dev/null
+++ b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.automotive.remoteaccess;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ScheduleInfo {
+ String clientId;
+ String scheduleId;
+ byte[] taskData;
+ int count;
+ long startTimeInEpochSeconds;
+ long periodicInSeconds;
+}
diff --git a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
index 0f4125f..4912651 100644
--- a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
+++ b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
@@ -18,6 +18,7 @@
import android.hardware.automotive.remoteaccess.ApState;
import android.hardware.automotive.remoteaccess.IRemoteTaskCallback;
+import android.hardware.automotive.remoteaccess.ScheduleInfo;
/**
* Interface representing a remote wakeup client.
@@ -96,4 +97,69 @@
* <p>If {@code isWakeupRequired} is false, it must not try to wake up AP.
*/
void notifyApStateChange(in ApState state);
+
+ /**
+ * Returns whether task scheduling is supported.
+ *
+ * <p>If this returns {@code true}, user may use {@link scheduleTask} to schedule a task to be
+ * executed at a later time. If the device is off when the task is scheduled to be executed,
+ * the device will be woken up to execute the task.
+ *
+ * @return {@code true} if serverless remote task scheduling is supported.
+ */
+ boolean isTaskScheduleSupported();
+
+ /**
+ * Schedules a task to be executed later even when the vehicle is off.
+ *
+ * <p>If {@link isTaskScheduleSupported} returns {@code false}. This is no-op.
+ *
+ * <p>This sends a scheduled task message to a device external to Android so that the device
+ * can wake up Android and deliver the task through {@link IRemoteTaskCallback}.
+ *
+ * <p>Note that the scheduled task execution is on a best-effort basis. Multiple situations
+ * might cause the task not to execute successfully:
+ *
+ * <ul>
+ * <li>The vehicle is low on battery and the other device decides not to wake up Android.
+ * <li>User turns off vehicle while the task is executing.
+ * <li>The task logic itself fails.
+ *
+ * <p>Must return {@code EX_ILLEGAL_ARGUMENT} if a pending schedule with the same
+ * {@code scheduleId} for this client exists.
+ */
+ void scheduleTask(in ScheduleInfo scheduleInfo);
+
+ /**
+ * Unschedules a scheduled task.
+ *
+ * <p>If {@link isTaskScheduleSupported} returns {@code false}. This is no-op.
+ *
+ * <p>Does nothing if a pending schedule with {@code clientId} and {@code scheduleId} does not
+ * exist.
+ */
+ void unscheduleTask(String clientId, String scheduleId);
+
+ /**
+ * Unschedules all scheduled tasks for the client.
+ *
+ * <p>If {@link isTaskScheduleSupported} returns {@code false}. This is no-op.
+ */
+ void unscheduleAllTasks(String clientId);
+
+ /**
+ * Returns whether the specified task is scheduled.
+ *
+ * <p>If {@link isTaskScheduleSupported} returns {@code false}, This must return {@code false}.
+ */
+ boolean isTaskScheduled(String clientId, String scheduleId);
+
+ /**
+ * Gets all pending scheduled tasks for the client.
+ *
+ * <p>If {@link isTaskScheduleSupported} returns {@code false}. This must return empty array.
+ *
+ * <p>The finished scheduled tasks will not be included.
+ */
+ List<ScheduleInfo> getAllScheduledTasks(String clientId);
}
diff --git a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl
new file mode 100644
index 0000000..cf1437b
--- /dev/null
+++ b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/ScheduleInfo.aidl
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.automotive.remoteaccess;
+
+@VintfStability
+@JavaDerive(equals=true, toString=true)
+parcelable ScheduleInfo {
+ /**
+ * The ID used to identify the client this schedule is for. This must be one of the
+ * preconfigured remote access serverless client ID defined in car service resource
+ * {@code R.xml.remote_access_serverless_client_map}.
+ */
+ String clientId;
+ /**
+ * A unique scheduling ID (among the same client). Adding a new schedule info with a duplicate
+ * scheduleId will return {@code EX_ILLEGAL_ARGUMENT}.
+ */
+ String scheduleId;
+ /**
+ * The opaque task data that will be sent back to the remote task client app when the task is
+ * executed. It is not interpreted/parsed by the Android system.
+ */
+ byte[] taskData;
+ /**
+ * How many times this task will be executed. 0 means infinite.
+ *
+ * <p>This must be >= 0.
+ */
+ int count;
+ /**
+ * The start time in epoch seconds.
+ *
+ * <p>The external device issuing remote task must have a clock synced with the
+ * {@code System.currentTimeMillis()} used in Android system.
+ *
+ * <p>Optionally, the VHAL property {@code EPOCH_TIME} can be used to sync the time.
+ *
+ * <p>This must be >= 0.
+ */
+ long startTimeInEpochSeconds;
+ /**
+ * The interval (in seconds) between scheduled task execution.
+ *
+ * <p>This must be >=0. This is not useful when {@code count} is 1. If this is 0,
+ * The tasks will be delivered multiple times with no interval in between.
+ */
+ long periodicInSeconds;
+}
diff --git a/automotive/remoteaccess/hal/default/Android.bp b/automotive/remoteaccess/hal/default/Android.bp
index 0155667..97ed2c1 100644
--- a/automotive/remoteaccess/hal/default/Android.bp
+++ b/automotive/remoteaccess/hal/default/Android.bp
@@ -48,17 +48,17 @@
}
cc_binary {
- name: "android.hardware.automotive.remoteaccess@V1-default-service",
+ name: "android.hardware.automotive.remoteaccess@V2-default-service",
defaults: ["remote-access-hal-defaults"],
vintf_fragments: ["remoteaccess-default-service.xml"],
init_rc: ["remoteaccess-default-service.rc"],
cflags: [
- "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
+ "-DGRPC_SERVICE_ADDRESS=\"10.0.2.2:50051\"",
],
}
cc_binary {
- name: "android.hardware.automotive.remoteaccess@V1-tcu-test-service",
+ name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service",
defaults: ["remote-access-hal-defaults"],
vintf_fragments: ["remoteaccess-default-service.xml"],
init_rc: ["remoteaccess-tcu-test-service.rc"],
@@ -77,7 +77,7 @@
"src/RemoteAccessService.cpp",
],
whole_static_libs: [
- "android.hardware.automotive.remoteaccess-V1-ndk",
+ "android.hardware.automotive.remoteaccess-V2-ndk",
"wakeup_client_protos",
"libvhalclient",
],
@@ -99,7 +99,7 @@
}
cc_fuzz {
- name: "android.hardware.automotive.remoteaccess@V1-default-service.aidl_fuzzer",
+ name: "android.hardware.automotive.remoteaccess@V2-default-service.aidl_fuzzer",
srcs: ["fuzzer/fuzzer.cpp"],
whole_static_libs: [
"RemoteAccessService",
diff --git a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
index b18986a..1fc4037 100644
--- a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
+++ b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
@@ -21,6 +21,7 @@
#include <aidl/android/hardware/automotive/remoteaccess/BnRemoteAccess.h>
#include <aidl/android/hardware/automotive/remoteaccess/BnRemoteTaskCallback.h>
#include <aidl/android/hardware/automotive/remoteaccess/IRemoteTaskCallback.h>
+#include <aidl/android/hardware/automotive/remoteaccess/ScheduleInfo.h>
#include <android-base/thread_annotations.h>
#include <android/binder_auto_utils.h>
#include <utils/SystemClock.h>
@@ -78,6 +79,25 @@
ndk::ScopedAStatus notifyApStateChange(
const aidl::android::hardware::automotive::remoteaccess::ApState& newState) override;
+ ndk::ScopedAStatus isTaskScheduleSupported(bool* out) override;
+
+ ndk::ScopedAStatus scheduleTask(
+ const aidl::android::hardware::automotive::remoteaccess::ScheduleInfo& scheduleInfo)
+ override;
+
+ ndk::ScopedAStatus unscheduleTask(const std::string& clientId,
+ const std::string& scheduleId) override;
+
+ ndk::ScopedAStatus unscheduleAllTasks(const std::string& clientId) override;
+
+ ndk::ScopedAStatus isTaskScheduled(const std::string& clientId, const std::string& scheduleId,
+ bool* out) override;
+
+ ndk::ScopedAStatus getAllScheduledTasks(
+ const std::string& clientId,
+ std::vector<aidl::android::hardware::automotive::remoteaccess::ScheduleInfo>* out)
+ override;
+
binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
private:
diff --git a/automotive/remoteaccess/hal/default/remoteaccess-default-service.rc b/automotive/remoteaccess/hal/default/remoteaccess-default-service.rc
index b7a9cdc..c9b282c 100644
--- a/automotive/remoteaccess/hal/default/remoteaccess-default-service.rc
+++ b/automotive/remoteaccess/hal/default/remoteaccess-default-service.rc
@@ -1,4 +1,4 @@
-service vendor.remoteaccess-default /vendor/bin/hw/android.hardware.automotive.remoteaccess@V1-default-service
+service vendor.remoteaccess-default /vendor/bin/hw/android.hardware.automotive.remoteaccess@V2-default-service
class hal
user vehicle_network
group system inet
diff --git a/automotive/remoteaccess/hal/default/remoteaccess-default-service.xml b/automotive/remoteaccess/hal/default/remoteaccess-default-service.xml
index d050a1b..44ac309 100644
--- a/automotive/remoteaccess/hal/default/remoteaccess-default-service.xml
+++ b/automotive/remoteaccess/hal/default/remoteaccess-default-service.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.automotive.remoteaccess</name>
- <version>1</version>
+ <version>2</version>
<fqname>IRemoteAccess/default</fqname>
</hal>
</manifest>
diff --git a/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc b/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
index 59315eb..19faaf4 100644
--- a/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
+++ b/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
@@ -1,4 +1,4 @@
-service vendor.remoteaccess-default /vendor/bin/hw/android.hardware.automotive.remoteaccess@V1-tcu-test-service
+service vendor.remoteaccess-default /vendor/bin/hw/android.hardware.automotive.remoteaccess@V2-tcu-test-service
class hal
user vehicle_network
group system inet
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
index b091162..d4ba864 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessImpl.cpp
@@ -30,12 +30,12 @@
constexpr char SERVICE_NAME[] = "android.hardware.automotive.remoteaccess.IRemoteAccess/default";
int main(int /* argc */, char* /* argv */[]) {
- LOG(INFO) << "Registering RemoteAccessService as service...";
-
#ifndef GRPC_SERVICE_ADDRESS
LOG(ERROR) << "GRPC_SERVICE_ADDRESS is not defined, exiting";
exit(1);
#endif
+ LOG(INFO) << "Registering RemoteAccessService as service, server: " << GRPC_SERVICE_ADDRESS
+ << "...";
grpc::ChannelArguments grpcargs = {};
#ifdef GRPC_SERVICE_IFNAME
@@ -48,8 +48,7 @@
android::netdevice::WaitCondition::PRESENT_AND_UP);
LOG(INFO) << "Waiting for interface: " << GRPC_SERVICE_IFNAME << " done";
#endif
- auto channel = grpc::CreateCustomChannel(GRPC_SERVICE_ADDRESS,
- grpc::InsecureChannelCredentials(), grpcargs);
+ auto channel = grpc::CreateChannel(GRPC_SERVICE_ADDRESS, grpc::InsecureChannelCredentials());
auto clientStub = android::hardware::automotive::remoteaccess::WakeupClient::NewStub(channel);
auto service = ndk::SharedRefBase::make<
android::hardware::automotive::remoteaccess::RemoteAccessService>(clientStub.get());
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
index 5081ac0..7721bf4 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
@@ -39,6 +39,7 @@
using ::aidl::android::hardware::automotive::remoteaccess::ApState;
using ::aidl::android::hardware::automotive::remoteaccess::IRemoteTaskCallback;
+using ::aidl::android::hardware::automotive::remoteaccess::ScheduleInfo;
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
using ::android::base::Error;
using ::android::base::ParseInt;
@@ -313,6 +314,41 @@
return ScopedAStatus::ok();
}
+ScopedAStatus RemoteAccessService::isTaskScheduleSupported([[maybe_unused]] bool* out) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::scheduleTask([[maybe_unused]] const ScheduleInfo& scheduleInfo) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::unscheduleTask([[maybe_unused]] const std::string& clientId,
+ [[maybe_unused]] const std::string& scheduleId) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::unscheduleAllTasks(
+ [[maybe_unused]] const std::string& clientId) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::isTaskScheduled([[maybe_unused]] const std::string& clientId,
+ [[maybe_unused]] const std::string& scheduleId,
+ [[maybe_unused]] bool* out) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::getAllScheduledTasks(const std::string& clientId,
+ std::vector<ScheduleInfo>* out) {
+ // TODO(b/297271235): implement this.
+ return ScopedAStatus::ok();
+}
+
bool RemoteAccessService::checkDumpPermission() {
uid_t uid = AIBinder_getCallingUid();
return uid == AID_ROOT || uid == AID_SHELL || uid == AID_SYSTEM;
diff --git a/automotive/remoteaccess/test_grpc_server/README.md b/automotive/remoteaccess/test_grpc_server/README.md
index af3d54a..d2b6bbe 100644
--- a/automotive/remoteaccess/test_grpc_server/README.md
+++ b/automotive/remoteaccess/test_grpc_server/README.md
@@ -141,7 +141,7 @@
* The android lunch target: sdk_car_x86_64-userdebug and
cf_x86_64_auto-userdebug already contains the default remote access HAL. For
other lunch target, you can add the default remote access HAL by adding
- 'android.hardware.automotive.remoteaccess@V1-default-service' to
+ 'android.hardware.automotive.remoteaccess@V2-default-service' to
'PRODUCT_PACKAGES' variable in mk file, see `device/generic/car/common/car.mk`
as example.
diff --git a/automotive/remoteaccess/test_grpc_server/impl/Android.bp b/automotive/remoteaccess/test_grpc_server/impl/Android.bp
index 152b528..74c810e 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/Android.bp
+++ b/automotive/remoteaccess/test_grpc_server/impl/Android.bp
@@ -38,6 +38,26 @@
],
cflags: [
"-Wno-unused-parameter",
- "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"",
+ "-DGRPC_SERVICE_ADDRESS=\"127.0.0.1:50051\"",
+ ],
+}
+
+cc_binary_host {
+ name: "TestWakeupClientServerHost",
+ srcs: ["src/*.cpp"],
+ local_include_dirs: ["include"],
+ shared_libs: [
+ "libbase",
+ "libutils",
+ "libgrpc++",
+ "libprotobuf-cpp-full",
+ ],
+ whole_static_libs: [
+ "wakeup_client_protos",
+ ],
+ cflags: [
+ "-Wno-unused-parameter",
+ "-DGRPC_SERVICE_ADDRESS=\"127.0.0.1:50051\"",
+ "-DHOST",
],
}
diff --git a/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h b/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
index 6b86b35..4159e83 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
+++ b/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
@@ -34,11 +34,9 @@
// implementation, the task should come from remote task server. This class is thread-safe.
class FakeTaskGenerator final {
public:
- GetRemoteTasksResponse generateTask();
+ GetRemoteTasksResponse generateTask(const std::string& clientId);
private:
- // Simulates the client ID for each task.
- std::atomic<int> mCurrentClientId = 0;
constexpr static uint8_t DATA[] = {0xde, 0xad, 0xbe, 0xef};
};
@@ -99,7 +97,7 @@
void waitForTaskWithLock(std::unique_lock<std::mutex>& lock);
};
-class TestWakeupClientServiceImpl final : public WakeupClient::Service {
+class TestWakeupClientServiceImpl : public WakeupClient::Service {
public:
TestWakeupClientServiceImpl();
@@ -112,25 +110,57 @@
const NotifyWakeupRequiredRequest* request,
NotifyWakeupRequiredResponse* response) override;
+ /**
+ * Starts generating fake tasks for the specific client repeatedly.
+ *
+ * The fake task will have {0xDE 0xAD 0xBE 0xEF} as payload. A new fake task will be sent
+ * to the client every 5s.
+ */
+ void startGeneratingFakeTask(const std::string& clientId);
+ /**
+ * stops generating fake tasks.
+ */
+ void stopGeneratingFakeTask();
+ /**
+ * Returns whether we need to wakeup the target device to send remote tasks.
+ */
+ bool isWakeupRequired();
+ /**
+ * Returns whether we have an active connection with the target device.
+ */
+ bool isRemoteTaskConnectionAlive();
+ /**
+ * Injects a fake task with taskData to be sent to the specific client.
+ */
+ void injectTask(const std::string& taskData, const std::string& clientId);
+ /**
+ * Wakes up the target device.
+ *
+ * This must be implemented by child class and contains device specific logic. E.g. this might
+ * be sending QEMU commands for the emulator device.
+ */
+ virtual void wakeupApplicationProcessor() = 0;
+
private:
// This is a thread for communicating with remote wakeup server (via network) and receive tasks
// from it.
std::thread mThread;
// A variable to notify server is stopping.
- std::condition_variable mServerStoppedCv;
+ std::condition_variable mTaskLoopStoppedCv;
// Whether wakeup AP is required for executing tasks.
std::atomic<bool> mWakeupRequired = true;
+ // Whether we currently have an active long-live connection to deliver remote tasks.
+ std::atomic<bool> mRemoteTaskConnectionAlive = false;
std::mutex mLock;
- bool mServerStopped GUARDED_BY(mLock);
+ bool mGeneratingFakeTask GUARDED_BY(mLock);
// Thread-safe. For test impl only.
FakeTaskGenerator mFakeTaskGenerator;
// Thread-sfae.
TaskQueue mTaskQueue;
- void fakeTaskGenerateLoop();
-
- void wakeupApplicationProcessor();
+ void fakeTaskGenerateLoop(const std::string& clientId);
+ void injectTaskResponse(const GetRemoteTasksResponse& response);
};
} // namespace remoteaccess
diff --git a/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp b/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
index 7dcd31e..eb3871b 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
+++ b/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
@@ -16,8 +16,6 @@
#include "TestWakeupClientServiceImpl.h"
-#include "ApPowerControl.h"
-
#include <android-base/stringprintf.h>
#include <inttypes.h>
#include <utils/Looper.h>
@@ -44,12 +42,10 @@
} // namespace
-GetRemoteTasksResponse FakeTaskGenerator::generateTask() {
- int clientId = mCurrentClientId++;
+GetRemoteTasksResponse FakeTaskGenerator::generateTask(const std::string& clientId) {
GetRemoteTasksResponse response;
- response.set_data(std::string(reinterpret_cast<const char*>(DATA), sizeof(DATA)));
- std::string clientIdStr = StringPrintf("%d", clientId);
- response.set_clientid(clientIdStr);
+ response.set_data(reinterpret_cast<const char*>(DATA), sizeof(DATA));
+ response.set_clientid(clientId);
return response;
}
@@ -165,38 +161,68 @@
}
}
-TestWakeupClientServiceImpl::TestWakeupClientServiceImpl() {
- mThread = std::thread([this] { fakeTaskGenerateLoop(); });
-}
+TestWakeupClientServiceImpl::TestWakeupClientServiceImpl() {}
TestWakeupClientServiceImpl::~TestWakeupClientServiceImpl() {
+ { std::lock_guard<std::mutex> lockGuard(mLock); }
+ mTaskQueue.stopWait();
+ stopGeneratingFakeTask();
+}
+
+void TestWakeupClientServiceImpl::injectTask(const std::string& taskData,
+ const std::string& clientId) {
+ GetRemoteTasksResponse response;
+ response.set_data(taskData);
+ response.set_clientid(clientId);
+ injectTaskResponse(response);
+}
+
+void TestWakeupClientServiceImpl::injectTaskResponse(const GetRemoteTasksResponse& response) {
+ printf("Received a new task\n");
+ mTaskQueue.add(response);
+ if (mWakeupRequired) {
+ wakeupApplicationProcessor();
+ }
+}
+
+void TestWakeupClientServiceImpl::startGeneratingFakeTask(const std::string& clientId) {
+ std::lock_guard<std::mutex> lockGuard(mLock);
+ if (mGeneratingFakeTask) {
+ printf("Fake task is already being generated\n");
+ return;
+ }
+ mGeneratingFakeTask = true;
+ mThread = std::thread([this, clientId] { fakeTaskGenerateLoop(clientId); });
+ printf("Started generating fake tasks\n");
+}
+
+void TestWakeupClientServiceImpl::stopGeneratingFakeTask() {
{
std::lock_guard<std::mutex> lockGuard(mLock);
- mServerStopped = true;
- mServerStoppedCv.notify_all();
+ if (!mGeneratingFakeTask) {
+ printf("Fake task is not being generated, do nothing\n");
+ return;
+ }
+ mTaskLoopStoppedCv.notify_all();
+ mGeneratingFakeTask = false;
}
- mTaskQueue.stopWait();
if (mThread.joinable()) {
mThread.join();
}
+ printf("Stopped generating fake tasks\n");
}
-void TestWakeupClientServiceImpl::fakeTaskGenerateLoop() {
+void TestWakeupClientServiceImpl::fakeTaskGenerateLoop(const std::string& clientId) {
// In actual implementation, this should communicate with the remote server and receives tasks
// from it. Here we simulate receiving one remote task every {kTaskIntervalInMs}ms.
while (true) {
- mTaskQueue.add(mFakeTaskGenerator.generateTask());
- printf("Received a new task\n");
- if (mWakeupRequired) {
- wakeupApplicationProcessor();
- }
-
+ injectTaskResponse(mFakeTaskGenerator.generateTask(clientId));
printf("Sleeping for %d seconds until next task\n", kTaskIntervalInMs);
std::unique_lock lk(mLock);
- if (mServerStoppedCv.wait_for(lk, std::chrono::milliseconds(kTaskIntervalInMs), [this] {
+ if (mTaskLoopStoppedCv.wait_for(lk, std::chrono::milliseconds(kTaskIntervalInMs), [this] {
ScopedLockAssertion lockAssertion(mLock);
- return mServerStopped;
+ return !mGeneratingFakeTask;
})) {
// If the stopped flag is set, we are quitting, exit the loop.
return;
@@ -208,6 +234,7 @@
const GetRemoteTasksRequest* request,
ServerWriter<GetRemoteTasksResponse>* writer) {
printf("GetRemoteTasks called\n");
+ mRemoteTaskConnectionAlive = true;
while (true) {
mTaskQueue.waitForTask();
@@ -226,16 +253,19 @@
// The task failed to be sent, add it back to the queue. The order might change, but
// it is okay.
mTaskQueue.add(response);
+ mRemoteTaskConnectionAlive = false;
return Status::CANCELLED;
}
}
}
+ mRemoteTaskConnectionAlive = false;
return Status::OK;
}
Status TestWakeupClientServiceImpl::NotifyWakeupRequired(ServerContext* context,
const NotifyWakeupRequiredRequest* request,
NotifyWakeupRequiredResponse* response) {
+ printf("NotifyWakeupRequired called\n");
if (request->iswakeuprequired() && !mWakeupRequired && !mTaskQueue.isEmpty()) {
// If wakeup is now required and previously not required, this means we have finished
// shutting down the device. If there are still pending tasks, try waking up AP again
@@ -243,11 +273,20 @@
wakeupApplicationProcessor();
}
mWakeupRequired = request->iswakeuprequired();
+ if (mWakeupRequired) {
+ // We won't know the connection is down unless we try to send a task over. If wakeup is
+ // required, the connection is very likely already down.
+ mRemoteTaskConnectionAlive = false;
+ }
return Status::OK;
}
-void TestWakeupClientServiceImpl::wakeupApplicationProcessor() {
- wakeupAp();
+bool TestWakeupClientServiceImpl::isWakeupRequired() {
+ return mWakeupRequired;
+}
+
+bool TestWakeupClientServiceImpl::isRemoteTaskConnectionAlive() {
+ return mRemoteTaskConnectionAlive;
}
} // namespace remoteaccess
diff --git a/automotive/remoteaccess/test_grpc_server/impl/src/main.cpp b/automotive/remoteaccess/test_grpc_server/impl/src/main.cpp
index d3f519c..be285a8 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/src/main.cpp
+++ b/automotive/remoteaccess/test_grpc_server/impl/src/main.cpp
@@ -14,7 +14,17 @@
* limitations under the License.
*/
+#include <signal.h>
+#include <stdio.h>
+#include <sys/wait.h>
+#include <iostream>
+#include <sstream>
#include <string>
+#include <thread>
+
+#ifndef HOST
+#include "ApPowerControl.h"
+#endif // #ifndef HOST
#include "TestWakeupClientServiceImpl.h"
@@ -28,10 +38,18 @@
using ::grpc::ServerBuilder;
using ::grpc::ServerWriter;
-void RunServer(const std::string& serviceAddr) {
- std::shared_ptr<TestWakeupClientServiceImpl> service =
- std::make_unique<TestWakeupClientServiceImpl>();
+constexpr int SHUTDOWN_REQUEST = 289410889;
+constexpr int VEHICLE_IN_USE = 287313738;
+const char* COMMAND_RUN_EMU = "source ~/.aae-toolbox/bin/bashrc && aae emulator run";
+const char* COMMAND_SET_VHAL_PROP =
+ "adb -s emulator-5554 wait-for-device && adb -s emulator-5554 root "
+ "&& sleep 1 && adb -s emulator-5554 wait-for-device && adb -s emulator-5554 shell "
+ "dumpsys android.hardware.automotive.vehicle.IVehicle/default --set %d -i %d";
+pid_t emuPid = 0;
+
+void RunServer(const std::string& serviceAddr,
+ std::shared_ptr<TestWakeupClientServiceImpl> service) {
ServerBuilder builder;
builder.AddListeningPort(serviceAddr, grpc::InsecureServerCredentials());
builder.RegisterService(service.get());
@@ -40,11 +58,224 @@
server->Wait();
}
+pid_t runCommand(const char* bashCommand) {
+ pid_t pid = fork();
+ if (pid == 0) {
+ // In child process. Put it into a separate process group so we can kill it.
+ setpgid(0, 0);
+ execl("/bin/bash", "bash", "-c", bashCommand, /*terminateArg=*/nullptr);
+ exit(0);
+ } else {
+ return pid;
+ }
+}
+
+void updateEmuStatus() {
+ if (emuPid == 0) {
+ return;
+ }
+ pid_t pid = waitpid(emuPid, nullptr, WNOHANG);
+ if (pid == emuPid) {
+ // Emu process already exited. If Emu process is still running, pid will be 0.
+ emuPid = 0;
+ }
+}
+
+bool powerOnEmu() {
+ updateEmuStatus();
+ if (emuPid != 0) {
+ printf("The emulator is already running\n");
+ return false;
+ }
+ emuPid = runCommand(COMMAND_RUN_EMU);
+ printf("Emulator started in process: %d\n", emuPid);
+ return true;
+}
+
+bool powerOn() {
+#ifdef HOST
+ return powerOnEmu();
+#else
+ printf("power on is only supported on host\n");
+ return false;
+#endif
+}
+
+const char* getSetPropCommand(int propId) {
+ int size = snprintf(nullptr, 0, COMMAND_SET_VHAL_PROP, propId, 1);
+ char* command = new char[size + 1];
+ snprintf(command, size + 1, COMMAND_SET_VHAL_PROP, propId, 1);
+ return command;
+}
+
+void powerOffEmu() {
+ updateEmuStatus();
+ if (emuPid == 0) {
+ printf("The emulator is not running\n");
+ return;
+ }
+ const char* command = getSetPropCommand(SHUTDOWN_REQUEST);
+ runCommand(command);
+ delete[] command;
+ waitpid(emuPid, nullptr, /*options=*/0);
+ emuPid = 0;
+}
+
+void powerOff() {
+#ifdef HOST
+ powerOffEmu();
+#else
+ printf("power off is only supported on host\n");
+#endif
+}
+
+void setVehicleInUse(bool vehicleInUse) {
+#ifdef HOST
+ printf("Set vehicleInUse to %d\n", vehicleInUse);
+ int value = 0;
+ if (vehicleInUse) {
+ value = 1;
+ }
+ const char* command = getSetPropCommand(VEHICLE_IN_USE);
+ runCommand(command);
+ delete[] command;
+#else
+ printf("set vehicleInUse is only supported on host\n");
+#endif
+}
+
+void help() {
+ std::cout << "Remote Access Host Test Utility" << std::endl
+ << "help:\t"
+ << "Print out this help info" << std::endl
+ << "genFakeTask start [clientID]:\t"
+ << "Start generating a fake task every 5s" << std::endl
+ << "genFakeTask stop:\t"
+ << "Stop the fake task generation" << std::endl
+ << "status:\t"
+ << "Print current status" << std::endl
+ << "power on:\t"
+ << "Power on the emulator, simulate user enters vehicle while AP is off"
+ << " (only supported on host)" << std::endl
+ << "power off:\t"
+ << "Power off the emulator, simulate user leaves vehicle"
+ << " (only supported on host)" << std::endl
+ << "inject task [clientID] [taskData]:\t"
+ << "Inject a remote task" << std::endl
+ << "set vehicleInUse:\t"
+ << "Set vehicle in use, simulate user enter vehicle while boot up for remote task "
+ << "(only supported on host)" << std::endl;
+}
+
+void parseCommand(const std::string& userInput,
+ std::shared_ptr<TestWakeupClientServiceImpl> service) {
+ if (userInput == "") {
+ // ignore empty line.
+ } else if (userInput == "help") {
+ help();
+ } else if (userInput.rfind("genFakeTask start", 0) == 0) {
+ std::string clientId;
+ std::stringstream ss;
+ ss << userInput;
+ int i = 0;
+ while (std::getline(ss, clientId, ' ')) {
+ i++;
+ if (i == 3) {
+ break;
+ }
+ }
+ if (i != 3) {
+ printf("Missing clientId, see 'help'\n");
+ return;
+ }
+ service->startGeneratingFakeTask(clientId);
+ } else if (userInput == "genFakeTask stop") {
+ service->stopGeneratingFakeTask();
+ } else if (userInput == "status") {
+ printf("isWakeupRequired: %B, isRemoteTaskConnectionAlive: %B\n",
+ service->isWakeupRequired(), service->isRemoteTaskConnectionAlive());
+ } else if (userInput == "power on") {
+ powerOn();
+ } else if (userInput == "power off") {
+ powerOff();
+ } else if (userInput.rfind("inject task", 0) == 0) {
+ std::stringstream ss;
+ ss << userInput;
+ std::string data;
+ std::string taskData;
+ std::string clientId;
+ int i = 0;
+ while (std::getline(ss, data, ' ')) {
+ i++;
+ if (i == 3) {
+ clientId = data;
+ }
+ if (i == 4) {
+ taskData = data;
+ }
+ }
+ if (taskData == "" || clientId == "") {
+ printf("Missing taskData or clientId, see 'help'\n");
+ return;
+ }
+ service->injectTask(taskData, clientId);
+ printf("Remote task with client ID: %s, data: %s injected\n", clientId.c_str(),
+ taskData.c_str());
+ } else if (userInput == "set vehicleInUse") {
+ setVehicleInUse(true);
+ } else {
+ printf("Unknown command, see 'help'\n");
+ }
+}
+
+void saHandler(int signum) {
+ if (emuPid != 0) {
+ kill(-emuPid, signum);
+ waitpid(emuPid, nullptr, /*options=*/0);
+ // Sleep for 1 seconds to allow emulator to print out logs.
+ sleep(1);
+ }
+ exit(-1);
+}
+
+class MyTestWakeupClientServiceImpl final : public TestWakeupClientServiceImpl {
+ public:
+ void wakeupApplicationProcessor() override {
+#ifdef HOST
+ if (powerOnEmu()) {
+ // If we wake up AP to execute remote task, vehicle in use should be false.
+ setVehicleInUse(false);
+ }
+#else
+ wakeupAp();
+#endif
+ };
+};
+
int main(int argc, char** argv) {
std::string serviceAddr = GRPC_SERVICE_ADDRESS;
if (argc > 1) {
serviceAddr = argv[1];
}
- RunServer(serviceAddr);
+ // Let the server thread run, we will force kill the server when we exit the program.
+ std::shared_ptr<TestWakeupClientServiceImpl> service =
+ std::make_shared<MyTestWakeupClientServiceImpl>();
+ std::thread serverThread([serviceAddr, service] { RunServer(serviceAddr, service); });
+
+ // Register the signal handler for SIGTERM and SIGINT so that we can stop the emulator before
+ // exit.
+ struct sigaction sa = {};
+ sigemptyset(&sa.sa_mask);
+ sa.sa_handler = saHandler;
+ sigaction(SIGTERM, &sa, nullptr);
+ sigaction(SIGINT, &sa, nullptr);
+
+ // Start processing the user inputs.
+ std::string userInput;
+ while (true) {
+ std::cout << ">>> ";
+ std::getline(std::cin, userInput);
+ parseCommand(userInput, service);
+ }
return 0;
}
diff --git a/automotive/remoteaccess/test_grpc_server/lib/Android.bp b/automotive/remoteaccess/test_grpc_server/lib/Android.bp
index 7e95f53..8391018 100644
--- a/automotive/remoteaccess/test_grpc_server/lib/Android.bp
+++ b/automotive/remoteaccess/test_grpc_server/lib/Android.bp
@@ -26,7 +26,7 @@
cc_library_shared {
name: "ApPowerControlLib",
vendor: true,
- srcs: ["*.cpp"],
+ srcs: ["ApPowerControl.cpp"],
local_include_dirs: ["."],
export_include_dirs: ["."],
}
diff --git a/automotive/vehicle/aidl/impl/utils/test/Android.bp b/automotive/remoteaccess/test_grpc_server/lib/ApPowerControlHost.cpp
similarity index 66%
rename from automotive/vehicle/aidl/impl/utils/test/Android.bp
rename to automotive/remoteaccess/test_grpc_server/lib/ApPowerControlHost.cpp
index ad9954f..a475b00 100644
--- a/automotive/vehicle/aidl/impl/utils/test/Android.bp
+++ b/automotive/remoteaccess/test_grpc_server/lib/ApPowerControlHost.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,13 +14,10 @@
* limitations under the License.
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
+#include "ApPowerControl.h"
-cc_library_headers {
- name: "VehicleHalTestUtilHeaders",
- vendor: true,
- header_libs: ["VehicleHalUtilHeaders"],
- export_include_dirs: ["include"],
+#include <cstdio>
+
+void wakeupAp() {
+ printf("Waking up application processor...\n");
}
diff --git a/automotive/vehicle/2.0/default/TEST_MAPPING b/automotive/vehicle/2.0/default/TEST_MAPPING
index bb58700..63ea3d5 100644
--- a/automotive/vehicle/2.0/default/TEST_MAPPING
+++ b/automotive/vehicle/2.0/default/TEST_MAPPING
@@ -2,7 +2,9 @@
"presubmit": [
{
"name": "android.hardware.automotive.vehicle@2.0-manager-unit-tests"
- },
+ }
+ ],
+ "postsubmit": [
{
"name": "android.hardware.automotive.vehicle@2.0-default-impl-unit-tests"
}
diff --git a/automotive/vehicle/Android.bp b/automotive/vehicle/Android.bp
index c0d71d7..f0abbcf 100644
--- a/automotive/vehicle/Android.bp
+++ b/automotive/vehicle/Android.bp
@@ -22,6 +22,6 @@
name: "VehicleHalInterfaceDefaults",
static_libs: [
"android.hardware.automotive.vehicle-V2-ndk",
- "android.hardware.automotive.vehicle.property-V2-ndk",
+ "android.hardware.automotive.vehicle.property-V3-ndk",
],
}
diff --git a/automotive/vehicle/TEST_MAPPING b/automotive/vehicle/TEST_MAPPING
index da8416c..02ad8bb 100644
--- a/automotive/vehicle/TEST_MAPPING
+++ b/automotive/vehicle/TEST_MAPPING
@@ -43,6 +43,14 @@
"auto-presubmit": [
{
"name": "VtsHalAutomotiveVehicle_TargetTest"
+ },
+ {
+ "name": "CarServiceUnitTest",
+ "options" : [
+ {
+ "include-filter": "com.android.car.hal.fakevhal.FakeVehicleStubUnitTest"
+ }
+ ]
}
]
}
diff --git a/automotive/vehicle/aidl/aidl_test/Android.bp b/automotive/vehicle/aidl/aidl_test/Android.bp
index d752b2a..b8f797f 100644
--- a/automotive/vehicle/aidl/aidl_test/Android.bp
+++ b/automotive/vehicle/aidl/aidl_test/Android.bp
@@ -52,7 +52,7 @@
],
static_libs: [
"android.hardware.automotive.vehicle-V2-java",
- "android.hardware.automotive.vehicle.property-V2-java",
+ "android.hardware.automotive.vehicle.property-V3-java",
"androidx.test.runner",
"truth",
],
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
index d0c6e83..c4e2c64 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -247,6 +247,7 @@
{VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess::READ},
{VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyAccess::WRITE},
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyAccess::READ_WRITE},
+ {VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyAccess::WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
index 48532c9..bd6c705 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -247,6 +247,7 @@
{VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::VEHICLE_IN_USE, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
index 758670d..6e66632 100644
--- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -239,6 +239,7 @@
Map.entry(VehicleProperty.SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyAccess.READ_WRITE),
+ Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyAccess.WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
index 29069f8..522c82f 100644
--- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -239,6 +239,7 @@
Map.entry(VehicleProperty.SUPPORTED_PROPERTY_IDS, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.CLUSTER_HEARTBEAT, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
diff --git a/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java
new file mode 100644
index 0000000..144d0e1
--- /dev/null
+++ b/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * DO NOT EDIT MANUALLY!!!
+ *
+ * Generated by tools/generate_annotation_enums.py.
+ */
+
+// clang-format off
+
+package android.hardware.automotive.vehicle;
+
+import java.util.List;
+import java.util.Map;
+
+public final class EnumForVehicleProperty {
+
+ public static final Map<Integer, List<Class<?>>> values = Map.ofEntries(
+ Map.entry(VehicleProperty.INFO_FUEL_TYPE, List.of(FuelType.class)),
+ Map.entry(VehicleProperty.INFO_EV_CONNECTOR_TYPE, List.of(EvConnectorType.class)),
+ Map.entry(VehicleProperty.INFO_FUEL_DOOR_LOCATION, List.of(PortLocationType.class)),
+ Map.entry(VehicleProperty.INFO_EV_PORT_LOCATION, List.of(PortLocationType.class)),
+ Map.entry(VehicleProperty.INFO_DRIVER_SEAT, List.of(VehicleAreaSeat.class)),
+ Map.entry(VehicleProperty.INFO_MULTI_EV_PORT_LOCATIONS, List.of(PortLocationType.class)),
+ Map.entry(VehicleProperty.ENGINE_OIL_LEVEL, List.of(VehicleOilLevel.class)),
+ Map.entry(VehicleProperty.GEAR_SELECTION, List.of(VehicleGear.class)),
+ Map.entry(VehicleProperty.CURRENT_GEAR, List.of(VehicleGear.class)),
+ Map.entry(VehicleProperty.TURN_SIGNAL_STATE, List.of(VehicleTurnSignal.class)),
+ Map.entry(VehicleProperty.IGNITION_STATE, List.of(VehicleIgnitionState.class)),
+ Map.entry(VehicleProperty.EV_STOPPING_MODE, List.of(EvStoppingMode.class)),
+ Map.entry(VehicleProperty.HVAC_FAN_DIRECTION, List.of(VehicleHvacFanDirection.class)),
+ Map.entry(VehicleProperty.HVAC_TEMPERATURE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.HVAC_FAN_DIRECTION_AVAILABLE, List.of(VehicleHvacFanDirection.class)),
+ Map.entry(VehicleProperty.DISTANCE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.FUEL_VOLUME_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.TIRE_PRESSURE_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.EV_BATTERY_DISPLAY_UNITS, List.of(VehicleUnit.class)),
+ Map.entry(VehicleProperty.HW_ROTARY_INPUT, List.of(RotaryInputType.class)),
+ Map.entry(VehicleProperty.HW_CUSTOM_INPUT, List.of(CustomInputType.class)),
+ Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.SEAT_FOOTWELL_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.SEAT_OCCUPANCY, List.of(VehicleSeatOccupancyState.class)),
+ Map.entry(VehicleProperty.WINDSHIELD_WIPERS_STATE, List.of(WindshieldWipersState.class)),
+ Map.entry(VehicleProperty.WINDSHIELD_WIPERS_SWITCH, List.of(WindshieldWipersSwitch.class)),
+ Map.entry(VehicleProperty.HEADLIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.HIGH_BEAM_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.FOG_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.HAZARD_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.HEADLIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.HIGH_BEAM_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.FOG_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.HAZARD_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.CABIN_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.CABIN_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.READING_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.READING_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.STEERING_WHEEL_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.STEERING_WHEEL_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.ELECTRONIC_TOLL_COLLECTION_CARD_TYPE, List.of(ElectronicTollCollectionCardType.class)),
+ Map.entry(VehicleProperty.ELECTRONIC_TOLL_COLLECTION_CARD_STATUS, List.of(ElectronicTollCollectionCardStatus.class)),
+ Map.entry(VehicleProperty.FRONT_FOG_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.FRONT_FOG_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.REAR_FOG_LIGHTS_STATE, List.of(VehicleLightState.class)),
+ Map.entry(VehicleProperty.REAR_FOG_LIGHTS_SWITCH, List.of(VehicleLightSwitch.class)),
+ Map.entry(VehicleProperty.EV_CHARGE_STATE, List.of(EvChargeState.class)),
+ Map.entry(VehicleProperty.EV_REGENERATIVE_BRAKING_STATE, List.of(EvRegenerativeBrakingState.class)),
+ Map.entry(VehicleProperty.TRAILER_PRESENT, List.of(TrailerState.class)),
+ Map.entry(VehicleProperty.GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, List.of(GsrComplianceRequirementType.class)),
+ Map.entry(VehicleProperty.SHUTDOWN_REQUEST, List.of(VehicleApPowerStateShutdownParam.class)),
+ Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, List.of(AutomaticEmergencyBrakingState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_STATE, List.of(ForwardCollisionWarningState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, List.of(BlindSpotWarningState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_STATE, List.of(LaneDepartureWarningState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.LANE_KEEP_ASSIST_STATE, List.of(LaneKeepAssistState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_COMMAND, List.of(LaneCenteringAssistCommand.class)),
+ Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_STATE, List.of(LaneCenteringAssistState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.EMERGENCY_LANE_KEEP_ASSIST_STATE, List.of(EmergencyLaneKeepAssistState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.CRUISE_CONTROL_TYPE, List.of(CruiseControlType.class, ErrorState.class)),
+ Map.entry(VehicleProperty.CRUISE_CONTROL_STATE, List.of(CruiseControlState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.CRUISE_CONTROL_COMMAND, List.of(CruiseControlCommand.class)),
+ Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, List.of(HandsOnDetectionDriverState.class, ErrorState.class)),
+ Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, List.of(HandsOnDetectionWarning.class, ErrorState.class))
+ );
+
+}
diff --git a/automotive/vehicle/aidl/impl/README.md b/automotive/vehicle/aidl/impl/README.md
index 121ffd1..2cd3a3e 100644
--- a/automotive/vehicle/aidl/impl/README.md
+++ b/automotive/vehicle/aidl/impl/README.md
@@ -46,7 +46,7 @@
use this library, along with their own implementation for `IVehicleHardware`
interface.
-Also defines a binary `android.hardware.automotive.vehicle@V1-default-service`
+Also defines a binary `android.hardware.automotive.vehicle@V3-default-service`
which is the reference VHAL implementation. It implements `IVehicle.aidl`
interface. It uses `DefaultVehicleHal`, along with `FakeVehicleHardware`
(in fake_impl). It simulates the vehicle bus interaction by using an
diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp
index 6984d5e..75a3541 100644
--- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp
+++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp
@@ -35,14 +35,17 @@
cc_library {
name: "VehicleHalJsonConfigLoaderEnableTestProperties",
vendor: true,
- srcs: ["src/*.cpp"],
+ srcs: [
+ "src/*.cpp",
+ ":VhalTestVendorProperties",
+ ],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
defaults: ["VehicleHalDefaults"],
static_libs: ["VehicleHalUtils"],
header_libs: [
- "VehicleHalTestUtilHeaders",
"IVehicleGeneratedHeaders",
+ "libbinder_headers",
],
cflags: ["-DENABLE_VEHICLE_HAL_TEST_PROPERTIES"],
shared_libs: ["libjsoncpp"],
diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
index 0a1f904..39ce10e 100644
--- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
+++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
@@ -21,7 +21,7 @@
#include <PropertyUtils.h>
#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
-#include <TestPropertyUtils.h>
+#include <android/hardware/automotive/vehicle/TestVendorProperty.h>
#endif // ENABLE_VEHICLE_HAL_TEST_PROPERTIES
#include <android-base/strings.h>
@@ -91,10 +91,6 @@
{"HVAC_ALL", HVAC_ALL},
{"HVAC_LEFT", HVAC_LEFT},
{"HVAC_RIGHT", HVAC_RIGHT},
- {"VENDOR_EXTENSION_INT_PROPERTY", VENDOR_EXTENSION_INT_PROPERTY},
- {"VENDOR_EXTENSION_BOOLEAN_PROPERTY", VENDOR_EXTENSION_BOOLEAN_PROPERTY},
- {"VENDOR_EXTENSION_STRING_PROPERTY", VENDOR_EXTENSION_STRING_PROPERTY},
- {"VENDOR_EXTENSION_FLOAT_PROPERTY", VENDOR_EXTENSION_FLOAT_PROPERTY},
{"WINDOW_1_LEFT", WINDOW_1_LEFT},
{"WINDOW_1_RIGHT", WINDOW_1_RIGHT},
{"WINDOW_2_LEFT", WINDOW_2_LEFT},
@@ -133,24 +129,9 @@
{"EV_STOPPING_MODE_HOLD", EV_STOPPING_MODE_HOLD},
{"MIRROR_DRIVER_LEFT_RIGHT",
toInt(VehicleAreaMirror::DRIVER_LEFT) | toInt(VehicleAreaMirror::DRIVER_RIGHT)},
-#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
- // Following are test properties:
- {"ECHO_REVERSE_BYTES", ECHO_REVERSE_BYTES},
- {"VENDOR_PROPERTY_ID", VENDOR_PROPERTY_ID},
- {"kMixedTypePropertyForTest", kMixedTypePropertyForTest},
- {"VENDOR_CLUSTER_NAVIGATION_STATE", VENDOR_CLUSTER_NAVIGATION_STATE},
- {"VENDOR_CLUSTER_REQUEST_DISPLAY", VENDOR_CLUSTER_REQUEST_DISPLAY},
- {"VENDOR_CLUSTER_SWITCH_UI", VENDOR_CLUSTER_SWITCH_UI},
- {"VENDOR_CLUSTER_DISPLAY_STATE", VENDOR_CLUSTER_DISPLAY_STATE},
- {"VENDOR_CLUSTER_REPORT_STATE", VENDOR_CLUSTER_REPORT_STATE},
- {"PLACEHOLDER_PROPERTY_INT", PLACEHOLDER_PROPERTY_INT},
- {"PLACEHOLDER_PROPERTY_FLOAT", PLACEHOLDER_PROPERTY_FLOAT},
- {"PLACEHOLDER_PROPERTY_BOOLEAN", PLACEHOLDER_PROPERTY_BOOLEAN},
- {"PLACEHOLDER_PROPERTY_STRING", PLACEHOLDER_PROPERTY_STRING}
-#endif // ENABLE_VEHICLE_HAL_TEST_PROPERTIES
};
-// A class to parse constant values for type T.
+// A class to parse constant values for type T where T is defined as an enum in NDK AIDL backend.
template <class T>
class ConstantParser final : public ConstantParserInterface {
public:
@@ -181,6 +162,33 @@
std::unordered_map<std::string, int> mValueByName;
};
+#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
+// A class to parse constant values for type T where T is defined as an enum in CPP AIDL backend.
+template <class T>
+class CppConstantParser final : public ConstantParserInterface {
+ public:
+ CppConstantParser() {
+ for (const T& v : android::enum_range<T>()) {
+ std::string name = android::hardware::automotive::vehicle::toString(v);
+ mValueByName[name] = toInt(v);
+ }
+ }
+
+ ~CppConstantParser() = default;
+
+ Result<int> parseValue(const std::string& name) const override {
+ auto it = mValueByName.find(name);
+ if (it == mValueByName.end()) {
+ return Error() << "Constant name: " << name << " is not defined";
+ }
+ return it->second;
+ }
+
+ private:
+ std::unordered_map<std::string, int> mValueByName;
+};
+#endif
+
// A class to parse constant values defined in CONSTANTS_BY_NAME map.
class LocalVariableParser final : public ConstantParserInterface {
public:
@@ -260,6 +268,10 @@
mConstantParsersByType["LaneCenteringAssistState"] =
std::make_unique<ConstantParser<LaneCenteringAssistState>>();
mConstantParsersByType["Constants"] = std::make_unique<LocalVariableParser>();
+#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
+ mConstantParsersByType["TestVendorProperty"] =
+ std::make_unique<CppConstantParser<TestVendorProperty>>();
+#endif // ENABLE_VEHICLE_HAL_TEST_PROPERTIES
}
template <>
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 5503de2..6c8d59c 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -1899,8 +1899,16 @@
}
],
"configArray": [
+ "VehicleProperty::HVAC_ACTUAL_FAN_SPEED_RPM",
+ "VehicleProperty::HVAC_AC_ON",
+ "VehicleProperty::HVAC_AUTO_ON",
+ "VehicleProperty::HVAC_AUTO_RECIRC_ON",
+ "VehicleProperty::HVAC_FAN_DIRECTION",
"VehicleProperty::HVAC_FAN_SPEED",
- "VehicleProperty::HVAC_FAN_DIRECTION"
+ "VehicleProperty::HVAC_MAX_AC_ON",
+ "VehicleProperty::HVAC_RECIRC_ON",
+ "VehicleProperty::HVAC_TEMPERATURE_CURRENT",
+ "VehicleProperty::HVAC_TEMPERATURE_SET"
]
},
{
@@ -3387,7 +3395,7 @@
"property": "VehicleProperty::CRUISE_CONTROL_TYPE",
"defaultValue": {
"int32Values": [
- "CruiseControlType::STANDARD"
+ "CruiseControlType::ADAPTIVE"
]
},
"areas": [
@@ -3621,6 +3629,21 @@
"property": "VehicleProperty::CLUSTER_NAVIGATION_STATE"
},
{
+ "property": "VehicleProperty::CLUSTER_HEARTBEAT",
+ "configArray": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 2,
+ 0,
+ 0,
+ 16
+ ],
+ "comment": "configArray specifies it consists of int64[2] and byte[16]."
+ },
+ {
"property": "VehicleProperty::GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT",
"defaultValue": {
"int32Values": [
@@ -3629,6 +3652,17 @@
}
},
{
+ "property": "VehicleProperty::SHUTDOWN_REQUEST"
+ },
+ {
+ "property": "VehicleProperty::VEHICLE_IN_USE",
+ "defaultValue": {
+ "int32Values": [
+ 1
+ ]
+ }
+ },
+ {
"property": "VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED",
"defaultValue": {
"int32Values": [
diff --git a/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json b/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
index fd4b002..73e4d44 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/TestProperties.json
@@ -1,7 +1,7 @@
{
"properties": [
{
- "property": "Constants::kMixedTypePropertyForTest",
+ "property": "TestVendorProperty::MIXED_TYPE_PROPERTY_FOR_TEST",
"defaultValue": {
"floatValues": [
4.5
@@ -28,7 +28,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_EXTENSION_BOOLEAN_PROPERTY",
+ "property": "TestVendorProperty::VENDOR_EXTENSION_BOOLEAN_PROPERTY",
"areas": [
{
"defaultValue": {
@@ -67,7 +67,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_EXTENSION_FLOAT_PROPERTY",
+ "property": "TestVendorProperty::VENDOR_EXTENSION_FLOAT_PROPERTY",
"areas": [
{
"defaultValue": {
@@ -94,7 +94,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_EXTENSION_INT_PROPERTY",
+ "property": "TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY",
"areas": [
{
"defaultValue": {
@@ -131,7 +131,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_EXTENSION_STRING_PROPERTY",
+ "property": "TestVendorProperty::VENDOR_EXTENSION_STRING_PROPERTY",
"defaultValue": {
"stringValue": "Vendor String Property"
},
@@ -139,7 +139,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::PLACEHOLDER_PROPERTY_INT",
+ "property": "TestVendorProperty::PLACEHOLDER_PROPERTY_INT",
"defaultValue": {
"int32Values": [
0
@@ -149,7 +149,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::PLACEHOLDER_PROPERTY_FLOAT",
+ "property": "TestVendorProperty::PLACEHOLDER_PROPERTY_FLOAT",
"defaultValue": {
"floatValues": [
0.0
@@ -159,7 +159,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::PLACEHOLDER_PROPERTY_BOOLEAN",
+ "property": "TestVendorProperty::PLACEHOLDER_PROPERTY_BOOLEAN",
"defaultValue": {
"int32Values": [
0
@@ -169,7 +169,7 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::PLACEHOLDER_PROPERTY_STRING",
+ "property": "TestVendorProperty::PLACEHOLDER_PROPERTY_STRING",
"defaultValue": {
"stringValue": "Test"
},
@@ -177,12 +177,12 @@
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::ECHO_REVERSE_BYTES",
+ "property": "TestVendorProperty::ECHO_REVERSE_BYTES",
"access": "VehiclePropertyAccess::READ_WRITE",
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_PROPERTY_ID",
+ "property": "TestVendorProperty::VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING",
"access": "VehiclePropertyAccess::READ_WRITE",
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
@@ -194,13 +194,13 @@
]
},
"configArray": [
- "Constants::kMixedTypePropertyForTest",
+ "TestVendorProperty::MIXED_TYPE_PROPERTY_FOR_TEST",
"VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_INFO",
"VehicleVendorPermission::PERMISSION_SET_VENDOR_CATEGORY_INFO",
- "Constants::VENDOR_EXTENSION_INT_PROPERTY",
+ "TestVendorProperty::VENDOR_EXTENSION_INT_PROPERTY",
"VehicleVendorPermission::PERMISSION_GET_VENDOR_CATEGORY_SEAT",
"VehicleVendorPermission::PERMISSION_NOT_ACCESSIBLE",
- "Constants::VENDOR_EXTENSION_FLOAT_PROPERTY",
+ "TestVendorProperty::VENDOR_EXTENSION_FLOAT_PROPERTY",
"VehicleVendorPermission::PERMISSION_DEFAULT",
"VehicleVendorPermission::PERMISSION_DEFAULT"
]
diff --git a/automotive/vehicle/aidl/impl/default_config/config/VendorClusterTestProperties.json b/automotive/vehicle/aidl/impl/default_config/config/VendorClusterTestProperties.json
index 3a1a783..8c2bc93 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/VendorClusterTestProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/VendorClusterTestProperties.json
@@ -1,17 +1,17 @@
{
"properties": [
{
- "property": "Constants::VENDOR_CLUSTER_SWITCH_UI",
+ "property": "TestVendorProperty::VENDOR_CLUSTER_SWITCH_UI",
"access": "VehiclePropertyAccess::WRITE",
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_CLUSTER_DISPLAY_STATE",
+ "property": "TestVendorProperty::VENDOR_CLUSTER_DISPLAY_STATE",
"access": "VehiclePropertyAccess::WRITE",
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
},
{
- "property": "Constants::VENDOR_CLUSTER_REPORT_STATE",
+ "property": "TestVendorProperty::VENDOR_CLUSTER_REPORT_STATE",
"defaultValue": {
"int32Values": [
0,
@@ -44,7 +44,7 @@
"Value means 0 /* Off */, -1, -1, -1, -1 /* Bounds */, -1, -1, -1, -1 /* Insets */, 0 /* ClusterHome */, -1 /* ClusterNone */"
},
{
- "property": "Constants::VENDOR_CLUSTER_REQUEST_DISPLAY",
+ "property": "TestVendorProperty::VENDOR_CLUSTER_REQUEST_DISPLAY",
"defaultValue": {
"int32Values": [
0
@@ -55,7 +55,7 @@
"comment": "0 means ClusterHome"
},
{
- "property": "Constants::VENDOR_CLUSTER_NAVIGATION_STATE",
+ "property": "TestVendorProperty::VENDOR_CLUSTER_NAVIGATION_STATE",
"access": "VehiclePropertyAccess::READ",
"changeMode": "VehiclePropertyChangeMode::ON_CHANGE"
}
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp
index 4c17cde..e75f648 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp
@@ -21,7 +21,10 @@
cc_library {
name: "FakeVehicleHardware",
vendor: true,
- srcs: ["src/*.cpp"],
+ srcs: [
+ "src/*.cpp",
+ ":VhalTestVendorProperties",
+ ],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
cflags: ["-DENABLE_VEHICLE_HAL_TEST_PROPERTIES"],
@@ -35,7 +38,7 @@
name: "FakeVehicleHardwareDefaults",
header_libs: [
"IVehicleHardware",
- "VehicleHalTestUtilHeaders",
+ "libbinder_headers",
],
export_header_lib_headers: ["IVehicleHardware"],
static_libs: [
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
index af1bb1d..844bea5 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -36,6 +36,7 @@
#include <memory>
#include <mutex>
#include <unordered_map>
+#include <unordered_set>
#include <vector>
namespace android {
@@ -161,6 +162,9 @@
aidl::android::hardware::automotive::vehicle::SetValueRequest>
mPendingSetValueRequests;
+ // Set of HVAC properties dependent on HVAC_POWER_ON
+ std::unordered_set<int32_t> hvacPowerDependentProps;
+
const bool mForceOverride;
bool mAddExtraTestVendorConfigs;
@@ -192,11 +196,14 @@
VhalResult<void> maybeSetSpecialValue(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value,
bool* isSpecialValue);
+ VhalResult<bool> isCruiseControlTypeStandard() const;
ValueResultType maybeGetSpecialValue(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value,
bool* isSpecialValue) const;
VhalResult<void> setApPowerStateReport(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value);
+ VhalResult<void> setApPowerStateReqShutdown(
+ const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value);
VehiclePropValuePool::RecyclableType createApPowerStateReq(
aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReq state);
VehiclePropValuePool::RecyclableType createAdasStateReq(int32_t propertyId, int32_t areaId,
@@ -250,7 +257,7 @@
const aidl::android::hardware::automotive::vehicle::SetValueRequest& request);
std::string genFakeDataCommand(const std::vector<std::string>& options);
- void sendHvacPropertiesCurrentValues(int32_t areaId);
+ void sendHvacPropertiesCurrentValues(int32_t areaId, int32_t hvacPowerOnVal);
void sendAdasPropertiesState(int32_t propertyId, int32_t state);
void generateVendorConfigs(
std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropConfig>&) const;
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 250a226..ee24fbd 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -24,7 +24,6 @@
#include <JsonFakeValueGenerator.h>
#include <LinearFakeValueGenerator.h>
#include <PropertyUtils.h>
-#include <TestPropertyUtils.h>
#include <VehicleHalTypes.h>
#include <VehicleUtils.h>
@@ -32,6 +31,7 @@
#include <android-base/parsedouble.h>
#include <android-base/properties.h>
#include <android-base/strings.h>
+#include <android/hardware/automotive/vehicle/TestVendorProperty.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
#include <utils/Trace.h>
@@ -51,6 +51,8 @@
namespace {
+using ::aidl::android::hardware::automotive::vehicle::CruiseControlCommand;
+using ::aidl::android::hardware::automotive::vehicle::CruiseControlType;
using ::aidl::android::hardware::automotive::vehicle::ErrorState;
using ::aidl::android::hardware::automotive::vehicle::GetValueRequest;
using ::aidl::android::hardware::automotive::vehicle::GetValueResult;
@@ -60,6 +62,7 @@
using ::aidl::android::hardware::automotive::vehicle::StatusCode;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReport;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReq;
+using ::aidl::android::hardware::automotive::vehicle::VehicleArea;
using ::aidl::android::hardware::automotive::vehicle::VehicleHwKeyInputAction;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig;
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
@@ -84,14 +87,12 @@
// getPropertiesAsync, and setPropertiesAsync.
// 0x21403000
constexpr int32_t STARTING_VENDOR_CODE_PROPERTIES_FOR_TEST =
- 0x3000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::INT32);
+ 0x3000 | toInt(VehiclePropertyGroup::VENDOR) | toInt(VehicleArea::GLOBAL) |
+ toInt(VehiclePropertyType::INT32);
// 0x21405000
constexpr int32_t ENDING_VENDOR_CODE_PROPERTIES_FOR_TEST =
- 0x5000 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::INT32);
+ 0x5000 | toInt(VehiclePropertyGroup::VENDOR) | toInt(VehicleArea::GLOBAL) |
+ toInt(VehiclePropertyType::INT32);
// The directory for default property configuration file.
// For config file format, see impl/default_config/config/README.md.
constexpr char DEFAULT_CONFIG_DIR[] = "/vendor/etc/automotive/vhalconfig/";
@@ -102,7 +103,7 @@
// overwrite the default configs.
constexpr char OVERRIDE_PROPERTY[] = "persist.vendor.vhal_init_value_override";
constexpr char POWER_STATE_REQ_CONFIG_PROPERTY[] = "ro.vendor.fake_vhal.ap_power_state_req.config";
-// The value to be returned if VENDOR_PROPERTY_ID is set as the property
+// The value to be returned if VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING is set as the property
constexpr int VENDOR_ERROR_CODE = 0x00ab0005;
// A list of supported options for "--set" command.
const std::unordered_set<std::string> SET_PROP_OPTIONS = {
@@ -199,6 +200,11 @@
bool globalProp = isGlobalProp(propId);
size_t numAreas = globalProp ? 1 : vehiclePropConfig.areaConfigs.size();
+ if (propId == toInt(VehicleProperty::HVAC_POWER_ON)) {
+ const auto& configArray = vehiclePropConfig.configArray;
+ hvacPowerDependentProps.insert(configArray.begin(), configArray.end());
+ }
+
for (size_t i = 0; i < numAreas; i++) {
int32_t curArea = globalProp ? 0 : vehiclePropConfig.areaConfigs[i].areaId;
@@ -341,6 +347,25 @@
return req;
}
+VhalResult<void> FakeVehicleHardware::setApPowerStateReqShutdown(const VehiclePropValue& value) {
+ if (value.value.int32Values.size() != 1) {
+ return StatusError(StatusCode::INVALID_ARG)
+ << "Failed to set SHUTDOWN_REQUEST, expect 1 int value: "
+ << "VehicleApPowerStateShutdownParam";
+ }
+ int powerStateShutdownParam = value.value.int32Values[0];
+ auto prop = createApPowerStateReq(VehicleApPowerStateReq::SHUTDOWN_PREPARE);
+ prop->value.int32Values[1] = powerStateShutdownParam;
+ if (auto writeResult = mServerSidePropStore->writeValue(
+ std::move(prop), /*updateStatus=*/true, VehiclePropertyStore::EventMode::ALWAYS);
+ !writeResult.ok()) {
+ return StatusError(getErrorCode(writeResult))
+ << "failed to write AP_POWER_STATE_REQ into property store, error: "
+ << getErrorMsg(writeResult);
+ }
+ return {};
+}
+
VhalResult<void> FakeVehicleHardware::setApPowerStateReport(const VehiclePropValue& value) {
auto updatedValue = mValuePool->obtain(value);
updatedValue->timestamp = elapsedRealtimeNano();
@@ -491,9 +516,7 @@
}
bool FakeVehicleHardware::isHvacPropAndHvacNotAvailable(int32_t propId, int32_t areaId) const {
- std::unordered_set<int32_t> powerProps(std::begin(HVAC_POWER_PROPERTIES),
- std::end(HVAC_POWER_PROPERTIES));
- if (powerProps.count(propId)) {
+ if (hvacPowerDependentProps.count(propId)) {
auto hvacPowerOnResults =
mServerSidePropStore->readValuesForProperty(toInt(VehicleProperty::HVAC_POWER_ON));
if (!hvacPowerOnResults.ok()) {
@@ -596,6 +619,18 @@
}
}
+VhalResult<bool> FakeVehicleHardware::isCruiseControlTypeStandard() const {
+ auto isCruiseControlTypeAvailableResult =
+ isAdasPropertyAvailable(toInt(VehicleProperty::CRUISE_CONTROL_TYPE));
+ if (!isCruiseControlTypeAvailableResult.ok()) {
+ return isCruiseControlTypeAvailableResult.error();
+ }
+ auto cruiseControlTypeValue =
+ mServerSidePropStore->readValue(toInt(VehicleProperty::CRUISE_CONTROL_TYPE));
+ return cruiseControlTypeValue.value()->value.int32Values[0] ==
+ toInt(CruiseControlType::STANDARD);
+}
+
FakeVehicleHardware::ValueResultType FakeVehicleHardware::maybeGetSpecialValue(
const VehiclePropValue& value, bool* isSpecialValue) const {
*isSpecialValue = false;
@@ -623,6 +658,7 @@
return StatusError(StatusCode::NOT_AVAILABLE_DISABLED) << "hvac not available";
}
+ VhalResult<void> isAdasPropertyAvailableResult;
switch (propId) {
case OBD2_FREEZE_FRAME:
*isSpecialValue = true;
@@ -638,24 +674,41 @@
result.value()->timestamp = elapsedRealtimeNano();
}
return result;
- case ECHO_REVERSE_BYTES:
+ case toInt(TestVendorProperty::ECHO_REVERSE_BYTES):
*isSpecialValue = true;
return getEchoReverseBytes(value);
- case VENDOR_PROPERTY_ID:
+ case toInt(TestVendorProperty::VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING):
*isSpecialValue = true;
return StatusError((StatusCode)VENDOR_ERROR_CODE);
case toInt(VehicleProperty::CRUISE_CONTROL_TARGET_SPEED):
- [[fallthrough]];
- case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP):
- [[fallthrough]];
- case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE): {
- auto isAdasPropertyAvailableResult =
+ isAdasPropertyAvailableResult =
isAdasPropertyAvailable(toInt(VehicleProperty::CRUISE_CONTROL_STATE));
if (!isAdasPropertyAvailableResult.ok()) {
*isSpecialValue = true;
return isAdasPropertyAvailableResult.error();
}
return nullptr;
+ case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP):
+ [[fallthrough]];
+ case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE): {
+ isAdasPropertyAvailableResult =
+ isAdasPropertyAvailable(toInt(VehicleProperty::CRUISE_CONTROL_STATE));
+ if (!isAdasPropertyAvailableResult.ok()) {
+ *isSpecialValue = true;
+ return isAdasPropertyAvailableResult.error();
+ }
+ auto isCruiseControlTypeStandardResult = isCruiseControlTypeStandard();
+ if (!isCruiseControlTypeStandardResult.ok()) {
+ *isSpecialValue = true;
+ return isCruiseControlTypeStandardResult.error();
+ }
+ if (isCruiseControlTypeStandardResult.value()) {
+ *isSpecialValue = true;
+ return StatusError(StatusCode::NOT_AVAILABLE_DISABLED)
+ << "tried to get target time gap or lead vehicle measured distance value "
+ << "while on a standard CC setting";
+ }
+ return nullptr;
}
default:
// Do nothing.
@@ -681,9 +734,8 @@
return std::move(gotValue);
}
-void FakeVehicleHardware::sendHvacPropertiesCurrentValues(int32_t areaId) {
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- int powerPropId = HVAC_POWER_PROPERTIES[i];
+void FakeVehicleHardware::sendHvacPropertiesCurrentValues(int32_t areaId, int32_t hvacPowerOnVal) {
+ for (auto& powerPropId : hvacPowerDependentProps) {
auto powerPropResults = mServerSidePropStore->readValuesForProperty(powerPropId);
if (!powerPropResults.ok()) {
ALOGW("failed to get power prop 0x%x, error: %s", powerPropId,
@@ -694,7 +746,8 @@
for (size_t j = 0; j < powerPropValues.size(); j++) {
auto powerPropValue = std::move(powerPropValues[j]);
if ((powerPropValue->areaId & areaId) == powerPropValue->areaId) {
- powerPropValue->status = VehiclePropertyStatus::AVAILABLE;
+ powerPropValue->status = hvacPowerOnVal ? VehiclePropertyStatus::AVAILABLE
+ : VehiclePropertyStatus::UNAVAILABLE;
powerPropValue->timestamp = elapsedRealtimeNano();
// This will trigger a property change event for the current hvac property value.
mServerSidePropStore->writeValue(std::move(powerPropValue), /*updateStatus=*/true,
@@ -715,7 +768,13 @@
}
auto& dependentPropConfig = dependentPropConfigResult.value();
for (auto& areaConfig : dependentPropConfig->areaConfigs) {
- auto propValue = createAdasStateReq(dependentPropId, areaConfig.areaId, state);
+ int32_t hardcoded_state = state;
+ // TODO: restore old/initial values here instead of hardcoded value (b/295542701)
+ if (state == 1 && dependentPropId == toInt(VehicleProperty::CRUISE_CONTROL_TYPE)) {
+ hardcoded_state = toInt(CruiseControlType::ADAPTIVE);
+ }
+ auto propValue =
+ createAdasStateReq(dependentPropId, areaConfig.areaId, hardcoded_state);
// This will trigger a property change event for the current ADAS property value.
mServerSidePropStore->writeValue(std::move(propValue), /*updateStatus=*/true,
VehiclePropertyStore::EventMode::ALWAYS);
@@ -740,13 +799,6 @@
return setUserHalProp(value);
}
- if (propId == toInt(VehicleProperty::HVAC_POWER_ON) && value.value.int32Values.size() == 1 &&
- value.value.int32Values[0] == 1) {
- // If we are turning HVAC power on, send current hvac property values through on change
- // event.
- sendHvacPropertiesCurrentValues(value.areaId);
- }
-
if (isHvacPropAndHvacNotAvailable(propId, value.areaId)) {
*isSpecialValue = true;
return StatusError(StatusCode::NOT_AVAILABLE_DISABLED) << "hvac not available";
@@ -762,10 +814,18 @@
}
}
+ VhalResult<void> isAdasPropertyAvailableResult;
+ VhalResult<bool> isCruiseControlTypeStandardResult;
switch (propId) {
case toInt(VehicleProperty::AP_POWER_STATE_REPORT):
*isSpecialValue = true;
return setApPowerStateReport(value);
+ case toInt(VehicleProperty::SHUTDOWN_REQUEST):
+ // If we receive SHUTDOWN_REQUEST, we should send this to an external component which
+ // should shutdown Android system via sending an AP_POWER_STATE_REQ event. Here we have
+ // no external components to notify, so we just send the event.
+ *isSpecialValue = true;
+ return setApPowerStateReqShutdown(value);
case toInt(VehicleProperty::VEHICLE_MAP_SERVICE):
// Placeholder for future implementation of VMS property in the default hal. For
// now, just returns OK; otherwise, hal clients crash with property not supported.
@@ -774,14 +834,24 @@
case OBD2_FREEZE_FRAME_CLEAR:
*isSpecialValue = true;
return mFakeObd2Frame->clearObd2FreezeFrames(value);
- case VENDOR_PROPERTY_ID:
+ case toInt(TestVendorProperty::VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING):
*isSpecialValue = true;
return StatusError((StatusCode)VENDOR_ERROR_CODE);
+ case toInt(VehicleProperty::HVAC_POWER_ON):
+ if (value.value.int32Values.size() != 1) {
+ *isSpecialValue = true;
+ return StatusError(StatusCode::INVALID_ARG)
+ << "HVAC_POWER_ON requires only one int32 value";
+ }
+ // When changing HVAC power state, send current hvac property values
+ // through on change event.
+ sendHvacPropertiesCurrentValues(value.areaId, value.value.int32Values[0]);
+ return {};
case toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION):
*isSpecialValue = true;
return setHvacTemperatureValueSuggestion(value);
case toInt(VehicleProperty::LANE_CENTERING_ASSIST_COMMAND): {
- auto isAdasPropertyAvailableResult =
+ isAdasPropertyAvailableResult =
isAdasPropertyAvailable(toInt(VehicleProperty::LANE_CENTERING_ASSIST_STATE));
if (!isAdasPropertyAvailableResult.ok()) {
*isSpecialValue = true;
@@ -789,14 +859,47 @@
return isAdasPropertyAvailableResult;
}
case toInt(VehicleProperty::CRUISE_CONTROL_COMMAND):
- [[fallthrough]];
- case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP): {
- auto isAdasPropertyAvailableResult =
+ isAdasPropertyAvailableResult =
isAdasPropertyAvailable(toInt(VehicleProperty::CRUISE_CONTROL_STATE));
if (!isAdasPropertyAvailableResult.ok()) {
*isSpecialValue = true;
+ return isAdasPropertyAvailableResult;
}
- return isAdasPropertyAvailableResult;
+ isCruiseControlTypeStandardResult = isCruiseControlTypeStandard();
+ if (!isCruiseControlTypeStandardResult.ok()) {
+ *isSpecialValue = true;
+ return isCruiseControlTypeStandardResult.error();
+ }
+ if (isCruiseControlTypeStandardResult.value() &&
+ (value.value.int32Values[0] ==
+ toInt(CruiseControlCommand::INCREASE_TARGET_TIME_GAP) ||
+ value.value.int32Values[0] ==
+ toInt(CruiseControlCommand::DECREASE_TARGET_TIME_GAP))) {
+ *isSpecialValue = true;
+ return StatusError(StatusCode::NOT_AVAILABLE_DISABLED)
+ << "tried to use a change target time gap command while on a standard CC "
+ << "setting";
+ }
+ return {};
+ case toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP): {
+ isAdasPropertyAvailableResult =
+ isAdasPropertyAvailable(toInt(VehicleProperty::CRUISE_CONTROL_STATE));
+ if (!isAdasPropertyAvailableResult.ok()) {
+ *isSpecialValue = true;
+ return isAdasPropertyAvailableResult;
+ }
+ isCruiseControlTypeStandardResult = isCruiseControlTypeStandard();
+ if (!isCruiseControlTypeStandardResult.ok()) {
+ *isSpecialValue = true;
+ return isCruiseControlTypeStandardResult.error();
+ }
+ if (isCruiseControlTypeStandardResult.value()) {
+ *isSpecialValue = true;
+ return StatusError(StatusCode::NOT_AVAILABLE_DISABLED)
+ << "tried to set target time gap or lead vehicle measured distance value "
+ << "while on a standard CC setting";
+ }
+ return {};
}
#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
@@ -806,9 +909,9 @@
[[fallthrough]];
case toInt(VehicleProperty::CLUSTER_NAVIGATION_STATE):
[[fallthrough]];
- case VENDOR_CLUSTER_SWITCH_UI:
+ case toInt(TestVendorProperty::VENDOR_CLUSTER_SWITCH_UI):
[[fallthrough]];
- case VENDOR_CLUSTER_DISPLAY_STATE:
+ case toInt(TestVendorProperty::VENDOR_CLUSTER_DISPLAY_STATE):
*isSpecialValue = true;
updatedValue = mValuePool->obtain(getPropType(value.prop));
updatedValue->prop = value.prop & ~toInt(VehiclePropertyGroup::MASK);
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp
index 8d8fcf5..b763d2f 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp
@@ -21,11 +21,14 @@
cc_test {
name: "FakeVehicleHardwareTest",
vendor: true,
- srcs: ["*.cpp"],
+ srcs: [
+ "*.cpp",
+ ":VhalTestVendorProperties",
+ ],
cflags: ["-DENABLE_VEHICLE_HAL_TEST_PROPERTIES"],
header_libs: [
"IVehicleHardware",
- "VehicleHalTestUtilHeaders",
+ "libbinder_headers",
],
static_libs: [
"VehicleHalJsonConfigLoaderEnableTestProperties",
@@ -47,7 +50,9 @@
":FakeVehicleHardwareTestOverrideJson",
":FakeVehicleHardwareTestPropJson",
],
- defaults: ["VehicleHalDefaults"],
+ defaults: [
+ "VehicleHalDefaults",
+ ],
test_suites: ["device-tests"],
}
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index 8d385dd..cf9beee 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -19,7 +19,9 @@
#include <FakeObd2Frame.h>
#include <FakeUserHal.h>
#include <PropertyUtils.h>
-#include <TestPropertyUtils.h>
+
+#include <aidl/android/hardware/automotive/vehicle/VehicleApPowerStateShutdownParam.h>
+#include <android/hardware/automotive/vehicle/TestVendorProperty.h>
#include <android-base/expected.h>
#include <android-base/file.h>
@@ -33,6 +35,7 @@
#include <inttypes.h>
#include <chrono>
#include <condition_variable>
+#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -60,6 +63,8 @@
namespace fake {
namespace {
+using ::aidl::android::hardware::automotive::vehicle::CruiseControlCommand;
+using ::aidl::android::hardware::automotive::vehicle::CruiseControlType;
using ::aidl::android::hardware::automotive::vehicle::ErrorState;
using ::aidl::android::hardware::automotive::vehicle::GetValueRequest;
using ::aidl::android::hardware::automotive::vehicle::GetValueResult;
@@ -69,11 +74,14 @@
using ::aidl::android::hardware::automotive::vehicle::StatusCode;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReport;
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReq;
+using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateShutdownParam;
using ::aidl::android::hardware::automotive::vehicle::VehicleAreaMirror;
using ::aidl::android::hardware::automotive::vehicle::VehicleHwKeyInputAction;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig;
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyAccess;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyStatus;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyType;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
using ::aidl::android::hardware::automotive::vehicle::VehicleUnit;
using ::android::base::expected;
@@ -104,6 +112,10 @@
return mHardware->loadConfigDeclarations();
}
+ std::unordered_set<int32_t> getHvacPowerDependentProps() {
+ return mHardware->hvacPowerDependentProps;
+ }
+
private:
FakeVehicleHardware* mHardware;
};
@@ -385,6 +397,25 @@
}
} mPropValueCmp;
+ std::unique_ptr<VehiclePropConfig> getVehiclePropConfig(int32_t propertyId) {
+ auto configs = mHardware->getAllPropertyConfigs();
+ for (auto& config : configs) {
+ if (config.prop == propertyId) {
+ auto ptr = std::make_unique<VehiclePropConfig>();
+ ptr->prop = config.prop;
+ ptr->access = config.access;
+ ptr->changeMode = config.changeMode;
+ ptr->areaConfigs = config.areaConfigs;
+ ptr->configArray = config.configArray;
+ ptr->configString = config.configString;
+ ptr->minSampleRate = config.minSampleRate;
+ ptr->maxSampleRate = config.maxSampleRate;
+ return ptr;
+ }
+ }
+ return std::unique_ptr<VehiclePropConfig>(nullptr);
+ }
+
private:
std::unique_ptr<FakeVehicleHardware> mHardware;
std::shared_ptr<IVehicleHardware::SetValuesCallback> mSetValuesCallback;
@@ -424,13 +455,13 @@
continue;
}
- if (propId == ECHO_REVERSE_BYTES) {
+ if (propId == toInt(TestVendorProperty::ECHO_REVERSE_BYTES)) {
// Ignore ECHO_REVERSE_BYTES, it has special logic.
continue;
}
- if (propId == VENDOR_PROPERTY_ID) {
- // Ignore VENDOR_PROPERTY_ID, it has special logic.
+ if (propId == toInt(TestVendorProperty::VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING)) {
+ // Ignore VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING, it has special logic.
continue;
}
@@ -963,7 +994,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = VENDOR_CLUSTER_REPORT_STATE,
+ .prop = toInt(TestVendorProperty::
+ VENDOR_CLUSTER_REPORT_STATE),
.value.int32Values = {1},
},
},
@@ -980,7 +1012,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = VENDOR_CLUSTER_REQUEST_DISPLAY,
+ .prop = toInt(TestVendorProperty::
+ VENDOR_CLUSTER_REQUEST_DISPLAY),
.value.int32Values = {1},
},
},
@@ -998,7 +1031,8 @@
.expectedValuesToGet =
{
VehiclePropValue{
- .prop = VENDOR_CLUSTER_NAVIGATION_STATE,
+ .prop = toInt(TestVendorProperty::
+ VENDOR_CLUSTER_NAVIGATION_STATE),
.value.byteValues = {0x1},
},
},
@@ -1008,7 +1042,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = VENDOR_CLUSTER_SWITCH_UI,
+ .prop = toInt(
+ TestVendorProperty::VENDOR_CLUSTER_SWITCH_UI),
.value.int32Values = {1},
},
},
@@ -1025,7 +1060,8 @@
.valuesToSet =
{
VehiclePropValue{
- .prop = VENDOR_CLUSTER_DISPLAY_STATE,
+ .prop = toInt(TestVendorProperty::
+ VENDOR_CLUSTER_DISPLAY_STATE),
.value.int32Values = {1, 2},
},
},
@@ -1451,7 +1487,7 @@
},
VehiclePropValue{
.prop = toInt(VehicleProperty::CRUISE_CONTROL_TYPE),
- .value.int32Values = {1},
+ .value.int32Values = {2},
},
VehiclePropValue{
.prop = toInt(VehicleProperty::CRUISE_CONTROL_STATE),
@@ -1519,6 +1555,33 @@
},
},
},
+ SetSpecialValueTestCase{
+ .name = "set_shutdown_request",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(VehicleProperty::SHUTDOWN_REQUEST),
+ .value.int32Values =
+ {
+ toInt(VehicleApPowerStateShutdownParam::
+ SHUTDOWN_ONLY),
+ },
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
+ .value.int32Values =
+ {
+ toInt(VehicleApPowerStateReq::
+ SHUTDOWN_PREPARE),
+ toInt(VehicleApPowerStateShutdownParam::
+ SHUTDOWN_ONLY),
+ },
+ },
+ },
+ },
};
}
@@ -1650,23 +1713,35 @@
}
TEST_F(FakeVehicleHardwareTest, testGetHvacPropNotAvailable) {
- int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
- for (int areaId : seatAreaIds) {
+ FakeVehicleHardwareTestHelper helper(getHardware());
+ auto hvacPowerOnConfig = std::move(getVehiclePropConfig(toInt(VehicleProperty::HVAC_POWER_ON)));
+ EXPECT_NE(hvacPowerOnConfig, nullptr);
+ for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
+ int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
+ // Turn off HVAC_POWER_ON for only 1 area ID
StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
+ .areaId = hvacPowerAreaId,
.value.int32Values = {0}});
+ EXPECT_EQ(status, StatusCode::OK);
- ASSERT_EQ(status, StatusCode::OK);
-
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- int powerPropId = HVAC_POWER_PROPERTIES[i];
- for (int powerDependentAreaId : seatAreaIds) {
+ for (auto& powerPropId : helper.getHvacPowerDependentProps()) {
+ auto powerPropConfig = std::move(getVehiclePropConfig(powerPropId));
+ EXPECT_NE(powerPropConfig, nullptr);
+ if (powerPropConfig->access == VehiclePropertyAccess::WRITE) {
+ continue;
+ }
+ // Try getting a value at each area ID supported by the power dependent property
+ for (auto& powerPropAreaConfig : powerPropConfig->areaConfigs) {
+ int powerDependentAreaId = powerPropAreaConfig.areaId;
auto getValueResult = getValue(VehiclePropValue{
.prop = powerPropId,
.areaId = powerDependentAreaId,
});
- if (areaId == powerDependentAreaId) {
+ // If the current area ID is contained within the HVAC_POWER_ON area ID
+ // turned off, then getValue should fail and a StatusCode error should be
+ // returned. Otherwise, a value should be returned.
+ if ((hvacPowerAreaId & powerDependentAreaId) == powerDependentAreaId) {
EXPECT_FALSE(getValueResult.ok());
EXPECT_EQ(getValueResult.error(), StatusCode::NOT_AVAILABLE_DISABLED);
} else {
@@ -1679,28 +1754,45 @@
// on this value from any power dependent property values other than those with the same
// areaId.
setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
+ .areaId = hvacPowerAreaId,
.value.int32Values = {1}});
}
}
TEST_F(FakeVehicleHardwareTest, testSetHvacPropNotAvailable) {
- int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
- for (int areaId : seatAreaIds) {
+ FakeVehicleHardwareTestHelper helper(getHardware());
+ auto hvacPowerOnConfig = std::move(getVehiclePropConfig(toInt(VehicleProperty::HVAC_POWER_ON)));
+ EXPECT_NE(hvacPowerOnConfig, nullptr);
+ for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
+ int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
+ // Turn off HVAC_POWER_ON for only 1 area ID
StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
+ .areaId = hvacPowerAreaId,
.value.int32Values = {0}});
+ EXPECT_EQ(status, StatusCode::OK);
- ASSERT_EQ(status, StatusCode::OK);
+ for (auto& powerPropId : helper.getHvacPowerDependentProps()) {
+ auto powerPropConfig = std::move(getVehiclePropConfig(powerPropId));
+ EXPECT_NE(powerPropConfig, nullptr);
+ if (powerPropConfig->access == VehiclePropertyAccess::READ) {
+ continue;
+ }
+ auto propType = getPropType(powerPropId);
+ // Try setting a value at each area ID supported by the power dependent property
+ for (auto& powerPropAreaConfig : powerPropConfig->areaConfigs) {
+ int powerDependentAreaId = powerPropAreaConfig.areaId;
+ auto val = VehiclePropValue{.prop = powerPropId, .areaId = powerDependentAreaId};
+ if (propType == VehiclePropertyType::FLOAT) {
+ val.value.floatValues.emplace_back(20);
+ } else {
+ val.value.int32Values.emplace_back(1);
+ }
+ status = setValue(val);
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- int powerPropId = HVAC_POWER_PROPERTIES[i];
- for (int powerDependentAreaId : seatAreaIds) {
- StatusCode status = setValue(VehiclePropValue{.prop = powerPropId,
- .areaId = powerDependentAreaId,
- .value.int32Values = {1}});
-
- if (areaId == powerDependentAreaId) {
+ // If the current area ID is contained within the HVAC_POWER_ON area ID
+ // turned off, then setValue should fail and a StatusCode error should be
+ // returned. Otherwise, an ok StatusCode should be returned.
+ if ((hvacPowerAreaId & powerDependentAreaId) == powerDependentAreaId) {
EXPECT_EQ(status, StatusCode::NOT_AVAILABLE_DISABLED);
} else {
EXPECT_EQ(status, StatusCode::OK);
@@ -1712,38 +1804,48 @@
// on this value from any power dependent property values other than those with the same
// areaId.
setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
+ .areaId = hvacPowerAreaId,
.value.int32Values = {1}});
}
}
TEST_F(FakeVehicleHardwareTest, testHvacPowerOnSendCurrentHvacPropValues) {
- int seatAreaIds[5] = {SEAT_1_LEFT, SEAT_1_RIGHT, SEAT_2_LEFT, SEAT_2_CENTER, SEAT_2_RIGHT};
- for (int areaId : seatAreaIds) {
+ FakeVehicleHardwareTestHelper helper(getHardware());
+ auto hvacPowerOnConfig = std::move(getVehiclePropConfig(toInt(VehicleProperty::HVAC_POWER_ON)));
+ EXPECT_NE(hvacPowerOnConfig, nullptr);
+ for (auto& hvacPowerOnAreaConfig : hvacPowerOnConfig->areaConfigs) {
+ int hvacPowerAreaId = hvacPowerOnAreaConfig.areaId;
StatusCode status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
+ .areaId = hvacPowerAreaId,
.value.int32Values = {0}});
-
- ASSERT_EQ(status, StatusCode::OK);
-
- clearChangedProperties();
- setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
- .areaId = areaId,
- .value.int32Values = {1}});
-
+ EXPECT_EQ(status, StatusCode::OK);
auto events = getChangedProperties();
- // If we turn HVAC power on, we expect to receive one property event for every HVAC prop
- // areas plus one event for HVAC_POWER_ON.
- std::vector<int32_t> changedPropIds;
- for (size_t i = 0; i < sizeof(HVAC_POWER_PROPERTIES) / sizeof(int32_t); i++) {
- changedPropIds.push_back(HVAC_POWER_PROPERTIES[i]);
- }
- changedPropIds.push_back(toInt(VehicleProperty::HVAC_POWER_ON));
-
for (const auto& event : events) {
- EXPECT_EQ(event.areaId, areaId);
- EXPECT_THAT(event.prop, AnyOfArray(changedPropIds));
+ // Ignore HVAC_POWER_ON event
+ if (event.prop == toInt(VehicleProperty::HVAC_POWER_ON)) {
+ continue;
+ }
+ EXPECT_THAT(event.prop, AnyOfArray(helper.getHvacPowerDependentProps()));
+ EXPECT_EQ((hvacPowerAreaId & event.areaId), hvacPowerAreaId);
+ EXPECT_EQ(event.status, VehiclePropertyStatus::UNAVAILABLE);
}
+ clearChangedProperties();
+
+ status = setValue(VehiclePropValue{.prop = toInt(VehicleProperty::HVAC_POWER_ON),
+ .areaId = hvacPowerAreaId,
+ .value.int32Values = {1}});
+ EXPECT_EQ(status, StatusCode::OK);
+ events = getChangedProperties();
+ for (const auto& event : events) {
+ // Ignore HVAC_POWER_ON event
+ if (event.prop == toInt(VehicleProperty::HVAC_POWER_ON)) {
+ continue;
+ }
+ EXPECT_THAT(event.prop, AnyOfArray(helper.getHvacPowerDependentProps()));
+ EXPECT_EQ((hvacPowerAreaId & event.areaId), hvacPowerAreaId);
+ EXPECT_EQ(event.status, VehiclePropertyStatus::AVAILABLE);
+ }
+ clearChangedProperties();
}
}
@@ -1804,6 +1906,47 @@
}
}
+TEST_F(FakeVehicleHardwareTest, testGetAccPropertiesOnStandardCc) {
+ std::vector<int32_t> ccTypeDependentProperties = {
+ toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP),
+ toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE),
+ };
+
+ StatusCode status =
+ setValue(VehiclePropValue{.prop = toInt(VehicleProperty::CRUISE_CONTROL_TYPE),
+ .value.int32Values = {toInt(CruiseControlType::STANDARD)}});
+ EXPECT_EQ(status, StatusCode::OK);
+
+ for (int32_t dependentProp : ccTypeDependentProperties) {
+ auto getValueResult = getValue(VehiclePropValue{.prop = dependentProp});
+ EXPECT_FALSE(getValueResult.ok());
+ EXPECT_EQ(getValueResult.error(), StatusCode::NOT_AVAILABLE_DISABLED);
+ }
+}
+
+TEST_F(FakeVehicleHardwareTest, testSetAccPropertiesOnStandardCc) {
+ std::vector<VehiclePropValue> testVehiclePropValues = {
+ VehiclePropValue{
+ .prop = toInt(VehicleProperty::ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP),
+ .value.int32Values = {3}},
+ VehiclePropValue{
+ .prop = toInt(VehicleProperty::CRUISE_CONTROL_COMMAND),
+ .value.int32Values = {toInt(CruiseControlCommand::INCREASE_TARGET_TIME_GAP)}},
+ VehiclePropValue{
+ .prop = toInt(VehicleProperty::CRUISE_CONTROL_COMMAND),
+ .value.int32Values = {toInt(CruiseControlCommand::DECREASE_TARGET_TIME_GAP)}}};
+
+ StatusCode status =
+ setValue(VehiclePropValue{.prop = toInt(VehicleProperty::CRUISE_CONTROL_TYPE),
+ .value.int32Values = {toInt(CruiseControlType::STANDARD)}});
+ EXPECT_EQ(status, StatusCode::OK);
+
+ for (auto value : testVehiclePropValues) {
+ status = setValue(value);
+ EXPECT_EQ(status, StatusCode::NOT_AVAILABLE_DISABLED);
+ }
+}
+
TEST_F(FakeVehicleHardwareTest, testSendAdasPropertiesState) {
std::unordered_map<int32_t, std::vector<int32_t>> adasEnabledPropToAdasPropWithErrorState = {
// AEB
@@ -2855,7 +2998,7 @@
TEST_F(FakeVehicleHardwareTest, testGetEchoReverseBytes) {
ASSERT_EQ(setValue(VehiclePropValue{
- .prop = ECHO_REVERSE_BYTES,
+ .prop = toInt(TestVendorProperty::ECHO_REVERSE_BYTES),
.value =
{
.byteValues = {0x01, 0x02, 0x03, 0x04},
@@ -2864,7 +3007,7 @@
StatusCode::OK);
auto result = getValue(VehiclePropValue{
- .prop = ECHO_REVERSE_BYTES,
+ .prop = toInt(TestVendorProperty::ECHO_REVERSE_BYTES),
});
ASSERT_TRUE(result.ok()) << "failed to get ECHO_REVERSE_BYTES value: " << getStatus(result);
@@ -2938,13 +3081,8 @@
// Config array values from HVAC_TEMPERATURE_SET in DefaultProperties.json
auto configs = getHardware()->getAllPropertyConfigs();
- VehiclePropConfig* hvacTemperatureSetConfig = nullptr;
- for (auto& config : configs) {
- if (config.prop == toInt(VehicleProperty::HVAC_TEMPERATURE_SET)) {
- hvacTemperatureSetConfig = &config;
- break;
- }
- }
+ auto hvacTemperatureSetConfig =
+ std::move(getVehiclePropConfig(toInt(VehicleProperty::HVAC_TEMPERATURE_SET)));
EXPECT_NE(hvacTemperatureSetConfig, nullptr);
auto& hvacTemperatureSetConfigArray = hvacTemperatureSetConfig->configArray;
diff --git a/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp b/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
index 6cbc7e5..6b789bb 100644
--- a/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
+++ b/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/src/ProtoMessageConverter.cpp
@@ -73,6 +73,11 @@
protoACfg->set_max_float_value(areaConfig.maxFloatValue);
protoACfg->set_min_int32_value(areaConfig.minInt32Value);
protoACfg->set_max_int32_value(areaConfig.maxInt32Value);
+ if (areaConfig.supportedEnumValues.has_value()) {
+ for (auto& supportedEnumValue : areaConfig.supportedEnumValues.value()) {
+ protoACfg->add_supported_enum_values(supportedEnumValue);
+ }
+ }
}
}
@@ -87,7 +92,7 @@
COPY_PROTOBUF_VEC_TO_VHAL_TYPE(in, config_array, out, configArray);
auto cast_to_acfg = [](const proto::VehicleAreaConfig& protoAcfg) {
- return aidl_vehicle::VehicleAreaConfig{
+ auto vehicleAreaConfig = aidl_vehicle::VehicleAreaConfig{
.areaId = protoAcfg.area_id(),
.minInt32Value = protoAcfg.min_int32_value(),
.maxInt32Value = protoAcfg.max_int32_value(),
@@ -96,6 +101,9 @@
.minFloatValue = protoAcfg.min_float_value(),
.maxFloatValue = protoAcfg.max_float_value(),
};
+ COPY_PROTOBUF_VEC_TO_VHAL_TYPE(protoAcfg, supported_enum_values, (&vehicleAreaConfig),
+ supportedEnumValues.value());
+ return vehicleAreaConfig;
};
CAST_COPY_PROTOBUF_VEC_TO_VHAL_TYPE(in, area_configs, out, areaConfigs, cast_to_acfg);
}
diff --git a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/StatusCode.proto b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/StatusCode.proto
index 63d7933..95e766a 100644
--- a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/StatusCode.proto
+++ b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/StatusCode.proto
@@ -38,6 +38,37 @@
/* Something unexpected has happened in Vehicle HAL */
INTERNAL_ERROR = 5;
+
+ /**
+ * For features that are not available because the underlying feature is
+ * disabled.
+ */
+ NOT_AVAILABLE_DISABLED = 6;
+
+ /**
+ * For features that are not available because the vehicle speed is too low.
+ */
+ NOT_AVAILABLE_SPEED_LOW = 7;
+
+ /**
+ * For features that are not available because the vehicle speed is too
+ * high.
+ */
+ NOT_AVAILABLE_SPEED_HIGH = 8;
+
+ /**
+ * For features that are not available because of bad camera or sensor
+ * visibility. Examples might be bird poop blocking the camera or a bumper
+ * cover blocking an ultrasonic sensor.
+ */
+ NOT_AVAILABLE_POOR_VISIBILITY = 9;
+
+ /**
+ * The feature cannot be accessed due to safety reasons. Eg. System could be
+ * in a faulty state, an object or person could be blocking the requested
+ * operation such as closing a trunk door, etc.
+ */
+ NOT_AVAILABLE_SAFETY = 10;
};
message VehicleHalCallStatus {
diff --git a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
index b5b7e80..ddc64d9 100644
--- a/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
+++ b/automotive/vehicle/aidl/impl/proto/android/hardware/automotive/vehicle/VehicleAreaConfig.proto
@@ -36,4 +36,11 @@
float min_float_value = 6;
float max_float_value = 7;
+
+ /**
+ * If the property has a @data_enum, then it is possible to specify a supported subset of the
+ * @data_enum. If the property has a @data_enum and supported_enum_values is null, then it is
+ * assumed all @data_enum values are supported unless specified through another mechanism.
+ */
+ repeated int64 supported_enum_values = 8;
};
diff --git a/automotive/vehicle/aidl/impl/utils/README.md b/automotive/vehicle/aidl/impl/utils/README.md
index 87bb7e3..255131d 100644
--- a/automotive/vehicle/aidl/impl/utils/README.md
+++ b/automotive/vehicle/aidl/impl/utils/README.md
@@ -57,6 +57,6 @@
Defines many useful utility functions.
-## test
+## test_vendor_properties
-Defines utility libraries for test only.
+Contains vendor properties used for testing purpose in reference VHAL.
diff --git a/automotive/vehicle/aidl/impl/utils/common/include/PropertyUtils.h b/automotive/vehicle/aidl/impl/utils/common/include/PropertyUtils.h
index 7275ba3..78b61f7 100644
--- a/automotive/vehicle/aidl/impl/utils/common/include/PropertyUtils.h
+++ b/automotive/vehicle/aidl/impl/utils/common/include/PropertyUtils.h
@@ -77,22 +77,6 @@
constexpr int SEAT_2_LEFT = toInt(propertyutils_impl::VehicleAreaSeat::ROW_2_LEFT);
constexpr int SEAT_2_RIGHT = toInt(propertyutils_impl::VehicleAreaSeat::ROW_2_RIGHT);
constexpr int SEAT_2_CENTER = toInt(propertyutils_impl::VehicleAreaSeat::ROW_2_CENTER);
-constexpr int VENDOR_EXTENSION_BOOLEAN_PROPERTY =
- 0x101 | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(propertyutils_impl::VehiclePropertyType::BOOLEAN) |
- toInt(propertyutils_impl::VehicleArea::DOOR);
-constexpr int VENDOR_EXTENSION_FLOAT_PROPERTY =
- 0x102 | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(propertyutils_impl::VehiclePropertyType::FLOAT) |
- toInt(propertyutils_impl::VehicleArea::SEAT);
-constexpr int VENDOR_EXTENSION_INT_PROPERTY =
- 0x103 | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(propertyutils_impl::VehiclePropertyType::INT32) |
- toInt(propertyutils_impl::VehicleArea::WINDOW);
-constexpr int VENDOR_EXTENSION_STRING_PROPERTY =
- 0x104 | toInt(propertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(propertyutils_impl::VehiclePropertyType::STRING) |
- toInt(propertyutils_impl::VehicleArea::GLOBAL);
constexpr int FUEL_DOOR_REAR_LEFT = toInt(propertyutils_impl::PortLocationType::REAR_LEFT);
constexpr int CHARGE_PORT_FRONT_LEFT = toInt(propertyutils_impl::PortLocationType::FRONT_LEFT);
constexpr int CHARGE_PORT_REAR_LEFT = toInt(propertyutils_impl::PortLocationType::REAR_LEFT);
@@ -114,11 +98,6 @@
constexpr int HVAC_RIGHT = SEAT_1_RIGHT | SEAT_2_RIGHT;
constexpr int HVAC_ALL = HVAC_LEFT | HVAC_RIGHT;
-const int32_t HVAC_POWER_PROPERTIES[] = {
- toInt(propertyutils_impl::VehicleProperty::HVAC_FAN_SPEED),
- toInt(propertyutils_impl::VehicleProperty::HVAC_FAN_DIRECTION),
-};
-
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
index 250b331..dd43712 100644
--- a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
+++ b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp
@@ -27,7 +27,6 @@
"libgtest",
"libgmock",
],
- header_libs: ["VehicleHalTestUtilHeaders"],
defaults: ["VehicleHalDefaults"],
test_suites: ["device-tests"],
}
diff --git a/automotive/vehicle/aidl/impl/utils/common/test/VehicleUtilsTest.cpp b/automotive/vehicle/aidl/impl/utils/common/test/VehicleUtilsTest.cpp
index 411539b..9abb2a2 100644
--- a/automotive/vehicle/aidl/impl/utils/common/test/VehicleUtilsTest.cpp
+++ b/automotive/vehicle/aidl/impl/utils/common/test/VehicleUtilsTest.cpp
@@ -16,7 +16,6 @@
#include <ConcurrentQueue.h>
#include <PropertyUtils.h>
-#include <TestPropertyUtils.h>
#include <VehicleUtils.h>
#include <gtest/gtest.h>
@@ -56,6 +55,9 @@
constexpr int32_t int64VecProp = toInt(VehicleProperty::WHEEL_TICK);
constexpr int32_t floatProp = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE);
constexpr int32_t floatVecProp = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION);
+constexpr int32_t kMixedTypePropertyForTest = 0x1111 | toInt(VehiclePropertyGroup::VENDOR) |
+ toInt(VehicleArea::GLOBAL) |
+ toInt(VehiclePropertyType::MIXED);
std::vector<InvalidPropValueTestCase> getInvalidPropValuesTestCases() {
return std::vector<InvalidPropValueTestCase>(
diff --git a/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h b/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h
deleted file mode 100644
index 1400288..0000000
--- a/automotive/vehicle/aidl/impl/utils/test/include/TestPropertyUtils.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef android_hardware_automotive_vehicle_utils_test_include_TestPropertyUtils_H_
-#define android_hardware_automotive_vehicle_utils_test_include_TestPropertyUtils_H_
-
-#include <VehicleHalTypes.h>
-#include <VehicleUtils.h>
-
-namespace android {
-namespace hardware {
-namespace automotive {
-namespace vehicle {
-
-namespace testpropertyutils_impl {
-
-// These names are not part of the API since we only expose ints.
-using ::aidl::android::hardware::automotive::vehicle::VehicleArea;
-using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
-using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyGroup;
-using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyType;
-
-} // namespace testpropertyutils_impl
-
-// Converts the system property to the vendor property.
-// WARNING: This is only for the end-to-end testing, Should NOT include in the user build.
-inline constexpr int32_t toVendor(
- const aidl::android::hardware::automotive::vehicle::VehicleProperty& prop) {
- return (toInt(prop) & ~toInt(testpropertyutils_impl::VehiclePropertyGroup::MASK)) |
- toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR);
-}
-
-// These properties are used for the end-to-end testing of ClusterHomeService.
-constexpr int32_t VENDOR_CLUSTER_SWITCH_UI =
- toVendor(testpropertyutils_impl::VehicleProperty::CLUSTER_SWITCH_UI);
-constexpr int32_t VENDOR_CLUSTER_DISPLAY_STATE =
- toVendor(testpropertyutils_impl::VehicleProperty::CLUSTER_DISPLAY_STATE);
-constexpr int32_t VENDOR_CLUSTER_REPORT_STATE =
- toVendor(testpropertyutils_impl::VehicleProperty::CLUSTER_REPORT_STATE);
-constexpr int32_t VENDOR_CLUSTER_REQUEST_DISPLAY =
- toVendor(testpropertyutils_impl::VehicleProperty::CLUSTER_REQUEST_DISPLAY);
-constexpr int32_t VENDOR_CLUSTER_NAVIGATION_STATE =
- toVendor(testpropertyutils_impl::VehicleProperty::CLUSTER_NAVIGATION_STATE);
-
-// These properties are placeholder properties for developers to test new features without
-// implementing a real property.
-constexpr int32_t PLACEHOLDER_PROPERTY_INT =
- 0x2a11 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::INT32);
-constexpr int32_t PLACEHOLDER_PROPERTY_FLOAT =
- 0x2a11 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::FLOAT);
-constexpr int32_t PLACEHOLDER_PROPERTY_BOOLEAN =
- 0x2a11 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::BOOLEAN);
-constexpr int32_t PLACEHOLDER_PROPERTY_STRING =
- 0x2a11 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::STRING);
-
-// This property is used for testing LargeParcelable marshalling/unmarhsalling end to end.
-// It acts as an regular property that stores the property value when setting and return the value
-// when getting, except that all the byteValues used in the setValue response would be filled in
-// the reverse order.
-// 0x21702a12
-constexpr int32_t ECHO_REVERSE_BYTES = 0x2a12 |
- toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::BYTES);
-
-// This property is used for testing vendor error codes end to end.
-// 0x21402a13
-constexpr int32_t VENDOR_PROPERTY_ID = 0x2a13 |
- toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::INT32);
-
-// This property is used for test purpose. End to end tests use this property to test set and get
-// method for MIXED type properties.
-constexpr int32_t kMixedTypePropertyForTest =
- 0x1111 | toInt(testpropertyutils_impl::VehiclePropertyGroup::VENDOR) |
- toInt(testpropertyutils_impl::VehicleArea::GLOBAL) |
- toInt(testpropertyutils_impl::VehiclePropertyType::MIXED);
-} // namespace vehicle
-} // namespace automotive
-} // namespace hardware
-} // namespace android
-
-#endif // android_hardware_automotive_vehicle_utils_test_include_TestPropertyUtils_H_
diff --git a/automotive/vehicle/aidl/impl/utils/test/Android.bp b/automotive/vehicle/aidl/impl/utils/test_vendor_properties/Android.bp
similarity index 65%
copy from automotive/vehicle/aidl/impl/utils/test/Android.bp
copy to automotive/vehicle/aidl/impl/utils/test_vendor_properties/Android.bp
index ad9954f..f7da7e0 100644
--- a/automotive/vehicle/aidl/impl/utils/test/Android.bp
+++ b/automotive/vehicle/aidl/impl/utils/test_vendor_properties/Android.bp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,9 +18,14 @@
default_applicable_licenses: ["Android-Apache-2.0"],
}
-cc_library_headers {
- name: "VehicleHalTestUtilHeaders",
- vendor: true,
- header_libs: ["VehicleHalUtilHeaders"],
- export_include_dirs: ["include"],
+filegroup {
+ name: "VhalTestVendorProperties",
+ srcs: [
+ "**/*.aidl",
+ ],
+ visibility: [
+ "//hardware/interfaces/automotive/vehicle/aidl:__subpackages__",
+ "//packages/services/Car:__subpackages__",
+ "//cts/tests/tests/car_permission_tests",
+ ],
}
diff --git a/automotive/vehicle/aidl/impl/utils/test_vendor_properties/android/hardware/automotive/vehicle/TestVendorProperty.aidl b/automotive/vehicle/aidl/impl/utils/test_vendor_properties/android/hardware/automotive/vehicle/TestVendorProperty.aidl
new file mode 100644
index 0000000..3c877fa
--- /dev/null
+++ b/automotive/vehicle/aidl/impl/utils/test_vendor_properties/android/hardware/automotive/vehicle/TestVendorProperty.aidl
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.automotive.vehicle;
+
+/**
+ * Test vendor properties used in reference VHAL implementation.
+ */
+@Backing(type="int")
+enum TestVendorProperty {
+
+ /**
+ * Vendor version of CLUSTER_SWITCH_UI, used for the end-to-end testing of ClusterHomeService.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.INT32,
+ */
+ VENDOR_CLUSTER_SWITCH_UI = 0x0F34 + 0x20000000 + 0x01000000 + 0x00400000,
+
+ /**
+ * Vendor version of CLUSTER_DISPLAY_STATE, used for the end-to-end testing of
+ * ClusterHomeService.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.INT32_VEC
+ */
+ VENDOR_CLUSTER_DISPLAY_STATE = 0x0F35 + 0x20000000 + 0x01000000 + 0x00410000,
+
+ /**
+ * Vendor version of CLUSTER_REPORT_STATE, used for the end-to-end testing of
+ * ClusterHomeService.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyGroup.MIXED
+ */
+ VENDOR_CLUSTER_REPORT_STATE = 0x0F36 + 0x20000000 + 0x01000000 + 0x00E00000,
+
+ /**
+ * Vendor version of CLUSTER_REQUEST_DISPLAY, used for the end-to-end testing of
+ * ClusterHomeService.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.INT32
+ */
+ VENDOR_CLUSTER_REQUEST_DISPLAY = 0x0F37 + 0x20000000 + 0x01000000 + 0x00400000,
+
+ /**
+ * Vendor version of CLUSTER_NAVIGATION_STATE, used for the end-to-end testing of
+ * ClusterHomeService.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.BYTES
+ */
+ VENDOR_CLUSTER_NAVIGATION_STATE = 0x0F38 + 0x20000000 + 0x01000000 + 0x00700000,
+
+ // These properties are placeholder properties for developers to test new features without
+ // implementing a real property.
+
+ /**
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.INT32
+ */
+ PLACEHOLDER_PROPERTY_INT = 0x2A11 + 0x20000000 + 0x01000000 + 0x00400000,
+
+ /**
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.FLOAT
+ */
+ PLACEHOLDER_PROPERTY_FLOAT = 0x2A11 + 0x20000000 + 0x01000000 + 0x00600000,
+
+ /**
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.BOOLEAN
+ */
+ PLACEHOLDER_PROPERTY_BOOLEAN = 0x2A11 + 0x20000000 + 0x01000000 + 0x00200000,
+
+ /**
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.STRING
+ */
+ PLACEHOLDER_PROPERTY_STRING = 0x2A11 + 0x20000000 + 0x01000000 + 0x00100000,
+
+ /**
+ * This property is used for testing LargeParcelable marshalling/unmarhsalling end to end.
+ * It acts as an regular property that stores the property value when setting and return the
+ * value when getting, except that all the byteValues used in the setValue response would be
+ * filled in the reverse order.
+ *
+ * This is used in {@code VehicleHalLargeParcelableTest}.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.BYTES
+ *
+ * 0x21702a12
+ */
+ ECHO_REVERSE_BYTES = 0x2A12 + 0x20000000 + 0x01000000 + 0x00700000,
+
+ /**
+ * This property is used for testing vendor error codes end to end.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyType.INT32
+ *
+ * 0x21402a13
+ */
+ VENDOR_PROPERTY_FOR_ERROR_CODE_TESTING = 0x2A13 + 0x20000000 + 0x01000000 + 0x00400000,
+
+ /**
+ * This property is used for test purpose. End to end tests use this property to test set and
+ * get method for MIXED type properties.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyGroup.MIXED
+ */
+ MIXED_TYPE_PROPERTY_FOR_TEST = 0x1111 + 0x20000000 + 0x01000000 + 0x00E00000,
+
+ /**
+ * Property used for {@code CarVendorPropertyCustomPermissionTest}.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.DOOR | VehiclePropertyGroup.BOOLEAN
+ */
+ VENDOR_EXTENSION_BOOLEAN_PROPERTY = 0x0101 + 0x20000000 + 0x06000000 + 0x00200000,
+
+ /**
+ * Property used for {@code CarVendorPropertyCustomPermissionTest}.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.SEAT | VehiclePropertyGroup.FLOAT
+ */
+ VENDOR_EXTENSION_FLOAT_PROPERTY = 0x102 + 0x20000000 + 0x05000000 + 0x00600000,
+
+ /**
+ * Property used for {@code CarVendorPropertyCustomPermissionTest}.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.WINDOW | VehiclePropertyGroup.INT32
+ */
+ VENDOR_EXTENSION_INT_PROPERTY = 0x103 + 0x20000000 + 0x03000000 + 0x00400000,
+
+ /**
+ * Property used for {@code CarVendorPropertyCustomPermissionTest}.
+ *
+ * VehiclePropertyGroup.VENDOR | VehicleArea.GLOBAL | VehiclePropertyGroup.STRING
+ */
+ VENDOR_EXTENSION_STRING_PROPERTY = 0x103 + 0x20000000 + 0x01000000 + 0x00100000,
+}
diff --git a/automotive/vehicle/aidl/impl/vhal/Android.bp b/automotive/vehicle/aidl/impl/vhal/Android.bp
index 4feea79..c29345f 100644
--- a/automotive/vehicle/aidl/impl/vhal/Android.bp
+++ b/automotive/vehicle/aidl/impl/vhal/Android.bp
@@ -19,7 +19,7 @@
}
cc_binary {
- name: "android.hardware.automotive.vehicle@V1-default-service",
+ name: "android.hardware.automotive.vehicle@V3-default-service",
vendor: true,
defaults: [
"FakeVehicleHardwareDefaults",
@@ -68,7 +68,7 @@
}
cc_fuzz {
- name: "android.hardware.automotive.vehicle@V1-default-service_fuzzer",
+ name: "android.hardware.automotive.vehicle-default-service_fuzzer",
vendor: true,
defaults: [
"FakeVehicleHardwareDefaults",
diff --git a/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h b/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
index b3f4a0f..addc901 100644
--- a/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
+++ b/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
@@ -99,13 +99,10 @@
std::shared_ptr<const std::function<void(std::vector<ResultType>)>> mResultCallback;
};
-// A class to represent a client that calls {@code IVehicle.subscribe}.
-class SubscriptionClient final : public ConnectedClient {
+class SubscriptionClient {
public:
- SubscriptionClient(std::shared_ptr<PendingRequestPool> requestPool, CallbackType callback);
-
- // Gets the callback to be called when the request for this client has finished.
- std::shared_ptr<const IVehicleHardware::GetValuesCallback> getResultCallback();
+ using CallbackType =
+ std::shared_ptr<aidl::android::hardware::automotive::vehicle::IVehicleCallback>;
// Marshals the updated values into largeParcelable and sends it through {@code onPropertyEvent}
// callback.
@@ -119,21 +116,6 @@
CallbackType callback,
std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropError>&&
vehiclePropErrors);
-
- protected:
- // Gets the callback to be called when the request for this client has timeout.
- std::shared_ptr<const PendingRequestPool::TimeoutCallbackFunc> getTimeoutCallback() override;
-
- private:
- // The following members are only initialized during construction.
- std::shared_ptr<const PendingRequestPool::TimeoutCallbackFunc> mTimeoutCallback;
- std::shared_ptr<const IVehicleHardware::GetValuesCallback> mResultCallback;
- std::shared_ptr<const IVehicleHardware::PropertyChangeCallback> mPropertyChangeCallback;
-
- static void onGetValueResults(
- const void* clientId, CallbackType callback,
- std::shared_ptr<PendingRequestPool> requestPool,
- std::vector<aidl::android::hardware::automotive::vehicle::GetValueResult> results);
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h b/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h
index 74ad7ea..419e16b 100644
--- a/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h
+++ b/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h
@@ -90,39 +90,6 @@
GetSetValuesClient<aidl::android::hardware::automotive::vehicle::SetValueResult,
aidl::android::hardware::automotive::vehicle::SetValueResults>;
- // A thread safe class to maintain an increasing request ID for each subscribe client. This
- // class is safe to pass to async callbacks.
- class SubscribeIdByClient {
- public:
- int64_t getId(const CallbackType& callback);
-
- private:
- std::mutex mLock;
- std::unordered_map<const AIBinder*, int64_t> mIds GUARDED_BY(mLock);
- };
-
- // A thread safe class to store all subscribe clients. This class is safe to pass to async
- // callbacks.
- class SubscriptionClients {
- public:
- SubscriptionClients(std::shared_ptr<PendingRequestPool> pool) : mPendingRequestPool(pool) {}
-
- std::shared_ptr<SubscriptionClient> maybeAddClient(const CallbackType& callback);
-
- std::shared_ptr<SubscriptionClient> getClient(const CallbackType& callback);
-
- void removeClient(const AIBinder* clientId);
-
- size_t countClients();
-
- private:
- std::mutex mLock;
- std::unordered_map<const AIBinder*, std::shared_ptr<SubscriptionClient>> mClients
- GUARDED_BY(mLock);
- // PendingRequestPool is thread-safe.
- std::shared_ptr<PendingRequestPool> mPendingRequestPool;
- };
-
// A wrapper for binder lifecycle operations to enable stubbing for test.
class BinderLifecycleInterface {
public:
@@ -185,8 +152,6 @@
GUARDED_BY(mLock);
std::unordered_map<const AIBinder*, std::shared_ptr<SetValuesClient>> mSetValuesClients
GUARDED_BY(mLock);
- // SubscriptionClients is thread-safe.
- std::shared_ptr<SubscriptionClients> mSubscriptionClients;
// mBinderLifecycleHandler is only going to be changed in test.
std::unique_ptr<BinderLifecycleInterface> mBinderLifecycleHandler;
@@ -242,6 +207,8 @@
// mBinderEvents.
void onBinderDiedUnlinkedHandler();
+ size_t countSubscribeClients();
+
// Gets or creates a {@code T} object for the client to or from {@code clients}.
template <class T>
static std::shared_ptr<T> getOrCreateClient(
diff --git a/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h b/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
index 301d56c..512d906 100644
--- a/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
+++ b/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
@@ -105,6 +105,9 @@
std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropError>>
getSubscribedClientsForErrorEvents(const std::vector<SetValueErrorEvent>& errorEvents);
+ // Returns the number of subscribed clients.
+ size_t countClients();
+
// Checks whether the sample rate is valid.
static bool checkSampleRateHz(float sampleRateHz);
diff --git a/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp b/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
index fb23a25..35b93d2 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
@@ -250,36 +250,6 @@
template class GetSetValuesClient<GetValueResult, GetValueResults>;
template class GetSetValuesClient<SetValueResult, SetValueResults>;
-SubscriptionClient::SubscriptionClient(std::shared_ptr<PendingRequestPool> requestPool,
- std::shared_ptr<IVehicleCallback> callback)
- : ConnectedClient(requestPool, callback) {
- mTimeoutCallback = std::make_shared<const PendingRequestPool::TimeoutCallbackFunc>(
- [](std::unordered_set<int64_t> timeoutIds) {
- for (int64_t id : timeoutIds) {
- ALOGW("subscribe: requests with IDs: %" PRId64
- " has timed-out, not client informed, "
- "possibly one of recurrent requests for this subscription failed",
- id);
- }
- });
- auto requestPoolCopy = mRequestPool;
- const void* clientId = reinterpret_cast<const void*>(this);
- mResultCallback = std::make_shared<const IVehicleHardware::GetValuesCallback>(
- [clientId, callback, requestPoolCopy](std::vector<GetValueResult> results) {
- onGetValueResults(clientId, callback, requestPoolCopy, results);
- });
-}
-
-std::shared_ptr<const std::function<void(std::vector<GetValueResult>)>>
-SubscriptionClient::getResultCallback() {
- return mResultCallback;
-}
-
-std::shared_ptr<const PendingRequestPool::TimeoutCallbackFunc>
-SubscriptionClient::getTimeoutCallback() {
- return mTimeoutCallback;
-}
-
void SubscriptionClient::sendUpdatedValues(std::shared_ptr<IVehicleCallback> callback,
std::vector<VehiclePropValue>&& updatedValues) {
if (updatedValues.empty()) {
@@ -336,43 +306,6 @@
}
}
-void SubscriptionClient::onGetValueResults(const void* clientId,
- std::shared_ptr<IVehicleCallback> callback,
- std::shared_ptr<PendingRequestPool> requestPool,
- std::vector<GetValueResult> results) {
- std::unordered_set<int64_t> requestIds;
- for (const auto& result : results) {
- requestIds.insert(result.requestId);
- }
-
- auto finishedRequests = requestPool->tryFinishRequests(clientId, requestIds);
- std::vector<VehiclePropValue> propValues;
- for (auto& result : results) {
- int64_t requestId = result.requestId;
- if (finishedRequests.find(requestId) == finishedRequests.end()) {
- ALOGE("subscribe[%" PRId64
- "]: no pending request for the result from hardware, "
- "possibly already time-out",
- requestId);
- continue;
- }
- if (result.status != StatusCode::OK) {
- ALOGE("subscribe[%" PRId64
- "]: hardware returns non-ok status for getValues, status: "
- "%d",
- requestId, toInt(result.status));
- continue;
- }
- if (!result.prop.has_value()) {
- ALOGE("subscribe[%" PRId64 "]: no prop value in getValues result", requestId);
- continue;
- }
- propValues.push_back(std::move(result.prop.value()));
- }
-
- sendUpdatedValues(callback, std::move(propValues));
-}
-
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
index 0d5c070..f3eba2e 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
@@ -92,39 +92,6 @@
} // namespace
-std::shared_ptr<SubscriptionClient> DefaultVehicleHal::SubscriptionClients::maybeAddClient(
- const CallbackType& callback) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- return getOrCreateClient(&mClients, callback, mPendingRequestPool);
-}
-
-std::shared_ptr<SubscriptionClient> DefaultVehicleHal::SubscriptionClients::getClient(
- const CallbackType& callback) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- const AIBinder* clientId = callback->asBinder().get();
- if (mClients.find(clientId) == mClients.end()) {
- return nullptr;
- }
- return mClients[clientId];
-}
-
-int64_t DefaultVehicleHal::SubscribeIdByClient::getId(const CallbackType& callback) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- // This would be initialized to 0 if callback does not exist in the map.
- int64_t subscribeId = (mIds[callback->asBinder().get()])++;
- return subscribeId;
-}
-
-void DefaultVehicleHal::SubscriptionClients::removeClient(const AIBinder* clientId) {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- mClients.erase(clientId);
-}
-
-size_t DefaultVehicleHal::SubscriptionClients::countClients() {
- std::scoped_lock<std::mutex> lockGuard(mLock);
- return mClients.size();
-}
-
DefaultVehicleHal::DefaultVehicleHal(std::unique_ptr<IVehicleHardware> vehicleHardware)
: mVehicleHardware(std::move(vehicleHardware)),
mPendingRequestPool(std::make_shared<PendingRequestPool>(TIMEOUT_IN_NANO)) {
@@ -132,9 +99,6 @@
return;
}
- mSubscriptionClients = std::make_shared<SubscriptionClients>(mPendingRequestPool);
-
- auto subscribeIdByClient = std::make_shared<SubscribeIdByClient>();
IVehicleHardware* vehicleHardwarePtr = mVehicleHardware.get();
mSubscriptionManager = std::make_shared<SubscriptionManager>(vehicleHardwarePtr);
@@ -262,7 +226,6 @@
ALOGD("binder died, client ID: %p", clientId);
mSetValuesClients.erase(clientId);
mGetValuesClients.erase(clientId);
- mSubscriptionClients->removeClient(clientId);
mSubscriptionManager->unsubscribe(clientId);
}
@@ -301,10 +264,6 @@
DefaultVehicleHal::getOrCreateClient<DefaultVehicleHal::SetValuesClient>(
std::unordered_map<const AIBinder*, std::shared_ptr<SetValuesClient>>* clients,
const CallbackType& callback, std::shared_ptr<PendingRequestPool> pendingRequestPool);
-template std::shared_ptr<SubscriptionClient>
-DefaultVehicleHal::getOrCreateClient<SubscriptionClient>(
- std::unordered_map<const AIBinder*, std::shared_ptr<SubscriptionClient>>* clients,
- const CallbackType& callback, std::shared_ptr<PendingRequestPool> pendingRequestPool);
void DefaultVehicleHal::setTimeout(int64_t timeoutInNano) {
mPendingRequestPool = std::make_unique<PendingRequestPool>(timeoutInNano);
@@ -708,9 +667,6 @@
"client died");
}
- // Create a new SubscriptionClient if there isn't an existing one.
- mSubscriptionClients->maybeAddClient(callback);
-
if (!onChangeSubscriptions.empty()) {
auto result = mSubscriptionManager->subscribe(callback, onChangeSubscriptions,
/*isContinuousProperty=*/false);
@@ -842,12 +798,15 @@
dprintf(fd, "Containing %zu property configs\n", mConfigsByPropId.size());
dprintf(fd, "Currently have %zu getValues clients\n", mGetValuesClients.size());
dprintf(fd, "Currently have %zu setValues clients\n", mSetValuesClients.size());
- dprintf(fd, "Currently have %zu subscription clients\n",
- mSubscriptionClients->countClients());
+ dprintf(fd, "Currently have %zu subscribe clients\n", countSubscribeClients());
}
return STATUS_OK;
}
+size_t DefaultVehicleHal::countSubscribeClients() {
+ return mSubscriptionManager->countClients();
+}
+
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp b/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp
index 1f2690e..17683ae 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp
@@ -301,6 +301,11 @@
return mSubscribedPropsByClient.empty() && mClientsByPropIdArea.empty();
}
+size_t SubscriptionManager::countClients() {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ return mSubscribedPropsByClient.size();
+}
+
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
index 96b71f0..fb14373 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
@@ -350,7 +350,7 @@
size_t countClients() {
std::scoped_lock<std::mutex> lockGuard(mVhal->mLock);
return mVhal->mGetValuesClients.size() + mVhal->mSetValuesClients.size() +
- mVhal->mSubscriptionClients->countClients();
+ mVhal->countSubscribeClients();
}
std::shared_ptr<PendingRequestPool> getPool() { return mVhal->mPendingRequestPool; }
diff --git a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
index 19267cd..9fa7b98 100644
--- a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
+++ b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
@@ -1,4 +1,4 @@
-service vendor.vehicle-hal-default /vendor/bin/hw/android.hardware.automotive.vehicle@V1-default-service
+service vendor.vehicle-hal-default /vendor/bin/hw/android.hardware.automotive.vehicle@V3-default-service
class early_hal
user vehicle_network
group system inet
diff --git a/automotive/vehicle/aidl_property/Android.bp b/automotive/vehicle/aidl_property/Android.bp
index 19fa4a3..db96382 100644
--- a/automotive/vehicle/aidl_property/Android.bp
+++ b/automotive/vehicle/aidl_property/Android.bp
@@ -28,7 +28,7 @@
// This HAL was originally part of android.hardware.automotive.vehicle
"android/hardware/automotive/vehicle/*.aidl",
],
- frozen: true,
+ frozen: false,
stability: "vintf",
backend: {
cpp: {
@@ -52,7 +52,6 @@
version: "2",
imports: [],
},
-
],
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
index 44c9d54..a24f515 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
@@ -34,6 +34,7 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
enum VehicleAreaSeat {
+ UNKNOWN = 0x0000,
ROW_1_LEFT = 0x0001,
ROW_1_CENTER = 0x0002,
ROW_1_RIGHT = 0x0004,
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
index ba75e7b..231186f 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -245,6 +245,7 @@
SUPPORTED_PROPERTY_IDS = (((0x0F48 + 0x10000000) + 0x01000000) + 0x00410000) /* 289476424 */,
SHUTDOWN_REQUEST = (((0x0F49 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410889 */,
VEHICLE_IN_USE = (((0x0F4A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313738 */,
+ CLUSTER_HEARTBEAT = (((0x0F4B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 299896651 */,
AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1000 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313920 */,
AUTOMATIC_EMERGENCY_BRAKING_STATE = (((0x1001 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411073 */,
FORWARD_COLLISION_WARNING_ENABLED = (((0x1002 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313922 */,
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
index 89d50ea..e70fb22 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleAreaSeat.aidl
@@ -22,6 +22,7 @@
@VintfStability
@Backing(type="int")
enum VehicleAreaSeat {
+ UNKNOWN = 0x0000,
ROW_1_LEFT = 0x0001,
ROW_1_CENTER = 0x0002,
ROW_1_RIGHT = 0x0004,
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index d9c6de7..af2e903 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -169,7 +169,7 @@
* int32Values[4] = wheel base
* int32Values[5] = track width front
* int32Values[6] = track width rear
- * int32Values[7] = curb to curb turning radius
+ * int32Values[7] = curb to curb turning diameter
*
* @change_mode VehiclePropertyChangeMode.STATIC
* @access VehiclePropertyAccess.READ
@@ -345,6 +345,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
FUEL_DOOR_OPEN = 0x0308 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -383,6 +384,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
EV_CHARGE_PORT_OPEN = 0x030A + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -419,6 +421,7 @@
*
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @unit VehicleUnit:METER
*/
RANGE_REMAINING = 0x0308 + 0x10000000 + 0x01000000
@@ -476,6 +479,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
ENGINE_IDLE_AUTO_STOP_ENABLED =
0x0320 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -560,6 +564,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
EV_BRAKE_REGENERATION_LEVEL =
0x040C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -648,6 +653,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum EvStoppingMode
*/
EV_STOPPING_MODE =
@@ -696,8 +702,9 @@
* and passenger side, an alternative mapping would be:
* - ROW_1_LEFT
* - ROW_1_RIGHT
- *
- *
+ */
+
+ /**
* Fan speed setting
*
* The maxInt32Value and minInt32Value in VehicleAreaConfig must be defined.
@@ -713,6 +720,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_FAN_SPEED = 0x0500 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -724,6 +732,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleHvacFanDirection
*/
HVAC_FAN_DIRECTION = 0x0501 + 0x10000000 + 0x05000000
@@ -763,6 +772,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @unit VehicleUnit:CELSIUS
*/
HVAC_TEMPERATURE_SET = 0x0503 + 0x10000000 + 0x05000000
@@ -775,6 +785,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_DEFROSTER = 0x0504 + 0x10000000 + 0x03000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WINDOW,VehiclePropertyType:BOOLEAN
@@ -786,6 +797,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @config_flags Supported areaIds
*/
HVAC_AC_ON = 0x0505 + 0x10000000 + 0x05000000
@@ -803,6 +815,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_MAX_AC_ON = 0x0506 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -825,6 +838,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_MAX_DEFROST_ON = 0x0507 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -841,6 +855,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_RECIRC_ON = 0x0508 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -879,6 +894,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_DUAL_ON = 0x0509 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -900,6 +916,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_AUTO_ON = 0x050A + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -921,6 +938,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_SEAT_TEMPERATURE = 0x050B + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -943,6 +961,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_SIDE_MIRROR_HEAT = 0x050C + 0x10000000 + 0x04000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:MIRROR,VehiclePropertyType:INT32
@@ -965,6 +984,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_STEERING_WHEEL_HEAT = 0x050D + 0x10000000 + 0x01000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
@@ -989,6 +1009,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
HVAC_TEMPERATURE_DISPLAY_UNITS = 0x050E + 0x10000000 + 0x01000000
@@ -1043,6 +1064,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_POWER_ON = 0x0510 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -1077,6 +1099,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_AUTO_RECIRC_ON = 0x0512 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -1101,6 +1124,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_SEAT_VENTILATION = 0x0513 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -1112,6 +1136,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HVAC_ELECTRIC_DEFROSTER_ON = 0x0514 + 0x10000000 + 0x03000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WINDOW,VehiclePropertyType:BOOLEAN
@@ -1175,6 +1200,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
DISTANCE_DISPLAY_UNITS = 0x0600 + 0x10000000 + 0x01000000
@@ -1198,6 +1224,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
FUEL_VOLUME_DISPLAY_UNITS = 0x0601 + 0x10000000 + 0x01000000
@@ -1222,6 +1249,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
TIRE_PRESSURE_DISPLAY_UNITS = 0x0602 + 0x10000000 + 0x01000000
@@ -1246,6 +1274,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
EV_BATTERY_DISPLAY_UNITS = 0x0603 + 0x10000000 + 0x01000000
@@ -1262,6 +1291,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME = 0x0604 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -1284,6 +1314,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
VEHICLE_SPEED_DISPLAY_UNITS = 0x0605 + 0x10000000 + 0x01000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
@@ -1633,6 +1664,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
DOOR_POS = 0x0B00 + 0x10000000 + 0x06000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:DOOR,VehiclePropertyType:INT32
@@ -1657,6 +1689,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
DOOR_MOVE = 0x0B01 + 0x10000000 + 0x06000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:DOOR,VehiclePropertyType:INT32
@@ -1670,6 +1703,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
DOOR_LOCK = 0x0B02 + 0x10000000 + 0x06000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:DOOR,VehiclePropertyType:BOOLEAN
@@ -1685,6 +1719,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
DOOR_CHILD_LOCK_ENABLED =
0x0B03 + VehiclePropertyGroup.SYSTEM + VehicleArea.DOOR + VehiclePropertyType.BOOLEAN,
@@ -1710,6 +1745,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_Z_POS = 0x0B40 + 0x10000000 + 0x04000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:MIRROR,VehiclePropertyType:INT32
@@ -1735,6 +1771,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_Z_MOVE = 0x0B41 + 0x10000000 + 0x04000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:MIRROR,VehiclePropertyType:INT32
@@ -1760,6 +1797,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_Y_POS = 0x0B42 + 0x10000000 + 0x04000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:MIRROR,VehiclePropertyType:INT32
@@ -1784,6 +1822,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_Y_MOVE = 0x0B43 + 0x10000000 + 0x04000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:MIRROR,VehiclePropertyType:INT32
@@ -1797,6 +1836,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_LOCK = 0x0B44 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -1810,6 +1850,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_FOLD = 0x0B45 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -1826,6 +1867,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_AUTO_FOLD_ENABLED =
@@ -1843,6 +1885,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_AUTO_TILT_ENABLED =
@@ -1891,6 +1934,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BELT_BUCKLED = 0x0B82 + 0x10000000 + 0x05000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:BOOLEAN
@@ -1915,6 +1959,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BELT_HEIGHT_POS = 0x0B83 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -1942,6 +1987,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BELT_HEIGHT_MOVE = 0x0B84 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -1966,6 +2012,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_FORE_AFT_POS = 0x0B85 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -1992,6 +2039,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_FORE_AFT_MOVE = 0x0B86 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2018,6 +2066,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BACKREST_ANGLE_1_POS = 0x0B87 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2044,6 +2093,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BACKREST_ANGLE_1_MOVE = 0x0B88 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2072,6 +2122,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BACKREST_ANGLE_2_POS = 0x0B89 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2098,6 +2149,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_BACKREST_ANGLE_2_MOVE = 0x0B8A + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2120,6 +2172,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEIGHT_POS = 0x0B8B + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2144,6 +2197,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEIGHT_MOVE = 0x0B8C + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2171,6 +2225,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_DEPTH_POS = 0x0B8D + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2196,6 +2251,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_DEPTH_MOVE = 0x0B8E + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2222,6 +2278,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_TILT_POS = 0x0B8F + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2248,6 +2305,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_TILT_MOVE = 0x0B90 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2272,6 +2330,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_FORE_AFT_POS = 0x0B91 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2299,6 +2358,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_FORE_AFT_MOVE = 0x0B92 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2323,6 +2383,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_SIDE_SUPPORT_POS = 0x0B93 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2350,6 +2411,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 0x0B94 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2369,6 +2431,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_HEIGHT_POS = 0x0B95 + 0x10000000 + 0x01000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:INT32
@@ -2395,6 +2458,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_HEIGHT_POS_V2 =
0x0BA4 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2423,6 +2487,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_HEIGHT_MOVE = 0x0B96 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2445,6 +2510,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_ANGLE_POS = 0x0B97 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2472,6 +2538,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_ANGLE_MOVE = 0x0B98 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2494,6 +2561,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_FORE_AFT_POS = 0x0B99 + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2521,6 +2589,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_HEADREST_FORE_AFT_MOVE = 0x0B9A + 0x10000000 + 0x05000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:SEAT,VehiclePropertyType:INT32
@@ -2565,6 +2634,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
SEAT_FOOTWELL_LIGHTS_SWITCH =
@@ -2581,6 +2651,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_EASY_ACCESS_ENABLED =
0x0B9D + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.BOOLEAN,
@@ -2600,6 +2671,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_AIRBAG_ENABLED =
0x0B9E + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.BOOLEAN,
@@ -2624,6 +2696,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_CUSHION_SIDE_SUPPORT_POS =
0x0B9F + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2651,6 +2724,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_CUSHION_SIDE_SUPPORT_MOVE =
0x0BA0 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2673,6 +2747,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_VERTICAL_POS =
0x0BA1 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2698,6 +2773,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_LUMBAR_VERTICAL_MOVE =
0x0BA2 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2723,6 +2799,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
SEAT_WALK_IN_POS =
0x0BA3 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -2770,6 +2847,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
WINDOW_POS = 0x0BC0 + 0x10000000 + 0x03000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WINDOW,VehiclePropertyType:INT32
@@ -2811,6 +2889,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
WINDOW_MOVE = 0x0BC1 + 0x10000000 + 0x03000000
+ 0x00400000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WINDOW,VehiclePropertyType:INT32
@@ -2824,6 +2903,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
WINDOW_LOCK = 0x0BC4 + 0x10000000 + 0x03000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:WINDOW,VehiclePropertyType:BOOLEAN
@@ -2889,6 +2969,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum WindshieldWipersSwitch
*/
WINDSHIELD_WIPERS_SWITCH =
@@ -2915,6 +2996,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_DEPTH_POS =
0x0BE0 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -2940,6 +3022,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_DEPTH_MOVE =
0x0BE1 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -2962,6 +3045,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_HEIGHT_POS =
0x0BE2 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -2987,6 +3071,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_HEIGHT_MOVE =
0x0BE3 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -3001,6 +3086,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_THEFT_LOCK_ENABLED =
0x0BE4 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -3014,6 +3100,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_LOCKED =
0x0BE5 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -3028,6 +3115,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
STEERING_WHEEL_EASY_ACCESS_ENABLED =
0x0BE6 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -3054,6 +3142,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
GLOVE_BOX_DOOR_POS =
0x0BF0 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.INT32,
@@ -3072,6 +3161,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
GLOVE_BOX_LOCKED =
0x0BF1 + VehiclePropertyGroup.SYSTEM + VehicleArea.SEAT + VehiclePropertyType.BOOLEAN,
@@ -3291,6 +3381,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
HEADLIGHTS_SWITCH = 0x0E10 + 0x10000000 + 0x01000000
@@ -3305,6 +3396,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
HIGH_BEAM_LIGHTS_SWITCH = 0x0E11 + 0x10000000 + 0x01000000
@@ -3335,6 +3427,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
FOG_LIGHTS_SWITCH = 0x0E12 + 0x10000000 + 0x01000000
@@ -3349,6 +3442,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
HAZARD_LIGHTS_SWITCH = 0x0E13 + 0x10000000 + 0x01000000
@@ -3377,6 +3471,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
CABIN_LIGHTS_SWITCH = 0x0F02 + 0x10000000 + 0x01000000
@@ -3405,6 +3500,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
READING_LIGHTS_SWITCH = 0x0F04 + 0x10000000 + 0x05000000
@@ -3450,6 +3546,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
STEERING_WHEEL_LIGHTS_SWITCH =
@@ -4119,6 +4216,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
FRONT_FOG_LIGHTS_SWITCH = 0x0F3C + 0x10000000 + 0x01000000
@@ -4150,6 +4248,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
REAR_FOG_LIGHTS_SWITCH = 0x0F3E + 0x10000000 + 0x01000000
@@ -4166,6 +4265,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @unit VehicleUnit:AMPERE
*/
EV_CHARGE_CURRENT_DRAW_LIMIT = 0x0F3F + 0x10000000 + 0x01000000
@@ -4187,6 +4287,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
EV_CHARGE_PERCENT_LIMIT = 0x0F40 + 0x10000000 + 0x01000000
+ 0x00600000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:FLOAT
@@ -4214,6 +4315,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
EV_CHARGE_SWITCH = 0x0F42 + 0x10000000 + 0x01000000
+ 0x00200000, // VehiclePropertyGroup:SYSTEM,VehicleArea:GLOBAL,VehiclePropertyType:BOOLEAN
@@ -4375,12 +4477,30 @@
* powers on the vehicle. VEHICLE_IN_USE is set to true. After a driving session, user powers
* off the vehicle, VEHICLE_IN_USE is set to false.
*
+ * <p>This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
VEHICLE_IN_USE =
0x0F4A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
+ /**
+ * Sends the heartbeat signal to ClusterOS.
+ *
+ * int64[0]: epochTimeNs
+ * int64[1]: the visibility of ClusterUI, 0 - invisible, 1 - visible
+ * bytes: the app specific metadata, this can be empty when ClusterHomeService use the heartbeat
+ * to deliver the change of the visibility.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.WRITE
+ */
+ CLUSTER_HEARTBEAT =
+ 0x0F4B + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.MIXED,
+
/***********************************************************************************************
* Start of ADAS Properties
*
@@ -4403,6 +4523,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
AUTOMATIC_EMERGENCY_BRAKING_ENABLED =
0x1000 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4445,6 +4566,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
FORWARD_COLLISION_WARNING_ENABLED =
0x1002 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4484,6 +4606,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
BLIND_SPOT_WARNING_ENABLED =
0x1004 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4524,6 +4647,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
LANE_DEPARTURE_WARNING_ENABLED =
0x1006 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4568,6 +4692,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
LANE_KEEP_ASSIST_ENABLED =
0x1008 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4616,6 +4741,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
LANE_CENTERING_ASSIST_ENABLED =
0x100A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4625,11 +4751,11 @@
*
* Commands to activate and suspend LCA.
*
- * When the command ACTIVATE from LaneCenteringAssistCommmand is sent,
+ * When the command ACTIVATE from LaneCenteringAssistCommand is sent,
* LANE_CENTERING_ASSIST_STATE must be set to LaneCenteringAssistState#ACTIVATION_REQUESTED.
* When the ACTIVATE command succeeds, LANE_CENTERING_ASSIST_STATE must be set to
* LaneCenteringAssistState#ACTIVATED. When the command DEACTIVATE from
- * LaneCenteringAssistCommmand succeeds, LANE_CENTERING_ASSIST_STATE must be set to
+ * LaneCenteringAssistCommand succeeds, LANE_CENTERING_ASSIST_STATE must be set to
* LaneCenteringAssistState#ENABLED.
*
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless
@@ -4645,7 +4771,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.WRITE
- * @data_enum LaneCenteringAssistCommmand
+ * @data_enum LaneCenteringAssistCommand
*/
LANE_CENTERING_ASSIST_COMMAND =
0x100B + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
@@ -4690,6 +4816,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
EMERGENCY_LANE_KEEP_ASSIST_ENABLED =
0x100D + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4733,6 +4860,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
CRUISE_CONTROL_ENABLED =
0x100F + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4758,6 +4886,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum CruiseControlType
* @data_enum ErrorState
*/
@@ -4855,6 +4984,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @unit VehicleUnit:MILLI_SECS
*/
ADAPTIVE_CRUISE_CONTROL_TARGET_TIME_GAP =
@@ -4906,6 +5036,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
HANDS_ON_DETECTION_ENABLED =
0x1016 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
diff --git a/automotive/vehicle/tools/generate_annotation_enums.py b/automotive/vehicle/tools/generate_annotation_enums.py
old mode 100644
new mode 100755
index c36cbb0..05fc99a
--- a/automotive/vehicle/tools/generate_annotation_enums.py
+++ b/automotive/vehicle/tools/generate_annotation_enums.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2022 The Android Open Source Project
#
@@ -18,37 +18,45 @@
Need ANDROID_BUILD_TOP environmental variable to be set. This script will update
ChangeModeForVehicleProperty.h and AccessForVehicleProperty.h under generated_lib/cpp and
- ChangeModeForVehicleProperty.java and AccessForVehicleProperty.java under generated_lib/java.
+ ChangeModeForVehicleProperty.java, AccessForVehicleProperty.java, EnumForVehicleProperty.java under generated_lib/java.
Usage:
$ python generate_annotation_enums.py
"""
+import argparse
+import filecmp
import os
import re
import sys
+import tempfile
-PROP_AIDL_FILE_PATH = ("hardware/interfaces/automotive/vehicle/aidl_property/android/hardware/" +
- "automotive/vehicle/VehicleProperty.aidl")
-CHANGE_MODE_CPP_FILE_PATH = ("hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/" +
- "ChangeModeForVehicleProperty.h")
-ACCESS_CPP_FILE_PATH = ("hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/" +
- "AccessForVehicleProperty.h")
-CHANGE_MODE_JAVA_FILE_PATH = ("hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/" +
- "ChangeModeForVehicleProperty.java")
-ACCESS_JAVA_FILE_PATH = ("hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/" +
- "AccessForVehicleProperty.java")
+PROP_AIDL_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl_property/android/hardware/' +
+ 'automotive/vehicle/VehicleProperty.aidl')
+CHANGE_MODE_CPP_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/' +
+ 'ChangeModeForVehicleProperty.h')
+ACCESS_CPP_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/' +
+ 'AccessForVehicleProperty.h')
+CHANGE_MODE_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' +
+ 'ChangeModeForVehicleProperty.java')
+ACCESS_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' +
+ 'AccessForVehicleProperty.java')
+ENUM_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' +
+ 'EnumForVehicleProperty.java')
+SCRIPT_PATH = 'hardware/interfaces/automotive/vehicle/tools/generate_annotation_enums.py'
-TAB = " "
-RE_ENUM_START = re.compile("\s*enum VehicleProperty \{")
-RE_ENUM_END = re.compile("\s*\}\;")
-RE_COMMENT_BEGIN = re.compile("\s*\/\*\*?")
-RE_COMMENT_END = re.compile("\s*\*\/")
-RE_CHANGE_MODE = re.compile("\s*\* @change_mode (\S+)\s*")
-RE_ACCESS = re.compile("\s*\* @access (\S+)\s*")
-RE_VALUE = re.compile("\s*(\w+)\s*=(.*)")
+TAB = ' '
+RE_ENUM_START = re.compile('\s*enum VehicleProperty \{')
+RE_ENUM_END = re.compile('\s*\}\;')
+RE_COMMENT_BEGIN = re.compile('\s*\/\*\*?')
+RE_COMMENT_END = re.compile('\s*\*\/')
+RE_CHANGE_MODE = re.compile('\s*\* @change_mode (\S+)\s*')
+RE_ACCESS = re.compile('\s*\* @access (\S+)\s*')
+RE_DATA_ENUM = re.compile('\s*\* @data_enum (\S+)\s*')
+RE_UNIT = re.compile('\s*\* @unit (\S+)\s+')
+RE_VALUE = re.compile('\s*(\w+)\s*=(.*)')
LICENSE = """/*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -161,57 +169,145 @@
}
"""
+ENUM_JAVA_HEADER = """package android.hardware.automotive.vehicle;
-class Converter:
+import java.util.List;
+import java.util.Map;
- def __init__(self, name, annotation_re):
- self.name = name
- self.annotation_re = annotation_re
+public final class EnumForVehicleProperty {
- def convert(self, input, output, header, footer, cpp):
+ public static final Map<Integer, List<Class<?>>> values = Map.ofEntries(
+"""
+
+ENUM_JAVA_FOOTER = """
+ );
+
+}
+"""
+
+
+class PropertyConfig:
+ """Represents one VHAL property definition in VehicleProperty.aidl."""
+
+ def __init__(self):
+ self.name = None
+ self.description = None
+ self.change_mode = None
+ self.access_modes = []
+ self.enum_types = []
+ self.unit_type = None
+
+ def __repr__(self):
+ return self.__str__()
+
+ def __str__(self):
+ return ('PropertyConfig{{' +
+ 'name: {}, description: {}, change_mode: {}, access_modes: {}, enum_types: {}' +
+ ', unit_type: {}}}').format(self.name, self.description, self.change_mode,
+ self.access_modes, self.enum_types, self.unit_type)
+
+
+class FileParser:
+
+ def __init__(self):
+ self.configs = None
+
+ def parseFile(self, input_file):
+ """Parses the input VehicleProperty.aidl file into a list of property configs."""
processing = False
in_comment = False
- content = LICENSE + header
- annotation = None
- id = 0
- with open(input, 'r') as f:
+ configs = []
+ config = None
+ with open(input_file, 'r') as f:
for line in f.readlines():
if RE_ENUM_START.match(line):
processing = True
- annotation = None
elif RE_ENUM_END.match(line):
processing = False
if not processing:
continue
if RE_COMMENT_BEGIN.match(line):
in_comment = True
+ config = PropertyConfig()
+ description = ''
if RE_COMMENT_END.match(line):
in_comment = False
if in_comment:
- match = self.annotation_re.match(line)
+ if not config.description:
+ sline = line.strip()
+ # Skip the first line of comment
+ if sline.startswith('*'):
+ # Remove the '*'.
+ sline = sline[1:].strip()
+ # We reach an empty line of comment, the description part is ending.
+ if sline == '':
+ config.description = description
+ else:
+ if description != '':
+ description += ' '
+ description += sline
+ match = RE_CHANGE_MODE.match(line)
if match:
- annotation = match.group(1)
+ config.change_mode = match.group(1).replace('VehiclePropertyChangeMode.', '')
+ match = RE_ACCESS.match(line)
+ if match:
+ config.access_modes.append(match.group(1).replace('VehiclePropertyAccess.', ''))
+ match = RE_UNIT.match(line)
+ if match:
+ config.unit_type = match.group(1)
+ match = RE_DATA_ENUM.match(line)
+ if match:
+ config.enum_types.append(match.group(1))
else:
match = RE_VALUE.match(line)
if match:
prop_name = match.group(1)
- if prop_name == "INVALID":
+ if prop_name == 'INVALID':
continue
- if not annotation:
- print("No @" + self.name + " annotation for property: " + prop_name)
- sys.exit(1)
- if id != 0:
- content += "\n"
- if cpp:
- annotation = annotation.replace(".", "::")
- content += (TAB + TAB + "{VehicleProperty::" + prop_name + ", " +
- annotation + "},")
- else:
- content += (TAB + TAB + "Map.entry(VehicleProperty." + prop_name + ", " +
- annotation + "),")
- id += 1
+ if not config.change_mode:
+ raise Exception(
+ 'No change_mode annotation for property: ' + prop_name)
+ if not config.access_modes:
+ raise Exception(
+ 'No access_mode annotation for property: ' + prop_name)
+ config.name = prop_name
+ configs.append(config)
- # Remove the additional "," at the end for the Java file.
+ self.configs = configs
+
+ def convert(self, output, header, footer, cpp, field):
+ """Converts the property config file to C++/Java output file."""
+ counter = 0
+ content = LICENSE + header
+ for config in self.configs:
+ if field == 'change_mode':
+ if cpp:
+ annotation = "VehiclePropertyChangeMode::" + config.change_mode
+ else:
+ annotation = "VehiclePropertyChangeMode." + config.change_mode
+ elif field == 'access_mode':
+ if cpp:
+ annotation = "VehiclePropertyAccess::" + config.access_modes[0]
+ else:
+ annotation = "VehiclePropertyAccess." + config.access_modes[0]
+ elif field == 'enum_types':
+ if len(config.enum_types) < 1:
+ continue;
+ if not cpp:
+ annotation = "List.of(" + ', '.join([class_name + ".class" for class_name in config.enum_types]) + ")"
+ else:
+ raise Exception('Unknown field: ' + field)
+ if counter != 0:
+ content += '\n'
+ if cpp:
+ content += (TAB + TAB + '{VehicleProperty::' + config.name + ', ' +
+ annotation + '},')
+ else:
+ content += (TAB + TAB + 'Map.entry(VehicleProperty.' + config.name + ', ' +
+ annotation + '),')
+ counter += 1
+
+ # Remove the additional ',' at the end for the Java file.
if not cpp:
content = content[:-1]
@@ -220,26 +316,125 @@
with open(output, 'w') as f:
f.write(content)
+ def outputAsCsv(self, output):
+ content = 'name,description,change mode,access mode,enum type,unit type\n'
+ for config in self.configs:
+ enum_types = None
+ if not config.enum_types:
+ enum_types = '/'
+ else:
+ enum_types = '/'.join(config.enum_types)
+ unit_type = config.unit_type
+ if not unit_type:
+ unit_type = '/'
+ access_modes = ''
+ content += '"{}","{}","{}","{}","{}","{}"\n'.format(
+ config.name,
+ # Need to escape quote as double quote.
+ config.description.replace('"', '""'),
+ config.change_mode,
+ '/'.join(config.access_modes),
+ enum_types,
+ unit_type)
+
+ with open(output, 'w+') as f:
+ f.write(content)
+
+
+def createTempFile():
+ f = tempfile.NamedTemporaryFile(delete=False);
+ f.close();
+ return f.name
+
def main():
- android_top = os.environ['ANDROID_BUILD_TOP']
+ parser = argparse.ArgumentParser(
+ description='Generate Java and C++ enums based on annotations in VehicleProperty.aidl')
+ parser.add_argument('--android_build_top', required=False, help='Path to ANDROID_BUILD_TOP')
+ parser.add_argument('--preupload_files', nargs='*', required=False, help='modified files')
+ parser.add_argument('--check_only', required=False, action='store_true',
+ help='only check whether the generated files need update')
+ parser.add_argument('--output_csv', required=False,
+ help='Path to the parsing result in CSV style, useful for doc generation')
+ args = parser.parse_args();
+ android_top = None
+ output_folder = None
+ if args.android_build_top:
+ android_top = args.android_build_top
+ vehiclePropertyUpdated = False
+ for preuload_file in args.preupload_files:
+ if preuload_file.endswith('VehicleProperty.aidl'):
+ vehiclePropertyUpdated = True
+ break
+ if not vehiclePropertyUpdated:
+ return
+ else:
+ android_top = os.environ['ANDROID_BUILD_TOP']
if not android_top:
- print("ANDROID_BUILD_TOP is not in envorinmental variable, please run source and lunch " +
- "at the android root")
+ print('ANDROID_BUILD_TOP is not in environmental variable, please run source and lunch ' +
+ 'at the android root')
aidl_file = os.path.join(android_top, PROP_AIDL_FILE_PATH)
- change_mode_cpp_output = os.path.join(android_top, CHANGE_MODE_CPP_FILE_PATH);
- access_cpp_output = os.path.join(android_top, ACCESS_CPP_FILE_PATH);
- change_mode_java_output = os.path.join(android_top, CHANGE_MODE_JAVA_FILE_PATH);
- access_java_output = os.path.join(android_top, ACCESS_JAVA_FILE_PATH);
+ f = FileParser();
+ f.parseFile(aidl_file)
- c = Converter("change_mode", RE_CHANGE_MODE);
- c.convert(aidl_file, change_mode_cpp_output, CHANGE_MODE_CPP_HEADER, CHANGE_MODE_CPP_FOOTER, True)
- c.convert(aidl_file, change_mode_java_output, CHANGE_MODE_JAVA_HEADER, CHANGE_MODE_JAVA_FOOTER, False)
- c = Converter("access", RE_ACCESS)
- c.convert(aidl_file, access_cpp_output, ACCESS_CPP_HEADER, ACCESS_CPP_FOOTER, True)
- c.convert(aidl_file, access_java_output, ACCESS_JAVA_HEADER, ACCESS_JAVA_FOOTER, False)
+ if args.output_csv:
+ f.outputAsCsv(args.output_csv)
+ return
+
+ change_mode_cpp_file = os.path.join(android_top, CHANGE_MODE_CPP_FILE_PATH);
+ access_cpp_file = os.path.join(android_top, ACCESS_CPP_FILE_PATH);
+ change_mode_java_file = os.path.join(android_top, CHANGE_MODE_JAVA_FILE_PATH);
+ access_java_file = os.path.join(android_top, ACCESS_JAVA_FILE_PATH);
+ enum_java_file = os.path.join(android_top, ENUM_JAVA_FILE_PATH);
+ temp_files = []
+
+ if not args.check_only:
+ change_mode_cpp_output = change_mode_cpp_file
+ access_cpp_output = access_cpp_file
+ change_mode_java_output = change_mode_java_file
+ access_java_output = access_java_file
+ enum_java_output = enum_java_file
+ else:
+ change_mode_cpp_output = createTempFile()
+ temp_files.append(change_mode_cpp_output)
+ access_cpp_output = createTempFile()
+ temp_files.append(access_cpp_output)
+ change_mode_java_output = createTempFile()
+ temp_files.append(change_mode_java_output)
+ access_java_output = createTempFile()
+ temp_files.append(access_java_output)
+ enum_java_output = createTempFile()
+ temp_files.append(enum_java_output)
+
+ try:
+ f.convert(change_mode_cpp_output, CHANGE_MODE_CPP_HEADER, CHANGE_MODE_CPP_FOOTER,
+ True, 'change_mode')
+ f.convert(change_mode_java_output, CHANGE_MODE_JAVA_HEADER,
+ CHANGE_MODE_JAVA_FOOTER, False, 'change_mode')
+ f.convert(access_cpp_output, ACCESS_CPP_HEADER, ACCESS_CPP_FOOTER, True, 'access_mode')
+ f.convert(access_java_output, ACCESS_JAVA_HEADER, ACCESS_JAVA_FOOTER, False, 'access_mode')
+ f.convert(enum_java_output, ENUM_JAVA_HEADER, ENUM_JAVA_FOOTER, False, 'enum_types')
+
+ if not args.check_only:
+ return
+
+ if ((not filecmp.cmp(change_mode_cpp_output, change_mode_cpp_file)) or
+ (not filecmp.cmp(change_mode_java_output, change_mode_java_file)) or
+ (not filecmp.cmp(access_cpp_output, access_cpp_file)) or
+ (not filecmp.cmp(access_java_output, access_java_file)) or
+ (not filecmp.cmp(enum_java_output, enum_java_file))):
+ print('The generated enum files for VehicleProperty.aidl requires update, ')
+ print('Run \npython ' + android_top + '/' + SCRIPT_PATH)
+ sys.exit(1)
+ except Exception as e:
+ print('Error parsing VehicleProperty.aidl')
+ print(e)
+ sys.exit(1)
+ finally:
+ for file in temp_files:
+ os.remove(file)
-if __name__ == "__main__":
+if __name__ == '__main__':
main()
\ No newline at end of file
diff --git a/automotive/vehicle/vhal_static_cpp_lib.mk b/automotive/vehicle/vhal_static_cpp_lib.mk
index 995589c..bffa076 100644
--- a/automotive/vehicle/vhal_static_cpp_lib.mk
+++ b/automotive/vehicle/vhal_static_cpp_lib.mk
@@ -17,4 +17,4 @@
LOCAL_STATIC_LIBRARIES += \
android.hardware.automotive.vehicle-V2-ndk \
- android.hardware.automotive.vehicle.property-V2-ndk
+ android.hardware.automotive.vehicle.property-V3-ndk
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index 910ae7c..3dca0ae 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -166,9 +166,8 @@
ASSERT_TRUE(result.ok()) << "Failed to get all property configs, error: "
<< result.error().message();
- ASSERT_GE(result.value().size(), 1u)
- << StringPrintf("Expect to get at least 1 property config, got %zu",
- result.value().size());
+ ASSERT_GE(result.value().size(), 1u) << StringPrintf(
+ "Expect to get at least 1 property config, got %zu", result.value().size());
}
// Test getPropConfigs() can query properties returned by getAllPropConfigs.
@@ -188,9 +187,8 @@
ASSERT_TRUE(result.ok()) << "Failed to get required property config, error: "
<< result.error().message();
- ASSERT_EQ(result.value().size(), properties.size())
- << StringPrintf("Expect to get exactly %zu configs, got %zu",
- properties.size(), result.value().size());
+ ASSERT_EQ(result.value().size(), properties.size()) << StringPrintf(
+ "Expect to get exactly %zu configs, got %zu", properties.size(), result.value().size());
}
// Test getPropConfig() with an invalid propertyId returns an error code.
@@ -887,6 +885,12 @@
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
}
+TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyClusterHeartbeatConfig) {
+ verifyProperty(VehicleProperty::CLUSTER_HEARTBEAT, VehiclePropertyAccess::WRITE,
+ VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
+ VehicleArea::GLOBAL, VehiclePropertyType::MIXED);
+}
+
bool VtsHalAutomotiveVehicleTargetTest::checkIsSupported(int32_t propertyId) {
auto result = mVhalClient->getPropConfigs({propertyId});
return result.ok();
diff --git a/biometrics/common/util/include/util/Util.h b/biometrics/common/util/include/util/Util.h
index da19dc6..efd66bc 100644
--- a/biometrics/common/util/include/util/Util.h
+++ b/biometrics/common/util/include/util/Util.h
@@ -23,6 +23,9 @@
#include <thread>
#include <vector>
+#include <android-base/parseint.h>
+using ::android::base::ParseInt;
+
namespace aidl::android::hardware::biometrics {
#define SLEEP_MS(x) \
@@ -64,6 +67,87 @@
std::sregex_token_iterator());
return parts;
}
+
+ // Returns a vector of integers for the string separated by comma,
+ // Empty vector is returned if there is any parsing error
+ static std::vector<int32_t> parseIntSequence(const std::string& str,
+ const std::string& sep = ",") {
+ std::vector<std::string> seqs = Util::split(str, sep);
+ std::vector<int32_t> res;
+
+ for (const auto& seq : seqs) {
+ int32_t val;
+ if (ParseInt(seq, &val)) {
+ res.push_back(val);
+ } else {
+ LOG(WARNING) << "Invalid int sequence:" + str + " seq:" + seq;
+ res.clear();
+ break;
+ }
+ }
+
+ return res;
+ }
+
+ // Parses a single enrollment stage string in the format of
+ // enroll_stage_spec: <duration>[-acquiredInfos]
+ // duration: integerInMs
+ // acquiredInfos: [info1,info2,...]
+ //
+ // Returns false if there is parsing error
+ //
+ static bool parseEnrollmentCaptureSingle(const std::string& str,
+ std::vector<std::vector<int32_t>>& res) {
+ std::vector<int32_t> defaultAcquiredInfo = {1};
+ bool aborted = true;
+
+ do {
+ std::smatch sms;
+ // Parses strings like "1000-[5,1]" or "500"
+ std::regex ex("((\\d+)(-\\[([\\d|,]+)\\])?)");
+ if (!regex_match(str.cbegin(), str.cend(), sms, ex)) break;
+ int32_t duration;
+ if (!ParseInt(sms.str(2), &duration)) break;
+ res.push_back({duration});
+ if (!sms.str(4).empty()) {
+ auto acqv = parseIntSequence(sms.str(4));
+ if (acqv.empty()) break;
+ res.push_back(acqv);
+ } else
+ res.push_back(defaultAcquiredInfo);
+ aborted = false;
+ } while (0);
+
+ return !aborted;
+ }
+
+ // Parses enrollment string consisting of one or more stages in the formst of
+ // <enroll_stage_spec>[,enroll_stage_spec,...]
+ // Empty vector is returned in case of parsing error
+ static std::vector<std::vector<int32_t>> parseEnrollmentCapture(const std::string& str) {
+ std::vector<std::vector<int32_t>> res;
+
+ std::string s(str);
+ s.erase(std::remove_if(s.begin(), s.end(), ::isspace), s.end());
+ bool aborted = false;
+ std::smatch sms;
+ // Parses strings like "1000-[5,1],500,800-[6,5,1]"
+ // -------------- ----- ---------------
+ // into parts: A B C
+ while (regex_search(s, sms, std::regex("^(,)?(\\d+(-\\[[\\d|,]+\\])?)"))) {
+ if (!parseEnrollmentCaptureSingle(sms.str(2), res)) {
+ aborted = true;
+ break;
+ }
+ s = sms.suffix();
+ }
+ if (aborted || s.length() != 0) {
+ res.clear();
+ LOG(ERROR) << "Failed to parse enrollment captures:" + str;
+ }
+
+ return res;
+ }
};
} // namespace aidl::android::hardware::biometrics
diff --git a/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
index 82ad917..b005746 100644
--- a/biometrics/face/aidl/default/Android.bp
+++ b/biometrics/face/aidl/default/Android.bp
@@ -8,28 +8,25 @@
}
filegroup {
- name: "face-default.rc",
- srcs: ["face-default.rc"],
+ name: "face-example.rc",
+ srcs: ["face-example.rc"],
}
filegroup {
- name: "face-default.xml",
- srcs: ["face-default.xml"],
+ name: "face-example.xml",
+ srcs: ["face-example.xml"],
}
cc_binary {
name: "android.hardware.biometrics.face-service.example",
relative_install_path: "hw",
- init_rc: [":face-default.rc"],
- vintf_fragments: [":face-default.xml"],
+ init_rc: [":face-example.rc"],
+ vintf_fragments: [":face-example.xml"],
vendor: true,
+
shared_libs: [
- "libbase",
"libbinder_ndk",
- "android.hardware.biometrics.face-V3-ndk",
- "android.hardware.biometrics.common-V3-ndk",
- "android.hardware.biometrics.common.thread",
- "android.hardware.biometrics.common.util",
+ "liblog",
],
srcs: [
"main.cpp",
@@ -37,7 +34,17 @@
"FakeFaceEngine.cpp",
"Session.cpp",
],
- static_libs: ["libandroid.hardware.biometrics.face.VirtualProps"],
+ stl: "c++_static",
+ static_libs: [
+ "android.hardware.biometrics.common-V3-ndk",
+ "android.hardware.biometrics.common.thread",
+ "android.hardware.biometrics.common.util",
+ "android.hardware.biometrics.face-V3-ndk",
+ "android.hardware.common-V2-ndk",
+ "android.hardware.keymaster-V4-ndk",
+ "libandroid.hardware.biometrics.face.VirtualProps",
+ "libbase",
+ ],
}
sysprop_library {
diff --git a/biometrics/face/aidl/default/FakeFaceEngine.cpp b/biometrics/face/aidl/default/FakeFaceEngine.cpp
index 0f088f4..578231d 100644
--- a/biometrics/face/aidl/default/FakeFaceEngine.cpp
+++ b/biometrics/face/aidl/default/FakeFaceEngine.cpp
@@ -136,56 +136,127 @@
const std::future<void>& cancel) {
BEGIN_OP(FaceHalProperties::operation_authenticate_latency().value_or(0));
- // Signal to the framework that we have begun authenticating.
- AuthenticationFrame frame;
- frame.data.acquiredInfo = AcquiredInfo::START;
- frame.data.vendorCode = 0;
- cb->onAuthenticationFrame(frame);
-
- // Also signal that we have opened the camera.
- frame = {};
- frame.data.acquiredInfo = AcquiredInfo::FIRST_FRAME_RECEIVED;
- frame.data.vendorCode = 0;
- cb->onAuthenticationFrame(frame);
-
- auto now = Util::getSystemNanoTime();
- int64_t duration = FaceHalProperties::operation_authenticate_duration().value_or(0);
- if (duration > 0) {
- do {
- SLEEP_MS(5);
- } while (!Util::hasElapsed(now, duration));
- }
-
- if (FaceHalProperties::operation_authenticate_fails().value_or(false)) {
- LOG(ERROR) << "Fail: operation_authenticate_fails";
- cb->onError(Error::VENDOR, 0 /* vendorError */);
- return;
- }
-
- if (FaceHalProperties::lockout().value_or(false)) {
- LOG(ERROR) << "Fail: lockout";
- cb->onLockoutPermanent();
- cb->onError(Error::HW_UNAVAILABLE, 0 /* vendorError */);
- return;
- }
-
- if (shouldCancel(cancel)) {
- LOG(ERROR) << "Fail: cancel";
- cb->onError(Error::CANCELED, 0 /* vendorCode */);
- return;
- }
-
auto id = FaceHalProperties::enrollment_hit().value_or(0);
auto enrolls = FaceHalProperties::enrollments();
auto isEnrolled = std::find(enrolls.begin(), enrolls.end(), id) != enrolls.end();
- if (id < 0 || !isEnrolled) {
- LOG(ERROR) << (isEnrolled ? "invalid enrollment hit" : "Fail: not enrolled");
- cb->onAuthenticationFailed();
+
+ auto vec2str = [](std::vector<AcquiredInfo> va) {
+ std::stringstream ss;
+ bool isFirst = true;
+ for (auto ac : va) {
+ if (!isFirst) ss << ",";
+ ss << std::to_string((int8_t)ac);
+ isFirst = false;
+ }
+ return ss.str();
+ };
+
+ // default behavior mimic face sensor in U
+ int64_t defaultAuthDuration = 500;
+ std::string defaultAcquiredInfo =
+ vec2str({AcquiredInfo::START, AcquiredInfo::FIRST_FRAME_RECEIVED});
+ if (!isEnrolled) {
+ std::vector<AcquiredInfo> v;
+ for (int i = 0; i < 56; i++) v.push_back(AcquiredInfo::NOT_DETECTED);
+ defaultAcquiredInfo += "," + vec2str(v);
+ defaultAuthDuration = 2100;
+ } else {
+ defaultAcquiredInfo += "," + vec2str({AcquiredInfo::TOO_BRIGHT, AcquiredInfo::TOO_BRIGHT,
+ AcquiredInfo::TOO_BRIGHT, AcquiredInfo::TOO_BRIGHT,
+ AcquiredInfo::GOOD, AcquiredInfo::GOOD});
+ }
+
+ int64_t now = Util::getSystemNanoTime();
+ int64_t duration =
+ FaceHalProperties::operation_authenticate_duration().value_or(defaultAuthDuration);
+ auto acquired =
+ FaceHalProperties::operation_authenticate_acquired().value_or(defaultAcquiredInfo);
+ auto acquiredInfos = Util::parseIntSequence(acquired);
+ int N = acquiredInfos.size();
+
+ if (N == 0) {
+ LOG(ERROR) << "Fail to parse authentiate acquired info: " + acquired;
cb->onError(Error::UNABLE_TO_PROCESS, 0 /* vendorError */);
return;
}
- cb->onAuthenticationSucceeded(id, {} /* hat */);
+ int i = 0;
+ do {
+ if (FaceHalProperties::lockout().value_or(false)) {
+ LOG(ERROR) << "Fail: lockout";
+ cb->onLockoutPermanent();
+ cb->onError(Error::HW_UNAVAILABLE, 0 /* vendorError */);
+ return;
+ }
+
+ if (FaceHalProperties::operation_authenticate_fails().value_or(false)) {
+ LOG(ERROR) << "Fail: operation_authenticate_fails";
+ cb->onAuthenticationFailed();
+ return;
+ }
+
+ auto err = FaceHalProperties::operation_authenticate_error().value_or(0);
+ if (err != 0) {
+ LOG(ERROR) << "Fail: operation_authenticate_error";
+ auto ec = convertError(err);
+ cb->onError(ec.first, ec.second);
+ return; /* simply terminating current operation for any user inserted error,
+ revisit if tests need*/
+ }
+
+ if (shouldCancel(cancel)) {
+ LOG(ERROR) << "Fail: cancel";
+ cb->onError(Error::CANCELED, 0 /* vendorCode */);
+ return;
+ }
+
+ if (i < N) {
+ auto ac = convertAcquiredInfo(acquiredInfos[i]);
+ AuthenticationFrame frame;
+ frame.data.acquiredInfo = ac.first;
+ frame.data.vendorCode = ac.second;
+ cb->onAuthenticationFrame(frame);
+ LOG(INFO) << "AcquiredInfo:" << i << ": (" << (int)ac.first << "," << (int)ac.second
+ << ")";
+ i++;
+ }
+
+ SLEEP_MS(duration / N);
+ } while (!Util::hasElapsed(now, duration));
+
+ if (id > 0 && isEnrolled) {
+ cb->onAuthenticationSucceeded(id, {} /* hat */);
+ return;
+ } else {
+ LOG(ERROR) << "Fail: face not enrolled";
+ cb->onAuthenticationFailed();
+ cb->onError(Error::TIMEOUT, 0 /* vendorError*/);
+ return;
+ }
+}
+
+std::pair<AcquiredInfo, int32_t> FakeFaceEngine::convertAcquiredInfo(int32_t code) {
+ std::pair<AcquiredInfo, int32_t> res;
+ if (code > FACE_ACQUIRED_VENDOR_BASE) {
+ res.first = AcquiredInfo::VENDOR;
+ res.second = code - FACE_ACQUIRED_VENDOR_BASE;
+ } else {
+ res.first = (AcquiredInfo)code;
+ res.second = 0;
+ }
+ return res;
+}
+
+std::pair<Error, int32_t> FakeFaceEngine::convertError(int32_t code) {
+ std::pair<Error, int32_t> res;
+ if (code > FACE_ERROR_VENDOR_BASE) {
+ res.first = Error::VENDOR;
+ res.second = code - FACE_ERROR_VENDOR_BASE;
+ } else {
+ res.first = (Error)code;
+ res.second = 0;
+ }
+ return res;
}
void FakeFaceEngine::detectInteractionImpl(ISessionCallback* cb, const std::future<void>& cancel) {
@@ -315,4 +386,4 @@
cb->onLockoutCleared();
}
-} // namespace aidl::android::hardware::biometrics::face
\ No newline at end of file
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/FakeFaceEngine.h b/biometrics/face/aidl/default/FakeFaceEngine.h
index edb54ce..06dd396 100644
--- a/biometrics/face/aidl/default/FakeFaceEngine.h
+++ b/biometrics/face/aidl/default/FakeFaceEngine.h
@@ -16,6 +16,8 @@
#pragma once
+#define LOG_TAG "FaceVirtualHal"
+
#include <aidl/android/hardware/biometrics/common/SensorStrength.h>
#include <aidl/android/hardware/biometrics/face/BnSession.h>
#include <aidl/android/hardware/biometrics/face/FaceSensorType.h>
@@ -60,6 +62,12 @@
void resetLockoutImpl(ISessionCallback* cb, const keymaster::HardwareAuthToken& /*hat*/);
std::mt19937 mRandom;
+
+ private:
+ static constexpr int32_t FACE_ACQUIRED_VENDOR_BASE = 1000;
+ static constexpr int32_t FACE_ERROR_VENDOR_BASE = 1000;
+ std::pair<AcquiredInfo, int32_t> convertAcquiredInfo(int32_t code);
+ std::pair<Error, int32_t> convertError(int32_t code);
};
-} // namespace aidl::android::hardware::biometrics::face
\ No newline at end of file
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/README.md b/biometrics/face/aidl/default/README.md
index 1655973..516a7aa 100644
--- a/biometrics/face/aidl/default/README.md
+++ b/biometrics/face/aidl/default/README.md
@@ -1,77 +1,63 @@
-# Virtual Face HAL
+# Face Virtual HAL (VHAL)
This is a virtual HAL implementation that is backed by system properties
instead of actual hardware. It's intended for testing and UI development
on debuggable builds to allow devices to masquerade as alternative device
types and for emulators.
+Note: The virtual face HAL feature development will be done in phases. Refer to this doc often for
+the latest supported features
-## Device Selection
+## Supported Devices
-You can either run the FakeFaceEngine on a [real device](#actual-device) or a [virtual device/cuttlefish](#getting-started-on-a-virtual-device-cuttlefish). This document should
-help you to get started on either one.
+The face virtual hal is automatically built in in all debug builds (userdebug and eng) for the latest pixel devices and CF.
+The instructions in this doc applies to all
-After setting up a device, go ahead and try out [enrolling](#enrolling) & [authenticating](#authenticating)
+## Enabling Face Virtual HAL
-### Getting started on a Virtual Device (cuttlefish)
+On pixel devicse (non-CF), by default (after manufacture reset), Face VHAL is not enabled. Therefore real Face HAL is used.
+Face VHAL enabling is gated by the following two AND conditions:
+1. The Face VHAL feature flag (as part of Trunk-development strategy) must be tured until the flags life-cycle ends.
+2. The Face VHAL must be enabled via sysprop
+See adb commands below
+##Getting Stared
-Note, I'm running this via a cloudtop virtual device.
+A basic use case for a successful authentication via Face VHAL is given as an exmple below.
-1. Setup cuttlefish on cloudtop, See [this](https://g3doc.corp.google.com/company/teams/android/teampages/acloud/getting_started.md?cl=head) for more details.
-2. acloud create --local-image
-3. Enter in the shell command to disable hidl
-
+### Enabling VHAL
```shell
$ adb root
-$ adb shell settings put secure com.android.server.biometrics.AuthService.hidlDisabled 1
-$ adb reboot
-```
-4. You should now be able to do fake enrollments and authentications (as seen down below)
-
-### Actual Device
-
-1. Modify your real devices make file (I.E. vendor/google/products/{YOUR_DEVICE}.mk)
-2. Ensure that there is no other face HAL that is being included by the device
-3. Add the following
-```
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.hardware.biometrics.face.xml
-
-PRODUCT_PACKAGES += \
- android.hardware.biometrics.face-service.example \
-
-```
-4. Now build and flash m -j120 && flash
-5. Run the following commands
-
-```shell
-# This is a temporary workaround
-$ adb root
-$ adb shell setprop persist.vendor.face.virtual.type RGB
+$ adb shell device_config put biometrics_framework com.android.server.biometrics.face_vhal_feature true
+$ adb shell settings put secure biometric_virtual_enabled 1
$ adb shell setprop persist.vendor.face.virtual.strength strong
-$ adb shell locksettings set-pin 0000
+$ adb shell setprop persist.vendor.face.virtual.type RGB
$ adb reboot
```
-## Enrolling
+### Direct Enrollment
+```shell
+$ adb shell locksettings set-pin 0000
+$ adb shell setprop persist.vendor.face.virtual.enrollments 1
+$ adb shell cmd face syncadb shell cmd face sync
+```
+
+## Authenticating
+To authenticate successfully, the captured (hit) must match the enrollment id set above. To trigger
+authentication failure, set the hit id to a different value.
+```shell
+$ adb shell setprop vendor.face.virtual.operation_authenticate_duration 800
+$ adb shell setprop vendor.face.virtual.enrollment_hit 1
+```
+Refer to face.sysprop for full supported features of authentication, such as error and acquiredInfo insertion
+
+
+## Enrollment via Setup
```shell
# authenticar_id,bucket_id:duration:(true|false)....
$ adb shell setprop vendor.face.virtual.next_enrollment 1,0:500:true,5:250:true,10:150:true,15:500:true
-$ adb shell am start -n com.android.settings/.biometrics.face.FaceEnrollIntroduction
+$ walk thru the manual enrollment process by following screen instructions
+
# If you would like to get rid of the enrollment, run the follwoing command
$ adb shell setprop persist.vendor.face.virtual.enrollments \"\"
```
-
-## Authenticating
-
-```shell
-# If enrollment hasn't been setup
-$ adb shell setprop persist.vendor.face.virtual.enrollments 1
-$ adb shell cmd face sync
-# After enrollment has been setup
-$ adb shell setprop vendor.face.virtual.operation_authenticate_duration 800
-$ adb shell setprop vendor.face.virtual.enrollment_hit 1
-# Power button press to simulate auth
-$ adb shell input keyevent 26
-```
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index 1188459..6235b83 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -18,6 +18,9 @@
#include "Session.h"
+#undef LOG_TAG
+#define LOG_TAG "FaceVirtualHalSession"
+
namespace aidl::android::hardware::biometrics::face {
constexpr size_t MAX_WORKER_QUEUE_SIZE = 5;
diff --git a/biometrics/face/aidl/default/apex/Android.bp b/biometrics/face/aidl/default/apex/Android.bp
index 2f39a08..86c4e12 100644
--- a/biometrics/face/aidl/default/apex/Android.bp
+++ b/biometrics/face/aidl/default/apex/Android.bp
@@ -16,27 +16,14 @@
default_applicable_licenses: ["Android-Apache-2.0"],
}
-apex_key {
- name: "com.android.hardware.biometrics.face.key",
- public_key: "com.android.hardware.biometrics.face.avbpubkey",
- private_key: "com.android.hardware.biometrics.face.pem",
-}
-
-android_app_certificate {
- name: "com.android.hardware.biometrics.face.certificate",
- certificate: "com.android.hardware.biometrics.face",
-}
-
apex {
- name: "com.android.hardware.biometrics.face",
+ name: "com.android.hardware.biometrics.face.virtual",
manifest: "manifest.json",
file_contexts: "file_contexts",
- key: "com.android.hardware.biometrics.face.key",
- certificate: ":com.android.hardware.biometrics.face.certificate",
+ key: "com.android.hardware.key",
+ certificate: ":com.android.hardware.certificate",
updatable: false,
-
vendor: true,
- use_vndk_as_stable: true,
binaries: [
// hal
@@ -44,11 +31,9 @@
],
prebuilts: [
// init_rc
- "face-default-apex.rc",
+ "face-example-apex.rc",
// vintf_fragment
- "face-default-apex.xml",
- // permission
- "android.hardware.biometrics.face.prebuilt.xml",
+ "face-example-apex.xml",
],
overrides: [
@@ -57,23 +42,21 @@
}
prebuilt_etc {
- name: "face-default-apex.rc",
- src: ":gen-face-default-apex.rc",
- vendor: true,
+ name: "face-example-apex.rc",
+ src: ":gen-face-example-apex.rc",
installable: false,
}
genrule {
- name: "gen-face-default-apex.rc",
- srcs: [":face-default.rc"],
- out: ["face-default-apex.rc"],
- cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.biometrics.face/bin/@' $(in) > $(out)",
+ name: "gen-face-example-apex.rc",
+ srcs: [":face-example.rc"],
+ out: ["face-example-apex.rc"],
+ cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.biometrics.face.virtual/bin/@' $(in) > $(out)",
}
prebuilt_etc {
- name: "face-default-apex.xml",
- src: ":face-default.xml",
+ name: "face-example-apex.xml",
+ src: ":face-example.xml",
sub_dir: "vintf",
- vendor: true,
installable: false,
}
diff --git a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.avbpubkey b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.avbpubkey
deleted file mode 100644
index 9f358ff..0000000
--- a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.avbpubkey
+++ /dev/null
Binary files differ
diff --git a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pem b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pem
deleted file mode 100644
index ad8f57d..0000000
--- a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pem
+++ /dev/null
@@ -1,52 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCoZ28KVXxB9kkX
-zPhi8pVSmiMU0xchU4PkoOvFzmr9t5b7rA1zmzOLjkNWMrxt1XCUEfOgT3N50z5T
-484dpEZBrwIH31NqSOr/T8mG5frZAkNg0WqfgV+AG81mCuA+nG4a08fmDL4nEzVg
-irQvWpXzRCNIn+LEx+gG4I2KG8EGWDiFnzXwSFJG4n60rfLQNHgsejv/06BmPCnS
-gp06LhqJTO2oJKCJVQxfO0TPNUd9FSVSXdWuHcHE2gwoHM/7C/10Bdx8XXCMbAQR
-a4d3moH5oRuhh1841PtIQ0ozw/vHapCTmdMbjmgbwpXZ49DfvJl2cnz5c5G/CUO1
-9CkLDdxffsHh48jLUzH1nRgcWW2CAnSIs8nGjScyOKB+gn831ke8agJGbVHs1Cp/
-ONbMZeQIhEL0kderI1vVoufeBf38/I93rpz6PXp5NiTwOnVdEik595/W7oldr/rM
-taKvWwfnjml+Z1uzJWWDKPnS+onxBVcoBGFhiewIejPz3UjncMiHW5QAx/BzfGgh
-UmFO0vsh8qrEfAqT4AqL4uCuyVm0JmugdWKoeQISh5i4+HMmvPaudd+8yF0plr10
-+pyNGkLZm4NBJxOD7V0AMjfTIpKRbmV8xnCAnWQ+xx/qWxHAZ0wfbZXXF0m6L6po
-dVwJJI7EnuQbAkbXnzMtCTQToZTSVwIDAQABAoICAAGjGJNY15kYKO3xzXWMyfXT
-gl7L9Im1TNVwP3Dpu+S7U0NSd1w12Iju35znzlwhx7/j8skOrKubaZvM9ztJ79Yb
-1CDs3PWhP6OVJeGvvHU9zkp59RexQ5Ma8hXskIroE2WJ97bQgRkfi/r9x8wKc39T
-aYv/SrTC0SPr+YRFSjMvfV35kvLC759slgwkmsH6ZWatSeyhPooJfX1kTRBi08A2
-i4lOBD+Bhtn2jG/+1eYtFyYXVaHx/E9XfU6QhSPgIhBULdujPucmj6pc4yRYnKxA
-32QxGc35u0QHEqJ9/iWAoporIMAmU/Qp7phl9g+OvxrFkloMc3cp3GSMh8k2bJUY
-nRvk0IPG1bF7jwezHbQGTwTlguJlWPl3+v+qeKJQI4pov3Cz6aNrBmBfEbjwcJrf
-RvPNCQ2X1GciZcGoJxcHRgFNKarzb+m92qNRftr6YDBZM8PlvJgGhnTRkOuFmIZB
-WPRergEwaClp1DbQsXwKlWpGfSMLznj57oKT3MJ31R4pusfMDBS39p9jUFH7uO+p
-e/Wdy+RaKei4AYBZIc+ks8LJzeIG+YWD9kN0lPVvzoza6nJYGGNVe/bxErjpESsR
-fZDs5EMNPGsCQ56Tgt+vtHEGF3x7ufGMF1XqisCMlaxH03aT2N3Wi5um8jO2pfFC
-4NEBq4ixvlyefb0TER+5AoIBAQC6nSDDzeeseLOJ8QSb1kHHkvQOGb8kdYY/KJ51
-+uiwoEWOYAxKubqumo2rYaqcM0lbZKWb/9cgVK4LAzdqY4z3BINA7YRzXSUXdb8T
-rbqtg33Yj7f1KBiBqns2FMktfIZ+6JUDALb+CD7rHGpi62RDd8JaKL8wugqMBmwM
-YHBfzECVSjDosjGpbILbDJPTfiEQLyPEoJxJ48Z3Xg6l+0BSZrrH9FqGVgsvEQ7f
-zhZ6rpJIefb1cFjwIRFORS4tMqS1keu+dugyUBs83AOp5kaq6O31n5hDAOyZVFsw
-HSBu8pbWAceWJrF7R1Am23063hIztjPbU9yeN2mvhVQSgO4PAoIBAQDnBQHt3prI
-AajCYbHmk0v1WT2kDD5yEX/fZzifTU5k/+0Jvixpa0KOR2qaUXyx4ocIT6F1hR89
-VXGby2UG6SlvuwXMzwmoVf5sueQ6wshu3fCaS8BYNpJnOAfgLTnUpKIWITDm/2Hj
-4NCFYL77EfBXXhFH7lLPhiPcTWQlPDuFCXU/BJuVhJbpd+GtF1+loiNQArg9nmKb
-9Ac7ccR9UBO/XSQN1th4+yaxyGQKaiYsBqsy8SPp2ynTdGXT72LePqSUrkNsjgE7
-PkzgX0pBZw8upBXk+8ByfIaaQONRbCuMQEXj6B66szaWeR2hDfaoDOk3/w6JN93r
-yPKfk4TFNB85AoIBAGoiHVVfUOjViP7l9cIPvD+eQ3GVkRFSSfS3zE+7UQXLUWPl
-GniRYywUuIgFNvw5avowpsOvYRGBN68JuEWosq52gZO2wkK+ce8Cx5aQkwBGLZey
-PWSP1khAxmx+q+BT10ZsTvtzN6AI3ofnFFaIG/EHNqECVaKH3KHAsUjkvGSvjPeb
-R2/AkOAT1+RvJc/+Bx3mQYh99AVOJz0SYHBkEjQLOyWnwqhuXVP6dqQw2LYTfRz9
-SMhUijCgDfCfBeEs0WJ2yEX96Jdc2fDmDKtfTUe8zEGK8BUDfIzD3kzh8+VF0SWL
-w5CRFxXO/DXtVS7ayC1i7eFKs8nEKDZsNOGFNF8CggEAKXRMlFKNk7Y4gijls2pb
-Bvusg/NugSmCuKPdFTjaCGWkM0tczM3ic4V9K5PTvFfZwzQG1P++S1M5v6sPxd2x
-AcudjtLX+Mz1iq0QtzqcnMhWlFljenDQdJUpVKDI789bBn2OOOU6u5lr0YM6wfLG
-HedTUoUBdxuq860vez8DryuzTkuVX48bRWmtpVG8aAxgKctTJDt3lmSDp7cSeyoT
-YRNllNYoogzvNJew2+2QS/YmYk3DFAOvzbHlU9Jw+1BiWAutLZ2NuwPC58AxourL
-XqMzCpPiRKjzvlpGcCXo6pHd+Ld+TCI8eWPiXTQUPrOSZenuwdC0kcrNPrVJ7dkc
-gQKCAQEAmE6BTX7nn0HT859PtBlsy3rM8psihR4UYuYkTdE0+KF4hBRIP6uhMAVh
-vV6UMnt3QubKIekG14seGkwkBnEhv5reYWn/1+t3qP7qqvgndGgI2yPbzJx/cPMK
-+KKhRbBAIgkjiY6hlo+DhrNS5nuBjZS2q/NnkO4NK7qBHvpIYAnRZK9qNsT4KZm6
-EO9YlCCnoZ3EB7brNgBZkxoekZG4jTlpD0E7nTxPTF1iVWedKRfmLFxAiDaSz0eo
-9tbTaRQ6ybU6jl1hMg4aINjp4xl/ScKk51veKg5ptjpPtspIh7keJRIUz3qwhuvk
-ZJpVwCxgxAOagrQtvwdedbmvChAfGA==
------END PRIVATE KEY-----
diff --git a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pk8 b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pk8
deleted file mode 100644
index af0ff4e..0000000
--- a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pk8
+++ /dev/null
Binary files differ
diff --git a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.x509.pem b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.x509.pem
deleted file mode 100644
index 3dc37ff..0000000
--- a/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.x509.pem
+++ /dev/null
@@ -1,34 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIF7TCCA9UCFCmJBOOYRVUgdy8vKm8OQd0ii2pPMA0GCSqGSIb3DQEBCwUAMIGx
-MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91
-bnRhaW4gVmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEi
-MCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTEtMCsGA1UEAwwkY29t
-LmFuZHJvaWQuaGFyZHdhcmUuYmlvbWV0cmljcy5mYWNlMCAXDTIzMDUyNTA2NDIw
-MFoYDzQ3NjEwNDIwMDY0MjAwWjCBsTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh
-bGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxEDAOBgNVBAoMB0FuZHJv
-aWQxEDAOBgNVBAsMB0FuZHJvaWQxIjAgBgkqhkiG9w0BCQEWE2FuZHJvaWRAYW5k
-cm9pZC5jb20xLTArBgNVBAMMJGNvbS5hbmRyb2lkLmhhcmR3YXJlLmJpb21ldHJp
-Y3MuZmFjZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPadnCNPEvKN
-HxACZt3C+tE2rga6gZ1pxfvlwGo1UY9yAxcQjL22SW93OA6R3de5uvQUbHh7b9g5
-AbNYcRnxOMiuUK2XSGWGDscxuGpQVCph4G1rXCOtbTmz1Zb42vQLCCQHHyxzI7ZE
-9Y6+rzw4p3jtEyBSiiErk13GFZTzwcDzqsQs12vDn9ovSTTn5Nyy6Csz7+O2t4SN
-qU4S/uLE6b/TiXj7196r58DcGvJgKbzbbnv/DUHGfaESrVWYLk3xoX3X8VJvP7jI
-M9XoZBbbgFLgAP5DFEvf5QWS9tR092z0YXOGr+mLHtkJM7Or9nKOohm6aFfHbuvu
-pSWyR4FWnaFANQ8wLH+fH485fiO6juJdTuRWeQpZddv0/IgguZ2Plu7z6NHCf5+L
-KYFjQ5y716wOufIqHhRLqYnpsAG2AFaMuPKzsy2KMifqoyB4KYR24EA1MCT7vwqu
-Hurp+SJrmNdkFVXbhGVUfMKf4nRZ37b9Miie0ju0OxJ9C3zY5uR5BMnqEjqq/rCX
-pQh5o1y+bWacOQVp0iQWJHfy8KkjhhQ1Pd1VeoVk9l2DsAJWm6unwMvGHviRcvzg
-BejDOVcE0x4xDj+TwAu2X2+w2hbUSY9W6lmkX4nGHlbLz211bIBFq42PzAMpRnYq
-jLxml4VpO4UnhyRp7Ipps99s7/iMFOn7AgMBAAEwDQYJKoZIhvcNAQELBQADggIB
-AG/5t56hKYKORne0bwJpMSCWZNT6JcYjf6fEmNrvG3/gz9BCuj4osZjJHD2OSUJl
-F5yI52RgPrXK8bNqJOvX6MIc4Y2JoSI2Uz4J2vZ3QhRkPC9oqwk/Enz4GIVJ4Dnm
-/kgpBbN2SN0TjnmEooptly5tWb3IPTjqLZpaPIW1ntQeCAbgrYVHiMsvNe1BuBrn
-RNi1xqw3QGp2ZV/RfJ3MH6d49TswEL1gwiUeg3hw5eG7IDfLB/2IJBrff7kmPTQ6
-n+il4uXuXMmX70xSvJXwP/NinomJsORZ4Npbmp7xV/QJp9cNoxNAo3DJ4OHRAnA+
-L7E1KZ3+nSRxGcVlqBekmG6wH9U39NN+dh758aGdJOWqA+B+1PAGxkvFCNqLgTpm
-xNl62YiRRo4FiIAkntvs+JneMEphv/T5i824t2xFZD2lBuW8r54nWj5cpx8AU9W2
-rulR0jx7BnVdj6czn1/pPCIah8Os9pZM8q1CbF8vXD+QLAF0/NjPNomTEGd/M+V+
-sfn1OhLGF/E1kWyNeOmkvX26txQdY8k6jUdsAc5vmQqgwxdorjI38ynpYQnFwq2g
-eO4l62sx8icsSh2TRklWy8BwZpaCyO/WVv/FcjIUexYhmZ0EHpmQk/RAlD1f9wFy
-CciNa/Dm94AwJgZk9LcXye3BSvb1sKF6C7eYrW0eI95V
------END CERTIFICATE-----
diff --git a/biometrics/face/aidl/default/apex/manifest.json b/biometrics/face/aidl/default/apex/manifest.json
index 4d46896..ecdc299 100644
--- a/biometrics/face/aidl/default/apex/manifest.json
+++ b/biometrics/face/aidl/default/apex/manifest.json
@@ -1,4 +1,4 @@
{
- "name": "com.android.hardware.biometrics.face",
+ "name": "com.android.hardware.biometrics.face.virtual",
"version": 1
}
diff --git a/biometrics/face/aidl/default/face-default.rc b/biometrics/face/aidl/default/face-default.rc
deleted file mode 100644
index f6499f0..0000000
--- a/biometrics/face/aidl/default/face-default.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-service vendor.face-default /vendor/bin/hw/android.hardware.biometrics.face-service.example
- class hal
- user nobody
- group nobody
-
diff --git a/biometrics/face/aidl/default/face-example.rc b/biometrics/face/aidl/default/face-example.rc
new file mode 100644
index 0000000..b0d82c6
--- /dev/null
+++ b/biometrics/face/aidl/default/face-example.rc
@@ -0,0 +1,8 @@
+service vendor.face-example /vendor/bin/hw/android.hardware.biometrics.face-service.example
+ class hal
+ user nobody
+ group nobody
+ interface aidl android.hardware.biometrics.face.IFace/virtual
+ oneshot
+ disabled
+
diff --git a/biometrics/face/aidl/default/face-default.xml b/biometrics/face/aidl/default/face-example.xml
similarity index 81%
rename from biometrics/face/aidl/default/face-default.xml
rename to biometrics/face/aidl/default/face-example.xml
index 8f2fbb8..1c5071a 100644
--- a/biometrics/face/aidl/default/face-default.xml
+++ b/biometrics/face/aidl/default/face-example.xml
@@ -2,6 +2,6 @@
<hal format="aidl">
<name>android.hardware.biometrics.face</name>
<version>3</version>
- <fqname>IFace/default</fqname>
+ <fqname>IFace/virtual</fqname>
</hal>
</manifest>
diff --git a/biometrics/face/aidl/default/face.sysprop b/biometrics/face/aidl/default/face.sysprop
index 6b0f37f..be32015 100644
--- a/biometrics/face/aidl/default/face.sysprop
+++ b/biometrics/face/aidl/default/face.sysprop
@@ -157,3 +157,22 @@
access: ReadWrite
api_name: "operation_authenticate_duration"
}
+
+# insert error for authenticate operations
+prop {
+ prop_name: "vendor.face.virtual.operation_authenticate_error"
+ type: Integer
+ scope: Internal
+ access: ReadWrite
+ api_name: "operation_authenticate_error"
+}
+
+# acquired info during authentication in format of sequence
+prop {
+ prop_name: "vendor.face.virtual.operation_authenticate_acquired"
+ type: String
+ scope: Internal
+ access: ReadWrite
+ api_name: "operation_authenticate_acquired"
+}
+
diff --git a/biometrics/face/aidl/default/main.cpp b/biometrics/face/aidl/default/main.cpp
index b7274e3..38e1c63 100644
--- a/biometrics/face/aidl/default/main.cpp
+++ b/biometrics/face/aidl/default/main.cpp
@@ -27,9 +27,11 @@
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<Face> hal = ndk::SharedRefBase::make<Face>();
- const std::string instance = std::string(Face::descriptor) + "/default";
- binder_status_t status = AServiceManager_addService(hal->asBinder().get(), instance.c_str());
+ const std::string instance = std::string(Face::descriptor) + "/virtual";
+ binder_status_t status =
+ AServiceManager_registerLazyService(hal->asBinder().get(), instance.c_str());
CHECK_EQ(status, STATUS_OK);
+ AServiceManager_forceLazyServicesPersist(true);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/biometrics/face/aidl/default/tests/FakeFaceEngineTest.cpp b/biometrics/face/aidl/default/tests/FakeFaceEngineTest.cpp
index c8ad6b7..6897dc4 100644
--- a/biometrics/face/aidl/default/tests/FakeFaceEngineTest.cpp
+++ b/biometrics/face/aidl/default/tests/FakeFaceEngineTest.cpp
@@ -245,7 +245,7 @@
FaceHalProperties::enrollments({3});
FaceHalProperties::enrollment_hit(100);
mEngine.authenticateImpl(mCallback.get(), 0 /* operationId*/, mCancel.get_future());
- ASSERT_EQ(Error::UNABLE_TO_PROCESS, mCallback->mError);
+ ASSERT_EQ(Error::TIMEOUT, mCallback->mError);
ASSERT_TRUE(mCallback->mAuthenticateFailed);
}
@@ -380,4 +380,4 @@
ASSERT_FALSE(mCallback->mAuthenticateFailed);
}
-} // namespace aidl::android::hardware::biometrics::face
\ No newline at end of file
+} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp b/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
index 54076c8..4e80052 100644
--- a/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
@@ -32,7 +32,9 @@
namespace aidl::android::hardware::biometrics::fingerprint {
FakeFingerprintEngine::FakeFingerprintEngine()
- : mRandom(std::mt19937::default_seed), mWorkMode(WorkMode::kIdle) {}
+ : mRandom(std::mt19937::default_seed),
+ mWorkMode(WorkMode::kIdle),
+ isLockoutTimerSupported(true) {}
void FakeFingerprintEngine::generateChallengeImpl(ISessionCallback* cb) {
BEGIN_OP(0);
@@ -142,7 +144,7 @@
return true;
}
auto enrollmentId = std::stoi(parts[0]);
- auto progress = parseEnrollmentCapture(parts[1]);
+ auto progress = Util::parseEnrollmentCapture(parts[1]);
for (size_t i = 0; i < progress.size(); i += 2) {
auto left = (progress.size() - i) / 2 - 1;
auto duration = progress[i][0];
@@ -193,7 +195,7 @@
int64_t now = Util::getSystemNanoTime();
int64_t duration = FingerprintHalProperties::operation_authenticate_duration().value_or(10);
auto acquired = FingerprintHalProperties::operation_authenticate_acquired().value_or("1");
- auto acquiredInfos = parseIntSequence(acquired);
+ auto acquiredInfos = Util::parseIntSequence(acquired);
int N = acquiredInfos.size();
if (N == 0) {
@@ -271,7 +273,7 @@
FingerprintHalProperties::operation_detect_interaction_duration().value_or(10);
auto acquired = FingerprintHalProperties::operation_detect_interaction_acquired().value_or("1");
- auto acquiredInfos = parseIntSequence(acquired);
+ auto acquiredInfos = Util::parseIntSequence(acquired);
int N = acquiredInfos.size();
int64_t now = Util::getSystemNanoTime();
@@ -305,15 +307,6 @@
SLEEP_MS(duration / N);
} while (!Util::hasElapsed(now, duration));
- auto id = FingerprintHalProperties::enrollment_hit().value_or(0);
- auto enrolls = FingerprintHalProperties::enrollments();
- auto isEnrolled = std::find(enrolls.begin(), enrolls.end(), id) != enrolls.end();
- if (id <= 0 || !isEnrolled) {
- LOG(ERROR) << "Fail: not enrolled";
- cb->onError(Error::UNABLE_TO_PROCESS, 0 /* vendorError */);
- return true;
- }
-
cb->onInteractionDetected();
return true;
@@ -386,7 +379,7 @@
return;
}
clearLockout(cb);
- isLockoutTimerAborted = true;
+ if (isLockoutTimerStarted) isLockoutTimerAborted = true;
}
void FakeFingerprintEngine::clearLockout(ISessionCallback* cb) {
@@ -450,76 +443,6 @@
return SensorLocation();
}
-std::vector<int32_t> FakeFingerprintEngine::parseIntSequence(const std::string& str,
- const std::string& sep) {
- std::vector<std::string> seqs = Util::split(str, sep);
- std::vector<int32_t> res;
-
- for (const auto& seq : seqs) {
- int32_t val;
- if (ParseInt(seq, &val)) {
- res.push_back(val);
- } else {
- LOG(WARNING) << "Invalid int sequence:" + str;
- res.clear();
- break;
- }
- }
-
- return res;
-}
-
-bool FakeFingerprintEngine::parseEnrollmentCaptureSingle(const std::string& str,
- std::vector<std::vector<int32_t>>& res) {
- std::vector<int32_t> defaultAcquiredInfo = {(int32_t)AcquiredInfo::GOOD};
- bool aborted = true;
-
- do {
- std::smatch sms;
- // Parses strings like "1000-[5,1]" or "500"
- std::regex ex("((\\d+)(-\\[([\\d|,]+)\\])?)");
- if (!regex_match(str.cbegin(), str.cend(), sms, ex)) break;
- int32_t duration;
- if (!ParseInt(sms.str(2), &duration)) break;
- res.push_back({duration});
- if (!sms.str(4).empty()) {
- auto acqv = parseIntSequence(sms.str(4));
- if (acqv.empty()) break;
- res.push_back(acqv);
- } else
- res.push_back(defaultAcquiredInfo);
- aborted = false;
- } while (0);
-
- return !aborted;
-}
-
-std::vector<std::vector<int32_t>> FakeFingerprintEngine::parseEnrollmentCapture(
- const std::string& str) {
- std::vector<std::vector<int32_t>> res;
-
- std::string s(str);
- s.erase(std::remove_if(s.begin(), s.end(), ::isspace), s.end());
- bool aborted = false;
- std::smatch sms;
- // Parses strings like "1000-[5,1],500,800-[6,5,1]"
- // ---------- --- -----------
- // into parts: A B C
- while (regex_search(s, sms, std::regex("^(,)?(\\d+(-\\[[\\d|,]+\\])?)"))) {
- if (!parseEnrollmentCaptureSingle(sms.str(2), res)) {
- aborted = true;
- break;
- }
- s = sms.suffix();
- }
- if (aborted || s.length() != 0) {
- res.clear();
- LOG(ERROR) << "Failed to parse enrollment captures:" + str;
- }
-
- return res;
-}
-
std::pair<AcquiredInfo, int32_t> FakeFingerprintEngine::convertAcquiredInfo(int32_t code) {
std::pair<AcquiredInfo, int32_t> res;
if (code > FINGERPRINT_ACQUIRED_VENDOR_BASE) {
@@ -603,6 +526,7 @@
isLockoutTimerStarted = true;
}
void FakeFingerprintEngine::lockoutTimerExpired(ISessionCallback* cb) {
+ BEGIN_OP(0);
if (!isLockoutTimerAborted) {
clearLockout(cb);
}
diff --git a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
index a78cdcd..acb792d 100644
--- a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
@@ -27,9 +27,7 @@
namespace aidl::android::hardware::biometrics::fingerprint {
-FakeFingerprintEngineSide::FakeFingerprintEngineSide() : FakeFingerprintEngine() {
- isLockoutTimerSupported = true;
-}
+FakeFingerprintEngineSide::FakeFingerprintEngineSide() : FakeFingerprintEngine() {}
SensorLocation FakeFingerprintEngineSide::defaultSensorLocation() {
return SensorLocation{.sensorLocationX = defaultSensorLocationX,
diff --git a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
index 2450115..15d8360 100644
--- a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
+++ b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
@@ -68,10 +68,6 @@
virtual void fingerDownAction();
- std::vector<int32_t> parseIntSequence(const std::string& str, const std::string& sep = ",");
-
- std::vector<std::vector<int32_t>> parseEnrollmentCapture(const std::string& str);
-
int32_t getLatency(const std::vector<std::optional<std::int32_t>>& latencyVec);
std::mt19937 mRandom;
@@ -110,8 +106,6 @@
static constexpr int32_t FINGERPRINT_ERROR_VENDOR_BASE = 1000;
std::pair<AcquiredInfo, int32_t> convertAcquiredInfo(int32_t code);
std::pair<Error, int32_t> convertError(int32_t code);
- bool parseEnrollmentCaptureSingle(const std::string& str,
- std::vector<std::vector<int32_t>>& res);
int32_t getRandomInRange(int32_t bound1, int32_t bound2);
bool checkSensorLockout(ISessionCallback*);
void clearLockout(ISessionCallback* cb);
diff --git a/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp b/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
index fe405f4..eedcae1 100644
--- a/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
@@ -357,7 +357,7 @@
FingerprintHalProperties::enrollment_hit({});
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
mEngine.fingerDownAction();
- ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
+ ASSERT_EQ(1, mCallback->mInteractionDetectedCount);
}
TEST_F(FakeFingerprintEngineTest, InteractionDetectNotEnrolled) {
@@ -365,7 +365,7 @@
FingerprintHalProperties::enrollment_hit(25);
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
mEngine.fingerDownAction();
- ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
+ ASSERT_EQ(1, mCallback->mInteractionDetectedCount);
}
TEST_F(FakeFingerprintEngineTest, InteractionDetectError) {
@@ -421,29 +421,29 @@
TEST_F(FakeFingerprintEngineTest, parseIntSequence) {
std::vector<int32_t> seqV;
- seqV = mEngine.parseIntSequence("");
+ seqV = Util::parseIntSequence("");
ASSERT_EQ(0, seqV.size());
- seqV = mEngine.parseIntSequence("2");
+ seqV = Util::parseIntSequence("2");
ASSERT_EQ(1, seqV.size());
ASSERT_EQ(2, seqV[0]);
- seqV = mEngine.parseIntSequence("2,3,4");
+ seqV = Util::parseIntSequence("2,3,4");
std::vector<int32_t> expV{2, 3, 4};
ASSERT_EQ(expV, seqV);
- seqV = mEngine.parseIntSequence("2,3,a");
+ seqV = Util::parseIntSequence("2,3,a");
ASSERT_EQ(0, seqV.size());
- seqV = mEngine.parseIntSequence("2, 3, 4");
+ seqV = Util::parseIntSequence("2, 3, 4");
ASSERT_EQ(expV, seqV);
- seqV = mEngine.parseIntSequence("123,456");
+ seqV = Util::parseIntSequence("123,456");
ASSERT_EQ(2, seqV.size());
std::vector<int32_t> expV1{123, 456};
ASSERT_EQ(expV1, seqV);
- seqV = mEngine.parseIntSequence("12f3,456");
+ seqV = Util::parseIntSequence("12f3,456");
ASSERT_EQ(0, seqV.size());
}
TEST_F(FakeFingerprintEngineTest, parseEnrollmentCaptureOk) {
std::vector<std::vector<int32_t>> ecV;
- ecV = mEngine.parseEnrollmentCapture("100,200,300");
+ ecV = Util::parseEnrollmentCapture("100,200,300");
ASSERT_EQ(6, ecV.size());
std::vector<std::vector<int32_t>> expE{{100}, {200}, {300}};
std::vector<int32_t> defC{1};
@@ -451,26 +451,26 @@
ASSERT_EQ(expE[i / 2], ecV[i]);
ASSERT_EQ(defC, ecV[i + 1]);
}
- ecV = mEngine.parseEnrollmentCapture("100");
+ ecV = Util::parseEnrollmentCapture("100");
ASSERT_EQ(2, ecV.size());
ASSERT_EQ(expE[0], ecV[0]);
ASSERT_EQ(defC, ecV[1]);
- ecV = mEngine.parseEnrollmentCapture("100-[5,6,7]");
+ ecV = Util::parseEnrollmentCapture("100-[5,6,7]");
std::vector<int32_t> expC{5, 6, 7};
ASSERT_EQ(2, ecV.size());
for (int i = 0; i < ecV.size(); i += 2) {
ASSERT_EQ(expE[i / 2], ecV[i]);
ASSERT_EQ(expC, ecV[i + 1]);
}
- ecV = mEngine.parseEnrollmentCapture("100-[5,6,7], 200, 300-[9,10]");
+ ecV = Util::parseEnrollmentCapture("100-[5,6,7], 200, 300-[9,10]");
std::vector<std::vector<int32_t>> expC1{{5, 6, 7}, {1}, {9, 10}};
ASSERT_EQ(6, ecV.size());
for (int i = 0; i < ecV.size(); i += 2) {
ASSERT_EQ(expE[i / 2], ecV[i]);
ASSERT_EQ(expC1[i / 2], ecV[i + 1]);
}
- ecV = mEngine.parseEnrollmentCapture("100-[5,6,7], 200-[2,1], 300-[9]");
+ ecV = Util::parseEnrollmentCapture("100-[5,6,7], 200-[2,1], 300-[9]");
std::vector<std::vector<int32_t>> expC2{{5, 6, 7}, {2, 1}, {9}};
ASSERT_EQ(ecV.size(), 6);
for (int i = 0; i < ecV.size(); i += 2) {
@@ -484,7 +484,7 @@
"100,2x0,300", "200-[f]", "a,b"};
std::vector<std::vector<int32_t>> ecV;
for (const auto& s : badStr) {
- ecV = mEngine.parseEnrollmentCapture(s);
+ ecV = Util::parseEnrollmentCapture(s);
ASSERT_EQ(ecV.size(), 0);
}
}
@@ -508,7 +508,7 @@
TEST_F(FakeFingerprintEngineTest, lockoutTimer) {
mEngine.startLockoutTimer(200, mCallback.get());
ASSERT_TRUE(mEngine.getLockoutTimerStarted());
- std::this_thread::sleep_for(std::chrono::milliseconds(210));
+ std::this_thread::sleep_for(std::chrono::milliseconds(250));
ASSERT_FALSE(mEngine.getLockoutTimerStarted());
ASSERT_TRUE(mCallback->mLockoutCleared);
}
diff --git a/broadcastradio/aidl/default/Android.bp b/broadcastradio/aidl/default/Android.bp
index 720aa8a..1d1bef7 100644
--- a/broadcastradio/aidl/default/Android.bp
+++ b/broadcastradio/aidl/default/Android.bp
@@ -23,23 +23,8 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_binary {
- name: "android.hardware.broadcastradio-service.default",
- relative_install_path: "hw",
- init_rc: ["broadcastradio-default.rc"],
- vintf_fragments: ["broadcastradio-default.xml"],
- vendor: true,
- cflags: [
- "-Wall",
- "-Wextra",
- "-Werror",
- ],
- srcs: [
- "BroadcastRadio.cpp",
- "main.cpp",
- "VirtualProgram.cpp",
- "VirtualRadio.cpp",
- ],
+cc_defaults {
+ name: "BroadcastRadioHalDefaults",
static_libs: [
"android.hardware.broadcastradio@common-utils-aidl-lib",
"android.hardware.broadcastradio@common-utils-lib",
@@ -51,4 +36,61 @@
"liblog",
"libcutils",
],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.broadcastradio-service.default",
+ relative_install_path: "hw",
+ init_rc: ["broadcastradio-default.rc"],
+ vintf_fragments: ["broadcastradio-default.xml"],
+ vendor: true,
+ defaults: [
+ "BroadcastRadioHalDefaults",
+ ],
+ srcs: [
+ "main.cpp",
+ ],
+ static_libs: [
+ "DefaultBroadcastRadioHal",
+ ],
+}
+
+cc_library {
+ name: "DefaultBroadcastRadioHal",
+ vendor: true,
+ export_include_dirs: ["."],
+ defaults: [
+ "BroadcastRadioHalDefaults",
+ ],
+ srcs: [
+ "BroadcastRadio.cpp",
+ "VirtualProgram.cpp",
+ "VirtualRadio.cpp",
+ ],
+}
+
+cc_fuzz {
+ name: "android.hardware.broadcastradio-service.default_fuzzer",
+ vendor: true,
+ defaults: [
+ "BroadcastRadioHalDefaults",
+ "service_fuzzer_defaults",
+ ],
+ static_libs: [
+ "DefaultBroadcastRadioHal",
+ "android.hardware.broadcastradio-V1-ndk",
+ ],
+ srcs: [
+ "fuzzer.cpp",
+ ],
+ fuzz_config: {
+ cc: [
+ "xuweilin@google.com",
+ ],
+ },
}
diff --git a/broadcastradio/aidl/default/BroadcastRadio.cpp b/broadcastradio/aidl/default/BroadcastRadio.cpp
index c0c475a..8584921 100644
--- a/broadcastradio/aidl/default/BroadcastRadio.cpp
+++ b/broadcastradio/aidl/default/BroadcastRadio.cpp
@@ -115,7 +115,8 @@
}
BroadcastRadio::~BroadcastRadio() {
- mThread.reset();
+ mTuningThread.reset();
+ mProgramListThread.reset();
}
ScopedAStatus BroadcastRadio::getAmFmRegionConfig(bool full, AmFmRegionConfig* returnConfigs) {
@@ -239,7 +240,7 @@
callback->onCurrentProgramInfoChanged(programInfo);
};
auto cancelTask = [program, callback]() { callback->onTuneFailed(Result::CANCELED, program); };
- mThread->schedule(task, cancelTask, kTuneDelayTimeMs);
+ mTuningThread->schedule(task, cancelTask, kTuneDelayTimeMs);
return ScopedAStatus::ok();
}
@@ -267,7 +268,7 @@
callback->onTuneFailed(Result::TIMEOUT, {});
};
- mThread->schedule(task, cancelTask, kSeekDelayTimeMs);
+ mTuningThread->schedule(task, cancelTask, kSeekDelayTimeMs);
return ScopedAStatus::ok();
}
@@ -300,7 +301,7 @@
}
callback->onCurrentProgramInfoChanged(programInfo);
};
- mThread->schedule(task, cancelTask, kSeekDelayTimeMs);
+ mTuningThread->schedule(task, cancelTask, kSeekDelayTimeMs);
return ScopedAStatus::ok();
}
@@ -355,15 +356,15 @@
callback->onCurrentProgramInfoChanged(programInfo);
};
auto cancelTask = [callback]() { callback->onTuneFailed(Result::CANCELED, {}); };
- mThread->schedule(task, cancelTask, kStepDelayTimeMs);
+ mTuningThread->schedule(task, cancelTask, kStepDelayTimeMs);
return ScopedAStatus::ok();
}
void BroadcastRadio::cancelLocked() {
- LOG(DEBUG) << __func__ << ": cancelling current operations...";
+ LOG(DEBUG) << __func__ << ": cancelling current tuning operations...";
- mThread->cancelAll();
+ mTuningThread->cancelAll();
if (mCurrentProgram.primaryId.type != IdentifierType::INVALID) {
mIsTuneCompleted = true;
}
@@ -388,6 +389,8 @@
lock_guard<mutex> lk(mMutex);
+ cancelProgramListUpdateLocked();
+
const auto& list = mVirtualRadio.getProgramList();
vector<VirtualProgram> filteredList;
std::copy_if(list.begin(), list.end(), std::back_inserter(filteredList), filterCb);
@@ -410,31 +413,43 @@
callback->onProgramListUpdated(chunk);
};
- mThread->schedule(task, kListDelayTimeS);
+ mProgramListThread->schedule(task, kListDelayTimeS);
return ScopedAStatus::ok();
}
+void BroadcastRadio::cancelProgramListUpdateLocked() {
+ LOG(DEBUG) << __func__ << ": cancelling current program list update operations...";
+ mProgramListThread->cancelAll();
+}
+
ScopedAStatus BroadcastRadio::stopProgramListUpdates() {
LOG(DEBUG) << __func__ << ": requested program list updates to stop...";
- // TODO(b/243681584) Implement stop program list updates method
+ lock_guard<mutex> lk(mMutex);
+ cancelProgramListUpdateLocked();
return ScopedAStatus::ok();
}
-ScopedAStatus BroadcastRadio::isConfigFlagSet(ConfigFlag flag, [[maybe_unused]] bool* returnIsSet) {
+ScopedAStatus BroadcastRadio::isConfigFlagSet(ConfigFlag flag, bool* returnIsSet) {
LOG(DEBUG) << __func__ << ": flag = " << toString(flag);
- LOG(INFO) << __func__ << ": getting ConfigFlag is not supported";
- return ScopedAStatus::fromServiceSpecificErrorWithMessage(
- resultToInt(Result::NOT_SUPPORTED), "getting ConfigFlag is not supported");
+ int flagBit = static_cast<int>(flag);
+ lock_guard<mutex> lk(mMutex);
+ *returnIsSet = ((mConfigFlagValues >> flagBit) & 1) == 1;
+ return ScopedAStatus::ok();
}
ScopedAStatus BroadcastRadio::setConfigFlag(ConfigFlag flag, bool value) {
LOG(DEBUG) << __func__ << ": flag = " << toString(flag) << ", value = " << value;
- LOG(INFO) << __func__ << ": setting ConfigFlag is not supported";
- return ScopedAStatus::fromServiceSpecificErrorWithMessage(
- resultToInt(Result::NOT_SUPPORTED), "setting ConfigFlag is not supported");
+ int flagBitMask = 1 << (static_cast<int>(flag));
+ lock_guard<mutex> lk(mMutex);
+ if (value) {
+ mConfigFlagValues |= flagBitMask;
+ } else {
+ mConfigFlagValues &= ~flagBitMask;
+ }
+ return ScopedAStatus::ok();
}
ScopedAStatus BroadcastRadio::setParameters(
diff --git a/broadcastradio/aidl/default/BroadcastRadio.h b/broadcastradio/aidl/default/BroadcastRadio.h
index 1c85ddc..0f818ce 100644
--- a/broadcastradio/aidl/default/BroadcastRadio.h
+++ b/broadcastradio/aidl/default/BroadcastRadio.h
@@ -68,16 +68,22 @@
const VirtualRadio& mVirtualRadio;
std::mutex mMutex;
AmFmRegionConfig mAmFmConfig GUARDED_BY(mMutex);
- std::unique_ptr<::android::WorkerThread> mThread GUARDED_BY(mMutex) =
+ std::unique_ptr<::android::WorkerThread> mTuningThread GUARDED_BY(mMutex) =
+ std::unique_ptr<::android::WorkerThread>(new ::android::WorkerThread());
+ std::unique_ptr<::android::WorkerThread> mProgramListThread GUARDED_BY(mMutex) =
std::unique_ptr<::android::WorkerThread>(new ::android::WorkerThread());
bool mIsTuneCompleted GUARDED_BY(mMutex) = true;
Properties mProperties GUARDED_BY(mMutex);
ProgramSelector mCurrentProgram GUARDED_BY(mMutex) = {};
std::shared_ptr<ITunerCallback> mCallback GUARDED_BY(mMutex);
+ // Bitmap for all ConfigFlag values
+ int mConfigFlagValues GUARDED_BY(mMutex) = 0;
+
std::optional<AmFmBandRange> getAmFmRangeLocked() const;
void cancelLocked();
ProgramInfo tuneInternalLocked(const ProgramSelector& sel);
+ void cancelProgramListUpdateLocked();
binder_status_t cmdHelp(int fd) const;
binder_status_t cmdTune(int fd, const char** args, uint32_t numArgs);
diff --git a/broadcastradio/aidl/default/fuzzer.cpp b/broadcastradio/aidl/default/fuzzer.cpp
new file mode 100644
index 0000000..d535432
--- /dev/null
+++ b/broadcastradio/aidl/default/fuzzer.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fuzzbinder/libbinder_ndk_driver.h>
+#include <fuzzer/FuzzedDataProvider.h>
+#include "BroadcastRadio.h"
+#include "VirtualRadio.h"
+
+using ::aidl::android::hardware::broadcastradio::BroadcastRadio;
+using ::aidl::android::hardware::broadcastradio::VirtualRadio;
+using ::android::fuzzService;
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ const VirtualRadio& amFmRadioMock = VirtualRadio::getAmFmRadio();
+ std::shared_ptr<BroadcastRadio> amFmRadio =
+ ::ndk::SharedRefBase::make<BroadcastRadio>(amFmRadioMock);
+ const VirtualRadio& dabRadioMock = VirtualRadio::getDabRadio();
+ std::shared_ptr<BroadcastRadio> dabRadio =
+ ::ndk::SharedRefBase::make<BroadcastRadio>(dabRadioMock);
+
+ std::vector<ndk::SpAIBinder> binder_services = {amFmRadio->asBinder(), dabRadio->asBinder()};
+
+ fuzzService(binder_services, FuzzedDataProvider(data, size));
+
+ return 0;
+}
diff --git a/camera/common/default/Android.bp b/camera/common/default/Android.bp
index e8c8f9d..b5d3095 100644
--- a/camera/common/default/Android.bp
+++ b/camera/common/default/Android.bp
@@ -30,13 +30,12 @@
"libgralloctypes",
"libhardware",
"libcamera_metadata",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
"libexif",
+ "libui",
],
include_dirs: ["system/media/private/camera/include"],
export_include_dirs: ["include"],
+ export_shared_lib_headers: ["libui"],
}
// NOTE: Deprecated module kept for compatibility reasons.
diff --git a/camera/common/default/HandleImporter.cpp b/camera/common/default/HandleImporter.cpp
index 1145baa..9c579e5 100644
--- a/camera/common/default/HandleImporter.cpp
+++ b/camera/common/default/HandleImporter.cpp
@@ -17,9 +17,10 @@
#define LOG_TAG "HandleImporter"
#include "HandleImporter.h"
+#include <aidl/android/hardware/graphics/common/Smpte2086.h>
#include <gralloctypes/Gralloc4.h>
#include <log/log.h>
-#include "aidl/android/hardware/graphics/common/Smpte2086.h"
+#include <ui/GraphicBufferMapper.h>
namespace android {
namespace hardware {
@@ -31,12 +32,6 @@
using aidl::android::hardware::graphics::common::PlaneLayoutComponent;
using aidl::android::hardware::graphics::common::PlaneLayoutComponentType;
using aidl::android::hardware::graphics::common::Smpte2086;
-using MetadataType = android::hardware::graphics::mapper::V4_0::IMapper::MetadataType;
-using MapperErrorV2 = android::hardware::graphics::mapper::V2_0::Error;
-using MapperErrorV3 = android::hardware::graphics::mapper::V3_0::Error;
-using MapperErrorV4 = android::hardware::graphics::mapper::V4_0::Error;
-using IMapperV3 = android::hardware::graphics::mapper::V3_0::IMapper;
-using IMapperV4 = android::hardware::graphics::mapper::V4_0::IMapper;
HandleImporter::HandleImporter() : mInitialized(false) {}
@@ -45,51 +40,20 @@
return;
}
- mMapperV4 = IMapperV4::getService();
- if (mMapperV4 != nullptr) {
- mInitialized = true;
- return;
- }
-
- mMapperV3 = IMapperV3::getService();
- if (mMapperV3 != nullptr) {
- mInitialized = true;
- return;
- }
-
- mMapperV2 = IMapper::getService();
- if (mMapperV2 == nullptr) {
- ALOGE("%s: cannnot acccess graphics mapper HAL!", __FUNCTION__);
- return;
- }
-
+ GraphicBufferMapper::preloadHal();
mInitialized = true;
return;
}
void HandleImporter::cleanup() {
- mMapperV4.clear();
- mMapperV3.clear();
- mMapperV2.clear();
mInitialized = false;
}
-template <class M, class E>
-bool HandleImporter::importBufferInternal(const sp<M> mapper, buffer_handle_t& handle) {
- E error;
+bool HandleImporter::importBufferInternal(buffer_handle_t& handle) {
buffer_handle_t importedHandle;
- auto ret = mapper->importBuffer(
- hidl_handle(handle), [&](const auto& tmpError, const auto& tmpBufferHandle) {
- error = tmpError;
- importedHandle = static_cast<buffer_handle_t>(tmpBufferHandle);
- });
-
- if (!ret.isOk()) {
- ALOGE("%s: mapper importBuffer failed: %s", __FUNCTION__, ret.description().c_str());
- return false;
- }
-
- if (error != E::NONE) {
+ auto status = GraphicBufferMapper::get().importBufferNoValidate(handle, &importedHandle);
+ if (status != OK) {
+ ALOGE("%s: mapper importBuffer failed: %d", __FUNCTION__, status);
return false;
}
@@ -97,172 +61,34 @@
return true;
}
-template <class M, class E>
-YCbCrLayout HandleImporter::lockYCbCrInternal(const sp<M> mapper, buffer_handle_t& buf,
- uint64_t cpuUsage,
- const IMapper::Rect& accessRegion) {
- hidl_handle acquireFenceHandle;
- auto buffer = const_cast<native_handle_t*>(buf);
- YCbCrLayout layout = {};
+android_ycbcr HandleImporter::lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage,
+ const android::Rect& accessRegion) {
+ Mutex::Autolock lock(mLock);
- typename M::Rect accessRegionCopy = {accessRegion.left, accessRegion.top, accessRegion.width,
- accessRegion.height};
- mapper->lockYCbCr(buffer, cpuUsage, accessRegionCopy, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpLayout) {
- if (tmpError == E::NONE) {
- // Member by member copy from different versions of YCbCrLayout.
- layout.y = tmpLayout.y;
- layout.cb = tmpLayout.cb;
- layout.cr = tmpLayout.cr;
- layout.yStride = tmpLayout.yStride;
- layout.cStride = tmpLayout.cStride;
- layout.chromaStep = tmpLayout.chromaStep;
- } else {
- ALOGE("%s: failed to lockYCbCr error %d!", __FUNCTION__, tmpError);
- }
- });
+ if (!mInitialized) {
+ initializeLocked();
+ }
+ android_ycbcr layout;
+
+ status_t status = GraphicBufferMapper::get().lockYCbCr(buf, cpuUsage, accessRegion, &layout);
+
+ if (status != OK) {
+ ALOGE("%s: failed to lockYCbCr error %d!", __FUNCTION__, status);
+ }
+
return layout;
}
-bool isMetadataPesent(const sp<IMapperV4> mapper, const buffer_handle_t& buf,
- MetadataType metadataType) {
- auto buffer = const_cast<native_handle_t*>(buf);
- bool ret = false;
- hidl_vec<uint8_t> vec;
- mapper->get(buffer, metadataType, [&](const auto& tmpError, const auto& tmpMetadata) {
- if (tmpError == MapperErrorV4::NONE) {
- vec = tmpMetadata;
- } else {
- ALOGE("%s: failed to get metadata %d!", __FUNCTION__, tmpError);
- }
- });
-
- if (vec.size() > 0) {
- if (metadataType == gralloc4::MetadataType_Smpte2086) {
- std::optional<Smpte2086> realSmpte2086;
- gralloc4::decodeSmpte2086(vec, &realSmpte2086);
- ret = realSmpte2086.has_value();
- } else if (metadataType == gralloc4::MetadataType_Smpte2094_10) {
- std::optional<std::vector<uint8_t>> realSmpte2094_10;
- gralloc4::decodeSmpte2094_10(vec, &realSmpte2094_10);
- ret = realSmpte2094_10.has_value();
- } else if (metadataType == gralloc4::MetadataType_Smpte2094_40) {
- std::optional<std::vector<uint8_t>> realSmpte2094_40;
- gralloc4::decodeSmpte2094_40(vec, &realSmpte2094_40);
- ret = realSmpte2094_40.has_value();
- } else {
- ALOGE("%s: Unknown metadata type!", __FUNCTION__);
- }
- }
-
- return ret;
-}
-
-std::vector<PlaneLayout> getPlaneLayouts(const sp<IMapperV4> mapper, buffer_handle_t& buf) {
- auto buffer = const_cast<native_handle_t*>(buf);
+std::vector<PlaneLayout> getPlaneLayouts(buffer_handle_t& buf) {
std::vector<PlaneLayout> planeLayouts;
- hidl_vec<uint8_t> encodedPlaneLayouts;
- mapper->get(buffer, gralloc4::MetadataType_PlaneLayouts,
- [&](const auto& tmpError, const auto& tmpEncodedPlaneLayouts) {
- if (tmpError == MapperErrorV4::NONE) {
- encodedPlaneLayouts = tmpEncodedPlaneLayouts;
- } else {
- ALOGE("%s: failed to get plane layouts %d!", __FUNCTION__, tmpError);
- }
- });
-
- gralloc4::decodePlaneLayouts(encodedPlaneLayouts, &planeLayouts);
+ status_t status = GraphicBufferMapper::get().getPlaneLayouts(buf, &planeLayouts);
+ if (status != OK) {
+ ALOGE("%s: failed to get PlaneLayouts! Status %d", __FUNCTION__, status);
+ }
return planeLayouts;
}
-template <>
-YCbCrLayout HandleImporter::lockYCbCrInternal<IMapperV4, MapperErrorV4>(
- const sp<IMapperV4> mapper, buffer_handle_t& buf, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion) {
- hidl_handle acquireFenceHandle;
- auto buffer = const_cast<native_handle_t*>(buf);
- YCbCrLayout layout = {};
- void* mapped = nullptr;
-
- typename IMapperV4::Rect accessRegionV4 = {accessRegion.left, accessRegion.top,
- accessRegion.width, accessRegion.height};
- mapper->lock(buffer, cpuUsage, accessRegionV4, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpPtr) {
- if (tmpError == MapperErrorV4::NONE) {
- mapped = tmpPtr;
- } else {
- ALOGE("%s: failed to lock error %d!", __FUNCTION__, tmpError);
- }
- });
-
- if (mapped == nullptr) {
- return layout;
- }
-
- std::vector<PlaneLayout> planeLayouts = getPlaneLayouts(mapper, buf);
- for (const auto& planeLayout : planeLayouts) {
- for (const auto& planeLayoutComponent : planeLayout.components) {
- const auto& type = planeLayoutComponent.type;
-
- if (!gralloc4::isStandardPlaneLayoutComponentType(type)) {
- continue;
- }
-
- uint8_t* data = reinterpret_cast<uint8_t*>(mapped);
- data += planeLayout.offsetInBytes;
- data += planeLayoutComponent.offsetInBits / 8;
-
- switch (static_cast<PlaneLayoutComponentType>(type.value)) {
- case PlaneLayoutComponentType::Y:
- layout.y = data;
- layout.yStride = planeLayout.strideInBytes;
- break;
- case PlaneLayoutComponentType::CB:
- layout.cb = data;
- layout.cStride = planeLayout.strideInBytes;
- layout.chromaStep = planeLayout.sampleIncrementInBits / 8;
- break;
- case PlaneLayoutComponentType::CR:
- layout.cr = data;
- layout.cStride = planeLayout.strideInBytes;
- layout.chromaStep = planeLayout.sampleIncrementInBits / 8;
- break;
- default:
- break;
- }
- }
- }
-
- return layout;
-}
-
-template <class M, class E>
-int HandleImporter::unlockInternal(const sp<M> mapper, buffer_handle_t& buf) {
- int releaseFence = -1;
- auto buffer = const_cast<native_handle_t*>(buf);
-
- mapper->unlock(buffer, [&](const auto& tmpError, const auto& tmpReleaseFence) {
- if (tmpError == E::NONE) {
- auto fenceHandle = tmpReleaseFence.getNativeHandle();
- if (fenceHandle) {
- if (fenceHandle->numInts != 0 || fenceHandle->numFds != 1) {
- ALOGE("%s: bad release fence numInts %d numFds %d", __FUNCTION__,
- fenceHandle->numInts, fenceHandle->numFds);
- return;
- }
- releaseFence = dup(fenceHandle->data[0]);
- if (releaseFence < 0) {
- ALOGE("%s: bad release fence FD %d", __FUNCTION__, releaseFence);
- }
- }
- } else {
- ALOGE("%s: failed to unlock error %d!", __FUNCTION__, tmpError);
- }
- });
- return releaseFence;
-}
-
// In IComposer, any buffer_handle_t is owned by the caller and we need to
// make a clone for hwcomposer2. We also need to translate empty handle
// to nullptr. This function does that, in-place.
@@ -277,20 +103,7 @@
initializeLocked();
}
- if (mMapperV4 != nullptr) {
- return importBufferInternal<IMapperV4, MapperErrorV4>(mMapperV4, handle);
- }
-
- if (mMapperV3 != nullptr) {
- return importBufferInternal<IMapperV3, MapperErrorV3>(mMapperV3, handle);
- }
-
- if (mMapperV2 != nullptr) {
- return importBufferInternal<IMapper, MapperErrorV2>(mMapperV2, handle);
- }
-
- ALOGE("%s: mMapperV4, mMapperV3 and mMapperV2 are all null!", __FUNCTION__);
- return false;
+ return importBufferInternal(handle);
}
void HandleImporter::freeBuffer(buffer_handle_t handle) {
@@ -303,21 +116,9 @@
initializeLocked();
}
- if (mMapperV4 != nullptr) {
- auto ret = mMapperV4->freeBuffer(const_cast<native_handle_t*>(handle));
- if (!ret.isOk()) {
- ALOGE("%s: mapper freeBuffer failed: %s", __FUNCTION__, ret.description().c_str());
- }
- } else if (mMapperV3 != nullptr) {
- auto ret = mMapperV3->freeBuffer(const_cast<native_handle_t*>(handle));
- if (!ret.isOk()) {
- ALOGE("%s: mapper freeBuffer failed: %s", __FUNCTION__, ret.description().c_str());
- }
- } else {
- auto ret = mMapperV2->freeBuffer(const_cast<native_handle_t*>(handle));
- if (!ret.isOk()) {
- ALOGE("%s: mapper freeBuffer failed: %s", __FUNCTION__, ret.description().c_str());
- }
+ status_t status = GraphicBufferMapper::get().freeBuffer(handle);
+ if (status != OK) {
+ ALOGE("%s: mapper freeBuffer failed. Status %d", __FUNCTION__, status);
}
}
@@ -345,12 +146,12 @@
}
void* HandleImporter::lock(buffer_handle_t& buf, uint64_t cpuUsage, size_t size) {
- IMapper::Rect accessRegion{0, 0, static_cast<int>(size), 1};
+ android::Rect accessRegion{0, 0, static_cast<int>(size), 1};
return lock(buf, cpuUsage, accessRegion);
}
void* HandleImporter::lock(buffer_handle_t& buf, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion) {
+ const android::Rect& accessRegion) {
Mutex::Autolock lock(mLock);
if (!mInitialized) {
@@ -358,81 +159,18 @@
}
void* ret = nullptr;
-
- if (mMapperV4 == nullptr && mMapperV3 == nullptr && mMapperV2 == nullptr) {
- ALOGE("%s: mMapperV4, mMapperV3 and mMapperV2 are all null!", __FUNCTION__);
- return ret;
- }
-
- hidl_handle acquireFenceHandle;
- auto buffer = const_cast<native_handle_t*>(buf);
- if (mMapperV4 != nullptr) {
- IMapperV4::Rect accessRegionV4{accessRegion.left, accessRegion.top, accessRegion.width,
- accessRegion.height};
-
- mMapperV4->lock(buffer, cpuUsage, accessRegionV4, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpPtr) {
- if (tmpError == MapperErrorV4::NONE) {
- ret = tmpPtr;
- } else {
- ALOGE("%s: failed to lock error %d!", __FUNCTION__, tmpError);
- }
- });
- } else if (mMapperV3 != nullptr) {
- IMapperV3::Rect accessRegionV3{accessRegion.left, accessRegion.top, accessRegion.width,
- accessRegion.height};
-
- mMapperV3->lock(buffer, cpuUsage, accessRegionV3, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpPtr, const auto& /*bytesPerPixel*/,
- const auto& /*bytesPerStride*/) {
- if (tmpError == MapperErrorV3::NONE) {
- ret = tmpPtr;
- } else {
- ALOGE("%s: failed to lock error %d!", __FUNCTION__, tmpError);
- }
- });
- } else {
- mMapperV2->lock(buffer, cpuUsage, accessRegion, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpPtr) {
- if (tmpError == MapperErrorV2::NONE) {
- ret = tmpPtr;
- } else {
- ALOGE("%s: failed to lock error %d!", __FUNCTION__, tmpError);
- }
- });
+ status_t status = GraphicBufferMapper::get().lock(buf, cpuUsage, accessRegion, &ret);
+ if (status != OK) {
+ ALOGE("%s: failed to lock error %d!", __FUNCTION__, status);
}
ALOGV("%s: ptr %p accessRegion.top: %d accessRegion.left: %d accessRegion.width: %d "
"accessRegion.height: %d",
- __FUNCTION__, ret, accessRegion.top, accessRegion.left, accessRegion.width,
- accessRegion.height);
+ __FUNCTION__, ret, accessRegion.top, accessRegion.left, accessRegion.width(),
+ accessRegion.height());
return ret;
}
-YCbCrLayout HandleImporter::lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion) {
- Mutex::Autolock lock(mLock);
-
- if (!mInitialized) {
- initializeLocked();
- }
-
- if (mMapperV4 != nullptr) {
- return lockYCbCrInternal<IMapperV4, MapperErrorV4>(mMapperV4, buf, cpuUsage, accessRegion);
- }
-
- if (mMapperV3 != nullptr) {
- return lockYCbCrInternal<IMapperV3, MapperErrorV3>(mMapperV3, buf, cpuUsage, accessRegion);
- }
-
- if (mMapperV2 != nullptr) {
- return lockYCbCrInternal<IMapper, MapperErrorV2>(mMapperV2, buf, cpuUsage, accessRegion);
- }
-
- ALOGE("%s: mMapperV4, mMapperV3 and mMapperV2 are all null!", __FUNCTION__);
- return {};
-}
-
status_t HandleImporter::getMonoPlanarStrideBytes(buffer_handle_t& buf, uint32_t* stride /*out*/) {
if (stride == nullptr) {
return BAD_VALUE;
@@ -444,35 +182,26 @@
initializeLocked();
}
- if (mMapperV4 != nullptr) {
- std::vector<PlaneLayout> planeLayouts = getPlaneLayouts(mMapperV4, buf);
- if (planeLayouts.size() != 1) {
- ALOGE("%s: Unexpected number of planes %zu!", __FUNCTION__, planeLayouts.size());
- return BAD_VALUE;
- }
-
- *stride = planeLayouts[0].strideInBytes;
- } else {
- ALOGE("%s: mMapperV4 is null! Query not supported!", __FUNCTION__);
- return NO_INIT;
+ std::vector<PlaneLayout> planeLayouts = getPlaneLayouts(buf);
+ if (planeLayouts.size() != 1) {
+ ALOGE("%s: Unexpected number of planes %zu!", __FUNCTION__, planeLayouts.size());
+ return BAD_VALUE;
}
+ *stride = planeLayouts[0].strideInBytes;
+
return OK;
}
int HandleImporter::unlock(buffer_handle_t& buf) {
- if (mMapperV4 != nullptr) {
- return unlockInternal<IMapperV4, MapperErrorV4>(mMapperV4, buf);
- }
- if (mMapperV3 != nullptr) {
- return unlockInternal<IMapperV3, MapperErrorV3>(mMapperV3, buf);
- }
- if (mMapperV2 != nullptr) {
- return unlockInternal<IMapper, MapperErrorV2>(mMapperV2, buf);
+ int releaseFence = -1;
+
+ status_t status = GraphicBufferMapper::get().unlockAsync(buf, &releaseFence);
+ if (status != OK) {
+ ALOGE("%s: failed to unlock error %d!", __FUNCTION__, status);
}
- ALOGE("%s: mMapperV4, mMapperV3 and mMapperV2 are all null!", __FUNCTION__);
- return -1;
+ return releaseFence;
}
bool HandleImporter::isSmpte2086Present(const buffer_handle_t& buf) {
@@ -481,14 +210,14 @@
if (!mInitialized) {
initializeLocked();
}
-
- if (mMapperV4 != nullptr) {
- return isMetadataPesent(mMapperV4, buf, gralloc4::MetadataType_Smpte2086);
- } else {
- ALOGE("%s: mMapperV4 is null! Query not supported!", __FUNCTION__);
+ std::optional<ui::Smpte2086> metadata;
+ status_t status = GraphicBufferMapper::get().getSmpte2086(buf, &metadata);
+ if (status != OK) {
+ ALOGE("%s: Mapper failed to get Smpte2094_40 metadata! Status: %d", __FUNCTION__, status);
+ return false;
}
- return false;
+ return metadata.has_value();
}
bool HandleImporter::isSmpte2094_10Present(const buffer_handle_t& buf) {
@@ -498,13 +227,14 @@
initializeLocked();
}
- if (mMapperV4 != nullptr) {
- return isMetadataPesent(mMapperV4, buf, gralloc4::MetadataType_Smpte2094_10);
- } else {
- ALOGE("%s: mMapperV4 is null! Query not supported!", __FUNCTION__);
+ std::optional<std::vector<uint8_t>> metadata;
+ status_t status = GraphicBufferMapper::get().getSmpte2094_10(buf, &metadata);
+ if (status != OK) {
+ ALOGE("%s: Mapper failed to get Smpte2094_40 metadata! Status: %d", __FUNCTION__, status);
+ return false;
}
- return false;
+ return metadata.has_value();
}
bool HandleImporter::isSmpte2094_40Present(const buffer_handle_t& buf) {
@@ -514,13 +244,14 @@
initializeLocked();
}
- if (mMapperV4 != nullptr) {
- return isMetadataPesent(mMapperV4, buf, gralloc4::MetadataType_Smpte2094_40);
- } else {
- ALOGE("%s: mMapperV4 is null! Query not supported!", __FUNCTION__);
+ std::optional<std::vector<uint8_t>> metadata;
+ status_t status = GraphicBufferMapper::get().getSmpte2094_40(buf, &metadata);
+ if (status != OK) {
+ ALOGE("%s: Mapper failed to get Smpte2094_40 metadata! Status: %d", __FUNCTION__, status);
+ return false;
}
- return false;
+ return metadata.has_value();
}
} // namespace helper
diff --git a/camera/common/default/include/HandleImporter.h b/camera/common/default/include/HandleImporter.h
index 5408ba9..df01202 100644
--- a/camera/common/default/include/HandleImporter.h
+++ b/camera/common/default/include/HandleImporter.h
@@ -17,15 +17,11 @@
#ifndef CAMERA_COMMON_1_0_HANDLEIMPORTED_H
#define CAMERA_COMMON_1_0_HANDLEIMPORTED_H
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
-#include <android/hardware/graphics/mapper/3.0/IMapper.h>
-#include <android/hardware/graphics/mapper/4.0/IMapper.h>
#include <cutils/native_handle.h>
+#include <system/graphics.h>
+#include <ui/Rect.h>
#include <utils/Mutex.h>
-using android::hardware::graphics::mapper::V2_0::IMapper;
-using android::hardware::graphics::mapper::V2_0::YCbCrLayout;
-
namespace android {
namespace hardware {
namespace camera {
@@ -49,11 +45,11 @@
void* lock(buffer_handle_t& buf, uint64_t cpuUsage, size_t size);
// Locks 2-D buffer. Assumes caller has waited for acquire fences.
- void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion);
+ void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const android::Rect& accessRegion);
// Assumes caller has waited for acquire fences.
- YCbCrLayout lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion);
+ android_ycbcr lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage,
+ const android::Rect& accessRegion);
// Query the stride of the first plane in bytes.
status_t getMonoPlanarStrideBytes(buffer_handle_t& buf, uint32_t* stride /*out*/);
@@ -69,19 +65,11 @@
void initializeLocked();
void cleanup();
- template <class M, class E>
- bool importBufferInternal(const sp<M> mapper, buffer_handle_t& handle);
- template <class M, class E>
- YCbCrLayout lockYCbCrInternal(const sp<M> mapper, buffer_handle_t& buf, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion);
- template <class M, class E>
- int unlockInternal(const sp<M> mapper, buffer_handle_t& buf);
+ bool importBufferInternal(buffer_handle_t& handle);
+ int unlockInternal(buffer_handle_t& buf);
Mutex mLock;
bool mInitialized;
- sp<IMapper> mMapperV2;
- sp<graphics::mapper::V3_0::IMapper> mMapperV3;
- sp<graphics::mapper::V4_0::IMapper> mMapperV4;
};
} // namespace helper
diff --git a/camera/device/1.0/default/Android.bp b/camera/device/1.0/default/Android.bp
index 9ff6480..6992ff0 100644
--- a/camera/device/1.0/default/Android.bp
+++ b/camera/device/1.0/default/Android.bp
@@ -32,6 +32,7 @@
"libgralloctypes",
"libhardware",
"libcamera_metadata",
+ "libui",
],
static_libs: [
"android.hardware.camera.common@1.0-helper",
diff --git a/camera/device/3.2/default/Android.bp b/camera/device/3.2/default/Android.bp
index a196291..adf834a 100644
--- a/camera/device/3.2/default/Android.bp
+++ b/camera/device/3.2/default/Android.bp
@@ -30,6 +30,7 @@
"libhardware",
"libcamera_metadata",
"libfmq",
+ "libui",
],
static_libs: [
"android.hardware.camera.common@1.0-helper",
diff --git a/camera/device/3.4/default/Android.bp b/camera/device/3.4/default/Android.bp
index 9f0c777..100106e 100644
--- a/camera/device/3.4/default/Android.bp
+++ b/camera/device/3.4/default/Android.bp
@@ -106,6 +106,7 @@
"libjpeg",
"libexif",
"libtinyxml2",
+ "libui",
],
static_libs: [
"android.hardware.camera.common@1.0-helper",
diff --git a/camera/device/3.4/default/ExternalCameraDeviceSession.cpp b/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
index ca7186b..01b3d41 100644
--- a/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
+++ b/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
@@ -1574,14 +1574,23 @@
} break;
case PixelFormat::YCBCR_420_888:
case PixelFormat::YV12: {
- IMapper::Rect outRect {0, 0,
- static_cast<int32_t>(halBuf.width),
- static_cast<int32_t>(halBuf.height)};
- YCbCrLayout outLayout = sHandleImporter.lockYCbCr(
- *(halBuf.bufPtr), halBuf.usage, outRect);
- ALOGV("%s: outLayout y %p cb %p cr %p y_str %d c_str %d c_step %d",
- __FUNCTION__, outLayout.y, outLayout.cb, outLayout.cr,
- outLayout.yStride, outLayout.cStride, outLayout.chromaStep);
+ android::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
+ static_cast<int32_t>(halBuf.height)};
+ android_ycbcr result =
+ sHandleImporter.lockYCbCr(*(halBuf.bufPtr), halBuf.usage, outRect);
+ ALOGV("%s: outLayout y %p cb %p cr %p y_str %zu c_str %zu c_step %zu", __FUNCTION__,
+ result.y, result.cb, result.cr, result.ystride, result.cstride,
+ result.chroma_step);
+ if (result.ystride > UINT32_MAX || result.cstride > UINT32_MAX ||
+ result.chroma_step > UINT32_MAX) {
+ return onDeviceError("%s: lockYCbCr failed. Unexpected values!", __FUNCTION__);
+ }
+ YCbCrLayout outLayout = {.y = result.y,
+ .cb = result.cb,
+ .cr = result.cr,
+ .yStride = static_cast<uint32_t>(result.ystride),
+ .cStride = static_cast<uint32_t>(result.cstride),
+ .chromaStep = static_cast<uint32_t>(result.chroma_step)};
// Convert to output buffer size/format
uint32_t outputFourcc = getFourCcFromLayout(outLayout);
diff --git a/camera/device/3.5/default/Android.bp b/camera/device/3.5/default/Android.bp
index 9d27b32..bc15629 100644
--- a/camera/device/3.5/default/Android.bp
+++ b/camera/device/3.5/default/Android.bp
@@ -46,6 +46,7 @@
],
shared_libs: [
"libhidlbase",
+ "libui",
"libutils",
"libcutils",
"camera.device@3.2-impl",
@@ -81,6 +82,7 @@
],
shared_libs: [
"libhidlbase",
+ "libui",
"libutils",
"libcutils",
"camera.device@3.2-impl",
diff --git a/camera/device/3.6/default/Android.bp b/camera/device/3.6/default/Android.bp
index 89ee145..b4a486f 100644
--- a/camera/device/3.6/default/Android.bp
+++ b/camera/device/3.6/default/Android.bp
@@ -41,6 +41,7 @@
],
shared_libs: [
"libhidlbase",
+ "libui",
"libutils",
"libcutils",
"camera.device@3.2-impl",
diff --git a/camera/device/3.6/default/ExternalCameraOfflineSession.cpp b/camera/device/3.6/default/ExternalCameraOfflineSession.cpp
index e606fda..1f1dfee 100644
--- a/camera/device/3.6/default/ExternalCameraOfflineSession.cpp
+++ b/camera/device/3.6/default/ExternalCameraOfflineSession.cpp
@@ -222,14 +222,23 @@
} break;
case PixelFormat::YCBCR_420_888:
case PixelFormat::YV12: {
- IMapper::Rect outRect {0, 0,
- static_cast<int32_t>(halBuf.width),
- static_cast<int32_t>(halBuf.height)};
- YCbCrLayout outLayout = sHandleImporter.lockYCbCr(
- *(halBuf.bufPtr), halBuf.usage, outRect);
- ALOGV("%s: outLayout y %p cb %p cr %p y_str %d c_str %d c_step %d",
- __FUNCTION__, outLayout.y, outLayout.cb, outLayout.cr,
- outLayout.yStride, outLayout.cStride, outLayout.chromaStep);
+ android::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
+ static_cast<int32_t>(halBuf.height)};
+ android_ycbcr result =
+ sHandleImporter.lockYCbCr(*(halBuf.bufPtr), halBuf.usage, outRect);
+ ALOGV("%s: outLayout y %p cb %p cr %p y_str %zu c_str %zu c_step %zu", __FUNCTION__,
+ result.y, result.cb, result.cr, result.ystride, result.cstride,
+ result.chroma_step);
+ if (result.ystride > UINT32_MAX || result.cstride > UINT32_MAX ||
+ result.chroma_step > UINT32_MAX) {
+ return onDeviceError("%s: lockYCbCr failed. Unexpected values!", __FUNCTION__);
+ }
+ YCbCrLayout outLayout = {.y = result.y,
+ .cb = result.cb,
+ .cr = result.cr,
+ .yStride = static_cast<uint32_t>(result.ystride),
+ .cStride = static_cast<uint32_t>(result.cstride),
+ .chromaStep = static_cast<uint32_t>(result.chroma_step)};
// Convert to output buffer size/format
uint32_t outputFourcc = V3_4::implementation::getFourCcFromLayout(outLayout);
diff --git a/camera/device/aidl/Android.bp b/camera/device/aidl/Android.bp
index 43a3934..1a665fb 100644
--- a/camera/device/aidl/Android.bp
+++ b/camera/device/aidl/Android.bp
@@ -18,7 +18,7 @@
"android.hardware.common.fmq-V1",
"android.hardware.camera.common-V1",
"android.hardware.camera.metadata-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
backend: {
cpp: {
@@ -37,7 +37,7 @@
"android.hardware.common.fmq-V1",
"android.hardware.camera.common-V1",
"android.hardware.camera.metadata-V1",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
{
@@ -47,7 +47,7 @@
"android.hardware.common.fmq-V1",
"android.hardware.camera.common-V1",
"android.hardware.camera.metadata-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
diff --git a/camera/device/default/Android.bp b/camera/device/default/Android.bp
index b577597..5fbcb5d 100644
--- a/camera/device/default/Android.bp
+++ b/camera/device/default/Android.bp
@@ -25,7 +25,10 @@
cc_library_shared {
name: "camera.device-external-impl",
- defaults: ["hidl_defaults"],
+ defaults: [
+ "android.hardware.graphics.common-ndk_shared",
+ "hidl_defaults",
+ ],
proprietary: true,
srcs: [
"ExternalCameraDevice.cpp",
@@ -37,8 +40,7 @@
shared_libs: [
"android.hardware.camera.common-V1-ndk",
"android.hardware.camera.device-V1-ndk",
- "android.hardware.graphics.allocator-V1-ndk",
- "android.hardware.graphics.common-V4-ndk",
+ "android.hardware.graphics.allocator-V2-ndk",
"android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@4.0",
@@ -58,6 +60,7 @@
"libsync",
"libtinyxml2",
"libutils",
+ "libui",
"libyuv",
],
static_libs: [
diff --git a/camera/device/default/ExternalCameraDeviceSession.cpp b/camera/device/default/ExternalCameraDeviceSession.cpp
index c962974..896e0da 100644
--- a/camera/device/default/ExternalCameraDeviceSession.cpp
+++ b/camera/device/default/ExternalCameraDeviceSession.cpp
@@ -224,10 +224,6 @@
}
void ExternalCameraDeviceSession::closeOutputThread() {
- closeOutputThreadImpl();
-}
-
-void ExternalCameraDeviceSession::closeOutputThreadImpl() {
if (mOutputThread != nullptr) {
mOutputThread->flush();
mOutputThread->requestExitAndWait();
@@ -235,6 +231,13 @@
}
}
+void ExternalCameraDeviceSession::closeBufferRequestThread() {
+ if (mBufferRequestThread != nullptr) {
+ mBufferRequestThread->requestExitAndWait();
+ mBufferRequestThread.reset();
+ }
+}
+
Status ExternalCameraDeviceSession::initStatus() const {
Mutex::Autolock _l(mLock);
Status status = Status::OK;
@@ -248,7 +251,7 @@
ExternalCameraDeviceSession::~ExternalCameraDeviceSession() {
if (!isClosed()) {
ALOGE("ExternalCameraDeviceSession deleted before close!");
- close(/*callerIsDtor*/ true);
+ closeImpl();
}
}
@@ -1411,19 +1414,16 @@
}
ScopedAStatus ExternalCameraDeviceSession::close() {
- close(false);
+ closeImpl();
return fromStatus(Status::OK);
}
-void ExternalCameraDeviceSession::close(bool callerIsDtor) {
+void ExternalCameraDeviceSession::closeImpl() {
Mutex::Autolock _il(mInterfaceLock);
bool closed = isClosed();
if (!closed) {
- if (callerIsDtor) {
- closeOutputThreadImpl();
- } else {
- closeOutputThread();
- }
+ closeOutputThread();
+ closeBufferRequestThread();
Mutex::Autolock _l(mLock);
// free all buffers
@@ -2882,13 +2882,23 @@
} break;
case PixelFormat::YCBCR_420_888:
case PixelFormat::YV12: {
- IMapper::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
+ android::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
static_cast<int32_t>(halBuf.height)};
- YCbCrLayout outLayout = sHandleImporter.lockYCbCr(
+ android_ycbcr result = sHandleImporter.lockYCbCr(
*(halBuf.bufPtr), static_cast<uint64_t>(halBuf.usage), outRect);
- ALOGV("%s: outLayout y %p cb %p cr %p y_str %d c_str %d c_step %d", __FUNCTION__,
- outLayout.y, outLayout.cb, outLayout.cr, outLayout.yStride, outLayout.cStride,
- outLayout.chromaStep);
+ ALOGV("%s: outLayout y %p cb %p cr %p y_str %zu c_str %zu c_step %zu", __FUNCTION__,
+ result.y, result.cb, result.cr, result.ystride, result.cstride,
+ result.chroma_step);
+ if (result.ystride > UINT32_MAX || result.cstride > UINT32_MAX ||
+ result.chroma_step > UINT32_MAX) {
+ return onDeviceError("%s: lockYCbCr failed. Unexpected values!", __FUNCTION__);
+ }
+ YCbCrLayout outLayout = {.y = result.y,
+ .cb = result.cb,
+ .cr = result.cr,
+ .yStride = static_cast<uint32_t>(result.ystride),
+ .cStride = static_cast<uint32_t>(result.cstride),
+ .chromaStep = static_cast<uint32_t>(result.chroma_step)};
// Convert to output buffer size/format
uint32_t outputFourcc = getFourCcFromLayout(outLayout);
diff --git a/camera/device/default/ExternalCameraDeviceSession.h b/camera/device/default/ExternalCameraDeviceSession.h
index e7eb799..736bfd1 100644
--- a/camera/device/default/ExternalCameraDeviceSession.h
+++ b/camera/device/default/ExternalCameraDeviceSession.h
@@ -24,6 +24,9 @@
#include <aidl/android/hardware/camera/device/BufferRequest.h>
#include <aidl/android/hardware/camera/device/Stream.h>
#include <android-base/unique_fd.h>
+#include <android/hardware/graphics/mapper/2.0/IMapper.h>
+#include <android/hardware/graphics/mapper/3.0/IMapper.h>
+#include <android/hardware/graphics/mapper/4.0/IMapper.h>
#include <fmq/AidlMessageQueue.h>
#include <utils/Thread.h>
#include <deque>
@@ -55,6 +58,7 @@
using ::android::hardware::camera::common::helper::SimpleThread;
using ::android::hardware::camera::external::common::ExternalCameraConfig;
using ::android::hardware::camera::external::common::SizeHasher;
+using ::android::hardware::graphics::mapper::V2_0::YCbCrLayout;
using ::ndk::ScopedAStatus;
class ExternalCameraDeviceSession : public BnCameraDeviceSession, public OutputThreadInterface {
@@ -240,9 +244,9 @@
// To init/close different version of output thread
void initOutputThread();
void closeOutputThread();
- void closeOutputThreadImpl();
+ void closeBufferRequestThread();
- void close(bool callerIsDtor);
+ void closeImpl();
Status initStatus() const;
status_t initDefaultRequests();
diff --git a/camera/device/default/ExternalCameraOfflineSession.cpp b/camera/device/default/ExternalCameraOfflineSession.cpp
index 4c7f732..53bd44f 100644
--- a/camera/device/default/ExternalCameraOfflineSession.cpp
+++ b/camera/device/default/ExternalCameraOfflineSession.cpp
@@ -486,13 +486,23 @@
} break;
case PixelFormat::YCBCR_420_888:
case PixelFormat::YV12: {
- IMapper::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
+ android::Rect outRect{0, 0, static_cast<int32_t>(halBuf.width),
static_cast<int32_t>(halBuf.height)};
- YCbCrLayout outLayout = sHandleImporter.lockYCbCr(
+ android_ycbcr result = sHandleImporter.lockYCbCr(
*(halBuf.bufPtr), static_cast<uint64_t>(halBuf.usage), outRect);
- ALOGV("%s: outLayout y %p cb %p cr %p y_str %d c_str %d c_step %d", __FUNCTION__,
- outLayout.y, outLayout.cb, outLayout.cr, outLayout.yStride, outLayout.cStride,
- outLayout.chromaStep);
+ ALOGV("%s: outLayout y %p cb %p cr %p y_str %zu c_str %zu c_step %zu", __FUNCTION__,
+ result.y, result.cb, result.cr, result.ystride, result.cstride,
+ result.chroma_step);
+ if (result.ystride > UINT32_MAX || result.cstride > UINT32_MAX ||
+ result.chroma_step > UINT32_MAX) {
+ return onDeviceError("%s: lockYCbCr failed. Unexpected values!", __FUNCTION__);
+ }
+ YCbCrLayout outLayout = {.y = result.y,
+ .cb = result.cb,
+ .cr = result.cr,
+ .yStride = static_cast<uint32_t>(result.ystride),
+ .cStride = static_cast<uint32_t>(result.cstride),
+ .chromaStep = static_cast<uint32_t>(result.chroma_step)};
// Convert to output buffer size/format
uint32_t outputFourcc = getFourCcFromLayout(outLayout);
@@ -544,4 +554,4 @@
} // namespace device
} // namespace camera
} // namespace hardware
-} // namespace android
\ No newline at end of file
+} // namespace android
diff --git a/camera/device/default/ExternalCameraUtils.h b/camera/device/default/ExternalCameraUtils.h
index b37933c..d434905 100644
--- a/camera/device/default/ExternalCameraUtils.h
+++ b/camera/device/default/ExternalCameraUtils.h
@@ -25,7 +25,11 @@
#include <aidl/android/hardware/camera/device/NotifyMsg.h>
#include <aidl/android/hardware/graphics/common/BufferUsage.h>
#include <aidl/android/hardware/graphics/common/PixelFormat.h>
+#include <android/hardware/graphics/mapper/2.0/IMapper.h>
+#include <android/hardware/graphics/mapper/3.0/IMapper.h>
+#include <android/hardware/graphics/mapper/4.0/IMapper.h>
#include <tinyxml2.h>
+#include <map>
#include <unordered_map>
#include <unordered_set>
@@ -37,6 +41,8 @@
using ::aidl::android::hardware::graphics::common::PixelFormat;
using ::android::hardware::camera::common::V1_0::helper::CameraMetadata;
using ::android::hardware::camera::common::V1_0::helper::HandleImporter;
+using ::android::hardware::graphics::mapper::V2_0::IMapper;
+using ::android::hardware::graphics::mapper::V2_0::YCbCrLayout;
namespace android {
namespace hardware {
diff --git a/camera/metadata/aidl/Android.bp b/camera/metadata/aidl/Android.bp
index 5872a86..2b2be55 100644
--- a/camera/metadata/aidl/Android.bp
+++ b/camera/metadata/aidl/Android.bp
@@ -11,7 +11,7 @@
name: "android.hardware.camera.metadata",
vendor_available: true,
srcs: ["android/hardware/camera/metadata/*.aidl"],
- frozen: true,
+ frozen: false,
stability: "vintf",
backend: {
cpp: {
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
index 71d4e41..0290aef 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -108,6 +108,11 @@
ANDROID_FLASH_COLOR_TEMPERATURE,
ANDROID_FLASH_MAX_ENERGY,
ANDROID_FLASH_STATE,
+ ANDROID_FLASH_STRENGTH_LEVEL,
+ ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL,
+ ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL,
+ ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL,
+ ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL,
ANDROID_FLASH_INFO_AVAILABLE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_FLASH_INFO_START /* 327680 */,
ANDROID_FLASH_INFO_CHARGE_DURATION,
ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL,
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
index 56aa690..dd679f3 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -560,6 +560,36 @@
*/
ANDROID_FLASH_STATE,
/**
+ * android.flash.strengthLevel [dynamic, int32, public]
+ *
+ * <p>Flash strength level to be used when manual flash control is active.</p>
+ */
+ ANDROID_FLASH_STRENGTH_LEVEL,
+ /**
+ * android.flash.singleStrengthMaxLevel [static, int32, public]
+ *
+ * <p>Maximum flash brightness level for manual flash control in SINGLE mode.</p>
+ */
+ ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL,
+ /**
+ * android.flash.singleStrengthDefaultLevel [static, int32, public]
+ *
+ * <p>Default flash brightness level for manual flash control in SINGLE mode.</p>
+ */
+ ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL,
+ /**
+ * android.flash.torchStrengthMaxLevel [static, int32, public]
+ *
+ * <p>Maximum flash brightness level for manual flash control in TORCH mode</p>
+ */
+ ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL,
+ /**
+ * android.flash.torchStrengthDefaultLevel [static, int32, public]
+ *
+ * <p>Default flash brightness level for manual flash control in TORCH mode</p>
+ */
+ ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL,
+ /**
* android.flash.info.available [static, enum, public]
*
* <p>Whether this camera device has a
diff --git a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
index 04db7f3..2d919cc 100644
--- a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
+++ b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
@@ -95,13 +95,14 @@
Return<Status> ExternalCameraProviderImpl_2_4::setCallback(
const sp<ICameraProviderCallback>& callback) {
+ if (callback == nullptr) {
+ return Status::ILLEGAL_ARGUMENT;
+ }
+
{
Mutex::Autolock _l(mLock);
mCallbacks = callback;
}
- if (mCallbacks == nullptr) {
- return Status::OK;
- }
// Send a callback for all devices to initialize
{
for (const auto& pair : mCameraStatusMap) {
diff --git a/camera/provider/2.4/default/LegacyCameraProviderImpl_2_4.cpp b/camera/provider/2.4/default/LegacyCameraProviderImpl_2_4.cpp
index 69318c7..07ed689 100644
--- a/camera/provider/2.4/default/LegacyCameraProviderImpl_2_4.cpp
+++ b/camera/provider/2.4/default/LegacyCameraProviderImpl_2_4.cpp
@@ -448,11 +448,11 @@
// Methods from ::android::hardware::camera::provider::V2_4::ICameraProvider follow.
Return<Status> LegacyCameraProviderImpl_2_4::setCallback(
const sp<ICameraProviderCallback>& callback) {
+ if (callback == nullptr) {
+ return Status::ILLEGAL_ARGUMENT;
+ }
Mutex::Autolock _l(mCbLock);
mCallbacks = callback;
- if (mCallbacks == nullptr) {
- return Status::OK;
- }
// Add and report all presenting external cameras.
for (auto const& statusPair : mCameraStatusMap) {
int id = std::stoi(statusPair.first);
diff --git a/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp b/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
index 62ce074..eba49a5 100644
--- a/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
+++ b/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
@@ -91,11 +91,11 @@
Return<Status> ExternalCameraProviderImpl_2_7::setCallback(
const sp<ICameraProviderCallback>& callback) {
+ if (callback == nullptr) {
+ return Status::ILLEGAL_ARGUMENT;
+ }
Mutex::Autolock _l(mLock);
mCallbacks = callback;
- if (mCallbacks == nullptr) {
- return Status::OK;
- }
// Send a callback for all devices to initialize
{
for (const auto& pair : mCameraStatusMap) {
diff --git a/camera/provider/default/ExternalCameraProvider.cpp b/camera/provider/default/ExternalCameraProvider.cpp
index 4d2c847..54875ab 100644
--- a/camera/provider/default/ExternalCameraProvider.cpp
+++ b/camera/provider/default/ExternalCameraProvider.cpp
@@ -75,15 +75,15 @@
ndk::ScopedAStatus ExternalCameraProvider::setCallback(
const std::shared_ptr<ICameraProviderCallback>& in_callback) {
+ if (in_callback == nullptr) {
+ return fromStatus(Status::ILLEGAL_ARGUMENT);
+ }
+
{
Mutex::Autolock _l(mLock);
mCallback = in_callback;
}
- if (mCallback == nullptr) {
- return fromStatus(Status::OK);
- }
-
for (const auto& pair : mCameraStatusMap) {
mCallback->cameraDeviceStatusChange(pair.first, pair.second);
}
diff --git a/compatibility_matrices/compatibility_matrix.9.xml b/compatibility_matrices/compatibility_matrix.9.xml
index 872099a..21b556a 100644
--- a/compatibility_matrices/compatibility_matrix.9.xml
+++ b/compatibility_matrices/compatibility_matrix.9.xml
@@ -94,7 +94,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.automotive.vehicle</name>
- <version>1-2</version>
+ <version>1-3</version>
<interface>
<name>IVehicle</name>
<instance>default</instance>
@@ -102,6 +102,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.automotive.remoteaccess</name>
+ <version>1-2</version>
<interface>
<name>IRemoteAccess</name>
<instance>default</instance>
@@ -120,6 +121,7 @@
<interface>
<name>IFace</name>
<instance>default</instance>
+ <instance>virtual</instance>
</interface>
</hal>
<hal format="aidl" optional="true" updatable-via-apex="true">
@@ -185,7 +187,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.contexthub</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IContextHub</name>
<instance>default</instance>
@@ -216,7 +218,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.gnss</name>
- <version>2-3</version>
+ <version>2-4</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
@@ -232,7 +234,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.graphics.composer3</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IComposer</name>
<instance>default</instance>
@@ -381,7 +383,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.power</name>
- <version>4</version>
+ <version>5</version>
<interface>
<name>IPower</name>
<instance>default</instance>
@@ -397,7 +399,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.config</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
@@ -405,7 +407,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.data</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioData</name>
<instance>slot1</instance>
@@ -415,7 +417,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.messaging</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioMessaging</name>
<instance>slot1</instance>
@@ -425,7 +427,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.modem</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioModem</name>
<instance>slot1</instance>
@@ -435,7 +437,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.network</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioNetwork</name>
<instance>slot1</instance>
@@ -445,7 +447,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.sim</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioSim</name>
<instance>slot1</instance>
@@ -465,7 +467,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.voice</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IRadioVoice</name>
<instance>slot1</instance>
@@ -475,7 +477,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.ims</name>
- <version>1</version>
+ <version>2</version>
<interface>
<name>IRadioIms</name>
<instance>slot1</instance>
@@ -485,7 +487,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.radio.ims.media</name>
- <version>1</version>
+ <version>2</version>
<interface>
<name>IImsMedia</name>
<instance>default</instance>
@@ -566,14 +568,6 @@
</interface>
</hal>
<hal format="aidl" optional="true">
- <name>android.hardware.threadnetwork</name>
- <version>1</version>
- <interface>
- <name>IThreadChip</name>
- <instance>chip0</instance>
- </interface>
- </hal>
- <hal format="aidl" optional="true">
<name>android.hardware.tv.hdmi.cec</name>
<version>1</version>
<interface>
@@ -607,7 +601,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.tv.input</name>
- <version>1</version>
+ <version>1-2</version>
<interface>
<name>ITvInput</name>
<instance>default</instance>
diff --git a/contexthub/aidl/Android.bp b/contexthub/aidl/Android.bp
index a0315d0..cf10529 100644
--- a/contexthub/aidl/Android.bp
+++ b/contexthub/aidl/Android.bp
@@ -49,6 +49,6 @@
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
index 6163cfc..d0099ff 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHubCallback.aidl
@@ -39,5 +39,6 @@
void handleContextHubAsyncEvent(in android.hardware.contexthub.AsyncEventType evt);
void handleTransactionResult(in int transactionId, in boolean success);
void handleNanSessionRequest(in android.hardware.contexthub.NanSessionRequest request);
+ byte[16] getUuid();
const int CONTEXTHUB_NAN_TRANSACTION_TIMEOUT_MS = 10000;
}
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
index bfcb51e..41fb266 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHubCallback.aidl
@@ -91,6 +91,14 @@
void handleNanSessionRequest(in NanSessionRequest request);
/**
+ * This callback is passed to the HAL implementation to allow the HAL to request a UUID that
+ * uniquely identifies an IContextHubCallback.
+ *
+ * @return a byte array representating the UUID
+ */
+ byte[16] getUuid();
+
+ /**
* Amount of time, in milliseconds, that a handleNanSessionRequest can be pending before the
* Contexthub service must respond.
*/
diff --git a/contexthub/aidl/default/Android.bp b/contexthub/aidl/default/Android.bp
index d293e30..03213bc 100644
--- a/contexthub/aidl/default/Android.bp
+++ b/contexthub/aidl/default/Android.bp
@@ -29,7 +29,7 @@
shared_libs: [
"libbase",
"libbinder_ndk",
- "android.hardware.contexthub-V2-ndk",
+ "android.hardware.contexthub-V3-ndk",
],
export_include_dirs: ["include"],
srcs: [
@@ -50,7 +50,7 @@
shared_libs: [
"libbase",
"libbinder_ndk",
- "android.hardware.contexthub-V2-ndk",
+ "android.hardware.contexthub-V3-ndk",
],
static_libs: [
"libcontexthubexampleimpl",
diff --git a/contexthub/aidl/default/contexthub-default.xml b/contexthub/aidl/default/contexthub-default.xml
index 930f672..2f8ddc8 100644
--- a/contexthub/aidl/default/contexthub-default.xml
+++ b/contexthub/aidl/default/contexthub-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.contexthub</name>
- <version>2</version>
+ <version>3</version>
<interface>
<name>IContextHub</name>
<instance>default</instance>
diff --git a/contexthub/aidl/vts/Android.bp b/contexthub/aidl/vts/Android.bp
index 1534b40..b166baf 100644
--- a/contexthub/aidl/vts/Android.bp
+++ b/contexthub/aidl/vts/Android.bp
@@ -32,7 +32,7 @@
"libbinder",
],
static_libs: [
- "android.hardware.contexthub-V2-cpp",
+ "android.hardware.contexthub-V3-cpp",
"VtsHalContexthubUtils",
],
test_suites: [
diff --git a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
index c1cc07c..e780857 100644
--- a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
+++ b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
@@ -48,6 +48,10 @@
using ::android::hardware::contexthub::vts_utils::kNonExistentAppId;
using ::android::hardware::contexthub::vts_utils::waitForCallback;
+// 6612b522-b717-41c8-b48d-c0b1cc64e142
+const std::array<uint8_t, 16> kUuid = {0x66, 0x12, 0xb5, 0x22, 0xb7, 0x17, 0x41, 0xc8,
+ 0xb4, 0x8d, 0xc0, 0xb1, 0xcc, 0x64, 0xe1, 0x42};
+
class ContextHubAidl : public testing::TestWithParam<std::tuple<std::string, int32_t>> {
public:
virtual void SetUp() override {
@@ -126,6 +130,11 @@
Status handleNanSessionRequest(const NanSessionRequest& /* request */) override {
return Status::ok();
}
+
+ Status getUuid(std::array<uint8_t, 16>* out_uuid) override {
+ *out_uuid = kUuid;
+ return Status::ok();
+ }
};
TEST_P(ContextHubAidl, TestRegisterCallback) {
@@ -157,6 +166,11 @@
return Status::ok();
}
+ Status getUuid(std::array<uint8_t, 16>* out_uuid) override {
+ *out_uuid = kUuid;
+ return Status::ok();
+ }
+
std::promise<std::vector<NanoappInfo>> promise;
};
@@ -223,6 +237,11 @@
return Status::ok();
}
+ Status getUuid(std::array<uint8_t, 16>* out_uuid) override {
+ *out_uuid = kUuid;
+ return Status::ok();
+ }
+
uint32_t expectedTransactionId = 0;
std::promise<bool> promise;
};
diff --git a/drm/aidl/OWNERS b/drm/aidl/OWNERS
deleted file mode 100644
index e69de29..0000000
--- a/drm/aidl/OWNERS
+++ /dev/null
diff --git a/drm/aidl/vts/OWNERS b/drm/aidl/vts/OWNERS
deleted file mode 100644
index e69de29..0000000
--- a/drm/aidl/vts/OWNERS
+++ /dev/null
diff --git a/gnss/1.1/default/Android.bp b/gnss/1.1/default/Android.bp
index 300e8de..697cb91 100644
--- a/gnss/1.1/default/Android.bp
+++ b/gnss/1.1/default/Android.bp
@@ -27,7 +27,7 @@
"android.hardware.gnss@2.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@1.0",
- "android.hardware.gnss-V3-ndk",
+ "android.hardware.gnss-V4-ndk",
],
static_libs: [
"android.hardware.gnss@common-default-lib",
diff --git a/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp
index 2414cbc..f9fcbf1 100644
--- a/gnss/1.1/vts/functional/Android.bp
+++ b/gnss/1.1/vts/functional/Android.bp
@@ -36,7 +36,7 @@
"android.hardware.gnss@1.1",
"android.hardware.gnss@2.0",
"android.hardware.gnss@common-vts-lib",
- "android.hardware.gnss-V3-cpp",
+ "android.hardware.gnss-V4-cpp",
],
shared_libs: [
"android.hardware.gnss.measurement_corrections@1.0",
diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp
index 83bc2cc..35c2e37 100644
--- a/gnss/2.0/default/Android.bp
+++ b/gnss/2.0/default/Android.bp
@@ -50,7 +50,7 @@
"android.hardware.gnss@2.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@1.0",
- "android.hardware.gnss-V3-ndk",
+ "android.hardware.gnss-V4-ndk",
],
static_libs: [
"android.hardware.gnss@common-default-lib",
diff --git a/gnss/2.0/vts/functional/Android.bp b/gnss/2.0/vts/functional/Android.bp
index e8db886..0b54308 100644
--- a/gnss/2.0/vts/functional/Android.bp
+++ b/gnss/2.0/vts/functional/Android.bp
@@ -39,7 +39,7 @@
"android.hardware.gnss@2.0",
"android.hardware.gnss@2.1",
"android.hardware.gnss@common-vts-lib",
- "android.hardware.gnss-V3-cpp",
+ "android.hardware.gnss-V4-cpp",
],
test_suites: [
"general-tests",
diff --git a/gnss/2.1/default/Android.bp b/gnss/2.1/default/Android.bp
index 4a4ce54..1bb7512 100644
--- a/gnss/2.1/default/Android.bp
+++ b/gnss/2.1/default/Android.bp
@@ -44,7 +44,7 @@
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@2.0",
- "android.hardware.gnss-V3-ndk",
+ "android.hardware.gnss-V4-ndk",
],
static_libs: [
"android.hardware.gnss@common-default-lib",
diff --git a/gnss/2.1/vts/functional/Android.bp b/gnss/2.1/vts/functional/Android.bp
index 76f9d07..9906b27 100644
--- a/gnss/2.1/vts/functional/Android.bp
+++ b/gnss/2.1/vts/functional/Android.bp
@@ -40,7 +40,7 @@
"android.hardware.gnss@2.0",
"android.hardware.gnss@2.1",
"android.hardware.gnss@common-vts-lib",
- "android.hardware.gnss-V3-cpp",
+ "android.hardware.gnss-V4-cpp",
],
shared_libs: [
"libvintf",
diff --git a/gnss/aidl/Android.bp b/gnss/aidl/Android.bp
index cb2c001..611c7e0 100644
--- a/gnss/aidl/Android.bp
+++ b/gnss/aidl/Android.bp
@@ -52,6 +52,6 @@
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/ElapsedRealtime.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/ElapsedRealtime.aidl
index 559ed29..5d7f51e 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/ElapsedRealtime.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/ElapsedRealtime.aidl
@@ -38,6 +38,6 @@
int flags;
long timestampNs;
double timeUncertaintyNs;
- const int HAS_TIMESTAMP_NS = 1;
- const int HAS_TIME_UNCERTAINTY_NS = 2;
+ const int HAS_TIMESTAMP_NS = (1 << 0) /* 1 */;
+ const int HAS_TIME_UNCERTAINTY_NS = (1 << 1) /* 2 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssClock.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssClock.aidl
index a8454dd..63edd44 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssClock.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssClock.aidl
@@ -46,11 +46,11 @@
double driftUncertaintyNsps;
int hwClockDiscontinuityCount;
android.hardware.gnss.GnssSignalType referenceSignalTypeForIsb;
- const int HAS_LEAP_SECOND = 1;
- const int HAS_TIME_UNCERTAINTY = 2;
- const int HAS_FULL_BIAS = 4;
- const int HAS_BIAS = 8;
- const int HAS_BIAS_UNCERTAINTY = 16;
- const int HAS_DRIFT = 32;
- const int HAS_DRIFT_UNCERTAINTY = 64;
+ const int HAS_LEAP_SECOND = (1 << 0) /* 1 */;
+ const int HAS_TIME_UNCERTAINTY = (1 << 1) /* 2 */;
+ const int HAS_FULL_BIAS = (1 << 2) /* 4 */;
+ const int HAS_BIAS = (1 << 3) /* 8 */;
+ const int HAS_BIAS_UNCERTAINTY = (1 << 4) /* 16 */;
+ const int HAS_DRIFT = (1 << 5) /* 32 */;
+ const int HAS_DRIFT_UNCERTAINTY = (1 << 6) /* 64 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssLocation.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssLocation.aidl
index ed9dcfa..e64d98a 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssLocation.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssLocation.aidl
@@ -47,12 +47,12 @@
double bearingAccuracyDegrees;
long timestampMillis;
android.hardware.gnss.ElapsedRealtime elapsedRealtime;
- const int HAS_LAT_LONG = 1;
- const int HAS_ALTITUDE = 2;
- const int HAS_SPEED = 4;
- const int HAS_BEARING = 8;
- const int HAS_HORIZONTAL_ACCURACY = 16;
- const int HAS_VERTICAL_ACCURACY = 32;
- const int HAS_SPEED_ACCURACY = 64;
- const int HAS_BEARING_ACCURACY = 128;
+ const int HAS_LAT_LONG = 0x0001;
+ const int HAS_ALTITUDE = 0x0002;
+ const int HAS_SPEED = 0x0004;
+ const int HAS_BEARING = 0x0008;
+ const int HAS_HORIZONTAL_ACCURACY = 0x0010;
+ const int HAS_VERTICAL_ACCURACY = 0x0020;
+ const int HAS_SPEED_ACCURACY = 0x0040;
+ const int HAS_BEARING_ACCURACY = 0x0080;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssMeasurement.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssMeasurement.aidl
index 8a44887..a2594af 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssMeasurement.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssMeasurement.aidl
@@ -61,39 +61,39 @@
double satelliteInterSignalBiasUncertaintyNs;
android.hardware.gnss.SatellitePvt satellitePvt;
android.hardware.gnss.CorrelationVector[] correlationVectors;
- const int HAS_SNR = 1;
- const int HAS_CARRIER_FREQUENCY = 512;
- const int HAS_CARRIER_CYCLES = 1024;
- const int HAS_CARRIER_PHASE = 2048;
- const int HAS_CARRIER_PHASE_UNCERTAINTY = 4096;
- const int HAS_AUTOMATIC_GAIN_CONTROL = 8192;
- const int HAS_FULL_ISB = 65536;
- const int HAS_FULL_ISB_UNCERTAINTY = 131072;
- const int HAS_SATELLITE_ISB = 262144;
- const int HAS_SATELLITE_ISB_UNCERTAINTY = 524288;
- const int HAS_SATELLITE_PVT = 1048576;
- const int HAS_CORRELATION_VECTOR = 2097152;
+ const int HAS_SNR = (1 << 0) /* 1 */;
+ const int HAS_CARRIER_FREQUENCY = (1 << 9) /* 512 */;
+ const int HAS_CARRIER_CYCLES = (1 << 10) /* 1024 */;
+ const int HAS_CARRIER_PHASE = (1 << 11) /* 2048 */;
+ const int HAS_CARRIER_PHASE_UNCERTAINTY = (1 << 12) /* 4096 */;
+ const int HAS_AUTOMATIC_GAIN_CONTROL = (1 << 13) /* 8192 */;
+ const int HAS_FULL_ISB = (1 << 16) /* 65536 */;
+ const int HAS_FULL_ISB_UNCERTAINTY = (1 << 17) /* 131072 */;
+ const int HAS_SATELLITE_ISB = (1 << 18) /* 262144 */;
+ const int HAS_SATELLITE_ISB_UNCERTAINTY = (1 << 19) /* 524288 */;
+ const int HAS_SATELLITE_PVT = (1 << 20) /* 1048576 */;
+ const int HAS_CORRELATION_VECTOR = (1 << 21) /* 2097152 */;
const int STATE_UNKNOWN = 0;
- const int STATE_CODE_LOCK = 1;
- const int STATE_BIT_SYNC = 2;
- const int STATE_SUBFRAME_SYNC = 4;
- const int STATE_TOW_DECODED = 8;
- const int STATE_MSEC_AMBIGUOUS = 16;
- const int STATE_SYMBOL_SYNC = 32;
- const int STATE_GLO_STRING_SYNC = 64;
- const int STATE_GLO_TOD_DECODED = 128;
- const int STATE_BDS_D2_BIT_SYNC = 256;
- const int STATE_BDS_D2_SUBFRAME_SYNC = 512;
- const int STATE_GAL_E1BC_CODE_LOCK = 1024;
- const int STATE_GAL_E1C_2ND_CODE_LOCK = 2048;
- const int STATE_GAL_E1B_PAGE_SYNC = 4096;
- const int STATE_SBAS_SYNC = 8192;
- const int STATE_TOW_KNOWN = 16384;
- const int STATE_GLO_TOD_KNOWN = 32768;
- const int STATE_2ND_CODE_LOCK = 65536;
+ const int STATE_CODE_LOCK = (1 << 0) /* 1 */;
+ const int STATE_BIT_SYNC = (1 << 1) /* 2 */;
+ const int STATE_SUBFRAME_SYNC = (1 << 2) /* 4 */;
+ const int STATE_TOW_DECODED = (1 << 3) /* 8 */;
+ const int STATE_MSEC_AMBIGUOUS = (1 << 4) /* 16 */;
+ const int STATE_SYMBOL_SYNC = (1 << 5) /* 32 */;
+ const int STATE_GLO_STRING_SYNC = (1 << 6) /* 64 */;
+ const int STATE_GLO_TOD_DECODED = (1 << 7) /* 128 */;
+ const int STATE_BDS_D2_BIT_SYNC = (1 << 8) /* 256 */;
+ const int STATE_BDS_D2_SUBFRAME_SYNC = (1 << 9) /* 512 */;
+ const int STATE_GAL_E1BC_CODE_LOCK = (1 << 10) /* 1024 */;
+ const int STATE_GAL_E1C_2ND_CODE_LOCK = (1 << 11) /* 2048 */;
+ const int STATE_GAL_E1B_PAGE_SYNC = (1 << 12) /* 4096 */;
+ const int STATE_SBAS_SYNC = (1 << 13) /* 8192 */;
+ const int STATE_TOW_KNOWN = (1 << 14) /* 16384 */;
+ const int STATE_GLO_TOD_KNOWN = (1 << 15) /* 32768 */;
+ const int STATE_2ND_CODE_LOCK = (1 << 16) /* 65536 */;
const int ADR_STATE_UNKNOWN = 0;
- const int ADR_STATE_VALID = 1;
- const int ADR_STATE_RESET = 2;
- const int ADR_STATE_CYCLE_SLIP = 4;
- const int ADR_STATE_HALF_CYCLE_RESOLVED = 8;
+ const int ADR_STATE_VALID = (1 << 0) /* 1 */;
+ const int ADR_STATE_RESET = (1 << 1) /* 2 */;
+ const int ADR_STATE_CYCLE_SLIP = (1 << 2) /* 4 */;
+ const int ADR_STATE_HALF_CYCLE_RESOLVED = (1 << 3) /* 8 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssSignalType.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssSignalType.aidl
index 4a49547..a17f933 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssSignalType.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/GnssSignalType.aidl
@@ -42,6 +42,7 @@
const @utf8InCpp String CODE_TYPE_B = "B";
const @utf8InCpp String CODE_TYPE_C = "C";
const @utf8InCpp String CODE_TYPE_D = "D";
+ const @utf8InCpp String CODE_TYPE_E = "E";
const @utf8InCpp String CODE_TYPE_I = "I";
const @utf8InCpp String CODE_TYPE_L = "L";
const @utf8InCpp String CODE_TYPE_M = "M";
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IAGnssRil.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IAGnssRil.aidl
index c782b6f..c8634ec 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IAGnssRil.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IAGnssRil.aidl
@@ -40,8 +40,8 @@
void setSetId(in android.hardware.gnss.IAGnssRil.SetIdType type, in @utf8InCpp String setid);
void updateNetworkState(in android.hardware.gnss.IAGnssRil.NetworkAttributes attributes);
void injectNiSuplMessageData(in byte[] msgData, in int slotIndex);
- const int NETWORK_CAPABILITY_NOT_METERED = 1;
- const int NETWORK_CAPABILITY_NOT_ROAMING = 2;
+ const int NETWORK_CAPABILITY_NOT_METERED = 0x01;
+ const int NETWORK_CAPABILITY_NOT_ROAMING = 0x02;
@Backing(type="int") @VintfStability
enum AGnssRefLocationType {
GSM_CELLID = 1,
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
index 0e6405e..d1aaf2c 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl
@@ -77,19 +77,19 @@
}
@Backing(type="int") @VintfStability
enum GnssAidingData {
- EPHEMERIS = 1,
- ALMANAC = 2,
- POSITION = 4,
- TIME = 8,
- IONO = 16,
- UTC = 32,
- HEALTH = 64,
- SVDIR = 128,
- SVSTEER = 256,
- SADATA = 512,
- RTI = 1024,
- CELLDB_INFO = 32768,
- ALL = 65535,
+ EPHEMERIS = 0x0001,
+ ALMANAC = 0x0002,
+ POSITION = 0x0004,
+ TIME = 0x0008,
+ IONO = 0x0010,
+ UTC = 0x0020,
+ HEALTH = 0x0040,
+ SVDIR = 0x0080,
+ SVSTEER = 0x0100,
+ SADATA = 0x0200,
+ RTI = 0x0400,
+ CELLDB_INFO = 0x8000,
+ ALL = 0xFFFF,
}
@VintfStability
parcelable PositionModeOptions {
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssBatching.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssBatching.aidl
index d82aa1f..a021f55 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssBatching.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssBatching.aidl
@@ -41,7 +41,7 @@
void flush();
void stop();
void cleanup();
- const int WAKEUP_ON_FIFO_FULL = 1;
+ const int WAKEUP_ON_FIFO_FULL = 0x01;
@VintfStability
parcelable Options {
long periodNanos;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl
index 0247182..61710d3 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssCallback.aidl
@@ -46,22 +46,22 @@
void gnssRequestTimeCb();
void gnssRequestLocationCb(in boolean independentFromGnss, in boolean isUserEmergency);
void gnssSetSignalTypeCapabilitiesCb(in android.hardware.gnss.GnssSignalType[] gnssSignalTypes);
- const int CAPABILITY_SCHEDULING = 1;
- const int CAPABILITY_MSB = 2;
- const int CAPABILITY_MSA = 4;
- const int CAPABILITY_SINGLE_SHOT = 8;
- const int CAPABILITY_ON_DEMAND_TIME = 16;
- const int CAPABILITY_GEOFENCING = 32;
- const int CAPABILITY_MEASUREMENTS = 64;
- const int CAPABILITY_NAV_MESSAGES = 128;
- const int CAPABILITY_LOW_POWER_MODE = 256;
- const int CAPABILITY_SATELLITE_BLOCKLIST = 512;
- const int CAPABILITY_MEASUREMENT_CORRECTIONS = 1024;
- const int CAPABILITY_ANTENNA_INFO = 2048;
- const int CAPABILITY_CORRELATION_VECTOR = 4096;
- const int CAPABILITY_SATELLITE_PVT = 8192;
- const int CAPABILITY_MEASUREMENT_CORRECTIONS_FOR_DRIVING = 16384;
- const int CAPABILITY_ACCUMULATED_DELTA_RANGE = 32768;
+ const int CAPABILITY_SCHEDULING = (1 << 0) /* 1 */;
+ const int CAPABILITY_MSB = (1 << 1) /* 2 */;
+ const int CAPABILITY_MSA = (1 << 2) /* 4 */;
+ const int CAPABILITY_SINGLE_SHOT = (1 << 3) /* 8 */;
+ const int CAPABILITY_ON_DEMAND_TIME = (1 << 4) /* 16 */;
+ const int CAPABILITY_GEOFENCING = (1 << 5) /* 32 */;
+ const int CAPABILITY_MEASUREMENTS = (1 << 6) /* 64 */;
+ const int CAPABILITY_NAV_MESSAGES = (1 << 7) /* 128 */;
+ const int CAPABILITY_LOW_POWER_MODE = (1 << 8) /* 256 */;
+ const int CAPABILITY_SATELLITE_BLOCKLIST = (1 << 9) /* 512 */;
+ const int CAPABILITY_MEASUREMENT_CORRECTIONS = (1 << 10) /* 1024 */;
+ const int CAPABILITY_ANTENNA_INFO = (1 << 11) /* 2048 */;
+ const int CAPABILITY_CORRELATION_VECTOR = (1 << 12) /* 4096 */;
+ const int CAPABILITY_SATELLITE_PVT = (1 << 13) /* 8192 */;
+ const int CAPABILITY_MEASUREMENT_CORRECTIONS_FOR_DRIVING = (1 << 14) /* 16384 */;
+ const int CAPABILITY_ACCUMULATED_DELTA_RANGE = (1 << 15) /* 32768 */;
@Backing(type="int") @VintfStability
enum GnssStatusValue {
NONE = 0,
@@ -73,10 +73,10 @@
@Backing(type="int") @VintfStability
enum GnssSvFlags {
NONE = 0,
- HAS_EPHEMERIS_DATA = 1,
- HAS_ALMANAC_DATA = 2,
- USED_IN_FIX = 4,
- HAS_CARRIER_FREQUENCY = 8,
+ HAS_EPHEMERIS_DATA = (1 << 0) /* 1 */,
+ HAS_ALMANAC_DATA = (1 << 1) /* 2 */,
+ USED_IN_FIX = (1 << 2) /* 4 */,
+ HAS_CARRIER_FREQUENCY = (1 << 3) /* 8 */,
}
@VintfStability
parcelable GnssSvInfo {
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl
index 1d6399e..70df11a 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssConfiguration.aidl
@@ -42,11 +42,11 @@
void setEmergencySuplPdn(in boolean enable);
void setEsExtensionSec(in int emergencyExtensionSeconds);
void setBlocklist(in android.hardware.gnss.BlocklistedSource[] blocklist);
- const int SUPL_MODE_MSB = 1;
- const int SUPL_MODE_MSA = 2;
- const int LPP_PROFILE_USER_PLANE = 1;
- const int LPP_PROFILE_CONTROL_PLANE = 2;
- const int GLONASS_POS_PROTOCOL_RRC_CPLANE = 1;
- const int GLONASS_POS_PROTOCOL_RRLP_UPLANE = 2;
- const int GLONASS_POS_PROTOCOL_LPP_UPLANE = 4;
+ const int SUPL_MODE_MSB = 0x01;
+ const int SUPL_MODE_MSA = 0x02;
+ const int LPP_PROFILE_USER_PLANE = 0x01;
+ const int LPP_PROFILE_CONTROL_PLANE = 0x02;
+ const int GLONASS_POS_PROTOCOL_RRC_CPLANE = 0x01;
+ const int GLONASS_POS_PROTOCOL_RRLP_UPLANE = 0x02;
+ const int GLONASS_POS_PROTOCOL_LPP_UPLANE = 0x04;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssGeofenceCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssGeofenceCallback.aidl
index df5dc2d..90f9ebc 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssGeofenceCallback.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssGeofenceCallback.aidl
@@ -41,15 +41,15 @@
void gnssGeofenceRemoveCb(in int geofenceId, in int status);
void gnssGeofencePauseCb(in int geofenceId, in int status);
void gnssGeofenceResumeCb(in int geofenceId, in int status);
- const int ENTERED = 1;
- const int EXITED = 2;
- const int UNCERTAIN = 4;
- const int UNAVAILABLE = 1;
- const int AVAILABLE = 2;
+ const int ENTERED = (1 << 0) /* 1 */;
+ const int EXITED = (1 << 1) /* 2 */;
+ const int UNCERTAIN = (1 << 2) /* 4 */;
+ const int UNAVAILABLE = (1 << 0) /* 1 */;
+ const int AVAILABLE = (1 << 1) /* 2 */;
const int OPERATION_SUCCESS = 0;
- const int ERROR_TOO_MANY_GEOFENCES = -100;
- const int ERROR_ID_EXISTS = -101;
- const int ERROR_ID_UNKNOWN = -102;
- const int ERROR_INVALID_TRANSITION = -103;
- const int ERROR_GENERIC = -149;
+ const int ERROR_TOO_MANY_GEOFENCES = (-100) /* -100 */;
+ const int ERROR_ID_EXISTS = (-101) /* -101 */;
+ const int ERROR_ID_UNKNOWN = (-102) /* -102 */;
+ const int ERROR_INVALID_TRANSITION = (-103) /* -103 */;
+ const int ERROR_GENERIC = (-149) /* -149 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssNavigationMessageCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssNavigationMessageCallback.aidl
index c65cff2..57d0e68 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssNavigationMessageCallback.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssNavigationMessageCallback.aidl
@@ -44,26 +44,26 @@
int messageId;
int submessageId;
byte[] data;
- const int STATUS_PARITY_PASSED = 1;
- const int STATUS_PARITY_REBUILT = 2;
+ const int STATUS_PARITY_PASSED = (1 << 0) /* 1 */;
+ const int STATUS_PARITY_REBUILT = (1 << 1) /* 2 */;
const int STATUS_UNKNOWN = 0;
@Backing(type="int") @VintfStability
enum GnssNavigationMessageType {
UNKNOWN = 0,
- GPS_L1CA = 257,
- GPS_L2CNAV = 258,
- GPS_L5CNAV = 259,
- SBS = 513,
- GPS_CNAV2 = 260,
- GLO_L1CA = 769,
- QZS_L1CA = 1025,
- BDS_D1 = 1281,
- BDS_D2 = 1282,
- BDS_CNAV1 = 1283,
- BDS_CNAV2 = 1284,
- GAL_I = 1537,
- GAL_F = 1538,
- IRN_L5CA = 1793,
+ GPS_L1CA = 0x0101,
+ GPS_L2CNAV = 0x0102,
+ GPS_L5CNAV = 0x0103,
+ SBS = 0x0201,
+ GPS_CNAV2 = 0x0104,
+ GLO_L1CA = 0x0301,
+ QZS_L1CA = 0x0401,
+ BDS_D1 = 0x0501,
+ BDS_D2 = 0x0502,
+ BDS_CNAV1 = 0x0503,
+ BDS_CNAV2 = 0x0504,
+ GAL_I = 0x0601,
+ GAL_F = 0x0602,
+ IRN_L5CA = 0x0701,
}
}
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPowerIndicationCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPowerIndicationCallback.aidl
index d35c77f..07b10ad 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPowerIndicationCallback.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnssPowerIndicationCallback.aidl
@@ -37,10 +37,10 @@
interface IGnssPowerIndicationCallback {
void setCapabilitiesCb(in int capabilities);
oneway void gnssPowerStatsCb(in android.hardware.gnss.GnssPowerStats gnssPowerStats);
- const int CAPABILITY_TOTAL = 1;
- const int CAPABILITY_SINGLEBAND_TRACKING = 2;
- const int CAPABILITY_MULTIBAND_TRACKING = 4;
- const int CAPABILITY_SINGLEBAND_ACQUISITION = 8;
- const int CAPABILITY_MULTIBAND_ACQUISITION = 16;
- const int CAPABILITY_OTHER_MODES = 32;
+ const int CAPABILITY_TOTAL = (1 << 0) /* 1 */;
+ const int CAPABILITY_SINGLEBAND_TRACKING = (1 << 1) /* 2 */;
+ const int CAPABILITY_MULTIBAND_TRACKING = (1 << 2) /* 4 */;
+ const int CAPABILITY_SINGLEBAND_ACQUISITION = (1 << 3) /* 8 */;
+ const int CAPABILITY_MULTIBAND_ACQUISITION = (1 << 4) /* 16 */;
+ const int CAPABILITY_OTHER_MODES = (1 << 5) /* 32 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
index 5fd411f..ae65f39 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/SatellitePvt.aidl
@@ -46,9 +46,9 @@
long timeOfEphemerisSeconds;
int issueOfDataEphemeris;
android.hardware.gnss.SatellitePvt.SatelliteEphemerisSource ephemerisSource = android.hardware.gnss.SatellitePvt.SatelliteEphemerisSource.OTHER;
- const int HAS_POSITION_VELOCITY_CLOCK_INFO = 1;
- const int HAS_IONO = 2;
- const int HAS_TROPO = 4;
+ const int HAS_POSITION_VELOCITY_CLOCK_INFO = (1 << 0) /* 1 */;
+ const int HAS_IONO = (1 << 1) /* 2 */;
+ const int HAS_TROPO = (1 << 2) /* 4 */;
@Backing(type="int") @VintfStability
enum SatelliteEphemerisSource {
DEMODULATED = 0,
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/IMeasurementCorrectionsCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/IMeasurementCorrectionsCallback.aidl
index 4126702..61909d0 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/IMeasurementCorrectionsCallback.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/IMeasurementCorrectionsCallback.aidl
@@ -36,7 +36,7 @@
@VintfStability
interface IMeasurementCorrectionsCallback {
void setCapabilitiesCb(in int capabilities);
- const int CAPABILITY_LOS_SATS = 1;
- const int CAPABILITY_EXCESS_PATH_LENGTH = 2;
- const int CAPABILITY_REFLECTING_PLANE = 4;
+ const int CAPABILITY_LOS_SATS = (1 << 0) /* 1 */;
+ const int CAPABILITY_EXCESS_PATH_LENGTH = (1 << 1) /* 2 */;
+ const int CAPABILITY_REFLECTING_PLANE = (1 << 2) /* 4 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/SingleSatCorrection.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/SingleSatCorrection.aidl
index ebbe684..72d32e4 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/SingleSatCorrection.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/measurement_corrections/SingleSatCorrection.aidl
@@ -44,10 +44,10 @@
float combinedExcessPathLengthUncertaintyMeters;
float combinedAttenuationDb;
android.hardware.gnss.measurement_corrections.SingleSatCorrection.ExcessPathInfo[] excessPathInfos;
- const int SINGLE_SAT_CORRECTION_HAS_SAT_IS_LOS_PROBABILITY = 1;
- const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH = 2;
- const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH_UNC = 4;
- const int SINGLE_SAT_CORRECTION_HAS_COMBINED_ATTENUATION = 16;
+ const int SINGLE_SAT_CORRECTION_HAS_SAT_IS_LOS_PROBABILITY = 0x0001;
+ const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH = 0x0002;
+ const int SINGLE_SAT_CORRECTION_HAS_COMBINED_EXCESS_PATH_LENGTH_UNC = 0x0004;
+ const int SINGLE_SAT_CORRECTION_HAS_COMBINED_ATTENUATION = 0x0010;
@VintfStability
parcelable ExcessPathInfo {
int excessPathInfoFlags;
@@ -55,9 +55,9 @@
float excessPathLengthUncertaintyMeters;
android.hardware.gnss.measurement_corrections.ReflectingPlane reflectingPlane;
float attenuationDb;
- const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH = 1;
- const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH_UNC = 2;
- const int EXCESS_PATH_INFO_HAS_REFLECTING_PLANE = 4;
- const int EXCESS_PATH_INFO_HAS_ATTENUATION = 8;
+ const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH = 0x0001;
+ const int EXCESS_PATH_INFO_HAS_EXCESS_PATH_LENGTH_UNC = 0x0002;
+ const int EXCESS_PATH_INFO_HAS_REFLECTING_PLANE = 0x0004;
+ const int EXCESS_PATH_INFO_HAS_ATTENUATION = 0x0008;
}
}
diff --git a/gnss/aidl/android/hardware/gnss/GnssSignalType.aidl b/gnss/aidl/android/hardware/gnss/GnssSignalType.aidl
index 241971f..c66d9e8 100644
--- a/gnss/aidl/android/hardware/gnss/GnssSignalType.aidl
+++ b/gnss/aidl/android/hardware/gnss/GnssSignalType.aidl
@@ -46,27 +46,36 @@
double carrierFrequencyHz;
/**
- * GNSS signal code type "A" representing GALILEO E1A, GALILEO E6A, IRNSS L5A, IRNSS SA.
+ * GNSS signal code type "A" representing GALILEO E1A, GALILEO E6A, IRNSS L5A SPS, IRNSS SA SPS,
+ * GLONASS G1a L1OCd, GLONASS G2a L2CSI.
*/
const @utf8InCpp String CODE_TYPE_A = "A";
/**
- * GNSS signal code type "B" representing GALILEO E1B, GALILEO E6B, IRNSS L5B, IRNSS SB.
+ * GNSS signal code type "B" representing GALILEO E1B, GALILEO E6B, IRNSS L5B RS (D),
+ * IRNSS SB RS (D), GLONASS G1a L1OCp, GLONASS G2a L2OCp, QZSS L1Sb.
*/
const @utf8InCpp String CODE_TYPE_B = "B";
/**
* GNSS signal code type "C" representing GPS L1 C/A, GPS L2 C/A, GLONASS G1 C/A,
- * GLONASS G2 C/A, GALILEO E1C, GALILEO E6C, SBAS L1 C/A, QZSS L1 C/A, IRNSS L5C.
+ * GLONASS G2 C/A, GALILEO E1C, GALILEO E6C, SBAS L1 C/A, QZSS L1 C/A, IRNSS L5C RS (P),
+ * IRNSS SC RS (P).
*/
const @utf8InCpp String CODE_TYPE_C = "C";
/**
- * GNSS signal code type "D" representing BDS B1C D.
+ * GNSS signal code type "D" representing GPS L2 (L1(C/A) + (P2-P1) (semi-codeless)),
+ * QZSS L5S(I), BDS B1C Data, BDS B2a Data, BDS B2b Data, BDS B2 (B2a+B2b) Data, BDS B3a Data.
*/
const @utf8InCpp String CODE_TYPE_D = "D";
/**
+ * GNSS signal code type "E" representing QZSS L1 C/B, QZSS L6E.
+ */
+ const @utf8InCpp String CODE_TYPE_E = "E";
+
+ /**
* GNSS signal code type "I" representing GPS L5 I, GLONASS G3 I, GALILEO E5a I, GALILEO E5b I,
* GALILEO E5a+b I, SBAS L5 I, QZSS L5 I, BDS B1 I, BDS B2 I, BDS B3 I.
*/
@@ -74,7 +83,7 @@
/**
* GNSS signal code type "L" representing GPS L1C (P), GPS L2C (L), QZSS L1C (P), QZSS L2C (L),
- * LEX(6) L.
+ * QZSS L6P, BDS B1a Pilot.
*/
const @utf8InCpp String CODE_TYPE_L = "L";
@@ -89,7 +98,9 @@
const @utf8InCpp String CODE_TYPE_N = "N";
/**
- * GNSS signal code type "P" representing GPS L1P, GPS L2P, GLONASS G1P, GLONASS G2P, BDS B1C P.
+ * GNSS signal code type "P" representing GPS L1P, GPS L2P, GLONASS G1P, GLONASS G2P,
+ * BDS B1C Pilot, BDS B2a Pilot, BDS B2b Pilot, BDS B2 (B2a+B2b) Pilot, BDS B3a Pilot,
+ * QZSS L5S(Q).
*/
const @utf8InCpp String CODE_TYPE_P = "P";
@@ -101,7 +112,7 @@
/**
* GNSS signal code type "S" represents GPS L1C (D), GPS L2C (M), QZSS L1C (D), QZSS L2C (M),
- * LEX(6) S.
+ * QZSS L6D, BDS B1a Data.
*/
const @utf8InCpp String CODE_TYPE_S = "S";
@@ -112,9 +123,11 @@
/**
* GNSS signal code type "X" representing GPS L1C (D+P), GPS L2C (M+L), GPS L5 (I+Q),
- * GLONASS G3 (I+Q), GALILEO E1 (B+C), GALILEO E5a (I+Q), GALILEO E5b (I+Q), GALILEO E5a+b(I+Q),
- * GALILEO E6 (B+C), SBAS L5 (I+Q), QZSS L1C (D+P), QZSS L2C (M+L), QZSS L5 (I+Q),
- * LEX(6) (S+L), BDS B1 (I+Q), BDS B1C (D+P), BDS B2 (I+Q), BDS B3 (I+Q), IRNSS L5 (B+C).
+ * GLONASS G1a L1OCd+L1OCp, GLONASS G2a L2CSI+L2OCp, GLONASS G3 (I+Q), GALILEO E1 (B+C),
+ * GALILEO E5a (I+Q), GALILEO E5b (I+Q), GALILEO E5a+b (I+Q), GALILEO E6 (B+C), SBAS L5 (I+Q),
+ * QZSS L1C (D+P), QZSS L2C (M+L), QZSS L5 (I+Q), QZSS L6 (D+P), BDS B1 (I+Q),
+ * BDS B1C Data+Pilot, BDS B2a Data+Pilot, BDS B2 (I+Q), BDS B2 (B2a+B2b) Data+Pilot,
+ * BDS B3 (I+Q), IRNSS L5 (B+C), IRNSS S (B+C).
*/
const @utf8InCpp String CODE_TYPE_X = "X";
@@ -124,7 +137,9 @@
const @utf8InCpp String CODE_TYPE_Y = "Y";
/**
- * GNSS signal code type "Z" representing GALILEO E1 (A+B+C), GALILEO E6 (A+B+C), QZSS L1-SAIF.
+ * GNSS signal code type "Z" representing GALILEO E1 (A+B+C), GALILEO E6 (A+B+C),
+ * QZSS L1S/L1-SAIF, QZSS L5S (I+Q), QZSS L6 (D+E), BDS B1A Data+Pilot, BDS B2b Data+Pilot,
+ * BDS B3a Data+Pilot.
*/
const @utf8InCpp String CODE_TYPE_Z = "Z";
@@ -142,10 +157,11 @@
* The value is one of the constant Strings with prefix CODE_TYPE_ defined in this parcelable.
*
* This is used to specify the observation descriptor defined in GNSS Observation Data File
- * Header Section Description in the RINEX standard (Version 3.XX). In RINEX Version 3.03,
- * in Appendix Table A2 Attributes are listed as uppercase letters (for instance, "A" for
- * "A channel"). In the future, if for instance a code "G" was added in the official RINEX
- * standard, "G" could be specified here.
+ * Header Section Description in the RINEX standard (Version 4.00) e.g., in Tables 9-16 (see
+ * https://igs.org/wg/rinex/#documents-formats). In cases where the code type does not align
+ * with the above listed values, the code type from the most recent version of RINEX should be
+ * used. In the future, if for instance a code "G" was added in the official RINEX standard,
+ * "G" could be specified here.
*/
@utf8InCpp String codeType;
}
diff --git a/gnss/aidl/default/Android.bp b/gnss/aidl/default/Android.bp
index ca5a41f..542796f 100644
--- a/gnss/aidl/default/Android.bp
+++ b/gnss/aidl/default/Android.bp
@@ -50,7 +50,7 @@
"android.hardware.gnss.measurement_corrections@1.1",
"android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss.visibility_control@1.0",
- "android.hardware.gnss-V3-ndk",
+ "android.hardware.gnss-V4-ndk",
],
srcs: [
"AGnssRil.cpp",
diff --git a/gnss/aidl/default/gnss-default.xml b/gnss/aidl/default/gnss-default.xml
index 73b841e..c01069e 100644
--- a/gnss/aidl/default/gnss-default.xml
+++ b/gnss/aidl/default/gnss-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.gnss</name>
- <version>3</version>
+ <version>4</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
diff --git a/gnss/aidl/vts/Android.bp b/gnss/aidl/vts/Android.bp
index 2a09a56..fd1d853 100644
--- a/gnss/aidl/vts/Android.bp
+++ b/gnss/aidl/vts/Android.bp
@@ -51,7 +51,7 @@
"libbinder",
],
static_libs: [
- "android.hardware.gnss-V3-cpp",
+ "android.hardware.gnss-V4-cpp",
"android.hardware.gnss@common-vts-lib",
],
test_suites: [
diff --git a/gnss/common/utils/default/Android.bp b/gnss/common/utils/default/Android.bp
index 4cf17a6..208bc59 100644
--- a/gnss/common/utils/default/Android.bp
+++ b/gnss/common/utils/default/Android.bp
@@ -57,6 +57,6 @@
"android.hardware.gnss@2.1",
"android.hardware.gnss.measurement_corrections@1.1",
"android.hardware.gnss.measurement_corrections@1.0",
- "android.hardware.gnss-V3-ndk",
+ "android.hardware.gnss-V4-ndk",
],
}
diff --git a/gnss/common/utils/vts/Android.bp b/gnss/common/utils/vts/Android.bp
index b5325b2..ed5674c 100644
--- a/gnss/common/utils/vts/Android.bp
+++ b/gnss/common/utils/vts/Android.bp
@@ -44,7 +44,7 @@
"android.hardware.gnss@2.1",
"android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss.measurement_corrections@1.1",
- "android.hardware.gnss-V3-cpp",
+ "android.hardware.gnss-V4-cpp",
],
static_libs: [
"libgtest",
diff --git a/graphics/Android.bp b/graphics/Android.bp
index 2fbcb41..cae5292 100644
--- a/graphics/Android.bp
+++ b/graphics/Android.bp
@@ -39,27 +39,27 @@
cc_defaults {
name: "android.hardware.graphics.common-ndk_static",
static_libs: [
- "android.hardware.graphics.common-V4-ndk",
+ "android.hardware.graphics.common-V5-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.common-ndk_shared",
shared_libs: [
- "android.hardware.graphics.common-V4-ndk",
+ "android.hardware.graphics.common-V5-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_static",
static_libs: [
- "android.hardware.graphics.composer3-V2-ndk",
+ "android.hardware.graphics.composer3-V3-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_shared",
shared_libs: [
- "android.hardware.graphics.composer3-V2-ndk",
+ "android.hardware.graphics.composer3-V3-ndk",
],
}
diff --git a/graphics/allocator/aidl/Android.bp b/graphics/allocator/aidl/Android.bp
index a3a2c55..03628b0 100644
--- a/graphics/allocator/aidl/Android.bp
+++ b/graphics/allocator/aidl/Android.bp
@@ -18,7 +18,7 @@
srcs: ["android/hardware/graphics/allocator/*.aidl"],
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
stability: "vintf",
backend: {
@@ -49,7 +49,7 @@
version: "2",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
diff --git a/graphics/common/aidl/Android.bp b/graphics/common/aidl/Android.bp
index 02334e8..f177a41 100644
--- a/graphics/common/aidl/Android.bp
+++ b/graphics/common/aidl/Android.bp
@@ -15,7 +15,7 @@
enabled: true,
support_system_process: true,
},
- vndk_use_version: "4",
+ vndk_use_version: "5",
srcs: [
"android/hardware/graphics/common/*.aidl",
],
@@ -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/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
index d3ab44f..d42a6d5 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
@@ -35,31 +35,31 @@
/* @hide */
@Backing(type="long") @VintfStability
enum BufferUsage {
- CPU_READ_MASK = 15,
+ CPU_READ_MASK = 0xf,
CPU_READ_NEVER = 0,
CPU_READ_RARELY = 2,
CPU_READ_OFTEN = 3,
- CPU_WRITE_MASK = 240,
- CPU_WRITE_NEVER = 0,
- CPU_WRITE_RARELY = 32,
- CPU_WRITE_OFTEN = 48,
- GPU_TEXTURE = 256,
- GPU_RENDER_TARGET = 512,
- COMPOSER_OVERLAY = 2048,
- COMPOSER_CLIENT_TARGET = 4096,
- PROTECTED = 16384,
- COMPOSER_CURSOR = 32768,
- VIDEO_ENCODER = 65536,
- CAMERA_OUTPUT = 131072,
- CAMERA_INPUT = 262144,
- RENDERSCRIPT = 1048576,
- VIDEO_DECODER = 4194304,
- SENSOR_DIRECT_DATA = 8388608,
- GPU_DATA_BUFFER = 16777216,
- GPU_CUBE_MAP = 33554432,
- GPU_MIPMAP_COMPLETE = 67108864,
- HW_IMAGE_ENCODER = 134217728,
- FRONT_BUFFER = 4294967296,
- VENDOR_MASK = -268435456,
- VENDOR_MASK_HI = -281474976710656,
+ CPU_WRITE_MASK = (0xf << 4) /* 240 */,
+ CPU_WRITE_NEVER = (0 << 4) /* 0 */,
+ CPU_WRITE_RARELY = (2 << 4) /* 32 */,
+ CPU_WRITE_OFTEN = (3 << 4) /* 48 */,
+ GPU_TEXTURE = (1 << 8) /* 256 */,
+ GPU_RENDER_TARGET = (1 << 9) /* 512 */,
+ COMPOSER_OVERLAY = (1 << 11) /* 2048 */,
+ COMPOSER_CLIENT_TARGET = (1 << 12) /* 4096 */,
+ PROTECTED = (1 << 14) /* 16384 */,
+ COMPOSER_CURSOR = (1 << 15) /* 32768 */,
+ VIDEO_ENCODER = (1 << 16) /* 65536 */,
+ CAMERA_OUTPUT = (1 << 17) /* 131072 */,
+ CAMERA_INPUT = (1 << 18) /* 262144 */,
+ RENDERSCRIPT = (1 << 20) /* 1048576 */,
+ VIDEO_DECODER = (1 << 22) /* 4194304 */,
+ SENSOR_DIRECT_DATA = (1 << 23) /* 8388608 */,
+ GPU_DATA_BUFFER = (1 << 24) /* 16777216 */,
+ GPU_CUBE_MAP = (1 << 25) /* 33554432 */,
+ GPU_MIPMAP_COMPLETE = (1 << 26) /* 67108864 */,
+ HW_IMAGE_ENCODER = (1 << 27) /* 134217728 */,
+ FRONT_BUFFER = (1L << 32) /* 4294967296 */,
+ VENDOR_MASK = (0xf << 28) /* -268435456 */,
+ VENDOR_MASK_HI = ((1L * 0xffff) << 48) /* -281474976710656 */,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
index b8af644..784fc17 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
@@ -39,4 +39,6 @@
UNKNOWN = 1,
SITED_INTERSTITIAL = 2,
COSITED_HORIZONTAL = 3,
+ COSITED_VERTICAL = 4,
+ COSITED_BOTH = 5,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
index 563b6c1..6ed5bb2 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
@@ -35,65 +35,67 @@
/* @hide */
@Backing(type="int") @VintfStability
enum Dataspace {
- UNKNOWN = 0,
- ARBITRARY = 1,
+ UNKNOWN = 0x0,
+ ARBITRARY = 0x1,
STANDARD_SHIFT = 16,
- STANDARD_MASK = 4128768,
- STANDARD_UNSPECIFIED = 0,
- STANDARD_BT709 = 65536,
- STANDARD_BT601_625 = 131072,
- STANDARD_BT601_625_UNADJUSTED = 196608,
- STANDARD_BT601_525 = 262144,
- STANDARD_BT601_525_UNADJUSTED = 327680,
- STANDARD_BT2020 = 393216,
- STANDARD_BT2020_CONSTANT_LUMINANCE = 458752,
- STANDARD_BT470M = 524288,
- STANDARD_FILM = 589824,
- STANDARD_DCI_P3 = 655360,
- STANDARD_ADOBE_RGB = 720896,
+ STANDARD_MASK = (63 << 16) /* 4128768 */,
+ STANDARD_UNSPECIFIED = (0 << 16) /* 0 */,
+ STANDARD_BT709 = (1 << 16) /* 65536 */,
+ STANDARD_BT601_625 = (2 << 16) /* 131072 */,
+ STANDARD_BT601_625_UNADJUSTED = (3 << 16) /* 196608 */,
+ STANDARD_BT601_525 = (4 << 16) /* 262144 */,
+ STANDARD_BT601_525_UNADJUSTED = (5 << 16) /* 327680 */,
+ STANDARD_BT2020 = (6 << 16) /* 393216 */,
+ STANDARD_BT2020_CONSTANT_LUMINANCE = (7 << 16) /* 458752 */,
+ STANDARD_BT470M = (8 << 16) /* 524288 */,
+ STANDARD_FILM = (9 << 16) /* 589824 */,
+ STANDARD_DCI_P3 = (10 << 16) /* 655360 */,
+ STANDARD_ADOBE_RGB = (11 << 16) /* 720896 */,
TRANSFER_SHIFT = 22,
- TRANSFER_MASK = 130023424,
- TRANSFER_UNSPECIFIED = 0,
- TRANSFER_LINEAR = 4194304,
- TRANSFER_SRGB = 8388608,
- TRANSFER_SMPTE_170M = 12582912,
- TRANSFER_GAMMA2_2 = 16777216,
- TRANSFER_GAMMA2_6 = 20971520,
- TRANSFER_GAMMA2_8 = 25165824,
- TRANSFER_ST2084 = 29360128,
- TRANSFER_HLG = 33554432,
+ TRANSFER_MASK = (31 << 22) /* 130023424 */,
+ TRANSFER_UNSPECIFIED = (0 << 22) /* 0 */,
+ TRANSFER_LINEAR = (1 << 22) /* 4194304 */,
+ TRANSFER_SRGB = (2 << 22) /* 8388608 */,
+ TRANSFER_SMPTE_170M = (3 << 22) /* 12582912 */,
+ TRANSFER_GAMMA2_2 = (4 << 22) /* 16777216 */,
+ TRANSFER_GAMMA2_6 = (5 << 22) /* 20971520 */,
+ TRANSFER_GAMMA2_8 = (6 << 22) /* 25165824 */,
+ TRANSFER_ST2084 = (7 << 22) /* 29360128 */,
+ TRANSFER_HLG = (8 << 22) /* 33554432 */,
RANGE_SHIFT = 27,
- RANGE_MASK = 939524096,
- RANGE_UNSPECIFIED = 0,
- RANGE_FULL = 134217728,
- RANGE_LIMITED = 268435456,
- RANGE_EXTENDED = 402653184,
- SRGB_LINEAR = 138477568,
- SCRGB_LINEAR = 406913024,
- SRGB = 142671872,
- SCRGB = 411107328,
- JFIF = 146931712,
- BT601_625 = 281149440,
- BT601_525 = 281280512,
- BT709 = 281083904,
- DCI_P3_LINEAR = 139067392,
- DCI_P3 = 155844608,
- DISPLAY_P3_LINEAR = 139067392,
- DISPLAY_P3 = 143261696,
- ADOBE_RGB = 151715840,
- BT2020_LINEAR = 138805248,
- BT2020 = 147193856,
- BT2020_PQ = 163971072,
- DEPTH = 4096,
- SENSOR = 4097,
- BT2020_ITU = 281411584,
- BT2020_ITU_PQ = 298188800,
- BT2020_ITU_HLG = 302383104,
- BT2020_HLG = 168165376,
- DISPLAY_BT2020 = 142999552,
- DYNAMIC_DEPTH = 4098,
- JPEG_APP_SEGMENTS = 4099,
- HEIF = 4100,
- JPEG_R = 4101,
- BT709_FULL_RANGE = 146866176,
+ RANGE_MASK = (7 << 27) /* 939524096 */,
+ RANGE_UNSPECIFIED = (0 << 27) /* 0 */,
+ RANGE_FULL = (1 << 27) /* 134217728 */,
+ RANGE_LIMITED = (2 << 27) /* 268435456 */,
+ RANGE_EXTENDED = (3 << 27) /* 402653184 */,
+ SRGB_LINEAR = (((1 << 16) | (1 << 22)) | (1 << 27)) /* 138477568 */,
+ SCRGB_LINEAR = (((1 << 16) | (1 << 22)) | (3 << 27)) /* 406913024 */,
+ SRGB = (((1 << 16) | (2 << 22)) | (1 << 27)) /* 142671872 */,
+ SCRGB = (((1 << 16) | (2 << 22)) | (3 << 27)) /* 411107328 */,
+ JFIF = (((2 << 16) | (3 << 22)) | (1 << 27)) /* 146931712 */,
+ BT601_625 = (((2 << 16) | (3 << 22)) | (2 << 27)) /* 281149440 */,
+ BT601_525 = (((4 << 16) | (3 << 22)) | (2 << 27)) /* 281280512 */,
+ BT709 = (((1 << 16) | (3 << 22)) | (2 << 27)) /* 281083904 */,
+ DCI_P3_LINEAR = (((10 << 16) | (1 << 22)) | (1 << 27)) /* 139067392 */,
+ DCI_P3 = (((10 << 16) | (5 << 22)) | (1 << 27)) /* 155844608 */,
+ DISPLAY_P3_LINEAR = (((10 << 16) | (1 << 22)) | (1 << 27)) /* 139067392 */,
+ DISPLAY_P3 = (((10 << 16) | (2 << 22)) | (1 << 27)) /* 143261696 */,
+ ADOBE_RGB = (((11 << 16) | (4 << 22)) | (1 << 27)) /* 151715840 */,
+ ADOBE_RGB_LINEAR = (((11 << 16) | (1 << 22)) | (1 << 27)) /* 139132928 */,
+ BT2020_LINEAR = (((6 << 16) | (1 << 22)) | (1 << 27)) /* 138805248 */,
+ BT2020 = (((6 << 16) | (3 << 22)) | (1 << 27)) /* 147193856 */,
+ BT2020_PQ = (((6 << 16) | (7 << 22)) | (1 << 27)) /* 163971072 */,
+ BT2020_LINEAR_EXTENDED = (((6 << 16) | (1 << 22)) | (3 << 27)) /* 407240704 */,
+ DEPTH = 0x1000,
+ SENSOR = 0x1001,
+ BT2020_ITU = (((6 << 16) | (3 << 22)) | (2 << 27)) /* 281411584 */,
+ BT2020_ITU_PQ = (((6 << 16) | (7 << 22)) | (2 << 27)) /* 298188800 */,
+ BT2020_ITU_HLG = (((6 << 16) | (8 << 22)) | (2 << 27)) /* 302383104 */,
+ BT2020_HLG = (((6 << 16) | (8 << 22)) | (1 << 27)) /* 168165376 */,
+ DISPLAY_BT2020 = (((6 << 16) | (2 << 22)) | (1 << 27)) /* 142999552 */,
+ DYNAMIC_DEPTH = 0x1002,
+ JPEG_APP_SEGMENTS = 0x1003,
+ HEIF = 0x1004,
+ JPEG_R = 0x1005,
+ BT709_FULL_RANGE = (((1 << 16) | (3 << 22)) | (1 << 27)) /* 146866176 */,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
index 1817769..0fe9493 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
@@ -32,7 +32,10 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.graphics.common;
-/* @hide */
+/**
+ * @hide
+ * @deprecated : Use instead android.hardware.HardwareBuffer in frameworks/base
+ */
@VintfStability
parcelable HardwareBuffer {
android.hardware.graphics.common.HardwareBufferDescription description;
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 68857e8..ed84a44 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
@@ -36,36 +36,36 @@
@Backing(type="int") @VintfStability
enum PixelFormat {
UNSPECIFIED = 0,
- RGBA_8888 = 1,
- RGBX_8888 = 2,
- RGB_888 = 3,
- RGB_565 = 4,
- BGRA_8888 = 5,
- YCBCR_422_SP = 16,
- YCRCB_420_SP = 17,
- YCBCR_422_I = 20,
- RGBA_FP16 = 22,
- RAW16 = 32,
- BLOB = 33,
- IMPLEMENTATION_DEFINED = 34,
- YCBCR_420_888 = 35,
- RAW_OPAQUE = 36,
- RAW10 = 37,
- RAW12 = 38,
- RGBA_1010102 = 43,
- Y8 = 538982489,
- Y16 = 540422489,
- YV12 = 842094169,
- DEPTH_16 = 48,
- DEPTH_24 = 49,
- DEPTH_24_STENCIL_8 = 50,
- DEPTH_32F = 51,
- DEPTH_32F_STENCIL_8 = 52,
- STENCIL_8 = 53,
- YCBCR_P010 = 54,
- HSV_888 = 55,
- R_8 = 56,
- R_16_UINT = 57,
- RG_1616_UINT = 58,
- RGBA_10101010 = 59,
+ RGBA_8888 = 0x1,
+ RGBX_8888 = 0x2,
+ RGB_888 = 0x3,
+ RGB_565 = 0x4,
+ BGRA_8888 = 0x5,
+ YCBCR_422_SP = 0x10,
+ YCRCB_420_SP = 0x11,
+ YCBCR_422_I = 0x14,
+ RGBA_FP16 = 0x16,
+ RAW16 = 0x20,
+ BLOB = 0x21,
+ IMPLEMENTATION_DEFINED = 0x22,
+ YCBCR_420_888 = 0x23,
+ RAW_OPAQUE = 0x24,
+ RAW10 = 0x25,
+ RAW12 = 0x26,
+ RGBA_1010102 = 0x2B,
+ Y8 = 0x20203859,
+ Y16 = 0x20363159,
+ YV12 = 0x32315659,
+ DEPTH_16 = 0x30,
+ DEPTH_24 = 0x31,
+ DEPTH_24_STENCIL_8 = 0x32,
+ DEPTH_32F = 0x33,
+ DEPTH_32F_STENCIL_8 = 0x34,
+ STENCIL_8 = 0x35,
+ YCBCR_P010 = 0x36,
+ HSV_888 = 0x37,
+ R_8 = 0x38,
+ R_16_UINT = 0x39,
+ RG_1616_UINT = 0x3a,
+ RGBA_10101010 = 0x3b,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
index 8ba9381..e306751 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
@@ -35,12 +35,12 @@
/* @hide */
@Backing(type="long") @VintfStability
enum PlaneLayoutComponentType {
- Y = 1,
- CB = 2,
- CR = 4,
- R = 1024,
- G = 2048,
- B = 4096,
- RAW = 1048576,
- A = 1073741824,
+ Y = (1 << 0) /* 1 */,
+ CB = (1 << 1) /* 2 */,
+ CR = (1 << 2) /* 4 */,
+ R = (1 << 10) /* 1024 */,
+ G = (1 << 11) /* 2048 */,
+ B = (1 << 12) /* 4096 */,
+ RAW = (1 << 20) /* 1048576 */,
+ A = (1 << 30) /* 1073741824 */,
}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl
index 986d089..dbed57d 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl
@@ -36,9 +36,9 @@
@Backing(type="int") @VintfStability
enum Transform {
NONE = 0,
- FLIP_H = 1,
- FLIP_V = 2,
- ROT_90 = 4,
- ROT_180 = 3,
- ROT_270 = 7,
+ FLIP_H = (1 << 0) /* 1 */,
+ FLIP_V = (1 << 1) /* 2 */,
+ ROT_90 = (1 << 2) /* 4 */,
+ ROT_180 = (FLIP_H | FLIP_V) /* 3 */,
+ ROT_270 = ((FLIP_H | FLIP_V) | ROT_90) /* 7 */,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
index 12bc441..0d1a094 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
@@ -24,35 +24,47 @@
@Backing(type="long")
enum BufferUsage {
/** bit 0-3 is an enum */
- CPU_READ_MASK = 0xf,
+ CPU_READ_MASK = 0xf,
/** buffer is never read by CPU */
- CPU_READ_NEVER = 0,
+ CPU_READ_NEVER = 0,
/** buffer is rarely read by CPU */
- CPU_READ_RARELY = 2,
+ CPU_READ_RARELY = 2,
/** buffer is often read by CPU */
- CPU_READ_OFTEN = 3,
+ CPU_READ_OFTEN = 3,
/** bit 4-7 is an enum */
- CPU_WRITE_MASK = 0xf << 4,
+ CPU_WRITE_MASK = 0xf << 4,
/** buffer is never written by CPU */
- CPU_WRITE_NEVER = 0 << 4,
+ CPU_WRITE_NEVER = 0 << 4,
/** buffer is rarely written by CPU */
- CPU_WRITE_RARELY = 2 << 4,
+ CPU_WRITE_RARELY = 2 << 4,
/** buffer is often written by CPU */
- CPU_WRITE_OFTEN = 3 << 4,
+ CPU_WRITE_OFTEN = 3 << 4,
- /** buffer is used as a GPU texture */
- GPU_TEXTURE = 1 << 8,
+ /**
+ * Buffer may be used as a GPU texture
+ *
+ * Buffers allocated with this flag must be
+ * texturable both in EGL/GL & Vulkan via
+ * their respective external memory extensions
+ */
+ GPU_TEXTURE = 1 << 8,
- /** buffer is used as a GPU render target */
- GPU_RENDER_TARGET = 1 << 9,
+ /**
+ * Buffer may be used as a GPU render target
+ *
+ * Buffers allocated with this flag must be
+ * renderable both in EGL/GL & Vulkan via
+ * their respective external memory extensions
+ */
+ GPU_RENDER_TARGET = 1 << 9,
/** bit 10 must be zero */
/** buffer is used as a composer HAL overlay layer */
- COMPOSER_OVERLAY = 1 << 11,
+ COMPOSER_OVERLAY = 1 << 11,
/** buffer is used as a composer HAL client target */
- COMPOSER_CLIENT_TARGET = 1 << 12,
+ COMPOSER_CLIENT_TARGET = 1 << 12,
/** bit 13 must be zero */
@@ -61,86 +73,86 @@
* contents (or information derived from the contents) into unprotected
* memory.
*/
- PROTECTED = 1 << 14,
+ PROTECTED = 1 << 14,
/** buffer is used as a hwcomposer HAL cursor layer */
- COMPOSER_CURSOR = 1 << 15,
+ COMPOSER_CURSOR = 1 << 15,
/** buffer is used as a video encoder input */
- VIDEO_ENCODER = 1 << 16,
+ VIDEO_ENCODER = 1 << 16,
/** buffer is used as a camera HAL output */
- CAMERA_OUTPUT = 1 << 17,
+ CAMERA_OUTPUT = 1 << 17,
/** buffer is used as a camera HAL input */
- CAMERA_INPUT = 1 << 18,
+ CAMERA_INPUT = 1 << 18,
/** bit 19 must be zero */
/** buffer is used as a renderscript allocation */
- RENDERSCRIPT = 1 << 20,
+ RENDERSCRIPT = 1 << 20,
/** bit 21 must be zero */
/** buffer is used as a video decoder output */
- VIDEO_DECODER = 1 << 22,
+ VIDEO_DECODER = 1 << 22,
/** buffer is used as a sensor direct report output */
- SENSOR_DIRECT_DATA = 1 << 23,
+ SENSOR_DIRECT_DATA = 1 << 23,
/**
* buffer is used as as an OpenGL shader storage or uniform
* buffer object
*/
- GPU_DATA_BUFFER = 1 << 24,
+ GPU_DATA_BUFFER = 1 << 24,
/** buffer is used as a cube map texture */
- GPU_CUBE_MAP = 1 << 25,
+ GPU_CUBE_MAP = 1 << 25,
/** buffer contains a complete mipmap hierarchy */
- GPU_MIPMAP_COMPLETE = 1 << 26,
+ GPU_MIPMAP_COMPLETE = 1 << 26,
/**
* Buffer is used as input for HEIC encoder.
*/
- HW_IMAGE_ENCODER = 1 << 27,
+ HW_IMAGE_ENCODER = 1 << 27,
/* Bits 28-31 are reserved for vendor usage */
/**
- * Buffer is used for front-buffer rendering.
- *
- * To satisfy an allocation with this usage, the resulting buffer
- * must operate as equivalent to shared memory for all targets.
- *
- * For CPU_USAGE_* other than NEVER, this means the buffer must
- * "lock in place". The buffers must be directly accessible via mapping.
- *
- * For GPU_RENDER_TARGET the buffer must behave equivalent to a
- * single-buffered EGL surface. For example glFlush must perform
- * a flush, same as if the default framebuffer was single-buffered.
- *
- * For COMPOSER_* the HWC must not perform any caching for this buffer
- * when submitted for composition. HWCs do not need to do any form
- * of auto-refresh, and they are allowed to cache composition results between
- * presents from SF (such as for panel self-refresh), but for any given
- * present the buffer must be composited from even if it otherwise appears
- * to be the same as a previous composition.
- *
- * If the GPU & HWC supports EGL_SINGLE_BUFFER, then it is recommended that
- * FRONT_BUFFER usage is supported for the same formats as supported by
- * EGL_SINGLE_BUFFER. In particular, it is recommended that the following
- * combination is supported when possible:
- * Format = RGBA_8888
- * Usage = FRONT_BUFFER | GPU_RENDER_TARGET | COMPOSER_OVERLAY
- *
- */
- FRONT_BUFFER = 1L << 32,
+ * Buffer is used for front-buffer rendering.
+ *
+ * To satisfy an allocation with this usage, the resulting buffer
+ * must operate as equivalent to shared memory for all targets.
+ *
+ * For CPU_USAGE_* other than NEVER, this means the buffer must
+ * "lock in place". The buffers must be directly accessible via mapping.
+ *
+ * For GPU_RENDER_TARGET the buffer must behave equivalent to a
+ * single-buffered EGL surface. For example glFlush must perform
+ * a flush, same as if the default framebuffer was single-buffered.
+ *
+ * For COMPOSER_* the HWC must not perform any caching for this buffer
+ * when submitted for composition. HWCs do not need to do any form
+ * of auto-refresh, and they are allowed to cache composition results between
+ * presents from SF (such as for panel self-refresh), but for any given
+ * present the buffer must be composited from even if it otherwise appears
+ * to be the same as a previous composition.
+ *
+ * If the GPU & HWC supports EGL_SINGLE_BUFFER, then it is recommended that
+ * FRONT_BUFFER usage is supported for the same formats as supported by
+ * EGL_SINGLE_BUFFER. In particular, it is recommended that the following
+ * combination is supported when possible:
+ * Format = RGBA_8888
+ * Usage = FRONT_BUFFER | GPU_RENDER_TARGET | COMPOSER_OVERLAY
+ *
+ */
+ FRONT_BUFFER = 1L << 32,
/** bits 28-31 are reserved for vendor extensions */
- VENDOR_MASK = 0xf << 28,
+ VENDOR_MASK = 0xf << 28,
/** bits 33-47 must be zero and are reserved for future versions */
/** bits 48-63 are reserved for vendor extensions */
- VENDOR_MASK_HI = (1L * 0xffff) << 48,
+ VENDOR_MASK_HI = (1L * 0xffff) << 48,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/ChromaSiting.aidl b/graphics/common/aidl/android/hardware/graphics/common/ChromaSiting.aidl
index ac44853..7da45da 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/ChromaSiting.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/ChromaSiting.aidl
@@ -37,4 +37,12 @@
* Cb and Cr are vertically sited interstitially.
* This is used by 4:2:0 for MPEG-2 frame pictures. */
COSITED_HORIZONTAL = 3,
+
+ /* Cb and Cr are horizontally sited interstitially with a luma sample.
+ * Cb and Cr are vertically sited coincident. */
+ COSITED_VERTICAL = 4,
+
+ /* Cb and Cr are both horizontally & vertically sited coincident
+ * with a luma sample. */
+ COSITED_BOTH = 5,
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl b/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
index 3ff0a65..79737eb 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
@@ -23,11 +23,26 @@
/**
* Default-assumption data space, when not explicitly specified.
*
- * It is safest to assume the buffer is an image with sRGB primaries and
- * encoding ranges, but the consumer and/or the producer of the data may
- * simply be using defaults. No automatic gamma transform should be
- * expected, except for a possible display gamma transform when drawn to a
- * screen.
+ * IAllocator implementations must not assume a particular dataspace interpretation when
+ * allocating a buffer. That is, the dataspace stored on a buffer's metadata must
+ * explicitly be UNKNOWN at the time of allocation. All other vendor implementations (for
+ * example, IComposer) are suggested to assume that the buffer is an image that conforms
+ * to the recommendations outlined by STANDARD_UNSPECIFIED, TRANSFER_UNSPECIFIED, and
+ * RANGE_UNSPECIFIED in order to avoid obviously-broken behavior.
+ *
+ * This means:
+ * - RGB buffers may be assumed to follow sRGB (IEC 61966-2.1)
+ * - YCbCr buffers smaller than 720p may be assumed to follow BT. 601-7
+ * - YCbCr buffers at least 720p may be assumed to follow BT. 709-6
+ * - Y buffers are full range with an undefined transfer and primaries
+ * - All other buffer formats may be treated in an implementation-defined manner
+ *
+ * It is the framework's - and application's - responsibility to communicate
+ * an accurate dataspace for any buffers throughout the system to guarantee
+ * well-defined behavior. For the framework, this means translating UNKNOWN
+ * dataspaces to a chosen default, and setting gralloc metadata on the buffer
+ * accordingly. For the application, this means signaling a defined dataspace
+ * to any framework apis.
*/
UNKNOWN = 0x0,
@@ -544,6 +559,13 @@
ADOBE_RGB = 11 << 16 | 4 << 22 | 1 << 27, // STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2 | RANGE_FULL
/**
+ * Adobe RGB LINEAR
+ *
+ * Use full range, linear transfer and Adobe RGB primaries
+ */
+ ADOBE_RGB_LINEAR = 11 << 16 | 1 << 22 | 1 << 27, // STANDARD_ADOBE_RGB | TRANSFER_LINEAR | RANGE_FULL
+
+ /**
* ITU-R Recommendation 2020 (BT.2020)
*
* Ultra High-definition television
@@ -571,6 +593,15 @@
BT2020_PQ = 6 << 16 | 7 << 22 | 1 << 27, // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL
/**
+ * ITU-R Recommendation 2020 (BT.2020)
+ *
+ * Ultra High-definition television
+ *
+ * Use extended range, linear transfer and BT2020 standard
+ */
+ BT2020_LINEAR_EXTENDED = 6 << 16 | 1 << 22 | 3 << 27, // STANDARD_BT2020 | TRANSFER_LINEAR | RANGE_EXTENDED
+
+ /**
* Data spaces for non-color formats
*/
diff --git a/graphics/common/aidl/android/hardware/graphics/common/HardwareBuffer.aidl b/graphics/common/aidl/android/hardware/graphics/common/HardwareBuffer.aidl
index 50306dc..ac95b1c 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/HardwareBuffer.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/HardwareBuffer.aidl
@@ -20,11 +20,13 @@
import android.hardware.graphics.common.HardwareBufferDescription;
/**
- * Stable AIDL counterpart of AHardwareBuffer.
+ * [Deprecated] Stable AIDL counterpart of AHardwareBuffer.
*
- * @note This is different from the public HardwareBuffer.
- * @sa +ndk libnativewindow#AHardwareBuffer
+ * @note This is different from the public HardwareBuffer. As the public
+ HardwareBuffer now supports being used in stable-aidl interfaces,
+ that is strongly preferred for new usages.
* @hide
+ * @deprecated: Use instead android.hardware.HardwareBuffer in frameworks/base
*/
@VintfStability
parcelable HardwareBuffer {
diff --git a/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h b/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h
index 499d3b9..336d15d 100644
--- a/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h
+++ b/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h
@@ -679,6 +679,10 @@
uint32_t read() { return mData[mDataRead++]; }
+ bool isReadSizeValid(uint32_t size) const {
+ return mDataRead * sizeof(uint32_t) + size <= mDataSize;
+ }
+
int32_t readSigned() {
int32_t val;
memcpy(&val, &mData[mDataRead++], sizeof(val));
@@ -760,7 +764,7 @@
std::unique_ptr<uint32_t[]> mData;
uint32_t mDataRead;
- private:
+ private:
std::unique_ptr<CommandQueueType> mQueue;
uint32_t mDataMaxSize;
diff --git a/graphics/composer/2.1/utils/resources/Android.bp b/graphics/composer/2.1/utils/resources/Android.bp
index 9eb23fa..4052003 100644
--- a/graphics/composer/2.1/utils/resources/Android.bp
+++ b/graphics/composer/2.1/utils/resources/Android.bp
@@ -29,20 +29,15 @@
vendor_available: true,
shared_libs: [
"android.hardware.graphics.composer@2.1",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
"libcutils",
"libhardware", // TODO remove hwcomposer2.h dependency
"libhidlbase",
"liblog",
+ "libui",
"libutils",
],
export_shared_lib_headers: [
"android.hardware.graphics.composer@2.1",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
"libhardware",
"libhidlbase",
"liblog",
diff --git a/graphics/composer/2.1/utils/resources/ComposerResources.cpp b/graphics/composer/2.1/utils/resources/ComposerResources.cpp
index e52bf71..80bfb7a 100644
--- a/graphics/composer/2.1/utils/resources/ComposerResources.cpp
+++ b/graphics/composer/2.1/utils/resources/ComposerResources.cpp
@@ -18,6 +18,8 @@
#include "composer-resources/2.1/ComposerResources.h"
+#include <ui/GraphicBufferMapper.h>
+
namespace android {
namespace hardware {
namespace graphics {
@@ -25,23 +27,10 @@
namespace V2_1 {
namespace hal {
+ComposerHandleImporter::ComposerHandleImporter() : mMapper{GraphicBufferMapper::get()} {}
+
bool ComposerHandleImporter::init() {
- mMapper4 = mapper::V4_0::IMapper::getService();
- if (mMapper4) {
- return true;
- }
- ALOGI_IF(!mMapper4, "failed to get mapper 4.0 service, falling back to mapper 3.0");
-
- mMapper3 = mapper::V3_0::IMapper::getService();
- if (mMapper3) {
- return true;
- }
- ALOGI_IF(!mMapper3, "failed to get mapper 3.0 service, falling back to mapper 2.0");
-
- mMapper2 = mapper::V2_0::IMapper::getService();
- ALOGE_IF(!mMapper2, "failed to get mapper 2.0 service");
-
- return mMapper2 != nullptr;
+ return true;
}
Error ComposerHandleImporter::importBuffer(const native_handle_t* rawHandle,
@@ -51,51 +40,17 @@
return Error::NONE;
}
- const native_handle_t* bufferHandle;
- if (mMapper2) {
- mapper::V2_0::Error error;
- mMapper2->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) {
- error = tmpError;
- bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle);
- });
- if (error != mapper::V2_0::Error::NONE) {
- return Error::NO_RESOURCES;
- }
+ status_t status = mMapper.importBufferNoValidate(rawHandle, outBufferHandle);
+ if (status == STATUS_OK) {
+ return Error::NONE;
+ } else {
+ return Error::NO_RESOURCES;
}
- if (mMapper3) {
- mapper::V3_0::Error error;
- mMapper3->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) {
- error = tmpError;
- bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle);
- });
- if (error != mapper::V3_0::Error::NONE) {
- return Error::NO_RESOURCES;
- }
- }
- if (mMapper4) {
- mapper::V4_0::Error error;
- mMapper4->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) {
- error = tmpError;
- bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle);
- });
- if (error != mapper::V4_0::Error::NONE) {
- return Error::NO_RESOURCES;
- }
- }
-
- *outBufferHandle = bufferHandle;
- return Error::NONE;
}
void ComposerHandleImporter::freeBuffer(const native_handle_t* bufferHandle) {
if (bufferHandle) {
- if (mMapper2) {
- mMapper2->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle)));
- } else if (mMapper3) {
- mMapper3->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle)));
- } else if (mMapper4) {
- mMapper4->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle)));
- }
+ mMapper.freeBuffer(bufferHandle);
}
}
diff --git a/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h b/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h
index de78a59..9838118 100644
--- a/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h
+++ b/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h
@@ -27,12 +27,10 @@
#include <android/hardware/graphics/composer/2.1/types.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
-#include <android/hardware/graphics/mapper/3.0/IMapper.h>
-#include <android/hardware/graphics/mapper/4.0/IMapper.h>
#include <log/log.h>
namespace android {
+class GraphicBufferMapper;
namespace hardware {
namespace graphics {
namespace composer {
@@ -42,6 +40,7 @@
// wrapper for IMapper to import buffers and sideband streams
class ComposerHandleImporter {
public:
+ ComposerHandleImporter();
bool init();
Error importBuffer(const native_handle_t* rawHandle, const native_handle_t** outBufferHandle);
@@ -50,9 +49,7 @@
void freeStream(const native_handle_t* streamHandle);
private:
- sp<mapper::V2_0::IMapper> mMapper2;
- sp<mapper::V3_0::IMapper> mMapper3;
- sp<mapper::V4_0::IMapper> mMapper4;
+ GraphicBufferMapper& mMapper;
};
class ComposerHandleCache {
diff --git a/graphics/composer/2.1/utils/vts/Android.bp b/graphics/composer/2.1/utils/vts/Android.bp
index 7b6a0e6..3bc127f 100644
--- a/graphics/composer/2.1/utils/vts/Android.bp
+++ b/graphics/composer/2.1/utils/vts/Android.bp
@@ -26,7 +26,6 @@
cc_library_static {
name: "android.hardware.graphics.composer@2.1-vts",
defaults: [
- "android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
@@ -34,18 +33,15 @@
"GraphicsComposerCallback.cpp",
"TestCommandReader.cpp",
],
+ shared_libs: [
+ "libui",
+ ],
static_libs: [
"android.hardware.graphics.composer@2.1",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libgtest",
],
export_static_lib_headers: [
"android.hardware.graphics.composer@2.1",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
],
header_libs: [
"android.hardware.graphics.composer@2.1-command-buffer",
diff --git a/graphics/composer/2.1/utils/vts/ComposerVts.cpp b/graphics/composer/2.1/utils/vts/ComposerVts.cpp
index 4603dd1..8b89784 100644
--- a/graphics/composer/2.1/utils/vts/ComposerVts.cpp
+++ b/graphics/composer/2.1/utils/vts/ComposerVts.cpp
@@ -308,113 +308,6 @@
writer->reset();
}
-NativeHandleWrapper::~NativeHandleWrapper() {
- if (mHandle) {
- mGralloc.freeBuffer(mHandle);
- }
-}
-
-Gralloc::Gralloc() {
- [this] {
- ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>(
- /*aidlAllocatorServiceName*/ IAllocator::descriptor +
- std::string("/default"),
- /*hidlAllocatorServiceName*/ "default",
- /*mapperServiceName*/ "default",
- /*errOnFailure=*/false));
- if (!mGralloc4->hasAllocator() || mGralloc4->getMapper() == nullptr) {
- mGralloc4 = nullptr;
- ASSERT_NO_FATAL_FAILURE(mGralloc3 = std::make_shared<Gralloc3>("default", "default",
- /*errOnFailure=*/false));
- if (mGralloc3->getAllocator() == nullptr || mGralloc3->getMapper() == nullptr) {
- mGralloc3 = nullptr;
- ASSERT_NO_FATAL_FAILURE(mGralloc2 = std::make_shared<Gralloc2>());
- }
- }
- }();
-}
-
-const NativeHandleWrapper Gralloc::allocate(uint32_t width, uint32_t height, uint32_t layerCount,
- PixelFormat format, uint64_t usage, bool import,
- uint32_t* outStride) {
- const native_handle_t* handle;
- if (mGralloc4) {
- IMapper4::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = static_cast<android::hardware::graphics::common::V1_2::PixelFormat>(format);
- info.usage = usage;
- handle = mGralloc4->allocate(info, import, outStride);
- } else if (mGralloc3) {
- IMapper3::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = static_cast<android::hardware::graphics::common::V1_2::PixelFormat>(format);
- info.usage = usage;
- handle = mGralloc3->allocate(info, import, outStride);
- } else {
- IMapper2::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = format;
- info.usage = usage;
- handle = mGralloc2->allocate(info, import, outStride);
- }
- return NativeHandleWrapper(*this, handle);
-}
-
-void* Gralloc::lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
- const AccessRegion& accessRegionRect, int acquireFence) {
- if (mGralloc4) {
- IMapper4::Rect accessRegion;
- accessRegion.left = accessRegionRect.left;
- accessRegion.top = accessRegionRect.top;
- accessRegion.width = accessRegionRect.width;
- accessRegion.height = accessRegionRect.height;
- return mGralloc4->lock(bufferHandle, cpuUsage, accessRegion, acquireFence);
- } else if (mGralloc3) {
- IMapper3::Rect accessRegion;
- accessRegion.left = accessRegionRect.left;
- accessRegion.top = accessRegionRect.top;
- accessRegion.width = accessRegionRect.width;
- accessRegion.height = accessRegionRect.height;
- int32_t bytesPerPixel;
- int32_t bytesPerStride;
- return mGralloc3->lock(bufferHandle, cpuUsage, accessRegion, acquireFence, &bytesPerPixel,
- &bytesPerStride);
- } else {
- IMapper2::Rect accessRegion;
- accessRegion.left = accessRegionRect.left;
- accessRegion.top = accessRegionRect.top;
- accessRegion.width = accessRegionRect.width;
- accessRegion.height = accessRegionRect.height;
- return mGralloc2->lock(bufferHandle, cpuUsage, accessRegion, acquireFence);
- }
-}
-
-int Gralloc::unlock(const native_handle_t* bufferHandle) {
- if (mGralloc4) {
- return mGralloc4->unlock(bufferHandle);
- } else if (mGralloc3) {
- return mGralloc3->unlock(bufferHandle);
- } else {
- return mGralloc2->unlock(bufferHandle);
- }
-}
-
-void Gralloc::freeBuffer(const native_handle_t* bufferHandle) {
- if (mGralloc4) {
- mGralloc4->freeBuffer(bufferHandle);
- } else if (mGralloc3) {
- mGralloc3->freeBuffer(bufferHandle);
- } else {
- mGralloc2->freeBuffer(bufferHandle);
- }
-}
-
} // namespace vts
} // namespace V2_1
} // namespace composer
diff --git a/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h b/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h
index f8ea661..c0aacb5 100644
--- a/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h
+++ b/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h
@@ -25,9 +25,6 @@
#include <android/hardware/graphics/composer/2.1/IComposer.h>
#include <composer-command-buffer/2.1/ComposerCommandBuffer.h>
#include <composer-vts/2.1/TestCommandReader.h>
-#include <mapper-vts/2.0/MapperVts.h>
-#include <mapper-vts/3.0/MapperVts.h>
-#include <mapper-vts/4.0/MapperVts.h>
#include <utils/StrongPointer.h>
#include "gtest/gtest.h"
@@ -43,13 +40,6 @@
using android::hardware::graphics::common::V1_0::Dataspace;
using android::hardware::graphics::common::V1_0::Hdr;
using android::hardware::graphics::common::V1_0::PixelFormat;
-using IMapper2 = android::hardware::graphics::mapper::V2_0::IMapper;
-using IMapper3 = android::hardware::graphics::mapper::V3_0::IMapper;
-using IMapper4 = android::hardware::graphics::mapper::V4_0::IMapper;
-using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc;
-using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc;
-using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc;
-using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator;
class ComposerClient;
@@ -129,52 +119,6 @@
const sp<IComposerClient> mClient;
};
-class AccessRegion {
- public:
- int32_t left;
- int32_t top;
- int32_t width;
- int32_t height;
-};
-
-class Gralloc;
-
-// RAII wrapper around native_handle_t*
-class NativeHandleWrapper {
- public:
- NativeHandleWrapper(Gralloc& gralloc, const native_handle_t* handle)
- : mGralloc(gralloc), mHandle(handle) {}
-
- ~NativeHandleWrapper();
-
- const native_handle_t* get() { return mHandle; }
-
- private:
- Gralloc& mGralloc;
- const native_handle_t* mHandle;
-};
-
-class Gralloc {
- public:
- explicit Gralloc();
-
- const NativeHandleWrapper allocate(uint32_t width, uint32_t height, uint32_t layerCount,
- PixelFormat format, uint64_t usage, bool import = true,
- uint32_t* outStride = nullptr);
-
- void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
- const AccessRegion& accessRegionRect, int acquireFence);
-
- int unlock(const native_handle_t* bufferHandle);
-
- void freeBuffer(const native_handle_t* bufferHandle);
-
- protected:
- std::shared_ptr<Gralloc2> mGralloc2 = nullptr;
- std::shared_ptr<Gralloc3> mGralloc3 = nullptr;
- std::shared_ptr<Gralloc4> mGralloc4 = nullptr;
-};
-
} // namespace vts
} // namespace V2_1
} // namespace composer
diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp
index 0f6d7e8..0706341 100644
--- a/graphics/composer/2.1/vts/functional/Android.bp
+++ b/graphics/composer/2.1/vts/functional/Android.bp
@@ -27,7 +27,6 @@
name: "VtsHalGraphicsComposerV2_1TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
- "android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_1TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_1TargetTest.cpp"],
@@ -38,22 +37,12 @@
"libbinder_ndk",
"libfmq",
"libsync",
+ "libui",
"android.hardware.common-V2-ndk",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
],
static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.1-vts",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
],
header_libs: [
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
index 9444d89..b67cfc2 100644
--- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
@@ -25,9 +25,7 @@
#include <hardware/hwcomposer2.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
-#include <mapper-vts/2.0/MapperVts.h>
-#include <mapper-vts/3.0/MapperVts.h>
-#include <mapper-vts/4.0/MapperVts.h>
+#include <ui/GraphicBuffer.h>
#include <unistd.h>
@@ -52,7 +50,6 @@
using android::hardware::graphics::common::V1_0::Dataspace;
using android::hardware::graphics::common::V1_0::PixelFormat;
using android::hardware::graphics::common::V1_0::Transform;
-using GrallocError = android::hardware::graphics::mapper::V2_0::Error;
class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
protected:
@@ -651,7 +648,6 @@
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::SetUp());
- ASSERT_NO_FATAL_FAILURE(mGralloc = std::make_unique<Gralloc>());
Config activeConfig = mComposerClient->getActiveConfig(mPrimaryDisplay);
mDisplayWidth = mComposerClient->getDisplayAttribute(mPrimaryDisplay, activeConfig,
IComposerClient::Attribute::WIDTH);
@@ -666,13 +662,17 @@
ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown());
}
- NativeHandleWrapper allocate() { return allocate(mDisplayWidth, mDisplayHeight); }
+ sp<GraphicBuffer> allocate() { return allocate(mDisplayWidth, mDisplayHeight); }
- NativeHandleWrapper allocate(uint32_t width, uint32_t height) {
- uint64_t usage =
+ sp<GraphicBuffer> allocate(int32_t width, int32_t height) {
+ auto result = sp<GraphicBuffer>::make(
+ width, height, static_cast<int32_t>(PixelFormat::RGBA_8888), /*layerCount*/ 1,
static_cast<uint64_t>(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN |
- BufferUsage::COMPOSER_OVERLAY);
- return mGralloc->allocate(width, height, 1, PixelFormat::RGBA_8888, usage);
+ BufferUsage::COMPOSER_OVERLAY));
+ if (result->initCheck() != STATUS_OK) {
+ return nullptr;
+ }
+ return result;
}
void execute() { mComposerClient->execute(mReader.get(), mWriter.get()); }
@@ -681,9 +681,6 @@
std::unique_ptr<TestCommandReader> mReader;
int32_t mDisplayWidth;
int32_t mDisplayHeight;
-
- private:
- std::unique_ptr<Gralloc> mGralloc;
};
/**
@@ -729,11 +726,11 @@
display = mComposerClient->createVirtualDisplay(64, 64, PixelFormat::IMPLEMENTATION_DEFINED,
kBufferSlotCount, &format));
- std::unique_ptr<NativeHandleWrapper> handle;
- ASSERT_NO_FATAL_FAILURE(handle.reset(new NativeHandleWrapper(allocate())));
+ auto handle = allocate();
+ ASSERT_TRUE(handle);
mWriter->selectDisplay(display);
- mWriter->setOutputBuffer(0, handle->get(), -1);
+ mWriter->setOutputBuffer(0, handle->handle, -1);
execute();
}
@@ -802,7 +799,7 @@
mWriter->setLayerZOrder(10);
mWriter->setLayerBlendMode(IComposerClient::BlendMode::NONE);
mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>(1, displayFrame));
- mWriter->setLayerBuffer(0, handle.get(), -1);
+ mWriter->setLayerBuffer(0, handle->handle, -1);
mWriter->setLayerDataspace(Dataspace::UNKNOWN);
mWriter->validateDisplay();
@@ -820,7 +817,7 @@
mWriter->selectLayer(layer);
auto handle2 = allocate();
ASSERT_NE(nullptr, handle2.get());
- mWriter->setLayerBuffer(0, handle2.get(), -1);
+ mWriter->setLayerBuffer(0, handle2->handle, -1);
mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>(1, {0, 0, 10, 10}));
mWriter->presentDisplay();
execute();
@@ -840,7 +837,7 @@
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
- mWriter->setLayerBuffer(0, handle.get(), -1);
+ mWriter->setLayerBuffer(0, handle->handle, -1);
mWriter->setLayerCompositionType(IComposerClient::Composition::CURSOR);
mWriter->setLayerDisplayFrame(displayFrame);
mWriter->setLayerPlaneAlpha(1);
@@ -881,7 +878,7 @@
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
- mWriter->setLayerBuffer(0, handle.get(), -1);
+ mWriter->setLayerBuffer(0, handle->handle, -1);
execute();
}
@@ -905,7 +902,7 @@
mWriter->selectLayer(layer);
mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE);
mWriter->setLayerDisplayFrame(displayFrame);
- mWriter->setLayerBuffer(0, handle1.get(), -1);
+ mWriter->setLayerBuffer(0, handle1->handle, -1);
mWriter->setLayerDataspace(Dataspace::UNKNOWN);
mWriter->validateDisplay();
execute();
@@ -928,7 +925,7 @@
mWriter->selectLayer(layer);
mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE);
mWriter->setLayerDisplayFrame(displayFrame);
- mWriter->setLayerBuffer(1, handle2.get(), -1);
+ mWriter->setLayerBuffer(1, handle2->handle, -1);
mWriter->setLayerDataspace(Dataspace::UNKNOWN);
mWriter->validateDisplay();
execute();
@@ -951,7 +948,7 @@
mWriter->selectLayer(layer);
mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE);
mWriter->setLayerDisplayFrame(displayFrame);
- mWriter->setLayerBuffer(2, handle3.get(), -1);
+ mWriter->setLayerBuffer(2, handle3->handle, -1);
mWriter->setLayerDataspace(Dataspace::UNKNOWN);
mWriter->validateDisplay();
execute();
@@ -968,10 +965,10 @@
// Ensure we can clear multiple buffer slots and then restore the active buffer at the end
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
- mWriter->setLayerBuffer(0, clearSlotBuffer.get(), -1);
+ mWriter->setLayerBuffer(0, clearSlotBuffer->handle, -1);
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
- mWriter->setLayerBuffer(1, clearSlotBuffer.get(), -1);
+ mWriter->setLayerBuffer(1, clearSlotBuffer->handle, -1);
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
mWriter->setLayerBuffer(2, nullptr, -1);
@@ -1113,7 +1110,7 @@
mWriter->selectDisplay(mPrimaryDisplay);
mWriter->selectLayer(layer);
- mWriter->setLayerSidebandStream(handle.get());
+ mWriter->setLayerSidebandStream(handle->handle);
execute();
}
diff --git a/graphics/composer/2.2/utils/vts/Android.bp b/graphics/composer/2.2/utils/vts/Android.bp
index d11592f..a923923 100644
--- a/graphics/composer/2.2/utils/vts/Android.bp
+++ b/graphics/composer/2.2/utils/vts/Android.bp
@@ -26,7 +26,6 @@
cc_library_static {
name: "android.hardware.graphics.composer@2.2-vts",
defaults: [
- "android.hardware.graphics.allocator-ndk_static",
"android.hardware.graphics.composer3-ndk_static",
"hidl_defaults",
"librenderengine_deps",
@@ -42,7 +41,6 @@
static_libs: [
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
- "android.hardware.graphics.mapper@2.1-vts",
"libarect",
"libgtest",
"libmath",
@@ -50,15 +48,10 @@
"librenderengine",
"libshaders",
"libtonemap",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0",
- "android.hardware.graphics.mapper@4.0-vts",
],
export_static_lib_headers: [
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
- "android.hardware.graphics.mapper@2.1-vts",
],
header_libs: [
"android.hardware.graphics.composer@2.2-command-buffer",
diff --git a/graphics/composer/2.2/utils/vts/ComposerVts.cpp b/graphics/composer/2.2/utils/vts/ComposerVts.cpp
index d4f0281..d041064 100644
--- a/graphics/composer/2.2/utils/vts/ComposerVts.cpp
+++ b/graphics/composer/2.2/utils/vts/ComposerVts.cpp
@@ -179,66 +179,6 @@
return matrix;
}
-Gralloc::Gralloc() {
- [this] {
- ALOGD("Attempting to initialize gralloc4");
- ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>(
- /*aidlAllocatorServiceName*/ IAllocator::descriptor +
- std::string("/default"),
- /*hidlAllocatorServiceName*/ "default",
- /*mapperServiceName*/ "default",
- /*errOnFailure=*/false));
- if (mGralloc4->getMapper() == nullptr || !mGralloc4->hasAllocator()) {
- mGralloc4 = nullptr;
- ALOGD("Failed to initialize gralloc4, initializing gralloc3");
- ASSERT_NO_FATAL_FAILURE(mGralloc3 = std::make_shared<Gralloc3>("default", "default",
- /*errOnFailure=*/false));
- if (mGralloc3->getMapper() == nullptr || mGralloc3->getAllocator() == nullptr) {
- mGralloc3 = nullptr;
- ALOGD("Failed to initialize gralloc3, initializing gralloc2_1");
- mGralloc2_1 = std::make_shared<Gralloc2_1>(/*errOnFailure*/ false);
- if (!mGralloc2_1->getMapper()) {
- mGralloc2_1 = nullptr;
- ALOGD("Failed to initialize gralloc2_1, initializing gralloc2");
- ASSERT_NO_FATAL_FAILURE(mGralloc2 = std::make_shared<Gralloc2>());
- }
- }
- }
- }();
-}
-
-bool Gralloc::validateBufferSize(const native_handle_t* bufferHandle, uint32_t width,
- uint32_t height, uint32_t layerCount, PixelFormat format,
- uint64_t usage, uint32_t stride) {
- if (mGralloc4) {
- IMapper4::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = static_cast<android::hardware::graphics::common::V1_2::PixelFormat>(format);
- info.usage = usage;
- return mGralloc4->validateBufferSize(bufferHandle, info, stride);
- } else if (mGralloc3) {
- IMapper3::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = static_cast<android::hardware::graphics::common::V1_2::PixelFormat>(format);
- info.usage = usage;
- return mGralloc3->validateBufferSize(bufferHandle, info, stride);
- } else if (mGralloc2_1) {
- IMapper2_1::BufferDescriptorInfo info{};
- info.width = width;
- info.height = height;
- info.layerCount = layerCount;
- info.format = static_cast<android::hardware::graphics::common::V1_1::PixelFormat>(format);
- info.usage = usage;
- return mGralloc2_1->validateBufferSize(bufferHandle, info, stride);
- } else {
- return true;
- }
-}
-
} // namespace vts
} // namespace V2_2
} // namespace composer
diff --git a/graphics/composer/2.2/utils/vts/ReadbackVts.cpp b/graphics/composer/2.2/utils/vts/ReadbackVts.cpp
index a1794af..9ba34f1 100644
--- a/graphics/composer/2.2/utils/vts/ReadbackVts.cpp
+++ b/graphics/composer/2.2/utils/vts/ReadbackVts.cpp
@@ -187,12 +187,11 @@
}
ReadbackBuffer::ReadbackBuffer(Display display, const std::shared_ptr<ComposerClient>& client,
- const std::shared_ptr<Gralloc>& gralloc, uint32_t width,
- uint32_t height, PixelFormat pixelFormat, Dataspace dataspace) {
+ uint32_t width, uint32_t height, PixelFormat pixelFormat,
+ Dataspace dataspace) {
mDisplay = display;
mComposerClient = client;
- mGralloc = gralloc;
mPixelFormat = pixelFormat;
mDataspace = dataspace;
@@ -202,20 +201,12 @@
mLayerCount = 1;
mFormat = mPixelFormat;
mUsage = static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN | BufferUsage::GPU_TEXTURE);
-
- mAccessRegion.top = 0;
- mAccessRegion.left = 0;
- mAccessRegion.width = width;
- mAccessRegion.height = height;
}
void ReadbackBuffer::setReadbackBuffer() {
- mBufferHandle.reset(new Gralloc::NativeHandleWrapper(
- mGralloc->allocate(mWidth, mHeight, mLayerCount, mFormat, mUsage,
- /*import*/ true, &mStride)));
- ASSERT_NE(false, mGralloc->validateBufferSize(mBufferHandle->get(), mWidth, mHeight,
- mLayerCount, mFormat, mUsage, mStride));
- ASSERT_NO_FATAL_FAILURE(mComposerClient->setReadbackBuffer(mDisplay, mBufferHandle->get(), -1));
+ mBuffer = sp<GraphicBuffer>::make(mWidth, mHeight, (int32_t)mFormat, mLayerCount, mUsage);
+ ASSERT_EQ(STATUS_OK, mBuffer->initCheck());
+ ASSERT_NO_FATAL_FAILURE(mComposerClient->setReadbackBuffer(mDisplay, mBuffer->handle, -1));
}
void ReadbackBuffer::checkReadbackBuffer(std::vector<IComposerClient::Color> expectedColors) {
@@ -223,15 +214,14 @@
int32_t fenceHandle;
ASSERT_NO_FATAL_FAILURE(mComposerClient->getReadbackBufferFence(mDisplay, &fenceHandle));
- void* bufData = mGralloc->lock(mBufferHandle->get(), mUsage, mAccessRegion, fenceHandle);
+ void* bufData = nullptr;
+ int32_t stride = mBuffer->stride;
+ status_t status = mBuffer->lockAsync(mUsage, &bufData, fenceHandle);
+ ASSERT_EQ(STATUS_OK, status);
ASSERT_TRUE(mPixelFormat == PixelFormat::RGB_888 || mPixelFormat == PixelFormat::RGBA_8888);
- ReadbackHelper::compareColorBuffers(expectedColors, bufData, mStride, mWidth, mHeight,
+ ReadbackHelper::compareColorBuffers(expectedColors, bufData, stride, mWidth, mHeight,
mPixelFormat);
- int32_t unlockFence = mGralloc->unlock(mBufferHandle->get());
- if (unlockFence != -1) {
- sync_wait(unlockFence, -1);
- close(unlockFence);
- }
+ EXPECT_EQ(STATUS_OK, mBuffer->unlock());
}
void TestColorLayer::write(const std::shared_ptr<CommandWriterBase>& writer) {
@@ -251,12 +241,10 @@
}
TestBufferLayer::TestBufferLayer(const std::shared_ptr<ComposerClient>& client,
- const std::shared_ptr<Gralloc>& gralloc,
TestRenderEngine& renderEngine, Display display, int32_t width,
int32_t height, PixelFormat format,
IComposerClient::Composition composition)
: TestLayer{client, display}, mRenderEngine(renderEngine) {
- mGralloc = gralloc;
mComposition = composition;
mWidth = width;
mHeight = height;
@@ -265,11 +253,6 @@
mUsage = static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN | BufferUsage::CPU_WRITE_OFTEN |
BufferUsage::COMPOSER_OVERLAY | BufferUsage::GPU_TEXTURE);
- mAccessRegion.top = 0;
- mAccessRegion.left = 0;
- mAccessRegion.width = width;
- mAccessRegion.height = height;
-
setSourceCrop({0, 0, (float)width, (float)height});
}
@@ -277,15 +260,13 @@
TestLayer::write(writer);
writer->setLayerCompositionType(mComposition);
writer->setLayerVisibleRegion(std::vector<IComposerClient::Rect>(1, mDisplayFrame));
- if (mBufferHandle != nullptr) writer->setLayerBuffer(0, mBufferHandle->get(), mFillFence);
+ if (mBuffer) writer->setLayerBuffer(0, mBuffer->handle, -1);
}
LayerSettings TestBufferLayer::toRenderEngineLayerSettings() {
LayerSettings layerSettings = TestLayer::toRenderEngineLayerSettings();
layerSettings.source.buffer.buffer = std::make_shared<renderengine::impl::ExternalTexture>(
- new GraphicBuffer(mBufferHandle->get(), GraphicBuffer::CLONE_HANDLE, mWidth, mHeight,
- static_cast<int32_t>(mFormat), 1, mUsage, mStride),
- mRenderEngine.getInternalRenderEngine(),
+ mBuffer, mRenderEngine.getInternalRenderEngine(),
renderengine::impl::ExternalTexture::Usage::READABLE);
layerSettings.source.buffer.usePremultipliedAlpha =
@@ -304,24 +285,18 @@
}
void TestBufferLayer::fillBuffer(std::vector<IComposerClient::Color> expectedColors) {
- void* bufData = mGralloc->lock(mBufferHandle->get(), mUsage, mAccessRegion, -1);
- ASSERT_NO_FATAL_FAILURE(
- ReadbackHelper::fillBuffer(mWidth, mHeight, mStride, bufData, mFormat, expectedColors));
- mFillFence = mGralloc->unlock(mBufferHandle->get());
- if (mFillFence != -1) {
- sync_wait(mFillFence, -1);
- close(mFillFence);
- }
+ void* bufData = nullptr;
+ status_t status = mBuffer->lock(mUsage, &bufData);
+ ASSERT_EQ(STATUS_OK, status);
+ ASSERT_NO_FATAL_FAILURE(ReadbackHelper::fillBuffer(mWidth, mHeight, mBuffer->stride, bufData,
+ mFormat, expectedColors));
+ EXPECT_EQ(STATUS_OK, mBuffer->unlock());
}
void TestBufferLayer::setBuffer(std::vector<IComposerClient::Color> colors) {
- mBufferHandle.reset(new Gralloc::NativeHandleWrapper(
- mGralloc->allocate(mWidth, mHeight, mLayerCount, mFormat, mUsage,
- /*import*/ true, &mStride)));
- ASSERT_NE(nullptr, mBufferHandle->get());
+ mBuffer = sp<GraphicBuffer>::make(mWidth, mHeight, (int32_t)mFormat, mLayerCount, mUsage);
+ ASSERT_EQ(STATUS_OK, mBuffer->initCheck());
ASSERT_NO_FATAL_FAILURE(fillBuffer(colors));
- ASSERT_NE(false, mGralloc->validateBufferSize(mBufferHandle->get(), mWidth, mHeight,
- mLayerCount, mFormat, mUsage, mStride));
}
void TestBufferLayer::setDataspace(Dataspace dataspace,
diff --git a/graphics/composer/2.2/utils/vts/RenderEngineVts.cpp b/graphics/composer/2.2/utils/vts/RenderEngineVts.cpp
index 1700b2a..6960d06 100644
--- a/graphics/composer/2.2/utils/vts/RenderEngineVts.cpp
+++ b/graphics/composer/2.2/utils/vts/RenderEngineVts.cpp
@@ -24,7 +24,6 @@
namespace V2_2 {
namespace vts {
-using mapper::V2_1::IMapper;
using renderengine::DisplaySettings;
using renderengine::LayerSettings;
using renderengine::RenderEngineCreationArgs;
@@ -72,7 +71,7 @@
auto texture = std::make_shared<renderengine::impl::ExternalTexture>(
mGraphicBuffer, *mRenderEngine, renderengine::impl::ExternalTexture::Usage::WRITEABLE);
auto result = mRenderEngine
- ->drawLayers(mDisplaySettings, compositionLayers, texture, true,
+ ->drawLayers(mDisplaySettings, compositionLayers, texture,
std::move(bufferFence))
.get();
if (result.ok()) {
diff --git a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h
index 02d7bdb..3e26d94 100644
--- a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h
+++ b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h
@@ -26,7 +26,6 @@
#include <android/hardware/graphics/composer/2.2/IComposerClient.h>
#include <composer-command-buffer/2.2/ComposerCommandBuffer.h>
#include <composer-vts/2.1/ComposerVts.h>
-#include <mapper-vts/2.1/MapperVts.h>
#include <utils/StrongPointer.h>
namespace android {
@@ -41,14 +40,6 @@
using common::V1_1::Dataspace;
using common::V1_1::PixelFormat;
using common::V1_1::RenderIntent;
-using IMapper2_1 = android::hardware::graphics::mapper::V2_1::IMapper;
-using IMapper3 = android::hardware::graphics::mapper::V3_0::IMapper;
-using IMapper4 = android::hardware::graphics::mapper::V4_0::IMapper;
-using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc;
-using Gralloc2_1 = android::hardware::graphics::mapper::V2_1::vts::Gralloc;
-using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc;
-using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc;
-using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator;
class ComposerClient;
@@ -92,28 +83,6 @@
const sp<IComposerClient> mClient;
};
-class Gralloc : public V2_1::vts::Gralloc {
- public:
- using NativeHandleWrapper = V2_1::vts::NativeHandleWrapper;
-
- Gralloc();
- const NativeHandleWrapper allocate(uint32_t width, uint32_t height, uint32_t layerCount,
- PixelFormat format, uint64_t usage, bool import = true,
- uint32_t* outStride = nullptr) {
- return V2_1::vts::Gralloc::allocate(
- width, height, layerCount,
- static_cast<android::hardware::graphics::common::V1_0::PixelFormat>(format), usage,
- import, outStride);
- }
-
- bool validateBufferSize(const native_handle_t* bufferHandle, uint32_t width, uint32_t height,
- uint32_t layerCount, PixelFormat format, uint64_t usage,
- uint32_t stride);
-
- protected:
- std::shared_ptr<Gralloc2_1> mGralloc2_1 = nullptr;
-};
-
} // namespace vts
} // namespace V2_2
} // namespace composer
diff --git a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h
index 58efde9..aa6932a 100644
--- a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h
+++ b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h
@@ -22,7 +22,6 @@
#include <composer-vts/2.1/GraphicsComposerCallback.h>
#include <composer-vts/2.1/TestCommandReader.h>
#include <composer-vts/2.2/ComposerVts.h>
-#include <mapper-vts/2.1/MapperVts.h>
#include <renderengine/RenderEngine.h>
#include <memory>
@@ -38,12 +37,9 @@
using common::V1_1::BufferUsage;
using common::V1_1::Dataspace;
using common::V1_1::PixelFormat;
-using IMapper2_1 = mapper::V2_1::IMapper;
-using Gralloc2_1 = mapper::V2_1::vts::Gralloc;
using renderengine::LayerSettings;
using V2_1::Display;
using V2_1::Layer;
-using V2_1::vts::AccessRegion;
using V2_1::vts::TestCommandReader;
static const IComposerClient::Color BLACK = {0, 0, 0, 0xff};
@@ -113,9 +109,8 @@
class TestBufferLayer : public TestLayer {
public:
TestBufferLayer(
- const std::shared_ptr<ComposerClient>& client, const std::shared_ptr<Gralloc>& gralloc,
- TestRenderEngine& renderEngine, Display display, int32_t width, int32_t height,
- PixelFormat format,
+ const std::shared_ptr<ComposerClient>& client, TestRenderEngine& renderEngine,
+ Display display, int32_t width, int32_t height, PixelFormat format,
IComposerClient::Composition composition = IComposerClient::Composition::DEVICE);
void write(const std::shared_ptr<CommandWriterBase>& writer) override;
@@ -135,15 +130,11 @@
uint32_t mLayerCount;
PixelFormat mFormat;
uint64_t mUsage;
- AccessRegion mAccessRegion;
- uint32_t mStride;
protected:
IComposerClient::Composition mComposition;
- std::shared_ptr<Gralloc> mGralloc;
TestRenderEngine& mRenderEngine;
- int32_t mFillFence;
- std::unique_ptr<Gralloc::NativeHandleWrapper> mBufferHandle;
+ sp<GraphicBuffer> mBuffer;
};
class ReadbackHelper {
@@ -179,9 +170,8 @@
class ReadbackBuffer {
public:
- ReadbackBuffer(Display display, const std::shared_ptr<ComposerClient>& client,
- const std::shared_ptr<Gralloc>& gralloc, uint32_t width, uint32_t height,
- PixelFormat pixelFormat, Dataspace dataspace);
+ ReadbackBuffer(Display display, const std::shared_ptr<ComposerClient>& client, uint32_t width,
+ uint32_t height, PixelFormat pixelFormat, Dataspace dataspace);
void setReadbackBuffer();
@@ -193,13 +183,10 @@
uint32_t mLayerCount;
PixelFormat mFormat;
uint64_t mUsage;
- AccessRegion mAccessRegion;
- uint32_t mStride;
- std::unique_ptr<Gralloc::NativeHandleWrapper> mBufferHandle = nullptr;
+ sp<GraphicBuffer> mBuffer;
PixelFormat mPixelFormat;
Dataspace mDataspace;
Display mDisplay;
- std::shared_ptr<Gralloc> mGralloc;
std::shared_ptr<ComposerClient> mComposerClient;
};
diff --git a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/RenderEngineVts.h b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/RenderEngineVts.h
index 26027d3..09b89ff 100644
--- a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/RenderEngineVts.h
+++ b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/RenderEngineVts.h
@@ -22,7 +22,6 @@
#include <renderengine/ExternalTexture.h>
#include <renderengine/RenderEngine.h>
#include <ui/GraphicBuffer.h>
-#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <ui/Region.h>
@@ -34,10 +33,8 @@
namespace V2_2 {
namespace vts {
-using mapper::V2_1::IMapper;
using renderengine::DisplaySettings;
using renderengine::RenderEngineCreationArgs;
-using vts::Gralloc;
class TestRenderEngine {
public:
diff --git a/graphics/composer/2.2/vts/functional/Android.bp b/graphics/composer/2.2/vts/functional/Android.bp
index 3476376..a781712 100644
--- a/graphics/composer/2.2/vts/functional/Android.bp
+++ b/graphics/composer/2.2/vts/functional/Android.bp
@@ -27,7 +27,6 @@
name: "VtsHalGraphicsComposerV2_2TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
- "android.hardware.graphics.allocator-ndk_static",
"android.hardware.graphics.composer3-ndk_static",
"librenderengine_deps",
],
@@ -54,24 +53,13 @@
"libsync",
"libui",
"android.hardware.common-V2-ndk",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
],
static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common@1.1",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.2-vts",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
"libgtest",
"librenderengine",
diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp
index e2a0f4d..74d2f03 100644
--- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp
+++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp
@@ -26,7 +26,6 @@
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
#include <ui/GraphicBuffer.h>
-#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <ui/Region.h>
@@ -45,9 +44,7 @@
using common::V1_1::PixelFormat;
using V2_1::Config;
using V2_1::Display;
-using V2_1::vts::NativeHandleWrapper;
using V2_1::vts::TestCommandReader;
-using vts::Gralloc;
class GraphicsCompositionTestBase : public ::testing::Test {
protected:
@@ -79,20 +76,19 @@
// set up command writer/reader and gralloc
mWriter = std::make_shared<CommandWriterBase>(1024);
mReader = std::make_unique<TestCommandReader>();
- mGralloc = std::make_shared<Gralloc>();
ASSERT_NO_FATAL_FAILURE(mComposerClient->setPowerMode(mPrimaryDisplay, PowerMode::ON));
ASSERT_NO_FATAL_FAILURE(
mTestRenderEngine = std::unique_ptr<TestRenderEngine>(new TestRenderEngine(
renderengine::RenderEngineCreationArgs::Builder()
- .setPixelFormat(static_cast<int>(ui::PixelFormat::RGBA_8888))
- .setImageCacheSize(TestRenderEngine::sMaxFrameBufferAcquireBuffers)
- .setUseColorManagerment(true)
- .setEnableProtectedContext(false)
- .setPrecacheToneMapperShaderOnly(false)
- .setContextPriority(renderengine::RenderEngine::ContextPriority::HIGH)
- .build())));
+ .setPixelFormat(static_cast<int>(ui::PixelFormat::RGBA_8888))
+ .setImageCacheSize(TestRenderEngine::sMaxFrameBufferAcquireBuffers)
+ .setEnableProtectedContext(false)
+ .setPrecacheToneMapperShaderOnly(false)
+ .setContextPriority(
+ renderengine::RenderEngine::ContextPriority::HIGH)
+ .build())));
renderengine::DisplaySettings clientCompositionDisplay;
clientCompositionDisplay.physicalDisplay = Rect(mDisplayWidth, mDisplayHeight);
@@ -143,7 +139,6 @@
std::vector<ColorMode> mTestColorModes;
std::shared_ptr<CommandWriterBase> mWriter;
std::unique_ptr<TestCommandReader> mReader;
- std::shared_ptr<Gralloc> mGralloc;
std::unique_ptr<TestRenderEngine> mTestRenderEngine;
bool mHasReadbackBuffer;
@@ -220,7 +215,7 @@
std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight);
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth, coloredSquare, BLUE);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -272,7 +267,7 @@
mWriter->selectDisplay(mPrimaryDisplay);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight);
@@ -285,9 +280,9 @@
{0, mDisplayHeight / 2, mDisplayWidth, mDisplayHeight},
BLUE);
- auto layer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
- mDisplayHeight, PixelFormat::RGBA_8888);
+ auto layer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
+ mPrimaryDisplay, mDisplayWidth,
+ mDisplayHeight, PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight});
layer->setZOrder(10);
layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), mWriter);
@@ -352,15 +347,16 @@
// This following buffer call should have no effect
uint64_t usage =
static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN | BufferUsage::CPU_WRITE_OFTEN);
- NativeHandleWrapper bufferHandle =
- mGralloc->allocate(mDisplayWidth, mDisplayHeight, 1, PixelFormat::RGBA_8888, usage);
- mWriter->setLayerBuffer(0, bufferHandle.get(), -1);
+ sp<GraphicBuffer> buffer = sp<GraphicBuffer>::make(
+ mDisplayWidth, mDisplayHeight, (int32_t)PixelFormat::RGBA_8888, 1, usage);
+ ASSERT_EQ(STATUS_OK, buffer->initCheck());
+ mWriter->setLayerBuffer(0, buffer->handle, -1);
// expected color for each pixel
std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight);
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth, coloredSquare, BLUE);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -419,16 +415,16 @@
{0, mDisplayHeight / 2, mDisplayWidth, mDisplayHeight},
BLUE);
- auto layer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
- mDisplayHeight, PixelFormat::RGBA_FP16);
+ auto layer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
+ mPrimaryDisplay, mDisplayWidth,
+ mDisplayHeight, PixelFormat::RGBA_FP16);
layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight});
layer->setZOrder(10);
layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), mWriter);
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(layers);
@@ -462,25 +458,20 @@
}
// create client target buffer
- uint32_t clientStride;
- NativeHandleWrapper clientBufferHandle =
- mGralloc->allocate(layer->mWidth, layer->mHeight, layer->mLayerCount,
- clientFormat, clientUsage, /*import*/ true, &clientStride);
- ASSERT_NE(nullptr, clientBufferHandle.get());
+ sp<GraphicBuffer> clientBuffer =
+ sp<GraphicBuffer>::make(layer->mWidth, layer->mHeight, (int32_t)clientFormat,
+ layer->mLayerCount, clientUsage);
+ ASSERT_EQ(STATUS_OK, clientBuffer->initCheck());
- void* clientBufData =
- mGralloc->lock(clientBufferHandle.get(), clientUsage, layer->mAccessRegion, -1);
+ void* clientBufData = nullptr;
+ ASSERT_EQ(STATUS_OK, clientBuffer->lock(clientUsage, &clientBufData));
ASSERT_NO_FATAL_FAILURE(ReadbackHelper::fillBuffer(layer->mWidth, layer->mHeight,
- clientStride, clientBufData,
+ clientBuffer->stride, clientBufData,
clientFormat, expectedColors));
- int clientFence = mGralloc->unlock(clientBufferHandle.get());
- if (clientFence != -1) {
- sync_wait(clientFence, -1);
- close(clientFence);
- }
+ clientBuffer->unlock();
- mWriter->setClientTarget(0, clientBufferHandle.get(), clientFence, clientDataspace,
+ mWriter->setClientTarget(0, clientBuffer->handle, -1, clientDataspace,
std::vector<IComposerClient::Rect>(1, damage));
layer->setToClientComposition(mWriter);
@@ -531,12 +522,12 @@
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth,
{0, mDisplayHeight / 2, mDisplayWidth, mDisplayHeight}, RED);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
auto deviceLayer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
+ mComposerClient, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
mDisplayHeight / 2, PixelFormat::RGBA_8888);
std::vector<IComposerClient::Color> deviceColors(deviceLayer->mWidth *
deviceLayer->mHeight);
@@ -573,8 +564,8 @@
}
auto clientLayer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, clientWidth,
- clientHeight, PixelFormat::RGBA_FP16, IComposerClient::Composition::DEVICE);
+ mComposerClient, *mTestRenderEngine, mPrimaryDisplay, clientWidth, clientHeight,
+ PixelFormat::RGBA_FP16, IComposerClient::Composition::DEVICE);
IComposerClient::Rect clientFrame = {0, mDisplayHeight / 2, mDisplayWidth, mDisplayHeight};
clientLayer->setDisplayFrame(clientFrame);
clientLayer->setZOrder(0);
@@ -590,27 +581,22 @@
}
// create client target buffer
ASSERT_EQ(1, mReader->mCompositionChanges[0].second);
- uint32_t clientStride;
- NativeHandleWrapper clientBufferHandle =
- mGralloc->allocate(mDisplayWidth, mDisplayHeight, clientLayer->mLayerCount,
- clientFormat, clientUsage, /*import*/ true, &clientStride);
- ASSERT_NE(nullptr, clientBufferHandle.get());
+ sp<GraphicBuffer> clientBuffer =
+ sp<GraphicBuffer>::make(mDisplayWidth, mDisplayHeight, (int32_t)clientFormat,
+ clientLayer->mLayerCount, clientUsage);
+ ASSERT_EQ(STATUS_OK, clientBuffer->initCheck());
- void* clientBufData = mGralloc->lock(clientBufferHandle.get(), clientUsage,
- {0, 0, mDisplayWidth, mDisplayHeight}, -1);
+ void* clientBufData = nullptr;
+ ASSERT_EQ(STATUS_OK, clientBuffer->lock(clientUsage, &clientBufData));
std::vector<IComposerClient::Color> clientColors(mDisplayWidth * mDisplayHeight);
ReadbackHelper::fillColorsArea(clientColors, mDisplayWidth, clientFrame, RED);
ASSERT_NO_FATAL_FAILURE(ReadbackHelper::fillBuffer(mDisplayWidth, mDisplayHeight,
- clientStride, clientBufData,
+ clientBuffer->stride, clientBufData,
clientFormat, clientColors));
- int clientFence = mGralloc->unlock(clientBufferHandle.get());
- if (clientFence != -1) {
- sync_wait(clientFence, -1);
- close(clientFence);
- }
+ EXPECT_EQ(STATUS_OK, clientBuffer->unlock());
- mWriter->setClientTarget(0, clientBufferHandle.get(), clientFence, clientDataspace,
+ mWriter->setClientTarget(0, clientBuffer->handle, -1, clientDataspace,
std::vector<IComposerClient::Rect>(1, clientFrame));
clientLayer->setToClientComposition(mWriter);
mWriter->validateDisplay();
@@ -655,9 +641,9 @@
std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight);
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth, redRect, RED);
- auto layer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
- mDisplayHeight, PixelFormat::RGBA_8888);
+ auto layer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
+ mPrimaryDisplay, mDisplayWidth,
+ mDisplayHeight, PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight});
layer->setZOrder(10);
layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), mWriter);
@@ -665,7 +651,7 @@
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -742,7 +728,7 @@
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -803,9 +789,9 @@
{0, mDisplayHeight / 2, mDisplayWidth, mDisplayHeight},
BLUE);
- auto layer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
- mDisplayHeight, PixelFormat::RGBA_8888);
+ auto layer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
+ mPrimaryDisplay, mDisplayWidth,
+ mDisplayHeight, PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight});
layer->setZOrder(10);
layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), mWriter);
@@ -819,7 +805,7 @@
// update expected colors to match crop
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth,
{0, 0, mDisplayWidth, mDisplayHeight}, BLUE);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(layers);
@@ -886,7 +872,7 @@
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth, blueRect, BLUE);
ReadbackHelper::fillColorsArea(expectedColors, mDisplayWidth, redRect, RED);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -955,9 +941,9 @@
backgroundLayer->setZOrder(0);
backgroundLayer->setColor(mBackgroundColor);
- auto layer = std::make_shared<TestBufferLayer>(
- mComposerClient, mGralloc, *mTestRenderEngine, mPrimaryDisplay, mDisplayWidth,
- mDisplayHeight, PixelFormat::RGBA_8888);
+ auto layer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
+ mPrimaryDisplay, mDisplayWidth,
+ mDisplayHeight, PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight});
layer->setZOrder(10);
layer->setDataspace(Dataspace::UNKNOWN, mWriter);
@@ -1043,7 +1029,7 @@
setUpLayers(IComposerClient::BlendMode::NONE);
setExpectedColors(expectedColors);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
@@ -1102,7 +1088,7 @@
setUpLayers(IComposerClient::BlendMode::COVERAGE);
setExpectedColors(expectedColors);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
@@ -1153,7 +1139,7 @@
setUpLayers(IComposerClient::BlendMode::PREMULTIPLIED);
setExpectedColors(expectedColors);
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
writeLayers(mLayers);
@@ -1193,7 +1179,7 @@
IComposerClient::Rect blueRect = {mSideLength / 2, mSideLength / 2, mSideLength,
mSideLength};
- mLayer = std::make_shared<TestBufferLayer>(mComposerClient, mGralloc, *mTestRenderEngine,
+ mLayer = std::make_shared<TestBufferLayer>(mComposerClient, *mTestRenderEngine,
mPrimaryDisplay, mSideLength, mSideLength,
PixelFormat::RGBA_8888);
mLayer->setDisplayFrame({0, 0, mSideLength, mSideLength});
@@ -1236,7 +1222,7 @@
GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace";
return;
}
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
mLayer->setTransform(Transform::FLIP_H);
@@ -1291,7 +1277,7 @@
GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace";
return;
}
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
@@ -1346,7 +1332,7 @@
GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace";
return;
}
- ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth,
+ ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mDisplayWidth,
mDisplayHeight, mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
index 13ae089..2bd287b 100644
--- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
+++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
@@ -18,14 +18,13 @@
#include <android-base/logging.h>
#include <android-base/properties.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-vts/2.1/GraphicsComposerCallback.h>
#include <composer-vts/2.1/TestCommandReader.h>
#include <composer-vts/2.2/ComposerVts.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
-#include <mapper-vts/2.0/MapperVts.h>
+#include <ui/GraphicBuffer.h>
namespace android {
namespace hardware {
@@ -40,7 +39,6 @@
using common::V1_1::Dataspace;
using common::V1_1::PixelFormat;
using common::V1_1::RenderIntent;
-using V2_1::vts::NativeHandleWrapper;
class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
protected:
@@ -141,8 +139,6 @@
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::SetUp());
- ASSERT_NO_FATAL_FAILURE(mGralloc = std::make_unique<Gralloc>());
-
mWriter = std::make_unique<CommandWriterBase>(1024);
mReader = std::make_unique<V2_1::vts::TestCommandReader>();
}
@@ -152,20 +148,10 @@
ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown());
}
- NativeHandleWrapper allocate() {
- uint64_t usage =
- static_cast<uint64_t>(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN);
- return mGralloc->allocate(/*width*/ 64, /*height*/ 64, /*layerCount*/ 1,
- PixelFormat::RGBA_8888, usage);
- }
-
void execute() { mComposerClient->execute(mReader.get(), mWriter.get()); }
std::unique_ptr<CommandWriterBase> mWriter;
std::unique_ptr<V2_1::vts::TestCommandReader> mReader;
-
- private:
- std::unique_ptr<Gralloc> mGralloc;
};
/**
@@ -437,13 +423,11 @@
uint64_t usage =
static_cast<uint64_t>(BufferUsage::COMPOSER_OVERLAY | BufferUsage::CPU_READ_OFTEN);
- std::unique_ptr<Gralloc> gralloc;
- std::unique_ptr<NativeHandleWrapper> buffer;
- ASSERT_NO_FATAL_FAILURE(gralloc = std::make_unique<Gralloc>());
- ASSERT_NO_FATAL_FAILURE(buffer.reset(new NativeHandleWrapper(
- gralloc->allocate(mDisplayWidth, mDisplayHeight, 1, mReadbackPixelFormat, usage))));
+ sp<GraphicBuffer> buffer = sp<GraphicBuffer>::make(mDisplayWidth, mDisplayHeight,
+ (int32_t)mReadbackPixelFormat, 1, usage);
+ ASSERT_EQ(STATUS_OK, buffer->initCheck());
- mComposerClient->setReadbackBuffer(mPrimaryDisplay, buffer->get(), -1);
+ mComposerClient->setReadbackBuffer(mPrimaryDisplay, buffer->handle, -1);
}
/**
@@ -460,14 +444,12 @@
uint64_t usage =
static_cast<uint64_t>(BufferUsage::COMPOSER_OVERLAY | BufferUsage::CPU_READ_OFTEN);
- std::unique_ptr<Gralloc> gralloc;
- std::unique_ptr<NativeHandleWrapper> buffer;
- ASSERT_NO_FATAL_FAILURE(gralloc = std::make_unique<Gralloc>());
- ASSERT_NO_FATAL_FAILURE(buffer.reset(new NativeHandleWrapper(
- gralloc->allocate(mDisplayWidth, mDisplayHeight, 1, mReadbackPixelFormat, usage))));
+ sp<GraphicBuffer> buffer = sp<GraphicBuffer>::make(mDisplayWidth, mDisplayHeight,
+ (int32_t)mReadbackPixelFormat, 1, usage);
+ ASSERT_EQ(STATUS_OK, buffer->initCheck());
- Error error =
- mComposerClient->getRaw()->setReadbackBuffer(mInvalidDisplayId, buffer->get(), nullptr);
+ Error error = mComposerClient->getRaw()->setReadbackBuffer(mInvalidDisplayId, buffer->handle,
+ nullptr);
ASSERT_EQ(Error::BAD_DISPLAY, error);
}
diff --git a/graphics/composer/2.3/utils/vts/Android.bp b/graphics/composer/2.3/utils/vts/Android.bp
index b372804..99429db 100644
--- a/graphics/composer/2.3/utils/vts/Android.bp
+++ b/graphics/composer/2.3/utils/vts/Android.bp
@@ -26,7 +26,6 @@
cc_library_static {
name: "android.hardware.graphics.composer@2.3-vts",
defaults: [
- "android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
diff --git a/graphics/composer/2.3/vts/functional/Android.bp b/graphics/composer/2.3/vts/functional/Android.bp
index 13f2b11..0d3c27d 100644
--- a/graphics/composer/2.3/vts/functional/Android.bp
+++ b/graphics/composer/2.3/vts/functional/Android.bp
@@ -27,7 +27,6 @@
name: "VtsHalGraphicsComposerV2_3TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
- "android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_3TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_3TargetTest.cpp"],
@@ -40,25 +39,14 @@
"libhidlbase",
"libsync",
"android.hardware.common-V2-ndk",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
],
static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.2-vts",
"android.hardware.graphics.composer@2.3",
"android.hardware.graphics.composer@2.3-vts",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
],
header_libs: [
diff --git a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
index ecfe66c..c072ef0 100644
--- a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
+++ b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
@@ -21,7 +21,6 @@
#include <android-base/logging.h>
#include <android-base/properties.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-command-buffer/2.3/ComposerCommandBuffer.h>
#include <composer-vts/2.1/GraphicsComposerCallback.h>
#include <composer-vts/2.1/TestCommandReader.h>
@@ -29,7 +28,6 @@
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
-#include <mapper-vts/2.0/MapperVts.h>
namespace android {
namespace hardware {
@@ -43,7 +41,6 @@
using common::V1_2::ColorMode;
using common::V1_2::Dataspace;
using common::V1_2::PixelFormat;
-using V2_2::vts::Gralloc;
class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
protected:
@@ -128,8 +125,6 @@
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::SetUp());
- ASSERT_NO_FATAL_FAILURE(mGralloc = std::make_unique<Gralloc>());
-
mWriter = std::make_unique<CommandWriterBase>(1024);
mReader = std::make_unique<V2_1::vts::TestCommandReader>();
}
@@ -143,9 +138,6 @@
std::unique_ptr<CommandWriterBase> mWriter;
std::unique_ptr<V2_1::vts::TestCommandReader> mReader;
-
- private:
- std::unique_ptr<Gralloc> mGralloc;
};
/**
diff --git a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerCommandEngine.h b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerCommandEngine.h
index 697d6b8..3b5ce5a 100644
--- a/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerCommandEngine.h
+++ b/graphics/composer/2.4/utils/hal/include/composer-hal/2.4/ComposerCommandEngine.h
@@ -90,6 +90,9 @@
}
const uint32_t keySize = read();
+ if (!isReadSizeValid(keySize)) {
+ return false;
+ }
std::string key;
key.resize(keySize);
readBlob(keySize, key.data());
@@ -97,6 +100,9 @@
const bool mandatory = read();
const uint32_t valueSize = read();
+ if (!isReadSizeValid(valueSize)) {
+ return false;
+ }
std::vector<uint8_t> value(valueSize);
readBlob(valueSize, value.data());
diff --git a/graphics/composer/2.4/utils/vts/Android.bp b/graphics/composer/2.4/utils/vts/Android.bp
index d2b2ffa..c39b5eb1 100644
--- a/graphics/composer/2.4/utils/vts/Android.bp
+++ b/graphics/composer/2.4/utils/vts/Android.bp
@@ -26,7 +26,6 @@
cc_library_static {
name: "android.hardware.graphics.composer@2.4-vts",
defaults: [
- "android.hardware.graphics.allocator-ndk_static",
"hidl_defaults",
],
srcs: [
diff --git a/graphics/composer/2.4/vts/functional/Android.bp b/graphics/composer/2.4/vts/functional/Android.bp
index b4ab259..52624b4 100644
--- a/graphics/composer/2.4/vts/functional/Android.bp
+++ b/graphics/composer/2.4/vts/functional/Android.bp
@@ -27,7 +27,6 @@
name: "VtsHalGraphicsComposerV2_4TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
- "android.hardware.graphics.allocator-ndk_static",
],
tidy_timeout_srcs: ["VtsHalGraphicsComposerV2_4TargetTest.cpp"],
srcs: ["VtsHalGraphicsComposerV2_4TargetTest.cpp"],
@@ -38,16 +37,10 @@
"libbinder_ndk",
"libfmq",
"libsync",
+ "libui",
"android.hardware.common-V2-ndk",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
],
static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
@@ -56,10 +49,6 @@
"android.hardware.graphics.composer@2.3-vts",
"android.hardware.graphics.composer@2.4",
"android.hardware.graphics.composer@2.4-vts",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
],
header_libs: [
diff --git a/graphics/composer/2.4/vts/functional/AndroidTest.xml b/graphics/composer/2.4/vts/functional/AndroidTest.xml
index 773db93..7626995 100644
--- a/graphics/composer/2.4/vts/functional/AndroidTest.xml
+++ b/graphics/composer/2.4/vts/functional/AndroidTest.xml
@@ -31,6 +31,6 @@
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
<option name="module-name" value="VtsHalGraphicsComposerV2_4TargetTest" />
- <option name="native-test-timeout" value="900000"/>
+ <option name="native-test-timeout" value="1800000"/>
</test>
</configuration>
diff --git a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp
index 35225d9..7ae917b 100644
--- a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp
+++ b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp
@@ -22,7 +22,6 @@
#include <android-base/logging.h>
#include <android-base/properties.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-command-buffer/2.4/ComposerCommandBuffer.h>
#include <composer-vts/2.4/ComposerVts.h>
#include <composer-vts/2.4/GraphicsComposerCallback.h>
@@ -30,9 +29,7 @@
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
-#include <mapper-vts/2.0/MapperVts.h>
-#include <mapper-vts/3.0/MapperVts.h>
-#include <mapper-vts/4.0/MapperVts.h>
+#include <ui/GraphicBuffer.h>
#include <utils/Timers.h>
namespace android {
@@ -51,9 +48,7 @@
using common::V1_2::Dataspace;
using common::V1_2::PixelFormat;
using V2_1::Layer;
-using V2_1::vts::NativeHandleWrapper;
using V2_2::Transform;
-using V2_2::vts::Gralloc;
using ContentType = IComposerClient::ContentType;
using DisplayCapability = IComposerClient::DisplayCapability;
@@ -103,8 +98,6 @@
}
mComposerCallback->setVsyncAllowed(false);
- ASSERT_NO_FATAL_FAILURE(mGralloc = std::make_unique<Gralloc>());
-
mWriter = std::make_unique<CommandWriterBase>(1024);
mReader = std::make_unique<TestCommandReader>();
}
@@ -157,12 +150,15 @@
void execute() { mComposerClient->execute(mReader.get(), mWriter.get()); }
- NativeHandleWrapper allocate(int32_t width, int32_t height) {
- return mGralloc->allocate(
- width, height, /*layerCount*/ 1,
- static_cast<common::V1_1::PixelFormat>(PixelFormat::RGBA_8888),
+ sp<GraphicBuffer> allocate(int32_t width, int32_t height) {
+ auto result = sp<GraphicBuffer>::make(
+ width, height, static_cast<int32_t>(PixelFormat::RGBA_8888), /*layerCount*/ 1,
static_cast<uint64_t>(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN |
BufferUsage::COMPOSER_OVERLAY));
+ if (result->initCheck() != STATUS_OK) {
+ return nullptr;
+ }
+ return result;
}
struct TestParameters {
@@ -256,7 +252,6 @@
std::unique_ptr<CommandWriterBase> mWriter;
std::unique_ptr<TestCommandReader> mReader;
sp<GraphicsComposerCallback> mComposerCallback;
- std::unique_ptr<Gralloc> mGralloc;
};
TEST_P(GraphicsComposerHidlTest, getDisplayCapabilitiesBadDisplay) {
@@ -458,7 +453,7 @@
mWriter->setLayerBlendMode(IComposerClient::BlendMode::NONE);
mWriter->setLayerSurfaceDamage(
std::vector<IComposerClient::Rect>(1, display.getFrameRect()));
- mWriter->setLayerBuffer(0, handle.get(), -1);
+ mWriter->setLayerBuffer(0, handle->handle, -1);
mWriter->setLayerDataspace(Dataspace::UNKNOWN);
mWriter->validateDisplay();
@@ -476,7 +471,7 @@
ASSERT_NE(nullptr, handle.get());
mWriter->selectLayer(layer);
- mWriter->setLayerBuffer(0, handle.get(), -1);
+ mWriter->setLayerBuffer(0, handle->handle, -1);
mWriter->setLayerSurfaceDamage(std::vector<IComposerClient::Rect>(1, {0, 0, 10, 10}));
mWriter->validateDisplay();
execute();
@@ -544,10 +539,12 @@
setActiveConfigWithConstraints(display, config2, constraints, &timeline));
EXPECT_TRUE(timeline.newVsyncAppliedTimeNanos >= constraints.desiredTimeNanos);
- // Refresh rate should change within a reasonable time
- constexpr std::chrono::nanoseconds kReasonableTimeForChange = 1s; // 1 second
- EXPECT_TRUE(timeline.newVsyncAppliedTimeNanos - constraints.desiredTimeNanos <=
- kReasonableTimeForChange.count());
+ if (configGroup1 == configGroup2) {
+ // Refresh rate should change within a reasonable time
+ constexpr std::chrono::nanoseconds kReasonableTimeForChange = 1s;
+ EXPECT_TRUE(timeline.newVsyncAppliedTimeNanos - constraints.desiredTimeNanos <=
+ kReasonableTimeForChange.count());
+ }
if (timeline.refreshRequired) {
if (params.refreshMiss) {
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
index 40448ec..5699895 100644
--- a/graphics/composer/aidl/Android.bp
+++ b/graphics/composer/aidl/Android.bp
@@ -31,14 +31,14 @@
enabled: true,
support_system_process: true,
},
- frozen: true,
+ frozen: false,
vndk_use_version: "1",
srcs: [
"android/hardware/graphics/composer3/*.aidl",
],
stability: "vintf",
imports: [
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
"android.hardware.common-V2",
],
backend: {
@@ -54,19 +54,22 @@
enabled: true,
},
},
+ rust: {
+ enabled: true,
+ },
},
versions_with_info: [
{
version: "1",
imports: [
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
"android.hardware.common-V2",
],
},
{
version: "2",
imports: [
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
"android.hardware.common-V2",
],
},
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
index 6eba887..0e2d72b 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -42,4 +42,5 @@
AUTO_LOW_LATENCY_MODE = 5,
SUSPEND = 6,
DISPLAY_IDLE_TIMER = 7,
+ MULTI_THREADED_PRESENT = 8,
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
index 662240e..cce35e7 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -45,4 +45,5 @@
boolean acceptDisplayChanges;
boolean presentDisplay;
boolean presentOrValidateDisplay;
+ int frameIntervalNs;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl
new file mode 100644
index 0000000..040afd7
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConfiguration.aidl
@@ -0,0 +1,48 @@
+/**
+ * Copyright 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable DisplayConfiguration {
+ int configId;
+ int width;
+ int height;
+ @nullable android.hardware.graphics.composer3.DisplayConfiguration.Dpi dpi;
+ int configGroup;
+ int vsyncPeriod;
+ @nullable android.hardware.graphics.composer3.VrrConfig vrrConfig;
+ parcelable Dpi {
+ float x;
+ float y;
+ }
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index cb85a88..bc27cc7 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -42,8 +42,14 @@
int getActiveConfig(long display);
android.hardware.graphics.composer3.ColorMode[] getColorModes(long display);
float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
+ /**
+ * @deprecated use getDisplayConfigurations instead. Returns a display attribute value for a particular display configuration. For legacy support getDisplayAttribute should return valid values for any requested DisplayAttribute, and for all of the configs obtained either through getDisplayConfigs or getDisplayConfigurations.
+ */
int getDisplayAttribute(long display, int config, android.hardware.graphics.composer3.DisplayAttribute attribute);
android.hardware.graphics.composer3.DisplayCapability[] getDisplayCapabilities(long display);
+ /**
+ * @deprecated use getDisplayConfigurations instead. For legacy support getDisplayConfigs should return at least one valid config. All the configs returned from the getDisplayConfigs should also be returned from getDisplayConfigurations.
+ */
int[] getDisplayConfigs(long display);
android.hardware.graphics.composer3.DisplayConnectionType getDisplayConnectionType(long display);
android.hardware.graphics.composer3.DisplayIdentification getDisplayIdentificationData(long display);
@@ -79,6 +85,8 @@
android.hardware.graphics.common.HdrConversionCapability[] getHdrConversionCapabilities();
android.hardware.graphics.common.Hdr setHdrConversionStrategy(in android.hardware.graphics.common.HdrConversionStrategy conversionStrategy);
void setRefreshRateChangedCallbackDebugEnabled(long display, boolean enabled);
+ android.hardware.graphics.composer3.DisplayConfiguration[] getDisplayConfigurations(long display, int maxFrameIntervalNs);
+ oneway void notifyExpectedPresent(long display, in android.hardware.graphics.composer3.ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
const int EX_BAD_CONFIG = 1;
const int EX_BAD_DISPLAY = 2;
const int EX_BAD_LAYER = 3;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VrrConfig.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VrrConfig.aidl
new file mode 100644
index 0000000..bb2569f
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VrrConfig.aidl
@@ -0,0 +1,48 @@
+/**
+ * Copyright 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable VrrConfig {
+ int minFrameIntervalNs;
+ @nullable android.hardware.graphics.composer3.VrrConfig.FrameIntervalPowerHint[] frameIntervalPowerHints;
+ @nullable android.hardware.graphics.composer3.VrrConfig.NotifyExpectedPresentConfig notifyExpectedPresentConfig;
+ parcelable FrameIntervalPowerHint {
+ int frameIntervalNs;
+ int averageRefreshPeriodNs;
+ }
+ parcelable NotifyExpectedPresentConfig {
+ int notifyExpectedPresentHeadsUpNs;
+ int notifyExpectedPresentTimeoutNs;
+ }
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
index f4b2984..7154d74 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -80,4 +80,20 @@
* IComposerCallback.onVsyncIdle.
*/
DISPLAY_IDLE_TIMER = 7,
+ /**
+ * Indicates that both the composer HAL implementation and the given display
+ * support calling executeCommands concurrently from separate threads.
+ * executeCommands for a particular display will never run concurrently to
+ * any other executeCommands for the same display. In addition, the
+ * CommandResultPayload must only reference displays included in the
+ * DisplayCommands passed to executeCommands. Displays referenced from
+ * separate threads must have minimal interference with one another. If a
+ * HWC-managed display has this capability, SurfaceFlinger can run
+ * executeCommands for this display concurrently with other displays with the
+ * same capability.
+ * @see IComposerClient.executeCommands
+ * @see DisplayCommand.presentDisplay
+ * @see DisplayCommand.validateDisplay
+ */
+ MULTI_THREADED_PRESENT = 8,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
index 4f69aee..02c1389 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -174,4 +174,15 @@
* or perform a VALIDATE_DISPLAY action instead.
*/
boolean presentOrValidateDisplay;
+
+ /**
+ * If a value greater than 0 is set, it provides a hint about the next frame(s)
+ * cadence. This parameter represents the time in nanoseconds of when to expect the
+ * next frames to arrive. For example. frameIntervalNs=33333333 indicates that the
+ * cadence of the next frames is 30Hz.
+ *
+ * The implementation should take the necessary steps to present the next frames as
+ * close as possible to the cadence.
+ */
+ int frameIntervalNs;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl
new file mode 100644
index 0000000..09c42dc
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConfiguration.aidl
@@ -0,0 +1,70 @@
+/**
+ * Copyright 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+import android.hardware.graphics.composer3.VrrConfig;
+
+@VintfStability
+parcelable DisplayConfiguration {
+ /**
+ * The config id, to be used with IComposerClient.setActiveConfig.
+ */
+ int configId;
+
+ /**
+ * Dimensions in pixels
+ */
+ int width;
+ int height;
+
+ /**
+ * Dots per inch.
+ * If the DPI for a configuration is unavailable or is
+ * considered unreliable, the device may set null instead.
+ */
+ parcelable Dpi {
+ float x;
+ float y;
+ }
+ @nullable Dpi dpi;
+
+ /**
+ * The configuration group ID this config is associated to.
+ * Switching between configurations within the same group may be
+ * done seamlessly in some conditions via
+ * setActiveConfigWithConstraints. Configurations which share the
+ * same config group are similar in all attributes except for the
+ * vsync period.
+ */
+ int configGroup;
+
+ /**
+ * Vsync period in nanoseconds. This period represents the internal
+ * frequency of the display. IComposerCallback.onVsync is expected
+ * to be called on each vsync event. For non-VRR configurations, a
+ * frame can be presented on each vsync event.
+ *
+ * A present fence, retrieved from CommandResultPayload.presentFence
+ * must be signaled on a vsync boundary.
+ */
+ int vsyncPeriod;
+
+ /**
+ * Represents the specific configurations for VRR (Variable Refresh Rate) display modes.
+ * Non-VRR modes should set this to null.
+ */
+ @nullable VrrConfig vrrConfig;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index 4e77f86..725c947 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -22,12 +22,14 @@
import android.hardware.graphics.common.HdrConversionStrategy;
import android.hardware.graphics.common.Transform;
import android.hardware.graphics.composer3.ClientTargetProperty;
+import android.hardware.graphics.composer3.ClockMonotonicTimestamp;
import android.hardware.graphics.composer3.ColorMode;
import android.hardware.graphics.composer3.CommandResultPayload;
import android.hardware.graphics.composer3.ContentType;
import android.hardware.graphics.composer3.DisplayAttribute;
import android.hardware.graphics.composer3.DisplayCapability;
import android.hardware.graphics.composer3.DisplayCommand;
+import android.hardware.graphics.composer3.DisplayConfiguration;
import android.hardware.graphics.composer3.DisplayConnectionType;
import android.hardware.graphics.composer3.DisplayContentSample;
import android.hardware.graphics.composer3.DisplayContentSamplingAttributes;
@@ -234,9 +236,18 @@
float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
/**
+ * @deprecated use getDisplayConfigurations instead.
+ *
* Returns a display attribute value for a particular display
* configuration.
*
+ * For legacy support getDisplayAttribute should return valid values for any requested
+ * DisplayAttribute, and for all of the configs obtained either through getDisplayConfigs
+ * or getDisplayConfigurations.
+ *
+ * @see getDisplayConfigurations
+ * @see getDisplayConfigs
+ *
* @param display is the display to query.
* @param config is the display configuration for which to return
* attribute values.
@@ -263,15 +274,12 @@
DisplayCapability[] getDisplayCapabilities(long display);
/**
- * Returns handles for all of the valid display configurations on this
- * display.
- * This should never return INVALID_CONFIGURATION as a valid value.
+ * @deprecated use getDisplayConfigurations instead.
+ * For legacy support getDisplayConfigs should return at least one valid config.
+ * All the configs returned from the getDisplayConfigs should also be returned
+ * from getDisplayConfigurations.
*
- * @param display is the display to query.
- *
- * @return is an array of configuration handles.
- *
- * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+ * @see getDisplayConfigurations
*/
int[] getDisplayConfigs(long display);
@@ -864,4 +872,45 @@
* false when refresh rate callback is disabled.
*/
void setRefreshRateChangedCallbackDebugEnabled(long display, boolean enabled);
+
+ /**
+ * Returns all of the valid display configurations.
+ * getDisplayConfigurations is the superset of getDisplayConfigs and
+ * getDisplayConfigs should return at least one config.
+ *
+ * @param display is the display for which the configurations are requested.
+ * @param maxFrameIntervalNs refers to the largest frameInterval to be set for
+ * VrrConfig.frameIntervalPowerHints in nanoseconds
+ *
+ * @see getDisplayConfigs
+ */
+ DisplayConfiguration[] getDisplayConfigurations(long display, int maxFrameIntervalNs);
+
+ /**
+ * Provides an early hint for a frame that is likely to be presented.
+ * This is used for the implementation to take the necessary steps to ensure that
+ * the next frame(s) could be presented as close as possible to the expectedPresentTime and
+ * according to the frameIntervalNs cadence.
+ * See DisplayCommand.expectedPresentTime and DisplayCommand.frameIntervalNs.
+ *
+ * The framework will call this function based on the parameters specified in
+ * DisplayConfiguration.VrrConfig:
+ * - notifyExpectedPresentTimeoutNs specifies the idle time from the previous present command
+ * where the framework must send the early hint for the next frame.
+ * - notifyExpectedPresentHeadsUpNs specifies minimal time that framework must send
+ * the early hint before the next frame.
+ *
+ * The framework can omit calling this API when the next present command matches
+ * the cadence of the previous present command frameIntervalNs.
+ *
+ * If DisplayConfiguration.notifyExpectedPresentConfig is null, this function will never be
+ * called.
+ *
+ * @param display is the display for which the notifyExpectedPresent is called.
+ * @param expectedPresentTime is the expectedPresentTime that will be provided in the next
+ * present command
+ * @param frameIntervalNs is a hint about the cadence of the next frames in nanoseconds.
+ */
+ oneway void notifyExpectedPresent(
+ long display, in ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/VrrConfig.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/VrrConfig.aidl
new file mode 100644
index 0000000..3b241ba
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/VrrConfig.aidl
@@ -0,0 +1,65 @@
+/**
+ * Copyright 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+parcelable VrrConfig {
+ /**
+ * The minimal time (in nanoseconds) that needs to pass between the previously presented frame
+ * and when the next frame can be presented.
+ */
+ int minFrameIntervalNs;
+
+ /**
+ * An optional mapping between frame intervals, and the physical display refresh period on
+ * average. This provides useful information to the framework when picking a specific frame rate
+ * (which is a divisor of the vsync rate) about the real display refresh rate, which could be
+ * used for power optimizations. The implementation should populate this map for frame rates
+ * that requires the display to run at a higher refresh rate due to self refresh frames. The
+ * lowest frame rate provided should be according to the parameter `maxFrameIntervalNs`
+ * specified in IComposerClient.getDisplayConfigurations, as the framework would generally not
+ * try to run at a lower frame rate.
+ */
+ parcelable FrameIntervalPowerHint {
+ int frameIntervalNs;
+ int averageRefreshPeriodNs;
+ }
+ @nullable FrameIntervalPowerHint[] frameIntervalPowerHints;
+
+ parcelable NotifyExpectedPresentConfig {
+ /**
+ * The minimal time in nanoseconds that IComposerClient.notifyExpectedPresent needs to be
+ * called ahead of an expectedPresentTime provided on a presentDisplay command.
+ */
+ int notifyExpectedPresentHeadsUpNs;
+
+ /**
+ * The time in nanoseconds that represents a timeout from the previous presentDisplay, which
+ * after this point the display needs a call to IComposerClient.notifyExpectedPresent before
+ * sending the next frame. If set to 0, there is no need to call
+ * IComposerClient.notifyExpectedPresent for timeout.
+ */
+ int notifyExpectedPresentTimeoutNs;
+ }
+
+ /**
+ * Parameters for when to call IComposerClient.notifyExpectedPresent.
+ *
+ * When set to null, the framework will not call IComposerClient.notifyExpectedPresent.
+ */
+ @nullable NotifyExpectedPresentConfig notifyExpectedPresentConfig;
+}
diff --git a/graphics/composer/aidl/vts/Android.bp b/graphics/composer/aidl/vts/Android.bp
index 60360fd..d71999d 100644
--- a/graphics/composer/aidl/vts/Android.bp
+++ b/graphics/composer/aidl/vts/Android.bp
@@ -54,13 +54,6 @@
"libgui",
"libhidlbase",
"libprocessgroup",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
"libvndksupport",
],
header_libs: [
@@ -70,13 +63,6 @@
"android.hardware.graphics.common@1.2",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
- "android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
"libarect",
"libbase",
diff --git a/graphics/composer/aidl/vts/ReadbackVts.cpp b/graphics/composer/aidl/vts/ReadbackVts.cpp
index abb58e2..8605628 100644
--- a/graphics/composer/aidl/vts/ReadbackVts.cpp
+++ b/graphics/composer/aidl/vts/ReadbackVts.cpp
@@ -35,6 +35,7 @@
writer.setLayerPlaneAlpha(mDisplay, mLayer, mAlpha);
writer.setLayerBlendMode(mDisplay, mLayer, mBlendMode);
writer.setLayerBrightness(mDisplay, mLayer, mBrightness);
+ writer.setLayerDataspace(mDisplay, mLayer, mDataspace);
}
std::string ReadbackHelper::getColorModeString(ColorMode mode) {
@@ -99,6 +100,7 @@
layerSettings.geometry.positionTransform = scale * translation;
layerSettings.whitePointNits = mWhitePointNits;
+ layerSettings.sourceDataspace = static_cast<::android::ui::Dataspace>(mDataspace);
return layerSettings;
}
@@ -189,6 +191,23 @@
}
}
+void ReadbackHelper::compareColorBuffers(void* expectedBuffer, void* actualBuffer,
+ const uint32_t stride, const uint32_t width,
+ const uint32_t height, common::PixelFormat pixelFormat) {
+ const int32_t bytesPerPixel = ReadbackHelper::GetBytesPerPixel(pixelFormat);
+ ASSERT_NE(-1, bytesPerPixel);
+ for (int row = 0; row < height; row++) {
+ for (int col = 0; col < width; col++) {
+ int offset = (row * static_cast<int32_t>(stride) + col) * bytesPerPixel;
+ uint8_t* expectedColor = (uint8_t*)expectedBuffer + offset;
+ uint8_t* actualColor = (uint8_t*)actualBuffer + offset;
+ ASSERT_EQ(expectedColor[0], actualColor[0]);
+ ASSERT_EQ(expectedColor[1], actualColor[1]);
+ ASSERT_EQ(expectedColor[2], actualColor[2]);
+ }
+ }
+}
+
ReadbackBuffer::ReadbackBuffer(int64_t display, const std::shared_ptr<VtsComposerClient>& client,
int32_t width, int32_t height, common::PixelFormat pixelFormat,
common::Dataspace dataspace)
@@ -248,6 +267,15 @@
EXPECT_EQ(::android::OK, status);
}
+::android::sp<::android::GraphicBuffer> ReadbackBuffer::getBuffer() {
+ const auto& [fenceStatus, bufferFence] = mComposerClient->getReadbackBufferFence(mDisplay);
+ EXPECT_TRUE(fenceStatus.isOk());
+ if (bufferFence.get() != -1) {
+ sync_wait(bufferFence.get(), -1);
+ }
+ return mGraphicBuffer;
+}
+
void TestColorLayer::write(ComposerClientWriter& writer) {
TestLayer::write(writer);
writer.setLayerCompositionType(mDisplay, mLayer, Composition::SOLID_COLOR);
@@ -344,10 +372,6 @@
"TestBufferLayer");
}
-void TestBufferLayer::setDataspace(common::Dataspace dataspace, ComposerClientWriter& writer) {
- writer.setLayerDataspace(mDisplay, mLayer, dataspace);
-}
-
void TestBufferLayer::setToClientComposition(ComposerClientWriter& writer) {
writer.setLayerCompositionType(mDisplay, mLayer, Composition::CLIENT);
}
diff --git a/graphics/composer/aidl/vts/ReadbackVts.h b/graphics/composer/aidl/vts/ReadbackVts.h
index ee9f0d5..ee20573 100644
--- a/graphics/composer/aidl/vts/ReadbackVts.h
+++ b/graphics/composer/aidl/vts/ReadbackVts.h
@@ -20,7 +20,6 @@
#include <android-base/unique_fd.h>
#include <android/hardware/graphics/composer3/ComposerClientReader.h>
#include <android/hardware/graphics/composer3/ComposerClientWriter.h>
-#include <mapper-vts/2.1/MapperVts.h>
#include <renderengine/RenderEngine.h>
#include <ui/GraphicBuffer.h>
#include <memory>
@@ -32,7 +31,6 @@
using ::android::renderengine::LayerSettings;
using common::Dataspace;
using common::PixelFormat;
-using IMapper2_1 = ::android::hardware::graphics::mapper::V2_1::IMapper;
static const Color BLACK = {0.0f, 0.0f, 0.0f, 1.0f};
static const Color RED = {1.0f, 0.0f, 0.0f, 1.0f};
@@ -44,6 +42,9 @@
static const Color GREEN = {0.0f, 1.0f, 0.0f, 1.0f};
static const Color BLUE = {0.0f, 0.0f, 1.0f, 1.0f};
static const Color WHITE = {1.0f, 1.0f, 1.0f, 1.0f};
+static const Color LIGHT_RED = {0.5f, 0.0f, 0.0f, 1.0f};
+static const Color LIGHT_GREEN = {0.0f, 0.5f, 0.0f, 1.0f};
+static const Color LIGHT_BLUE = {0.0f, 0.0f, 0.5f, 1.0f};
class TestRenderEngine;
@@ -73,6 +74,8 @@
mSurfaceDamage = std::move(surfaceDamage);
}
+ void setDataspace(Dataspace dataspace) { mDataspace = dataspace; }
+
void setTransform(Transform transform) { mTransform = transform; }
void setAlpha(float alpha) { mAlpha = alpha; }
void setBlendMode(BlendMode blendMode) { mBlendMode = blendMode; }
@@ -100,6 +103,7 @@
float mAlpha = 1.0;
BlendMode mBlendMode = BlendMode::NONE;
uint32_t mZOrder = 0;
+ Dataspace mDataspace = Dataspace::UNKNOWN;
};
class TestColorLayer : public TestLayer {
@@ -132,8 +136,6 @@
void setBuffer(std::vector<Color> colors);
- void setDataspace(Dataspace dataspace, ComposerClientWriter& writer);
-
void setToClientComposition(ComposerClientWriter& writer);
uint32_t getWidth() const { return mWidth; }
@@ -187,6 +189,9 @@
static void compareColorBuffers(const std::vector<Color>& expectedColors, void* bufferData,
const uint32_t stride, const uint32_t width,
const uint32_t height, PixelFormat pixelFormat);
+ static void compareColorBuffers(void* expectedBuffer, void* actualBuffer, const uint32_t stride,
+ const uint32_t width, const uint32_t height,
+ PixelFormat pixelFormat);
};
class ReadbackBuffer {
@@ -198,6 +203,8 @@
void checkReadbackBuffer(const std::vector<Color>& expectedColors);
+ ::android::sp<::android::GraphicBuffer> getBuffer();
+
protected:
uint32_t mWidth;
uint32_t mHeight;
diff --git a/graphics/composer/aidl/vts/RenderEngineVts.cpp b/graphics/composer/aidl/vts/RenderEngineVts.cpp
index 66779c8..4e7f773 100644
--- a/graphics/composer/aidl/vts/RenderEngineVts.cpp
+++ b/graphics/composer/aidl/vts/RenderEngineVts.cpp
@@ -19,7 +19,6 @@
namespace aidl::android::hardware::graphics::composer3::vts {
-using ::android::hardware::graphics::mapper::V2_1::IMapper;
using ::android::renderengine::DisplaySettings;
using ::android::renderengine::LayerSettings;
using ::android::renderengine::RenderEngineCreationArgs;
@@ -67,7 +66,7 @@
mGraphicBuffer, *mRenderEngine,
::android::renderengine::impl::ExternalTexture::Usage::WRITEABLE);
auto result = mRenderEngine
- ->drawLayers(mDisplaySettings, compositionLayers, texture, true,
+ ->drawLayers(mDisplaySettings, compositionLayers, texture,
std::move(bufferFence))
.get();
if (result.ok()) {
@@ -90,4 +89,32 @@
ASSERT_EQ(::android::OK, mGraphicBuffer->unlock());
}
+void TestRenderEngine::checkColorBuffer(const ::android::sp<::android::GraphicBuffer>& buffer) {
+ ASSERT_EQ(mGraphicBuffer->getWidth(), buffer->getWidth());
+ ASSERT_EQ(mGraphicBuffer->getHeight(), buffer->getHeight());
+ void* renderedBufferData;
+ int32_t bytesPerPixel = -1;
+ int32_t bytesPerStride = -1;
+ ASSERT_EQ(0, mGraphicBuffer->lock(static_cast<uint32_t>(mGraphicBuffer->getUsage()),
+ &renderedBufferData, &bytesPerPixel, &bytesPerStride));
+ const uint32_t renderedStride = (bytesPerPixel > 0 && bytesPerStride > 0)
+ ? static_cast<uint32_t>(bytesPerStride / bytesPerPixel)
+ : mGraphicBuffer->getStride();
+
+ void* bufferData;
+ ASSERT_EQ(0, buffer->lock(static_cast<uint32_t>(buffer->getUsage()), &bufferData,
+ &bytesPerPixel, &bytesPerStride));
+ const uint32_t bufferStride = (bytesPerPixel > 0 && bytesPerStride > 0)
+ ? static_cast<uint32_t>(bytesPerStride / bytesPerPixel)
+ : buffer->getStride();
+
+ ASSERT_EQ(renderedStride, bufferStride);
+
+ ReadbackHelper::compareColorBuffers(renderedBufferData, bufferData, bufferStride,
+ mGraphicBuffer->getWidth(), mGraphicBuffer->getHeight(),
+ mFormat);
+ ASSERT_EQ(::android::OK, buffer->unlock());
+ ASSERT_EQ(::android::OK, mGraphicBuffer->unlock());
+}
+
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/RenderEngineVts.h b/graphics/composer/aidl/vts/RenderEngineVts.h
index 43d3a42..bbe508f 100644
--- a/graphics/composer/aidl/vts/RenderEngineVts.h
+++ b/graphics/composer/aidl/vts/RenderEngineVts.h
@@ -15,13 +15,11 @@
*/
#pragma once
-#include <mapper-vts/2.1/MapperVts.h>
#include <math/half.h>
#include <math/vec3.h>
#include <renderengine/ExternalTexture.h>
#include <renderengine/RenderEngine.h>
#include <ui/GraphicBuffer.h>
-#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <ui/Region.h>
@@ -29,7 +27,6 @@
namespace aidl::android::hardware::graphics::composer3::vts {
-using ::android::hardware::graphics::mapper::V2_1::IMapper;
using ::android::renderengine::DisplaySettings;
using ::android::renderengine::ExternalTexture;
using ::android::renderengine::RenderEngineCreationArgs;
@@ -48,6 +45,7 @@
};
void drawLayers();
void checkColorBuffer(const std::vector<Color>& expectedColors);
+ void checkColorBuffer(const ::android::sp<::android::GraphicBuffer>& buffer);
::android::renderengine::RenderEngine& getInternalRenderEngine() { return *mRenderEngine; }
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.cpp b/graphics/composer/aidl/vts/VtsComposerClient.cpp
index 25b0ca0..11b995e 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.cpp
+++ b/graphics/composer/aidl/vts/VtsComposerClient.cpp
@@ -58,7 +58,7 @@
return verifyComposerCallbackParams() && destroyAllLayers();
}
-std::pair<ScopedAStatus, int32_t> VtsComposerClient::getInterfaceVersion() {
+std::pair<ScopedAStatus, int32_t> VtsComposerClient::getInterfaceVersion() const {
int32_t version = 1;
auto status = mComposerClient->getInterfaceVersion(&version);
return {std::move(status), version};
@@ -295,7 +295,31 @@
std::pair<ScopedAStatus, std::vector<int32_t>> VtsComposerClient::getDisplayConfigs(
int64_t display) {
std::vector<int32_t> outConfigs;
- return {mComposerClient->getDisplayConfigs(display, &outConfigs), outConfigs};
+ if (!getDisplayConfigurationSupported()) {
+ return {mComposerClient->getDisplayConfigs(display, &outConfigs), outConfigs};
+ }
+
+ auto [status, configs] = getDisplayConfigurations(display);
+ if (!status.isOk()) {
+ return {std::move(status), outConfigs};
+ }
+ for (const auto& config : configs) {
+ outConfigs.emplace_back(config.configId);
+ }
+ return {std::move(status), outConfigs};
+}
+
+std::pair<ScopedAStatus, std::vector<DisplayConfiguration>>
+VtsComposerClient::getDisplayConfigurations(int64_t display) {
+ std::vector<DisplayConfiguration> outConfigs;
+ return {mComposerClient->getDisplayConfigurations(display, kMaxFrameIntervalNs, &outConfigs),
+ outConfigs};
+}
+
+ScopedAStatus VtsComposerClient::notifyExpectedPresent(int64_t display,
+ ClockMonotonicTimestamp expectedPresentTime,
+ int frameIntervalNs) {
+ return mComposerClient->notifyExpectedPresent(display, expectedPresentTime, frameIntervalNs);
}
std::pair<ScopedAStatus, int32_t> VtsComposerClient::getDisplayVsyncPeriod(int64_t display) {
@@ -439,31 +463,41 @@
vtsDisplays.reserve(displays.size());
for (int64_t display : displays) {
auto vtsDisplay = VtsDisplay{display};
- auto configs = getDisplayConfigs(display);
- if (!configs.first.isOk()) {
- ALOGE("Unable to get the displays for test, failed to get the configs "
- "for display %" PRId64,
- display);
- return {std::move(configs.first), vtsDisplays};
- }
- for (int config : configs.second) {
- auto status = addDisplayConfig(&vtsDisplay, config);
+ if (getDisplayConfigurationSupported()) {
+ auto [status, configs] = getDisplayConfigurations(display);
if (!status.isOk()) {
- ALOGE("Unable to get the displays for test, failed to add config "
+ ALOGE("Unable to get the displays for test, failed to get the DisplayConfigs "
"for display %" PRId64,
display);
return {std::move(status), vtsDisplays};
}
+ addDisplayConfigs(&vtsDisplay, configs);
+ } else {
+ auto [status, configs] = getDisplayConfigs(display);
+ if (!status.isOk()) {
+ ALOGE("Unable to get the displays for test, failed to get the configs "
+ "for display %" PRId64,
+ display);
+ return {std::move(status), vtsDisplays};
+ }
+ for (int config : configs) {
+ status = addDisplayConfigLegacy(&vtsDisplay, config);
+ if (!status.isOk()) {
+ ALOGE("Unable to get the displays for test, failed to add config "
+ "for display %" PRId64,
+ display);
+ return {std::move(status), vtsDisplays};
+ }
+ }
}
-
- auto config = getActiveConfig(display);
- if (!config.first.isOk()) {
+ auto activeConfig = getActiveConfig(display);
+ if (!activeConfig.first.isOk()) {
ALOGE("Unable to get the displays for test, failed to get active config "
- "for display %" PRId64, display);
- return {std::move(config.first), vtsDisplays};
+ "for display %" PRId64,
+ display);
+ return {std::move(activeConfig.first), vtsDisplays};
}
-
- auto status = updateDisplayProperties(&vtsDisplay, config.second);
+ auto status = updateDisplayProperties(&vtsDisplay, activeConfig.second);
if (!status.isOk()) {
ALOGE("Unable to get the displays for test, "
"failed to update the properties "
@@ -480,39 +514,53 @@
}
}
-ScopedAStatus VtsComposerClient::addDisplayConfig(VtsDisplay* vtsDisplay, int32_t config) {
- const auto width =
- getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::WIDTH);
- const auto height =
- getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::HEIGHT);
+void VtsComposerClient::addDisplayConfigs(VtsDisplay* vtsDisplay,
+ const std::vector<DisplayConfiguration>& configs) {
+ for (const auto& config : configs) {
+ vtsDisplay->addDisplayConfig(config.configId, {config.vsyncPeriod, config.configGroup});
+ }
+}
+
+ScopedAStatus VtsComposerClient::addDisplayConfigLegacy(VtsDisplay* vtsDisplay, int32_t config) {
const auto vsyncPeriod =
getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::VSYNC_PERIOD);
const auto configGroup =
getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::CONFIG_GROUP);
- if (width.first.isOk() && height.first.isOk() && vsyncPeriod.first.isOk() &&
- configGroup.first.isOk()) {
+ if (vsyncPeriod.first.isOk() && configGroup.first.isOk()) {
vtsDisplay->addDisplayConfig(config, {vsyncPeriod.second, configGroup.second});
return ScopedAStatus::ok();
}
- LOG(ERROR) << "Failed to update display property for width: " << width.first.isOk()
- << ", height: " << height.first.isOk() << ", vsync: " << vsyncPeriod.first.isOk()
+ LOG(ERROR) << "Failed to update display property vsync: " << vsyncPeriod.first.isOk()
<< ", config: " << configGroup.first.isOk();
return ScopedAStatus::fromServiceSpecificError(IComposerClient::EX_BAD_CONFIG);
}
ScopedAStatus VtsComposerClient::updateDisplayProperties(VtsDisplay* vtsDisplay, int32_t config) {
- const auto width =
- getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::WIDTH);
- const auto height =
- getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::HEIGHT);
- if (width.first.isOk() && height.first.isOk()) {
- vtsDisplay->setDimensions(width.second, height.second);
- return ScopedAStatus::ok();
- }
+ if (getDisplayConfigurationSupported()) {
+ auto [status, configs] = getDisplayConfigurations(vtsDisplay->getDisplayId());
+ if (status.isOk()) {
+ for (const auto& displayConfig : configs) {
+ if (displayConfig.configId == config) {
+ vtsDisplay->setDimensions(displayConfig.width, displayConfig.height);
+ return ScopedAStatus::ok();
+ }
+ }
+ }
+ LOG(ERROR) << "Failed to update display property with DisplayConfig";
+ } else {
+ const auto width =
+ getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::WIDTH);
+ const auto height =
+ getDisplayAttribute(vtsDisplay->getDisplayId(), config, DisplayAttribute::HEIGHT);
+ if (width.first.isOk() && height.first.isOk()) {
+ vtsDisplay->setDimensions(width.second, height.second);
+ return ScopedAStatus::ok();
+ }
- LOG(ERROR) << "Failed to update display property for width: " << width.first.isOk()
- << ", height: " << height.first.isOk();
+ LOG(ERROR) << "Failed to update display property for width: " << width.first.isOk()
+ << ", height: " << height.first.isOk();
+ }
return ScopedAStatus::fromServiceSpecificError(IComposerClient::EX_BAD_CONFIG);
}
@@ -576,6 +624,13 @@
return isValid;
}
+bool VtsComposerClient::getDisplayConfigurationSupported() const {
+ auto [status, interfaceVersion] = getInterfaceVersion();
+ EXPECT_TRUE(status.isOk());
+ // getDisplayConfigurations api is supported starting interface version 3
+ return interfaceVersion >= 3;
+}
+
bool VtsComposerClient::destroyAllLayers() {
std::unordered_map<int64_t, DisplayResource> physicalDisplays;
while (!mDisplayResources.empty()) {
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.h b/graphics/composer/aidl/vts/VtsComposerClient.h
index ea3318c..20dc733 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.h
+++ b/graphics/composer/aidl/vts/VtsComposerClient.h
@@ -61,7 +61,7 @@
bool tearDown();
- std::pair<ScopedAStatus, int32_t> getInterfaceVersion();
+ std::pair<ScopedAStatus, int32_t> getInterfaceVersion() const;
std::pair<ScopedAStatus, VirtualDisplay> createVirtualDisplay(int32_t width, int32_t height,
PixelFormat pixelFormat,
@@ -142,6 +142,13 @@
std::pair<ScopedAStatus, std::vector<int32_t>> getDisplayConfigs(int64_t display);
+ std::pair<ScopedAStatus, std::vector<DisplayConfiguration>> getDisplayConfigurations(
+ int64_t display);
+
+ ScopedAStatus notifyExpectedPresent(int64_t display,
+ ClockMonotonicTimestamp expectedPresentTime,
+ int frameIntervalNs);
+
std::pair<ScopedAStatus, int32_t> getDisplayVsyncPeriod(int64_t display);
ScopedAStatus setAutoLowLatencyMode(int64_t display, bool isEnabled);
@@ -189,8 +196,12 @@
std::vector<RefreshRateChangedDebugData> takeListOfRefreshRateChangedDebugData();
+ static constexpr int32_t kMaxFrameIntervalNs = 50000000; // 20fps
+
private:
- ScopedAStatus addDisplayConfig(VtsDisplay* vtsDisplay, int32_t config);
+ void addDisplayConfigs(VtsDisplay*, const std::vector<DisplayConfiguration>&);
+ ScopedAStatus addDisplayConfigLegacy(VtsDisplay*, int32_t config);
+ bool getDisplayConfigurationSupported() const;
ScopedAStatus updateDisplayProperties(VtsDisplay* vtsDisplay, int32_t config);
ScopedAStatus addDisplayToDisplayResources(int64_t display, bool isVirtual);
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
index 9b849cc..466954f 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_ReadbackTest.cpp
@@ -64,16 +64,15 @@
::android::renderengine::RenderEngineCreationArgs::Builder()
.setPixelFormat(static_cast<int>(common::PixelFormat::RGBA_8888))
.setImageCacheSize(TestRenderEngine::sMaxFrameBufferAcquireBuffers)
- .setUseColorManagerment(true)
.setEnableProtectedContext(false)
.setPrecacheToneMapperShaderOnly(false)
.setContextPriority(::android::renderengine::RenderEngine::
ContextPriority::HIGH)
.build())));
- ::android::renderengine::DisplaySettings clientCompositionDisplay;
- clientCompositionDisplay.physicalDisplay = Rect(getDisplayWidth(), getDisplayHeight());
- clientCompositionDisplay.clip = clientCompositionDisplay.physicalDisplay;
+ mClientCompositionDisplaySettings.physicalDisplay =
+ Rect(getDisplayWidth(), getDisplayHeight());
+ mClientCompositionDisplaySettings.clip = mClientCompositionDisplaySettings.physicalDisplay;
mTestRenderEngine->initGraphicBuffer(
static_cast<uint32_t>(getDisplayWidth()), static_cast<uint32_t>(getDisplayHeight()),
@@ -82,7 +81,7 @@
static_cast<uint64_t>(common::BufferUsage::CPU_READ_OFTEN) |
static_cast<uint64_t>(common::BufferUsage::CPU_WRITE_OFTEN) |
static_cast<uint64_t>(common::BufferUsage::GPU_RENDER_TARGET)));
- mTestRenderEngine->setDisplaySettings(clientCompositionDisplay);
+ mTestRenderEngine->setDisplaySettings(mClientCompositionDisplaySettings);
}
void TearDown() override {
@@ -164,6 +163,7 @@
std::unique_ptr<TestRenderEngine> mTestRenderEngine;
common::PixelFormat mPixelFormat;
common::Dataspace mDataspace;
+ ::android::renderengine::DisplaySettings mClientCompositionDisplaySettings;
static constexpr uint32_t kClientTargetSlotCount = 64;
@@ -272,7 +272,7 @@
getDisplayHeight(), common::PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
layer->setZOrder(10);
- layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
ASSERT_NO_FATAL_FAILURE(layer->setBuffer(expectedColors));
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
@@ -456,7 +456,7 @@
getDisplayHeight(), PixelFormat::RGBA_FP16);
layer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
layer->setZOrder(10);
- layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
@@ -554,7 +554,7 @@
deviceLayer->setDisplayFrame({0, 0, static_cast<int32_t>(deviceLayer->getWidth()),
static_cast<int32_t>(deviceLayer->getHeight())});
deviceLayer->setZOrder(10);
- deviceLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ deviceLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
ASSERT_NO_FATAL_FAILURE(deviceLayer->setBuffer(deviceColors));
deviceLayer->write(*mWriter);
@@ -641,7 +641,7 @@
getDisplayHeight(), PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
layer->setZOrder(10);
- layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
ASSERT_NO_FATAL_FAILURE(layer->setBuffer(expectedColors));
std::vector<std::shared_ptr<TestLayer>> layers = {layer};
@@ -769,7 +769,7 @@
getDisplayHeight(), PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
layer->setZOrder(10);
- layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ layer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
layer->setSourceCrop({0, static_cast<float>(getDisplayHeight() / 2),
static_cast<float>(getDisplayWidth()),
static_cast<float>(getDisplayHeight())});
@@ -988,7 +988,7 @@
getDisplayHeight(), PixelFormat::RGBA_8888);
layer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
layer->setZOrder(10);
- layer->setDataspace(Dataspace::UNKNOWN, *mWriter);
+ layer->setDataspace(Dataspace::UNKNOWN);
ASSERT_NO_FATAL_FAILURE(layer->setBuffer(topLayerPixelColors));
layer->setBlendMode(blendMode);
@@ -1223,7 +1223,7 @@
getDisplayHeight(), mPixelFormat, mDataspace);
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
mLayer->setTransform(Transform::FLIP_H);
- mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
std::vector<Color> expectedColors(
static_cast<size_t>(getDisplayWidth() * getDisplayHeight()));
@@ -1269,7 +1269,7 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
mLayer->setTransform(Transform::FLIP_V);
- mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
std::vector<Color> expectedColors(
static_cast<size_t>(getDisplayWidth() * getDisplayHeight()));
@@ -1314,7 +1314,7 @@
ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
mLayer->setTransform(Transform::ROT_180);
- mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode), *mWriter);
+ mLayer->setDataspace(ReadbackHelper::getDataspaceForColorMode(mode));
std::vector<Color> expectedColors(
static_cast<size_t>(getDisplayWidth() * getDisplayHeight()));
@@ -1343,6 +1343,100 @@
}
}
+class GraphicsColorManagementCompositionTest
+ : public GraphicsCompositionTestBase,
+ public testing::WithParamInterface<std::tuple<std::string, Dataspace, Dataspace, Dataspace>> {
+ public:
+ void SetUp() override {
+ SetUpBase(std::get<0>(GetParam()));
+ // for some reason only sRGB reliably works
+ mTestColorModes.erase(
+ std::remove_if(mTestColorModes.begin(), mTestColorModes.end(),
+ [](ColorMode mode) { return mode != ColorMode::SRGB; }),
+ mTestColorModes.end());
+ auto standard = std::get<1>(GetParam());
+ auto transfer = std::get<2>(GetParam());
+ auto range = std::get<3>(GetParam());
+
+ mLayerDataspace = static_cast<Dataspace>(static_cast<int32_t>(standard) |
+ static_cast<int32_t>(transfer) |
+ static_cast<int32_t>(range));
+ ALOGD("Invoking test for dataspace: {%s, %s, %s}", toString(standard).c_str(),
+ toString(transfer).c_str(), toString(range).c_str());
+ }
+
+ void makeLayer() {
+ mLayer = std::make_shared<TestBufferLayer>(
+ mComposerClient, *mTestRenderEngine, getPrimaryDisplayId(), getDisplayWidth(),
+ getDisplayHeight(), common::PixelFormat::RGBA_8888);
+ mLayer->setDisplayFrame({0, 0, getDisplayWidth(), getDisplayHeight()});
+ mLayer->setZOrder(10);
+ mLayer->setAlpha(1.f);
+ mLayer->setDataspace(mLayerDataspace);
+ }
+
+ void fillColor(Color color) {
+ std::vector<Color> baseColors(static_cast<size_t>(getDisplayWidth() * getDisplayHeight()));
+ ReadbackHelper::fillColorsArea(baseColors, getDisplayWidth(),
+ common::Rect{.left = 0,
+ .top = 0,
+ .right = getDisplayWidth(),
+ .bottom = getDisplayHeight()},
+ color);
+ ASSERT_NO_FATAL_FAILURE(mLayer->setBuffer(baseColors));
+ }
+
+ Dataspace mLayerDataspace;
+ std::shared_ptr<TestBufferLayer> mLayer;
+};
+
+TEST_P(GraphicsColorManagementCompositionTest, ColorConversion) {
+ for (ColorMode mode : mTestColorModes) {
+ EXPECT_TRUE(mComposerClient
+ ->setColorMode(getPrimaryDisplayId(), mode, RenderIntent::COLORIMETRIC)
+ .isOk());
+
+ bool isSupported;
+ ASSERT_NO_FATAL_FAILURE(isSupported = getHasReadbackBuffer());
+ if (!isSupported) {
+ GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace";
+ return;
+ }
+
+ mClientCompositionDisplaySettings.outputDataspace =
+ static_cast<::android::ui::Dataspace>(mDataspace);
+ mTestRenderEngine->setDisplaySettings(mClientCompositionDisplaySettings);
+
+ makeLayer();
+ for (auto color : {LIGHT_RED, LIGHT_GREEN, LIGHT_BLUE}) {
+ ALOGD("Testing color: %f, %f, %f, %f with color mode: %d", color.r, color.g, color.b,
+ color.a, mode);
+ ReadbackBuffer readbackBuffer(getPrimaryDisplayId(), mComposerClient, getDisplayWidth(),
+ getDisplayHeight(), mPixelFormat, mDataspace);
+ ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer());
+ fillColor(color);
+ writeLayers({mLayer});
+ EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::ON).isOk());
+
+ ASSERT_TRUE(mReader.takeErrors().empty());
+ mWriter->validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp);
+ execute();
+ if (!mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty()) {
+ continue;
+ }
+ ASSERT_TRUE(mReader.takeErrors().empty());
+ mWriter->presentDisplay(getPrimaryDisplayId());
+ execute();
+ ASSERT_TRUE(mReader.takeErrors().empty());
+
+ mTestRenderEngine->setRenderLayers({mLayer});
+ ASSERT_NO_FATAL_FAILURE(mTestRenderEngine->drawLayers());
+ ASSERT_NO_FATAL_FAILURE(
+ mTestRenderEngine->checkColorBuffer(readbackBuffer.getBuffer()));
+ }
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsCompositionTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, GraphicsCompositionTest,
@@ -1361,5 +1455,17 @@
testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
::android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsColorManagementCompositionTest);
+INSTANTIATE_TEST_SUITE_P(PerInstance, GraphicsColorManagementCompositionTest,
+ testing::Combine(testing::ValuesIn(::android::getAidlHalInstanceNames(
+ IComposer::descriptor)),
+ // Only check sRGB, but verify that extended range
+ // doesn't trigger any gamma shifts
+ testing::Values(Dataspace::STANDARD_BT709),
+ testing::Values(Dataspace::TRANSFER_SRGB),
+ // Don't test limited range until we send YUV overlays
+ testing::Values(Dataspace::RANGE_FULL,
+ Dataspace::RANGE_EXTENDED)));
+
} // namespace
} // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 18d36e4..6d74951 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -34,6 +34,7 @@
#include <ui/PixelFormat.h>
#include <algorithm>
#include <iterator>
+#include <mutex>
#include <numeric>
#include <string>
#include <thread>
@@ -45,7 +46,6 @@
#define LOG_TAG "VtsHalGraphicsComposer3_TargetTest"
namespace aidl::android::hardware::graphics::composer3::vts {
-namespace {
using namespace std::chrono_literals;
@@ -891,39 +891,6 @@
EXPECT_TRUE(status.isOk());
}
-TEST_P(GraphicsComposerAidlTest, GetOverlaySupport) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "Device does not support the new API for overlay support";
- return;
- }
-
- const auto& [status, properties] = mComposerClient->getOverlaySupport();
- if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
- status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) {
- GTEST_SUCCEED() << "getOverlaySupport is not supported";
- return;
- }
-
- ASSERT_TRUE(status.isOk());
- for (const auto& i : properties.combinations) {
- for (const auto standard : i.standards) {
- const auto val = static_cast<int32_t>(standard) &
- static_cast<int32_t>(common::Dataspace::STANDARD_MASK);
- ASSERT_TRUE(val == static_cast<int32_t>(standard));
- }
- for (const auto transfer : i.transfers) {
- const auto val = static_cast<int32_t>(transfer) &
- static_cast<int32_t>(common::Dataspace::TRANSFER_MASK);
- ASSERT_TRUE(val == static_cast<int32_t>(transfer));
- }
- for (const auto range : i.ranges) {
- const auto val = static_cast<int32_t>(range) &
- static_cast<int32_t>(common::Dataspace::RANGE_MASK);
- ASSERT_TRUE(val == static_cast<int32_t>(range));
- }
- }
-}
-
TEST_P(GraphicsComposerAidlTest, GetDisplayPhysicalOrientation_BadDisplay) {
const auto& [status, _] = mComposerClient->getDisplayPhysicalOrientation(getInvalidDisplayId());
@@ -1169,6 +1136,238 @@
EXPECT_NO_FATAL_FAILURE(assertServiceSpecificError(status, IComposerClient::EX_BAD_PARAMETER));
}
+/*
+ * Test that no two display configs are exactly the same.
+ */
+TEST_P(GraphicsComposerAidlTest, GetDisplayConfigNoRepetitions) {
+ for (const auto& display : mDisplays) {
+ const auto& [status, configs] = mComposerClient->getDisplayConfigs(display.getDisplayId());
+ for (std::vector<int>::size_type i = 0; i < configs.size(); i++) {
+ for (std::vector<int>::size_type j = i + 1; j < configs.size(); j++) {
+ const auto& [widthStatus1, width1] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[i], DisplayAttribute::WIDTH);
+ const auto& [heightStatus1, height1] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[i], DisplayAttribute::HEIGHT);
+ const auto& [vsyncPeriodStatus1, vsyncPeriod1] =
+ mComposerClient->getDisplayAttribute(display.getDisplayId(), configs[i],
+ DisplayAttribute::VSYNC_PERIOD);
+ const auto& [groupStatus1, group1] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[i], DisplayAttribute::CONFIG_GROUP);
+
+ const auto& [widthStatus2, width2] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[j], DisplayAttribute::WIDTH);
+ const auto& [heightStatus2, height2] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[j], DisplayAttribute::HEIGHT);
+ const auto& [vsyncPeriodStatus2, vsyncPeriod2] =
+ mComposerClient->getDisplayAttribute(display.getDisplayId(), configs[j],
+ DisplayAttribute::VSYNC_PERIOD);
+ const auto& [groupStatus2, group2] = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), configs[j], DisplayAttribute::CONFIG_GROUP);
+
+ ASSERT_FALSE(width1 == width2 && height1 == height2 &&
+ vsyncPeriod1 == vsyncPeriod2 && group1 == group2);
+ }
+ }
+ }
+}
+
+class GraphicsComposerAidlV2Test : public GraphicsComposerAidlTest {
+ protected:
+ void SetUp() override {
+ GraphicsComposerAidlTest::SetUp();
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SKIP() << "Device interface version is expected to be >= 2";
+ }
+ }
+};
+
+TEST_P(GraphicsComposerAidlV2Test, GetOverlaySupport) {
+ const auto& [status, properties] = mComposerClient->getOverlaySupport();
+ if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
+ status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) {
+ GTEST_SUCCEED() << "getOverlaySupport is not supported";
+ return;
+ }
+
+ ASSERT_TRUE(status.isOk());
+ for (const auto& i : properties.combinations) {
+ for (const auto standard : i.standards) {
+ const auto val = static_cast<int32_t>(standard) &
+ static_cast<int32_t>(common::Dataspace::STANDARD_MASK);
+ ASSERT_TRUE(val == static_cast<int32_t>(standard));
+ }
+ for (const auto transfer : i.transfers) {
+ const auto val = static_cast<int32_t>(transfer) &
+ static_cast<int32_t>(common::Dataspace::TRANSFER_MASK);
+ ASSERT_TRUE(val == static_cast<int32_t>(transfer));
+ }
+ for (const auto range : i.ranges) {
+ const auto val = static_cast<int32_t>(range) &
+ static_cast<int32_t>(common::Dataspace::RANGE_MASK);
+ ASSERT_TRUE(val == static_cast<int32_t>(range));
+ }
+ }
+}
+
+class GraphicsComposerAidlV3Test : public GraphicsComposerAidlTest {
+ protected:
+ void SetUp() override {
+ GraphicsComposerAidlTest::SetUp();
+ if (getInterfaceVersion() <= 2) {
+ GTEST_SKIP() << "Device interface version is expected to be >= 3";
+ }
+ }
+};
+
+TEST_P(GraphicsComposerAidlV3Test, GetDisplayConfigurations) {
+ for (const auto& display : mDisplays) {
+ const auto& [status, displayConfigurations] =
+ mComposerClient->getDisplayConfigurations(display.getDisplayId());
+ EXPECT_TRUE(status.isOk());
+ EXPECT_FALSE(displayConfigurations.empty());
+
+ for (const auto& displayConfig : displayConfigurations) {
+ EXPECT_NE(-1, displayConfig.width);
+ EXPECT_NE(-1, displayConfig.height);
+ EXPECT_NE(-1, displayConfig.vsyncPeriod);
+ EXPECT_NE(-1, displayConfig.configGroup);
+ if (displayConfig.dpi) {
+ EXPECT_NE(-1.f, displayConfig.dpi->x);
+ EXPECT_NE(-1.f, displayConfig.dpi->y);
+ }
+ if (displayConfig.vrrConfig) {
+ const auto& vrrConfig = *displayConfig.vrrConfig;
+ EXPECT_GE(vrrConfig.minFrameIntervalNs, displayConfig.vsyncPeriod);
+
+ EXPECT_EQ(1, std::count_if(
+ displayConfigurations.cbegin(), displayConfigurations.cend(),
+ [displayConfig](const auto& config) {
+ return config.configGroup == displayConfig.configGroup;
+ }))
+ << "There should be only one VRR mode in one ConfigGroup";
+
+ const auto verifyFrameIntervalIsDivisorOfVsync = [&](int32_t frameIntervalNs) {
+ constexpr auto kThreshold = 0.05f; // 5%
+ const auto ratio =
+ static_cast<float>(frameIntervalNs) / displayConfig.vsyncPeriod;
+ return ratio - std::round(ratio) <= kThreshold;
+ };
+
+ EXPECT_TRUE(verifyFrameIntervalIsDivisorOfVsync(vrrConfig.minFrameIntervalNs));
+
+ if (vrrConfig.frameIntervalPowerHints) {
+ const auto& frameIntervalPowerHints = *vrrConfig.frameIntervalPowerHints;
+ EXPECT_FALSE(frameIntervalPowerHints.empty());
+
+ const auto minFrameInterval = *min_element(frameIntervalPowerHints.cbegin(),
+ frameIntervalPowerHints.cend());
+ EXPECT_LE(minFrameInterval->frameIntervalNs,
+ VtsComposerClient::kMaxFrameIntervalNs);
+
+ EXPECT_TRUE(std::all_of(frameIntervalPowerHints.cbegin(),
+ frameIntervalPowerHints.cend(),
+ [&](const auto& frameIntervalPowerHint) {
+ return verifyFrameIntervalIsDivisorOfVsync(
+ frameIntervalPowerHint->frameIntervalNs);
+ }));
+ }
+
+ if (vrrConfig.notifyExpectedPresentConfig) {
+ const auto& notifyExpectedPresentConfig =
+ *vrrConfig.notifyExpectedPresentConfig;
+ EXPECT_GT(0, notifyExpectedPresentConfig.notifyExpectedPresentHeadsUpNs);
+ EXPECT_GE(0, notifyExpectedPresentConfig.notifyExpectedPresentTimeoutNs);
+ }
+ }
+ }
+ }
+}
+
+TEST_P(GraphicsComposerAidlV3Test, GetDisplayConfigsIsSubsetOfGetDisplayConfigurations) {
+ for (const auto& display : mDisplays) {
+ const auto& [status, displayConfigurations] =
+ mComposerClient->getDisplayConfigurations(display.getDisplayId());
+ EXPECT_TRUE(status.isOk());
+
+ const auto& [legacyConfigStatus, legacyConfigs] =
+ mComposerClient->getDisplayConfigs(display.getDisplayId());
+ EXPECT_TRUE(legacyConfigStatus.isOk());
+ EXPECT_FALSE(legacyConfigs.empty());
+ EXPECT_TRUE(legacyConfigs.size() <= displayConfigurations.size());
+
+ for (const auto legacyConfigId : legacyConfigs) {
+ const auto& legacyWidth = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::WIDTH);
+ const auto& legacyHeight = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::HEIGHT);
+ const auto& legacyVsyncPeriod = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::VSYNC_PERIOD);
+ const auto& legacyConfigGroup = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::CONFIG_GROUP);
+ const auto& legacyDpiX = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::DPI_X);
+ const auto& legacyDpiY = mComposerClient->getDisplayAttribute(
+ display.getDisplayId(), legacyConfigId, DisplayAttribute::DPI_Y);
+
+ EXPECT_TRUE(legacyWidth.first.isOk() && legacyHeight.first.isOk() &&
+ legacyVsyncPeriod.first.isOk() && legacyConfigGroup.first.isOk());
+
+ EXPECT_TRUE(std::any_of(
+ displayConfigurations.begin(), displayConfigurations.end(),
+ [&](const auto& displayConfiguration) {
+ const bool requiredAttributesPredicate =
+ displayConfiguration.configId == legacyConfigId &&
+ displayConfiguration.width == legacyWidth.second &&
+ displayConfiguration.height == legacyHeight.second &&
+ displayConfiguration.vsyncPeriod == legacyVsyncPeriod.second &&
+ displayConfiguration.configGroup == legacyConfigGroup.second;
+
+ if (!requiredAttributesPredicate) {
+ // Required attributes did not match
+ return false;
+ }
+
+ // Check optional attributes
+ const auto& [legacyDpiXStatus, legacyDpiXValue] = legacyDpiX;
+ const auto& [legacyDpiYStatus, legacyDpiYValue] = legacyDpiY;
+ if (displayConfiguration.dpi) {
+ if (!legacyDpiXStatus.isOk() || !legacyDpiYStatus.isOk()) {
+ // getDisplayAttribute failed for optional attributes
+ return false;
+ }
+
+ // DPI values in DisplayConfigurations are not scaled (* 1000.f)
+ // the way they are in the legacy DisplayConfigs.
+ constexpr float kEpsilon = 0.001f;
+ return std::abs(displayConfiguration.dpi->x -
+ legacyDpiXValue / 1000.f) < kEpsilon &&
+ std::abs(displayConfiguration.dpi->y -
+ legacyDpiYValue / 1000.f) < kEpsilon;
+ } else {
+ return !legacyDpiXStatus.isOk() && !legacyDpiYStatus.isOk() &&
+ EX_SERVICE_SPECIFIC == legacyDpiXStatus.getExceptionCode() &&
+ EX_SERVICE_SPECIFIC == legacyDpiYStatus.getExceptionCode() &&
+ IComposerClient::EX_UNSUPPORTED ==
+ legacyDpiXStatus.getServiceSpecificError() &&
+ IComposerClient::EX_UNSUPPORTED ==
+ legacyDpiYStatus.getServiceSpecificError();
+ }
+ }));
+ }
+ }
+}
+
+// TODO(b/291792736) Add detailed VTS test cases for NotifyExpectedPresent
+TEST_P(GraphicsComposerAidlV3Test, NotifyExpectedPresent) {
+ for (const auto& display : mDisplays) {
+ EXPECT_TRUE(mComposerClient
+ ->notifyExpectedPresent(display.getDisplayId(),
+ ClockMonotonicTimestamp{0},
+ std::chrono::nanoseconds{8ms}.count())
+ .isOk());
+ }
+}
+
// Tests for Command.
class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
protected:
@@ -1183,21 +1382,17 @@
void execute() {
std::vector<CommandResultPayload> payloads;
for (auto& [_, writer] : mWriters) {
- auto commands = writer.takePendingCommands();
- if (commands.empty()) {
- continue;
- }
-
- auto [status, results] = mComposerClient->executeCommands(commands);
- ASSERT_TRUE(status.isOk()) << "executeCommands failed " << status.getDescription();
-
- payloads.reserve(payloads.size() + results.size());
- payloads.insert(payloads.end(), std::make_move_iterator(results.begin()),
- std::make_move_iterator(results.end()));
+ executeInternal(writer, payloads);
}
mReader.parse(std::move(payloads));
}
+ void execute(ComposerClientWriter& writer, ComposerClientReader& reader) {
+ std::vector<CommandResultPayload> payloads;
+ executeInternal(writer, payloads);
+ reader.parse(std::move(payloads));
+ }
+
static inline auto toTimePoint(nsecs_t time) {
return std::chrono::time_point<std::chrono::steady_clock>(std::chrono::nanoseconds(time));
}
@@ -1522,6 +1717,7 @@
// clang-format on
ComposerClientWriter& getWriter(int64_t display) {
+ std::lock_guard guard{mWritersMutex};
auto [it, _] = mWriters.try_emplace(display, display);
return it->second;
}
@@ -1529,7 +1725,27 @@
ComposerClientReader mReader;
private:
- std::unordered_map<int64_t, ComposerClientWriter> mWriters;
+ void executeInternal(ComposerClientWriter& writer,
+ std::vector<CommandResultPayload>& payloads) {
+ auto commands = writer.takePendingCommands();
+ if (commands.empty()) {
+ return;
+ }
+
+ auto [status, results] = mComposerClient->executeCommands(commands);
+ ASSERT_TRUE(status.isOk()) << "executeCommands failed " << status.getDescription();
+
+ payloads.reserve(payloads.size() + results.size());
+ payloads.insert(payloads.end(), std::make_move_iterator(results.begin()),
+ std::make_move_iterator(results.end()));
+ }
+
+ // Guards access to the map itself. Callers must ensure not to attempt to
+ // - modify the same writer from multiple threads
+ // - insert a new writer into the map during concurrent access, which would invalidate
+ // references from other threads
+ std::mutex mWritersMutex;
+ std::unordered_map<int64_t, ComposerClientWriter> mWriters GUARDED_BY(mWritersMutex);
};
TEST_P(GraphicsComposerAidlCommandTest, SetColorTransform) {
@@ -1662,10 +1878,6 @@
* surface damage have been set
*/
TEST_P(GraphicsComposerAidlCommandTest, PresentDisplayNoLayerStateChanges) {
- if (!hasCapability(Capability::SKIP_VALIDATE)) {
- GTEST_SUCCEED() << "Device does not have skip validate capability, skipping";
- return;
- }
EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::ON).isOk());
const auto& [renderIntentsStatus, renderIntents] =
@@ -1767,53 +1979,6 @@
execute();
}
-TEST_P(GraphicsComposerAidlCommandTest, SetLayerBufferSlotsToClear) {
- // Older HAL versions use a backwards compatible way of clearing buffer slots
- const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
- ASSERT_TRUE(versionStatus.isOk());
- if (version <= 1) {
- GTEST_SUCCEED() << "HAL at version 1 or lower does not have "
- "LayerCommand::bufferSlotsToClear.";
- return;
- }
-
- const auto& [layerStatus, layer] =
- mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount);
- EXPECT_TRUE(layerStatus.isOk());
- auto& writer = getWriter(getPrimaryDisplayId());
-
- // setup 3 buffers in the buffer cache, with the last buffer being active
- // then emulate the Android platform code that clears all 3 buffer slots
-
- const auto buffer1 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
- ASSERT_NE(nullptr, buffer1);
- const auto handle1 = buffer1->handle;
- writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, handle1, /*acquireFence*/ -1);
- execute();
- ASSERT_TRUE(mReader.takeErrors().empty());
-
- const auto buffer2 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
- ASSERT_NE(nullptr, buffer2);
- const auto handle2 = buffer2->handle;
- writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 1, handle2, /*acquireFence*/ -1);
- execute();
- ASSERT_TRUE(mReader.takeErrors().empty());
-
- const auto buffer3 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
- ASSERT_NE(nullptr, buffer3);
- const auto handle3 = buffer3->handle;
- writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 2, handle3, /*acquireFence*/ -1);
- execute();
- ASSERT_TRUE(mReader.takeErrors().empty());
-
- // Ensure we can clear all 3 buffer slots, even the active buffer - it is assumed the
- // current active buffer's slot will be cleared, but still remain the active buffer and no
- // errors will occur.
- writer.setLayerBufferSlotsToClear(getPrimaryDisplayId(), layer, {0, 1, 2});
- execute();
- ASSERT_TRUE(mReader.takeErrors().empty());
-}
-
TEST_P(GraphicsComposerAidlCommandTest, SetLayerBufferMultipleTimes) {
const auto& [layerStatus, layer] =
mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount);
@@ -2405,12 +2570,69 @@
EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::OFF).isOk());
}
-TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Unsupported) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
- "not supported on older version of the service";
- return;
+class GraphicsComposerAidlCommandV2Test : public GraphicsComposerAidlCommandTest {
+ protected:
+ void SetUp() override {
+ GraphicsComposerAidlTest::SetUp();
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SKIP() << "Device interface version is expected to be >= 2";
+ }
}
+};
+/**
+ * Test Capability::SKIP_VALIDATE
+ *
+ * Capability::SKIP_VALIDATE has been deprecated and should not be enabled.
+ */
+TEST_P(GraphicsComposerAidlCommandV2Test, SkipValidateDeprecatedTest) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ ASSERT_FALSE(hasCapability(Capability::SKIP_VALIDATE))
+ << "Found Capability::SKIP_VALIDATE capability.";
+#pragma clang diagnostic pop
+}
+
+TEST_P(GraphicsComposerAidlCommandV2Test, SetLayerBufferSlotsToClear) {
+ // Older HAL versions use a backwards compatible way of clearing buffer slots
+ // HAL at version 1 or lower does not have LayerCommand::bufferSlotsToClear
+ const auto& [layerStatus, layer] =
+ mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount);
+ EXPECT_TRUE(layerStatus.isOk());
+ auto& writer = getWriter(getPrimaryDisplayId());
+
+ // setup 3 buffers in the buffer cache, with the last buffer being active
+ // then emulate the Android platform code that clears all 3 buffer slots
+
+ const auto buffer1 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer1);
+ const auto handle1 = buffer1->handle;
+ writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, handle1, /*acquireFence*/ -1);
+ execute();
+ ASSERT_TRUE(mReader.takeErrors().empty());
+
+ const auto buffer2 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer2);
+ const auto handle2 = buffer2->handle;
+ writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 1, handle2, /*acquireFence*/ -1);
+ execute();
+ ASSERT_TRUE(mReader.takeErrors().empty());
+
+ const auto buffer3 = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer3);
+ const auto handle3 = buffer3->handle;
+ writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 2, handle3, /*acquireFence*/ -1);
+ execute();
+ ASSERT_TRUE(mReader.takeErrors().empty());
+
+ // Ensure we can clear all 3 buffer slots, even the active buffer - it is assumed the
+ // current active buffer's slot will be cleared, but still remain the active buffer and no
+ // errors will occur.
+ writer.setLayerBufferSlotsToClear(getPrimaryDisplayId(), layer, {0, 1, 2});
+ execute();
+ ASSERT_TRUE(mReader.takeErrors().empty());
+}
+
+TEST_P(GraphicsComposerAidlCommandV2Test, SetRefreshRateChangedCallbackDebug_Unsupported) {
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
auto status = mComposerClient->setRefreshRateChangedCallbackDebugEnabled(
getPrimaryDisplayId(), /*enabled*/ true);
@@ -2426,12 +2648,7 @@
}
}
-TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Enabled) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
- "not supported on older version of the service";
- return;
- }
+TEST_P(GraphicsComposerAidlCommandV2Test, SetRefreshRateChangedCallbackDebug_Enabled) {
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2459,13 +2676,8 @@
.isOk());
}
-TEST_P(GraphicsComposerAidlCommandTest,
+TEST_P(GraphicsComposerAidlCommandV2Test,
SetRefreshRateChangedCallbackDebugEnabled_noCallbackWhenIdle) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
- "not supported on older version of the service";
- return;
- }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2521,13 +2733,8 @@
.isOk());
}
-TEST_P(GraphicsComposerAidlCommandTest,
+TEST_P(GraphicsComposerAidlCommandV2Test,
SetRefreshRateChangedCallbackDebugEnabled_SetActiveConfigWithConstraints) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
- "not supported on older version of the service";
- return;
- }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2595,53 +2802,104 @@
}
}
-/*
- * Test that no two display configs are exactly the same.
- */
-TEST_P(GraphicsComposerAidlTest, GetDisplayConfigNoRepetitions) {
- for (const auto& display : mDisplays) {
- const auto& [status, configs] = mComposerClient->getDisplayConfigs(display.getDisplayId());
- for (std::vector<int>::size_type i = 0; i < configs.size(); i++) {
- for (std::vector<int>::size_type j = i + 1; j < configs.size(); j++) {
- const auto& [widthStatus1, width1] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[i], DisplayAttribute::WIDTH);
- const auto& [heightStatus1, height1] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[i], DisplayAttribute::HEIGHT);
- const auto& [vsyncPeriodStatus1, vsyncPeriod1] =
- mComposerClient->getDisplayAttribute(display.getDisplayId(), configs[i],
- DisplayAttribute::VSYNC_PERIOD);
- const auto& [groupStatus1, group1] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[i], DisplayAttribute::CONFIG_GROUP);
-
- const auto& [widthStatus2, width2] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[j], DisplayAttribute::WIDTH);
- const auto& [heightStatus2, height2] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[j], DisplayAttribute::HEIGHT);
- const auto& [vsyncPeriodStatus2, vsyncPeriod2] =
- mComposerClient->getDisplayAttribute(display.getDisplayId(), configs[j],
- DisplayAttribute::VSYNC_PERIOD);
- const auto& [groupStatus2, group2] = mComposerClient->getDisplayAttribute(
- display.getDisplayId(), configs[j], DisplayAttribute::CONFIG_GROUP);
-
- ASSERT_FALSE(width1 == width2 && height1 == height2 &&
- vsyncPeriod1 == vsyncPeriod2 && group1 == group2);
- }
+TEST_P(GraphicsComposerAidlCommandTest, MultiThreadedPresent) {
+ std::vector<VtsDisplay*> displays;
+ for (auto& display : mDisplays) {
+ if (hasDisplayCapability(display.getDisplayId(),
+ DisplayCapability::MULTI_THREADED_PRESENT)) {
+ displays.push_back(&display);
}
}
-}
-/**
- * Test Capability::SKIP_VALIDATE
- *
- * Capability::SKIP_VALIDATE has been deprecated and should not be enabled.
- */
-TEST_P(GraphicsComposerAidlCommandTest, SkipValidateDeprecatedTest) {
- if (getInterfaceVersion() <= 1) {
- GTEST_SUCCEED() << "HAL at version 1 or lower can contain Capability::SKIP_VALIDATE.";
- return;
+ const size_t numDisplays = displays.size();
+ if (numDisplays <= 1u) {
+ GTEST_SKIP();
}
- ASSERT_FALSE(hasCapability(Capability::SKIP_VALIDATE))
- << "Found Capability::SKIP_VALIDATE capability.";
+
+ // When multi-threaded, use a reader per display. As with mWriters, this mutex
+ // guards access to the map.
+ std::mutex readersMutex;
+ std::unordered_map<int64_t, ComposerClientReader> readers;
+ std::vector<std::thread> threads;
+ threads.reserve(numDisplays);
+
+ // Each display will have a layer to present. This maps from the display to
+ // the layer, so we can properly destroy each layer at the end.
+ std::unordered_map<int64_t, int64_t> layers;
+
+ for (auto* const display : displays) {
+ const int64_t displayId = display->getDisplayId();
+
+ // Ensure that all writers and readers have been added to their respective
+ // maps initially, so that the following loop never modifies the maps. The
+ // maps are accessed from different threads, and if the maps were modified,
+ // this would invalidate their iterators, and therefore references to the
+ // writers and readers.
+ auto& writer = getWriter(displayId);
+ {
+ std::lock_guard guard{readersMutex};
+ readers.try_emplace(displayId, displayId);
+ }
+
+ EXPECT_TRUE(mComposerClient->setPowerMode(displayId, PowerMode::ON).isOk());
+
+ const auto& [status, layer] = mComposerClient->createLayer(displayId, kBufferSlotCount);
+ const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+ ASSERT_NE(nullptr, buffer);
+ ASSERT_EQ(::android::OK, buffer->initCheck());
+ ASSERT_NE(nullptr, buffer->handle);
+
+ configureLayer(*display, layer, Composition::DEVICE, display->getFrameRect(),
+ display->getCrop());
+ writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+ /*acquireFence*/ -1);
+ writer.setLayerDataspace(displayId, layer, common::Dataspace::UNKNOWN);
+ layers.try_emplace(displayId, layer);
+ }
+
+ for (auto* const display : displays) {
+ const int64_t displayId = display->getDisplayId();
+ auto& writer = getWriter(displayId);
+ std::unique_lock lock{readersMutex};
+ auto& reader = readers.at(displayId);
+ lock.unlock();
+
+ writer.validateDisplay(displayId, ComposerClientWriter::kNoTimestamp);
+ execute(writer, reader);
+
+ threads.emplace_back([this, displayId, &readers, &readersMutex]() {
+ auto& writer = getWriter(displayId);
+ std::unique_lock lock{readersMutex};
+ ComposerClientReader& reader = readers.at(displayId);
+ lock.unlock();
+
+ writer.presentDisplay(displayId);
+ execute(writer, reader);
+ ASSERT_TRUE(reader.takeErrors().empty());
+
+ auto presentFence = reader.takePresentFence(displayId);
+ // take ownership
+ const int fenceOwner = presentFence.get();
+ *presentFence.getR() = -1;
+ EXPECT_NE(-1, fenceOwner);
+ const auto presentFence2 = sp<::android::Fence>::make(fenceOwner);
+ presentFence2->waitForever(LOG_TAG);
+ });
+ }
+
+ for (auto& thread : threads) {
+ thread.join();
+ }
+
+ for (auto& [displayId, layer] : layers) {
+ EXPECT_TRUE(mComposerClient->destroyLayer(displayId, layer).isOk());
+ }
+
+ std::lock_guard guard{readersMutex};
+ for (auto& [displayId, reader] : readers) {
+ ASSERT_TRUE(reader.takeErrors().empty());
+ ASSERT_TRUE(reader.takeChangedCompositionTypes(displayId).empty());
+ }
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandTest);
@@ -2649,13 +2907,27 @@
PerInstance, GraphicsComposerAidlCommandTest,
testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
::android::PrintInstanceNameToString);
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, GraphicsComposerAidlTest,
testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
::android::PrintInstanceNameToString);
-} // namespace
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlV2Test);
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, GraphicsComposerAidlV2Test,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
+ ::android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlV3Test);
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, GraphicsComposerAidlV3Test,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
+ ::android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandV2Test);
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, GraphicsComposerAidlCommandV2Test,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
+ ::android::PrintInstanceNameToString);
+
} // namespace aidl::android::hardware::graphics::composer3::vts
int main(int argc, char** argv) {
diff --git a/graphics/mapper/4.0/utils/vts/Android.bp b/graphics/mapper/4.0/utils/vts/Android.bp
index 51e871b..7815d41 100644
--- a/graphics/mapper/4.0/utils/vts/Android.bp
+++ b/graphics/mapper/4.0/utils/vts/Android.bp
@@ -47,7 +47,7 @@
],
export_static_lib_headers: [
"android.hardware.graphics.allocator@4.0",
- "android.hardware.graphics.common-V4-ndk",
+ "android.hardware.graphics.common-V5-ndk",
"android.hardware.graphics.mapper@4.0",
],
export_include_dirs: ["include"],
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index 03d9041..bae362f 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -2223,11 +2223,14 @@
// Keep optional metadata types below and populate the encoded metadata vec
// with some arbitrary different metadata because the common gralloc4::decode*()
// functions do not distinguish between an empty vec and bad value.
- ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
- ASSERT_EQ(Error::UNSUPPORTED,
- mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
- ASSERT_EQ(Error::UNSUPPORTED,
- mGralloc->set(bufferHandle, gralloc4::MetadataType_Cta861_3, vec));
+ if (base::GetIntProperty("ro.vendor.api_level", __ANDROID_API_FUTURE__) >= __ANDROID_API_T__) {
+ // Some old grallocs shipped with broken validation.
+ ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
+ ASSERT_EQ(Error::UNSUPPORTED,
+ mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
+ ASSERT_EQ(Error::UNSUPPORTED,
+ mGralloc->set(bufferHandle, gralloc4::MetadataType_Cta861_3, vec));
+ }
}
/**
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp
index 1d8cc13..4ad8f50 100644
--- a/health/aidl/default/Health.cpp
+++ b/health/aidl/default/Health.cpp
@@ -214,6 +214,7 @@
} else {
::android::base::WriteStringToFd(res.getDescription(), fd);
}
+ ::android::base::WriteStringToFd("\n", fd);
fsync(fd);
return STATUS_OK;
diff --git a/input/common/aidl/Android.bp b/input/common/aidl/Android.bp
index 95a14b2..f23f270 100644
--- a/input/common/aidl/Android.bp
+++ b/input/common/aidl/Android.bp
@@ -20,6 +20,9 @@
java: {
enabled: false,
},
+ rust: {
+ enabled: true,
+ },
},
versions_with_info: [
{
diff --git a/media/c2/aidl/android/hardware/media/c2/IComponent.aidl b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
index a330d46..a7d94b1 100644
--- a/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
@@ -17,6 +17,7 @@
package android.hardware.media.c2;
import android.hardware.common.NativeHandle;
+
import android.hardware.media.c2.IComponentInterface;
import android.hardware.media.c2.IConfigurable;
import android.hardware.media.c2.IGraphicBufferAllocator;
diff --git a/neuralnetworks/aidl/Android.bp b/neuralnetworks/aidl/Android.bp
index be86879..145604c 100644
--- a/neuralnetworks/aidl/Android.bp
+++ b/neuralnetworks/aidl/Android.bp
@@ -17,7 +17,7 @@
stability: "vintf",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
backend: {
java: {
@@ -40,28 +40,28 @@
version: "1",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
{
version: "2",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
{
version: "3",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
{
version: "4",
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V4",
+ "android.hardware.graphics.common-V5",
],
},
diff --git a/power/aidl/Android.bp b/power/aidl/Android.bp
index 082572d..7643926 100644
--- a/power/aidl/Android.bp
+++ b/power/aidl/Android.bp
@@ -55,6 +55,44 @@
},
],
- frozen: true,
+ frozen: false,
}
+
+cc_defaults {
+ name: "android.hardware.power-ndk_shared",
+ shared_libs: [
+ "android.hardware.power-V5-ndk",
+ ],
+}
+
+cc_defaults {
+ name: "android.hardware.power-ndk_export_shared",
+ shared_libs: [
+ "android.hardware.power-V5-ndk",
+ ],
+ export_shared_lib_headers: [
+ "android.hardware.power-V5-ndk",
+ ],
+}
+
+cc_defaults {
+ name: "android.hardware.power-ndk_static",
+ static_libs: [
+ "android.hardware.power-V5-ndk",
+ ],
+}
+
+java_defaults {
+ name: "android.hardware.power-java_shared",
+ libs: [
+ "android.hardware.power-V5-java",
+ ],
+}
+
+java_defaults {
+ name: "android.hardware.power-java_static",
+ static_libs: [
+ "android.hardware.power-V5-java",
+ ],
+}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Boost.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Boost.aidl
index c792d4e..8ee15ef 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Boost.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Boost.aidl
@@ -34,10 +34,10 @@
package android.hardware.power;
@Backing(type="int") @VintfStability
enum Boost {
- INTERACTION = 0,
- DISPLAY_UPDATE_IMMINENT = 1,
- ML_ACC = 2,
- AUDIO_LAUNCH = 3,
- CAMERA_LAUNCH = 4,
- CAMERA_SHOT = 5,
+ INTERACTION,
+ DISPLAY_UPDATE_IMMINENT,
+ ML_ACC,
+ AUDIO_LAUNCH,
+ CAMERA_LAUNCH,
+ CAMERA_SHOT,
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPowerHintSession.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPowerHintSession.aidl
index e6809da..6bc663e 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPowerHintSession.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPowerHintSession.aidl
@@ -41,4 +41,5 @@
oneway void close();
oneway void sendHint(android.hardware.power.SessionHint hint);
void setThreads(in int[] threadIds);
+ oneway void setMode(android.hardware.power.SessionMode type, boolean enabled);
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
index f38426b..b8a0710 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
@@ -34,21 +34,22 @@
package android.hardware.power;
@Backing(type="int") @VintfStability
enum Mode {
- DOUBLE_TAP_TO_WAKE = 0,
- LOW_POWER = 1,
- SUSTAINED_PERFORMANCE = 2,
- FIXED_PERFORMANCE = 3,
- VR = 4,
- LAUNCH = 5,
- EXPENSIVE_RENDERING = 6,
- INTERACTIVE = 7,
- DEVICE_IDLE = 8,
- DISPLAY_INACTIVE = 9,
- AUDIO_STREAMING_LOW_LATENCY = 10,
- CAMERA_STREAMING_SECURE = 11,
- CAMERA_STREAMING_LOW = 12,
- CAMERA_STREAMING_MID = 13,
- CAMERA_STREAMING_HIGH = 14,
- GAME = 15,
- GAME_LOADING = 16,
+ DOUBLE_TAP_TO_WAKE,
+ LOW_POWER,
+ SUSTAINED_PERFORMANCE,
+ FIXED_PERFORMANCE,
+ VR,
+ LAUNCH,
+ EXPENSIVE_RENDERING,
+ INTERACTIVE,
+ DEVICE_IDLE,
+ DISPLAY_INACTIVE,
+ AUDIO_STREAMING_LOW_LATENCY,
+ CAMERA_STREAMING_SECURE,
+ CAMERA_STREAMING_LOW,
+ CAMERA_STREAMING_MID,
+ CAMERA_STREAMING_HIGH,
+ GAME,
+ GAME_LOADING,
+ DISPLAY_CHANGE,
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
new file mode 100644
index 0000000..d0ae0ba
--- /dev/null
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.power;
+@Backing(type="int") @VintfStability
+enum SessionMode {
+ POWER_EFFICIENCY,
+}
diff --git a/power/aidl/android/hardware/power/IPowerHintSession.aidl b/power/aidl/android/hardware/power/IPowerHintSession.aidl
index 7db0ea1..62263c8 100644
--- a/power/aidl/android/hardware/power/IPowerHintSession.aidl
+++ b/power/aidl/android/hardware/power/IPowerHintSession.aidl
@@ -17,6 +17,7 @@
package android.hardware.power;
import android.hardware.power.SessionHint;
+import android.hardware.power.SessionMode;
import android.hardware.power.WorkDuration;
@VintfStability
@@ -81,4 +82,13 @@
* must be thrown.
*/
void setThreads(in int[] threadIds);
+
+ /**
+ * Called to enable or disable special modes for the hint session, which may
+ * adjust the power or performance of the session.
+ *
+ * @param type The mode being set
+ * @param enabled True to enable the mode, false to disable it
+ */
+ oneway void setMode(SessionMode type, boolean enabled);
}
diff --git a/power/aidl/android/hardware/power/Mode.aidl b/power/aidl/android/hardware/power/Mode.aidl
index cc4b130..78f0363 100644
--- a/power/aidl/android/hardware/power/Mode.aidl
+++ b/power/aidl/android/hardware/power/Mode.aidl
@@ -134,11 +134,6 @@
DISPLAY_INACTIVE,
/**
- * Below hints are currently not sent in Android framework but OEM might choose to
- * implement for power/perf optimizations.
- */
-
- /**
* This mode indicates that low latency audio is active.
*/
AUDIO_STREAMING_LOW_LATENCY,
@@ -172,4 +167,10 @@
* This mode indicates that the user is waiting for loading in a game.
*/
GAME_LOADING,
+
+ /**
+ * This mode indicates that the display layout is changing due to rotation
+ * or switching between inner and outer panels.
+ */
+ DISPLAY_CHANGE,
}
diff --git a/power/aidl/android/hardware/power/SessionMode.aidl b/power/aidl/android/hardware/power/SessionMode.aidl
new file mode 100644
index 0000000..f1ee64e
--- /dev/null
+++ b/power/aidl/android/hardware/power/SessionMode.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+@VintfStability
+@Backing(type="int")
+enum SessionMode {
+ /**
+ * This mode indicates that the work of this hint session is not
+ * critical to perceived performance, despite its CPU intensity,
+ * and can be safely scheduled to prefer power efficiency.
+ */
+ POWER_EFFICIENCY,
+}
diff --git a/power/aidl/default/Android.bp b/power/aidl/default/Android.bp
index 64766fc..e3af179 100644
--- a/power/aidl/default/Android.bp
+++ b/power/aidl/default/Android.bp
@@ -23,6 +23,7 @@
cc_binary {
name: "android.hardware.power-service.example",
+ defaults: ["android.hardware.power-ndk_shared"],
relative_install_path: "hw",
init_rc: [":android.hardware.power.rc"],
vintf_fragments: [":android.hardware.power.xml"],
@@ -30,7 +31,6 @@
shared_libs: [
"libbase",
"libbinder_ndk",
- "android.hardware.power-V4-ndk",
],
srcs: [
"main.cpp",
diff --git a/power/aidl/default/PowerHintSession.cpp b/power/aidl/default/PowerHintSession.cpp
index f395800..452e435 100644
--- a/power/aidl/default/PowerHintSession.cpp
+++ b/power/aidl/default/PowerHintSession.cpp
@@ -59,4 +59,8 @@
return ScopedAStatus::ok();
}
+ScopedAStatus PowerHintSession::setMode(SessionMode /* mode */, bool /* enabled */) {
+ return ScopedAStatus::ok();
+}
+
} // namespace aidl::android::hardware::power::impl::example
diff --git a/power/aidl/default/PowerHintSession.h b/power/aidl/default/PowerHintSession.h
index 1d74716..b488bf1 100644
--- a/power/aidl/default/PowerHintSession.h
+++ b/power/aidl/default/PowerHintSession.h
@@ -18,6 +18,7 @@
#include <aidl/android/hardware/power/BnPowerHintSession.h>
#include <aidl/android/hardware/power/SessionHint.h>
+#include <aidl/android/hardware/power/SessionMode.h>
#include <aidl/android/hardware/power/WorkDuration.h>
namespace aidl::android::hardware::power::impl::example {
@@ -33,6 +34,7 @@
ndk::ScopedAStatus close() override;
ndk::ScopedAStatus sendHint(SessionHint hint) override;
ndk::ScopedAStatus setThreads(const std::vector<int32_t>& threadIds) override;
+ ndk::ScopedAStatus setMode(SessionMode mode, bool enabled) override;
};
} // namespace aidl::android::hardware::power::impl::example
diff --git a/power/aidl/default/power-default.xml b/power/aidl/default/power-default.xml
index f5dd6b9..418fb83 100644
--- a/power/aidl/default/power-default.xml
+++ b/power/aidl/default/power-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.power</name>
- <version>4</version>
+ <version>5</version>
<fqname>IPower/default</fqname>
</hal>
</manifest>
diff --git a/power/aidl/vts/Android.bp b/power/aidl/vts/Android.bp
index 56c98bd..eb98b8b 100644
--- a/power/aidl/vts/Android.bp
+++ b/power/aidl/vts/Android.bp
@@ -26,14 +26,12 @@
defaults: [
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
+ "android.hardware.power-ndk_static",
],
srcs: ["VtsHalPowerTargetTest.cpp"],
shared_libs: [
"libbinder_ndk",
],
- static_libs: [
- "android.hardware.power-V4-ndk",
- ],
test_suites: [
"general-tests",
"vts",
diff --git a/power/aidl/vts/VtsHalPowerTargetTest.cpp b/power/aidl/vts/VtsHalPowerTargetTest.cpp
index c2216f8..96995a0 100644
--- a/power/aidl/vts/VtsHalPowerTargetTest.cpp
+++ b/power/aidl/vts/VtsHalPowerTargetTest.cpp
@@ -29,12 +29,12 @@
namespace aidl::android::hardware::power {
namespace {
-using ::android::base::GetUintProperty;
using android::hardware::power::Boost;
using android::hardware::power::IPower;
using android::hardware::power::IPowerHintSession;
using android::hardware::power::Mode;
using android::hardware::power::SessionHint;
+using android::hardware::power::SessionMode;
using android::hardware::power::WorkDuration;
const std::vector<Boost> kBoosts{ndk::enum_range<Boost>().begin(), ndk::enum_range<Boost>().end()};
@@ -44,6 +44,9 @@
const std::vector<SessionHint> kSessionHints{ndk::enum_range<SessionHint>().begin(),
ndk::enum_range<SessionHint>().end()};
+const std::vector<SessionMode> kSessionModes{ndk::enum_range<SessionMode>().begin(),
+ ndk::enum_range<SessionMode>().end()};
+
const std::vector<Boost> kInvalidBoosts = {
static_cast<Boost>(static_cast<int32_t>(kBoosts.front()) - 1),
static_cast<Boost>(static_cast<int32_t>(kBoosts.back()) + 1),
@@ -59,6 +62,11 @@
static_cast<SessionHint>(static_cast<int32_t>(kSessionHints.back()) + 1),
};
+const std::vector<SessionMode> kInvalidSessionModes = {
+ static_cast<SessionMode>(static_cast<int32_t>(kSessionModes.front()) - 1),
+ static_cast<SessionMode>(static_cast<int32_t>(kSessionModes.back()) + 1),
+};
+
class DurationWrapper : public WorkDuration {
public:
DurationWrapper(int64_t dur, int64_t time) {
@@ -92,36 +100,33 @@
DurationWrapper(1000000000L, 4L),
};
-// DEVICEs launching with Android 11 MUST meet the requirements for the
-// target-level=5 compatibility_matrix file.
-const uint64_t kCompatibilityMatrix5ApiLevel = 30;
-
-// DEVICEs launching with Android 13 MUST meet the requirements for the
-// target-level=7 compatibility_matrix file.
-const uint64_t kCompatibilityMatrix7ApiLevel = 33;
-
-// DEVICEs launching with Android 14 MUST meet the requirements for the
-// target-level=8 compatibility_matrix file.
-const uint64_t kCompatibilityMatrix8ApiLevel = 34;
-
-inline bool isUnknownOrUnsupported(const ndk::ScopedAStatus& status) {
- return status.getStatus() == STATUS_UNKNOWN_TRANSACTION ||
- status.getExceptionCode() == EX_UNSUPPORTED_OPERATION;
-}
-
class PowerAidl : public testing::TestWithParam<std::string> {
public:
virtual void SetUp() override {
AIBinder* binder = AServiceManager_waitForService(GetParam().c_str());
ASSERT_NE(binder, nullptr);
power = IPower::fromBinder(ndk::SpAIBinder(binder));
-
- mApiLevel = GetUintProperty<uint64_t>("ro.vendor.api_level", 0);
- ASSERT_NE(mApiLevel, 0);
+ auto status = power->getInterfaceVersion(&mServiceVersion);
+ ASSERT_TRUE(status.isOk());
}
std::shared_ptr<IPower> power;
- uint64_t mApiLevel;
+ int32_t mServiceVersion;
+};
+
+class HintSessionAidl : public PowerAidl {
+ public:
+ virtual void SetUp() override {
+ PowerAidl::SetUp();
+ if (mServiceVersion < 2) {
+ GTEST_SKIP() << "DEVICE not launching with Power V2 and beyond.";
+ }
+
+ auto status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &mSession);
+ ASSERT_TRUE(status.isOk());
+ ASSERT_NE(nullptr, mSession);
+ }
+ std::shared_ptr<IPowerHintSession> mSession;
};
TEST_P(PowerAidl, setMode) {
@@ -175,113 +180,95 @@
}
TEST_P(PowerAidl, getHintSessionPreferredRate) {
- int64_t rate = -1;
- auto status = power->getHintSessionPreferredRate(&rate);
- if (mApiLevel < kCompatibilityMatrix7ApiLevel && !status.isOk()) {
- EXPECT_TRUE(isUnknownOrUnsupported(status));
- GTEST_SKIP() << "DEVICE not launching with Android 13 and beyond.";
+ if (mServiceVersion < 2) {
+ GTEST_SKIP() << "DEVICE not launching with Power V2 and beyond.";
}
- ASSERT_TRUE(status.isOk());
+
+ int64_t rate = -1;
+ ASSERT_TRUE(power->getHintSessionPreferredRate(&rate).isOk());
// At least 1ms rate limit from HAL
ASSERT_GE(rate, 1000000);
}
-TEST_P(PowerAidl, createAndCloseHintSession) {
- std::shared_ptr<IPowerHintSession> session;
- auto status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &session);
- if (mApiLevel < kCompatibilityMatrix7ApiLevel && !status.isOk()) {
- EXPECT_TRUE(isUnknownOrUnsupported(status));
- GTEST_SKIP() << "DEVICE not launching with Android 13 and beyond.";
- }
- ASSERT_TRUE(status.isOk());
- ASSERT_NE(nullptr, session);
- ASSERT_TRUE(session->pause().isOk());
- ASSERT_TRUE(session->resume().isOk());
+TEST_P(HintSessionAidl, createAndCloseHintSession) {
+ ASSERT_TRUE(mSession->pause().isOk());
+ ASSERT_TRUE(mSession->resume().isOk());
// Test normal destroy operation
- ASSERT_TRUE(session->close().isOk());
- session.reset();
+ ASSERT_TRUE(mSession->close().isOk());
+ mSession.reset();
}
-TEST_P(PowerAidl, createHintSessionFailed) {
+TEST_P(HintSessionAidl, createHintSessionFailed) {
std::shared_ptr<IPowerHintSession> session;
auto status = power->createHintSession(getpid(), getuid(), kEmptyTids, 16666666L, &session);
// Regardless of whether V2 and beyond is supported, the status is always not STATUS_OK.
ASSERT_FALSE(status.isOk());
-
- // If device not launching with Android 13 and beyond, check whether it's supported,
- // if not, skip the test.
- if (mApiLevel < kCompatibilityMatrix7ApiLevel && isUnknownOrUnsupported(status)) {
- GTEST_SKIP() << "DEVICE not launching with Android 13 and beyond.";
- }
ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
}
-TEST_P(PowerAidl, updateAndReportDurations) {
- std::shared_ptr<IPowerHintSession> session;
- auto status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &session);
- if (mApiLevel < kCompatibilityMatrix7ApiLevel && !status.isOk()) {
- EXPECT_TRUE(isUnknownOrUnsupported(status));
- GTEST_SKIP() << "DEVICE not launching with Android 13 and beyond.";
- }
- ASSERT_TRUE(status.isOk());
- ASSERT_NE(nullptr, session);
-
- ASSERT_TRUE(session->updateTargetWorkDuration(16666667LL).isOk());
- ASSERT_TRUE(session->reportActualWorkDuration(kDurations).isOk());
+TEST_P(HintSessionAidl, updateAndReportDurations) {
+ ASSERT_TRUE(mSession->updateTargetWorkDuration(16666667LL).isOk());
+ ASSERT_TRUE(mSession->reportActualWorkDuration(kDurations).isOk());
}
-TEST_P(PowerAidl, sendSessionHint) {
- std::shared_ptr<IPowerHintSession> session;
- auto status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &session);
- if (!status.isOk()) {
- EXPECT_TRUE(isUnknownOrUnsupported(status));
- return;
+TEST_P(HintSessionAidl, sendSessionHint) {
+ if (mServiceVersion < 4) {
+ GTEST_SKIP() << "DEVICE not launching with Power V4 and beyond.";
}
+
for (const auto& sessionHint : kSessionHints) {
- ASSERT_TRUE(session->sendHint(sessionHint).isOk());
+ ASSERT_TRUE(mSession->sendHint(sessionHint).isOk());
}
for (const auto& sessionHint : kInvalidSessionHints) {
- ASSERT_TRUE(session->sendHint(sessionHint).isOk());
+ ASSERT_TRUE(mSession->sendHint(sessionHint).isOk());
}
}
-TEST_P(PowerAidl, setThreads) {
- std::shared_ptr<IPowerHintSession> session;
- auto status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &session);
- if (mApiLevel < kCompatibilityMatrix7ApiLevel && !status.isOk()) {
- EXPECT_TRUE(isUnknownOrUnsupported(status));
- GTEST_SKIP() << "DEVICE not launching with Android 13 and beyond.";
+TEST_P(HintSessionAidl, setThreads) {
+ if (mServiceVersion < 4) {
+ GTEST_SKIP() << "DEVICE not launching with Power V4 and beyond.";
}
- ASSERT_TRUE(status.isOk());
- status = session->setThreads(kEmptyTids);
- if (mApiLevel < kCompatibilityMatrix8ApiLevel && isUnknownOrUnsupported(status)) {
- GTEST_SKIP() << "DEVICE not launching with Android 14 and beyond.";
- }
+ auto status = mSession->setThreads(kEmptyTids);
ASSERT_FALSE(status.isOk());
ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
- status = session->setThreads(kSelfTids);
- ASSERT_TRUE(status.isOk());
+ ASSERT_TRUE(mSession->setThreads(kSelfTids).isOk());
+}
+
+TEST_P(HintSessionAidl, setSessionMode) {
+ if (mServiceVersion < 5) {
+ GTEST_SKIP() << "DEVICE not launching with Power V5 and beyond.";
+ }
+
+ for (const auto& sessionMode : kSessionModes) {
+ ASSERT_TRUE(mSession->setMode(sessionMode, true).isOk());
+ ASSERT_TRUE(mSession->setMode(sessionMode, false).isOk());
+ }
+ for (const auto& sessionMode : kInvalidSessionModes) {
+ ASSERT_TRUE(mSession->setMode(sessionMode, true).isOk());
+ ASSERT_TRUE(mSession->setMode(sessionMode, false).isOk());
+ }
}
// FIXED_PERFORMANCE mode is required for all devices which ship on Android 11
// or later
TEST_P(PowerAidl, hasFixedPerformance) {
- if (mApiLevel < kCompatibilityMatrix5ApiLevel) {
- GTEST_SKIP() << "FIXED_PERFORMANCE mode is only required for all devices launching Android "
- "11 or later.";
- }
bool supported;
ASSERT_TRUE(power->isModeSupported(Mode::FIXED_PERFORMANCE, &supported).isOk());
ASSERT_TRUE(supported);
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(PowerAidl);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(HintSessionAidl);
+
INSTANTIATE_TEST_SUITE_P(Power, PowerAidl,
testing::ValuesIn(::android::getAidlHalInstanceNames(IPower::descriptor)),
::android::PrintInstanceNameToString);
+INSTANTIATE_TEST_SUITE_P(Power, HintSessionAidl,
+ testing::ValuesIn(::android::getAidlHalInstanceNames(IPower::descriptor)),
+ ::android::PrintInstanceNameToString);
} // namespace
} // namespace aidl::android::hardware::power
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index 09f845b..1971832 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -12,7 +12,6 @@
vendor_available: true,
host_supported: true,
srcs: ["android/hardware/radio/*.aidl"],
- frozen: true,
stability: "vintf",
backend: {
cpp: {
@@ -41,9 +40,8 @@
vendor_available: true,
host_supported: true,
srcs: ["android/hardware/radio/config/*.aidl"],
- frozen: true,
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -72,7 +70,7 @@
host_supported: true,
srcs: ["android/hardware/radio/data/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -92,8 +90,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -102,7 +98,7 @@
host_supported: true,
srcs: ["android/hardware/radio/messaging/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -122,8 +118,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -132,7 +126,7 @@
host_supported: true,
srcs: ["android/hardware/radio/modem/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -152,8 +146,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -162,7 +154,7 @@
host_supported: true,
srcs: ["android/hardware/radio/network/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -182,8 +174,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -212,7 +202,6 @@
},
],
frozen: true,
-
}
aidl_interface {
@@ -222,8 +211,8 @@
srcs: ["android/hardware/radio/sim/*.aidl"],
stability: "vintf",
imports: [
- "android.hardware.radio-V2",
- "android.hardware.radio.config-V2",
+ "android.hardware.radio-V3",
+ "android.hardware.radio.config-V3",
],
backend: {
cpp: {
@@ -250,8 +239,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -260,7 +247,7 @@
host_supported: true,
srcs: ["android/hardware/radio/voice/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: true,
@@ -280,8 +267,6 @@
},
],
- frozen: true,
-
}
aidl_interface {
@@ -290,8 +275,8 @@
srcs: ["android/hardware/radio/ims/media/*.aidl"],
stability: "vintf",
imports: [
- "android.hardware.radio-V2",
- "android.hardware.radio.data-V2",
+ "android.hardware.radio-V3",
+ "android.hardware.radio.data-V3",
],
backend: {
cpp: {
@@ -310,8 +295,6 @@
],
},
],
- frozen: true,
-
}
aidl_interface {
@@ -319,7 +302,7 @@
vendor_available: true,
srcs: ["android/hardware/radio/ims/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V2"],
+ imports: ["android.hardware.radio-V3"],
backend: {
cpp: {
enabled: false,
@@ -334,6 +317,4 @@
imports: ["android.hardware.radio-V2"],
},
],
- frozen: true,
-
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
index a48a89b..0f5e7e4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
@@ -40,6 +40,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@VintfStability
interface IRadioConfig {
oneway void getHalDeviceCapabilities(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigIndication.aidl
index 994e337..9189f90 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@VintfStability
interface IRadioConfigIndication {
oneway void simSlotsStatusChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.config.SimSlotStatus[] slotStatus);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
index 038b0ae..348aa34 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@VintfStability
interface IRadioConfigResponse {
oneway void getHalDeviceCapabilitiesResponse(in android.hardware.radio.RadioResponseInfo info, in boolean modemReducedFeatureSet1);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
index 74017e4..41c4201 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum MultipleEnabledProfilesMode {
NONE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/PhoneCapability.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/PhoneCapability.aidl
index db3a4c6..3648866 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/PhoneCapability.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/PhoneCapability.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhoneCapability {
byte maxActiveData;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimPortInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimPortInfo.aidl
index b5d31ad..ede3189 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimPortInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimPortInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SimPortInfo {
String iccId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimSlotStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimSlotStatus.aidl
index c264dfd..e84e7d4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimSlotStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimSlotStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SimSlotStatus {
int cardState;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SlotPortMapping.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SlotPortMapping.aidl
index 31271ee..5278e79 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SlotPortMapping.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SlotPortMapping.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.config;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SlotPortMapping {
int physicalSlotId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnAuthType.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnAuthType.aidl
index a33ad6e..eed8170 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnAuthType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnAuthType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ApnAuthType {
NO_PAP_NO_CHAP,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
index 45d22c8..d2d3137 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/ApnTypes.aidl
@@ -32,22 +32,23 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ApnTypes {
NONE = 0,
- DEFAULT = (1 << 0),
- MMS = (1 << 1),
- SUPL = (1 << 2),
- DUN = (1 << 3),
- HIPRI = (1 << 4),
- FOTA = (1 << 5),
- IMS = (1 << 6),
- CBS = (1 << 7),
- IA = (1 << 8),
- EMERGENCY = (1 << 9),
- MCX = (1 << 10),
- XCAP = (1 << 11),
- VSIM = (1 << 12),
- BIP = (1 << 13),
- ENTERPRISE = (1 << 14),
+ DEFAULT = (1 << 0) /* 1 */,
+ MMS = (1 << 1) /* 2 */,
+ SUPL = (1 << 2) /* 4 */,
+ DUN = (1 << 3) /* 8 */,
+ HIPRI = (1 << 4) /* 16 */,
+ FOTA = (1 << 5) /* 32 */,
+ IMS = (1 << 6) /* 64 */,
+ CBS = (1 << 7) /* 128 */,
+ IA = (1 << 8) /* 256 */,
+ EMERGENCY = (1 << 9) /* 512 */,
+ MCX = (1 << 10) /* 1024 */,
+ XCAP = (1 << 11) /* 2048 */,
+ VSIM = (1 << 12) /* 4096 */,
+ BIP = (1 << 13) /* 8192 */,
+ ENTERPRISE = (1 << 14) /* 16384 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
index 8a3fd4f..009b428 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum DataCallFailCause {
NONE = 0,
@@ -101,12 +102,12 @@
OEM_DCFAILCAUSE_13 = 0x100D,
OEM_DCFAILCAUSE_14 = 0x100E,
OEM_DCFAILCAUSE_15 = 0x100F,
- VOICE_REGISTRATION_FAIL = (-1),
- DATA_REGISTRATION_FAIL = (-2),
- SIGNAL_LOST = (-3),
- PREF_RADIO_TECH_CHANGED = (-4),
- RADIO_POWER_OFF = (-5),
- TETHERED_CALL_ACTIVE = (-6),
+ VOICE_REGISTRATION_FAIL = (-1) /* -1 */,
+ DATA_REGISTRATION_FAIL = (-2) /* -2 */,
+ SIGNAL_LOST = (-3) /* -3 */,
+ PREF_RADIO_TECH_CHANGED = (-4) /* -4 */,
+ RADIO_POWER_OFF = (-5) /* -5 */,
+ TETHERED_CALL_ACTIVE = (-6) /* -6 */,
ERROR_UNSPECIFIED = 0xffff,
LLC_SNDCP = 0x19,
ACTIVATION_REJECTED_BCM_VIOLATION = 0x30,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
index 0136fa4..bd44275 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable DataProfileInfo {
int profileId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataRequestReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataRequestReason.aidl
index 0ddaff1..98ae53a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataRequestReason.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataRequestReason.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum DataRequestReason {
NORMAL = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
index e80a764..e1fedb8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
enum DataThrottlingAction {
NO_DATA_THROTTLING,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/EpsQos.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/EpsQos.aidl
index 5b9aaa0..3a3f41d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/EpsQos.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/EpsQos.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EpsQos {
int qci;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioData.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioData.aidl
index 7b572f1..3888c62 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioData.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioData.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@VintfStability
interface IRadioData {
oneway void allocatePduSessionId(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
index 0ffa1f7..6057d6a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@VintfStability
interface IRadioDataIndication {
oneway void dataCallListChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.SetupDataCallResult[] dcList);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataResponse.aidl
index 4edc17d..dc44454 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@VintfStability
interface IRadioDataResponse {
oneway void acknowledgeRequest(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveRequest.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveRequest.aidl
index 592a54a..789ee86 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveRequest.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveRequest.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable KeepaliveRequest {
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveStatus.aidl
index 82b0fc8..404b44a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/KeepaliveStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable KeepaliveStatus {
int sessionHandle;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
index 77d637b..bef4c73 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LinkAddress {
String address;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/NrQos.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/NrQos.aidl
index be859b7..22bbe42 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/NrQos.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/NrQos.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NrQos {
int fiveQi;
@@ -42,8 +43,8 @@
* @deprecated use averagingWindowMillis;
*/
char averagingWindowMs;
- int averagingWindowMillis = AVERAGING_WINDOW_UNKNOWN;
+ int averagingWindowMillis = AVERAGING_WINDOW_UNKNOWN /* -1 */;
const byte FLOW_ID_RANGE_MIN = 1;
const byte FLOW_ID_RANGE_MAX = 63;
- const int AVERAGING_WINDOW_UNKNOWN = (-1);
+ const int AVERAGING_WINDOW_UNKNOWN = (-1) /* -1 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/OsAppId.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/OsAppId.aidl
index 8595d52..e4bbf79 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/OsAppId.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/OsAppId.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable OsAppId {
byte[] osAppId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PcoDataInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PcoDataInfo.aidl
index 033b12f..ea7529c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PcoDataInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PcoDataInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PcoDataInfo {
int cid;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PdpProtocolType.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PdpProtocolType.aidl
index d1c4a62..3a7f82d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PdpProtocolType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PdpProtocolType.aidl
@@ -32,9 +32,10 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum PdpProtocolType {
- UNKNOWN = (-1),
+ UNKNOWN = (-1) /* -1 */,
IP = 0,
IPV6 = 1,
IPV4V6 = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
index 470a9c1..45e2dc9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PortRange {
int start;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/Qos.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/Qos.aidl
index ca06e41..4dac56c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/Qos.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/Qos.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union Qos {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosBandwidth.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosBandwidth.aidl
index 6d4b7a9..b59dee0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosBandwidth.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosBandwidth.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable QosBandwidth {
int maxBitrateKbps;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilter.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilter.aidl
index de45cc5..a3208d9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilter.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilter.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable QosFilter {
String[] localAddresses;
@@ -47,7 +48,7 @@
const byte DIRECTION_DOWNLINK = 0;
const byte DIRECTION_UPLINK = 1;
const byte DIRECTION_BIDIRECTIONAL = 2;
- const byte PROTOCOL_UNSPECIFIED = (-1);
+ const byte PROTOCOL_UNSPECIFIED = (-1) /* -1 */;
const byte PROTOCOL_TCP = 6;
const byte PROTOCOL_UDP = 17;
const byte PROTOCOL_ESP = 50;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpsecSpi.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpsecSpi.aidl
index 4b75340..50b52a4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpsecSpi.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpsecSpi.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union QosFilterIpsecSpi {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
index 3fb34ea..4913dcf 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union QosFilterIpv6FlowLabel {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterTypeOfService.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterTypeOfService.aidl
index fa85b5a..4f0d260 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterTypeOfService.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosFilterTypeOfService.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union QosFilterTypeOfService {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosSession.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosSession.aidl
index bbfdd2d..89010a9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosSession.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/QosSession.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable QosSession {
int qosSessionId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index d83df81..8864c24 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RouteSelectionDescriptor {
byte precedence;
@@ -39,7 +40,7 @@
byte sscMode;
android.hardware.radio.data.SliceInfo[] sliceInfo;
String[] dnn;
- const byte SSC_MODE_UNKNOWN = (-1);
+ const byte SSC_MODE_UNKNOWN = (-1) /* -1 */;
const byte SSC_MODE_1 = 1;
const byte SSC_MODE_2 = 2;
const byte SSC_MODE_3 = 3;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
index 83f9db6..6ae626e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SetupDataCallResult {
android.hardware.radio.data.DataCallFailCause cause;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SliceInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SliceInfo.aidl
index efe4816..60df402 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SliceInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SliceInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SliceInfo {
byte sliceServiceType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SlicingConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SlicingConfig.aidl
index b00febe..4d28737 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SlicingConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SlicingConfig.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SlicingConfig {
android.hardware.radio.data.UrspRule[] urspRules;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/TrafficDescriptor.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/TrafficDescriptor.aidl
index d7b0654..dc474a2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/TrafficDescriptor.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/TrafficDescriptor.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable TrafficDescriptor {
@nullable String dnn;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/UrspRule.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/UrspRule.aidl
index 7002fd1..6850f6a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/UrspRule.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/UrspRule.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.data;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable UrspRule {
int precedence;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
index 37e3b25..36a538c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum AmrMode {
AMR_MODE_0 = (1 << 0) /* 1 */,
AMR_MODE_1 = (1 << 1) /* 2 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
index 36edb7f..dcf0dd1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable AmrParams {
android.hardware.radio.ims.media.AmrMode amrMode;
boolean octetAligned;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AnbrMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AnbrMode.aidl
index c108c07..eca7b93 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AnbrMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AnbrMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable AnbrMode {
android.hardware.radio.ims.media.CodecMode anbrUplinkMode;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CallQuality.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CallQuality.aidl
index fff6e1c..594a39f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CallQuality.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CallQuality.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable CallQuality {
int downlinkCallQualityLevel;
int uplinkCallQualityLevel;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecMode.aidl
index 0e9140f..644321c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union CodecMode {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
index 3da2dbd..6eefb34 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable CodecParams {
android.hardware.radio.ims.media.CodecType codecType;
byte rxPayloadTypeNumber;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecSpecificParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecSpecificParams.aidl
index 08e3f0f..7e5722f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecSpecificParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecSpecificParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
union CodecSpecificParams {
android.hardware.radio.ims.media.AmrParams amr;
android.hardware.radio.ims.media.EvsParams evs;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
index e4193cd..98463b1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CodecType {
AMR = (1 << 0) /* 1 */,
AMR_WB = (1 << 1) /* 2 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/DtmfParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/DtmfParams.aidl
index 5523fd8..f420fa7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/DtmfParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/DtmfParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable DtmfParams {
byte rxPayloadTypeNumber;
byte txPayloadTypeNumber;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
index db3eb29..d8c77bd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsBandwidth.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EvsBandwidth {
NONE = 0,
NARROW_BAND = (1 << 0) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
index fb1f14d..1a59389 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EvsMode {
EVS_MODE_0 = (1 << 0) /* 1 */,
EVS_MODE_1 = (1 << 1) /* 2 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
index 735eb08..deb53af 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable EvsParams {
android.hardware.radio.ims.media.EvsBandwidth bandwidth;
android.hardware.radio.ims.media.EvsMode evsMode;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMedia.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMedia.aidl
index 30793e5..190d25b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMedia.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMedia.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@VintfStability
interface IImsMedia {
oneway void setListener(in android.hardware.radio.ims.media.IImsMediaListener mediaListener);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaListener.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaListener.aidl
index 40f7107..9b7a392 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaListener.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaListener.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@VintfStability
interface IImsMediaListener {
oneway void onOpenSessionSuccess(int sessionId, android.hardware.radio.ims.media.IImsMediaSession session);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSession.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSession.aidl
index ea9f3a4..45c8002 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSession.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSession.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@VintfStability
interface IImsMediaSession {
oneway void setListener(in android.hardware.radio.ims.media.IImsMediaSessionListener sessionListener);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
index cb221df..5ec9c18 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
+/* @hide */
@VintfStability
interface IImsMediaSessionListener {
oneway void onModifySessionResponse(in android.hardware.radio.ims.media.RtpConfig config, android.hardware.radio.ims.media.RtpError error);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/LocalEndPoint.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/LocalEndPoint.aidl
index 6ec5156..1095f01 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/LocalEndPoint.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/LocalEndPoint.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable LocalEndPoint {
ParcelFileDescriptor rtpFd;
ParcelFileDescriptor rtcpFd;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
index 0e9eaee..5410f2a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaDirection.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum MediaDirection {
NO_FLOW = 0,
RTP_TX = (1 << 0) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityStatus.aidl
index 4accf53..da6e751 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityStatus.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable MediaQualityStatus {
int rtpInactivityTimeMillis;
int rtcpInactivityTimeMillis;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityThreshold.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
index 31cf373..ecc379c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable MediaQualityThreshold {
int[] rtpInactivityTimerMillis;
int rtcpInactivityTimerMillis;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpConfig.aidl
index 6a76d85..0bc4154 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpConfig.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable RtcpConfig {
String canonicalName;
int transmitPort;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 289c810..714442c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RtcpXrReportBlockType {
RTCPXR_NONE = 0,
RTCPXR_LOSS_RLE_REPORT_BLOCK = (1 << 0) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpAddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpAddress.aidl
index 35357d1..dd7f466 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpAddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpAddress.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable RtpAddress {
String ipAddress;
int portNumber;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
index 8a826f6..472ec35 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable RtpConfig {
int direction;
android.hardware.radio.AccessNetwork accessNetwork;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpError.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpError.aidl
index 41b0aeb..97dacf1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpError.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpError.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RtpError {
NONE = 0,
INVALID_PARAM = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpHeaderExtension.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
index 83b8a31..06207ee 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable RtpHeaderExtension {
int localId;
byte[] data;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpSessionParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpSessionParams.aidl
index 13a7487..4107432 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpSessionParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpSessionParams.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims.media;
-@VintfStability
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
parcelable RtpSessionParams {
byte pTimeMillis;
int maxPtimeMillis;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index 90e75f9..421f752 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ConnectionFailureInfo {
android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason failureReason;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/EpsFallbackReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/EpsFallbackReason.aidl
index ebea903..75099e7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/EpsFallbackReason.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/EpsFallbackReason.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EpsFallbackReason {
NO_NETWORK_TRIGGER = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
index 4df8709..6018a4b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@VintfStability
interface IRadioIms {
oneway void setSrvccCallInfo(int serial, in android.hardware.radio.ims.SrvccCall[] srvccCalls);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
index ef6b4cc..c754af3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@VintfStability
interface IRadioImsIndication {
oneway void onConnectionSetupFailure(in android.hardware.radio.RadioIndicationType type, int token, in android.hardware.radio.ims.ConnectionFailureInfo info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
index 053ba46..fbb1bfc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@VintfStability
interface IRadioImsResponse {
oneway void setSrvccCallInfoResponse(in android.hardware.radio.RadioResponseInfo info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
index 6e14830..3895d75 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsCall {
int index;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index b04e559..5b5bd40 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ImsDeregistrationReason {
REASON_SIM_REMOVED = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
index be5e004..66d8165 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsRegistration {
android.hardware.radio.ims.ImsRegistrationState regState;
@@ -39,8 +40,8 @@
android.hardware.radio.ims.SuggestedAction suggestedAction;
int capabilities;
const int IMS_MMTEL_CAPABILITY_NONE = 0;
- const int IMS_MMTEL_CAPABILITY_VOICE = (1 << 0);
- const int IMS_MMTEL_CAPABILITY_VIDEO = (1 << 1);
- const int IMS_MMTEL_CAPABILITY_SMS = (1 << 2);
- const int IMS_RCS_CAPABILITIES = (1 << 3);
+ const int IMS_MMTEL_CAPABILITY_VOICE = (1 << 0) /* 1 */;
+ const int IMS_MMTEL_CAPABILITY_VIDEO = (1 << 1) /* 2 */;
+ const int IMS_MMTEL_CAPABILITY_SMS = (1 << 2) /* 4 */;
+ const int IMS_RCS_CAPABILITIES = (1 << 3) /* 8 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl
index 6302b47..01ae565 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ImsRegistrationState {
NOT_REGISTERED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
index cf2e4f1..efc3551 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ImsStreamDirection {
UPLINK = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamType.aidl
index 10c477f..853f4b5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamType.aidl
@@ -32,7 +32,8 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
-@Backing(type="int") @VintfStability
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ImsStreamType {
AUDIO = 1,
VIDEO = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
index b1a0b77..4eeda9d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ImsTrafficType {
EMERGENCY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
index 5119b0f..21645da 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SrvccCall {
int index;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SuggestedAction.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SuggestedAction.aidl
index bbe170e..120e7e8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SuggestedAction.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SuggestedAction.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.ims;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SuggestedAction {
NONE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
index 39e2be2..abfb308 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaBroadcastSmsConfigInfo {
int serviceCategory;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAck.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAck.aidl
index befdbde..ee8371c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAck.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAck.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSmsAck {
boolean errorClass;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAddress.aidl
index ab29c77..7382b1f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsAddress.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSmsAddress {
int digitMode;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsMessage.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsMessage.aidl
index 867596c..0e98f4b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsMessage.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSmsMessage {
int teleserviceId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index d67fe8c..a0e3991 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSmsSubaddress {
int subaddressType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
index b0a7f98..d6292e7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSmsWriteArgs {
int status;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
index 46604ca..1ccba86 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable GsmBroadcastSmsConfigInfo {
int fromServiceId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmSmsMessage.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmSmsMessage.aidl
index 4df7fd2..bdd7d0c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmSmsMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/GsmSmsMessage.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable GsmSmsMessage {
String smscPdu;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessaging.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessaging.aidl
index dfec59a..bf5fde5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessaging.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessaging.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@VintfStability
interface IRadioMessaging {
oneway void acknowledgeIncomingGsmSmsWithPdu(in int serial, in boolean success, in String ackPdu);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
index 8f7824f..389fb26 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@VintfStability
interface IRadioMessagingIndication {
oneway void cdmaNewSms(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.messaging.CdmaSmsMessage msg);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
index c3af7a6..9b10464 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@VintfStability
interface IRadioMessagingResponse {
oneway void acknowledgeIncomingGsmSmsWithPduResponse(in android.hardware.radio.RadioResponseInfo info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
index 85f62b7..40b9ddb 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsSmsMessage {
android.hardware.radio.RadioTechnologyFamily tech;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SendSmsResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SendSmsResult.aidl
index 32f7a5c..3f1d120 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SendSmsResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SendSmsResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SendSmsResult {
int messageRef;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
index d061c9e..6aeda3e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SmsAcknowledgeFailCause {
MEMORY_CAPACITY_EXCEEDED = 0xD3,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsWriteArgs.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsWriteArgs.aidl
index 489cc07..a294b47 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsWriteArgs.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/SmsWriteArgs.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.messaging;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SmsWriteArgs {
int status;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
index 7e22ee0..c834342 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ActivityStatsInfo {
int sleepModeTimeMs;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
index 08ed9a5..b44ab71 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ActivityStatsTechSpecificInfo {
android.hardware.radio.AccessNetwork rat;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
index acc0b22..1159f93 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/DeviceStateType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum DeviceStateType {
POWER_SAVE_MODE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfig.aidl
index 3a0ec25..2d814ef 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfig.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable HardwareConfig {
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
index 62bb160..d453cb0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigModem.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable HardwareConfigModem {
int rilModel;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigSim.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigSim.aidl
index 5810982..4c2e31b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigSim.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/HardwareConfigSim.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable HardwareConfigSim {
String modemUuid;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModem.aidl
index 8546be7..bd8ba47 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModem.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@VintfStability
interface IRadioModem {
oneway void enableModem(in int serial, in boolean on);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemIndication.aidl
index 514ff9a..20066f8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@VintfStability
interface IRadioModemIndication {
oneway void hardwareConfigChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.modem.HardwareConfig[] configs);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemResponse.aidl
index 5955439..b9ef51b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/IRadioModemResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@VintfStability
interface IRadioModemResponse {
oneway void acknowledgeRequest(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
index f8776ec..a2df30d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ImeiInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImeiInfo {
android.hardware.radio.modem.ImeiInfo.ImeiType type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
index b80d7ac..f97b9a2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvItem.aidl
@@ -33,6 +33,7 @@
package android.hardware.radio.modem;
/**
+ * @hide
* @deprecated NV APIs are deprecated starting from Android U.
*/
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
index 6a786bc..c38ceb7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/NvWriteItem.aidl
@@ -33,6 +33,7 @@
package android.hardware.radio.modem;
/**
+ * @hide
* @deprecated NV APIs are deprecated starting from Android U.
*/
@JavaDerive(toString=true) @VintfStability
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioCapability.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioCapability.aidl
index f2e2858..bc3cfcc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioCapability.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioCapability.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioCapability {
int session;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioState.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioState.aidl
index 57f2941..3383fa4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/RadioState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioState {
OFF = 0,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
index 37622b1..b4208b7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.modem;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ResetNvType {
RELOAD,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
index 28d8862..667a8a7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union AccessTechnologySpecificInfo {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
index e105b39..67c9349 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable BarringInfo {
int serviceType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringTypeSpecificInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
index a813633..03369b9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable BarringTypeSpecificInfo {
int factor;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
index 927f9ac..bc9c0ba 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
@@ -32,13 +32,14 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable Cdma2000RegistrationInfo {
boolean cssSupported;
int roamingIndicator;
int systemIsInPrl;
int defaultRoamingIndicator;
- const int PRL_INDICATOR_NOT_REGISTERED = (-1);
+ const int PRL_INDICATOR_NOT_REGISTERED = (-1) /* -1 */;
const int PRL_INDICATOR_NOT_IN_PRL = 0;
const int PRL_INDICATOR_IN_PRL = 1;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaRoamingType.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaRoamingType.aidl
index 2a4db70..84532e3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaRoamingType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaRoamingType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CdmaRoamingType {
HOME_NETWORK,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaSignalStrength.aidl
index e2f97bf..94430a8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CdmaSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSignalStrength {
int dbm;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellConnectionStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellConnectionStatus.aidl
index 5ce3b3e..3775a40 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellConnectionStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellConnectionStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CellConnectionStatus {
NONE,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentity.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentity.aidl
index 2ee92de..ba27b39 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentity.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentity.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union CellIdentity {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityCdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityCdma.aidl
index d659a28..63571bb 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityCdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityCdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityCdma {
int networkId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityGsm.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityGsm.aidl
index d3193be..5040f20 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityGsm.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityGsm.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityGsm {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityLte.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityLte.aidl
index 2ae7b43..be7821d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityLte.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityLte.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityLte {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityNr.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityNr.aidl
index b30af50..6f4f9a0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityNr.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityNr.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityNr {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityTdscdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityTdscdma.aidl
index e99d147..864a886 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityTdscdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityTdscdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityTdscdma {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityWcdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityWcdma.aidl
index 12001fc..4e76277 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityWcdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellIdentityWcdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellIdentityWcdma {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
index 467c6b7..6bb31b0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfo {
boolean registered;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoCdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoCdma.aidl
index e3bf46b..6d76a26 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoCdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoCdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoCdma {
android.hardware.radio.network.CellIdentityCdma cellIdentityCdma;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoGsm.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoGsm.aidl
index 84dcd07..2074c2f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoGsm.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoGsm.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoGsm {
android.hardware.radio.network.CellIdentityGsm cellIdentityGsm;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoLte.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoLte.aidl
index 221340b..aa3b310 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoLte.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoLte.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoLte {
android.hardware.radio.network.CellIdentityLte cellIdentityLte;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoNr.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoNr.aidl
index b392c1d..a8f49af 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoNr.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoNr.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoNr {
android.hardware.radio.network.CellIdentityNr cellIdentityNr;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
index 4ab0640..fd3239d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union CellInfoRatSpecificInfo {
android.hardware.radio.network.CellInfoGsm gsm;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoTdscdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoTdscdma.aidl
index 138b35c..1a03f34 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoTdscdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoTdscdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoTdscdma {
android.hardware.radio.network.CellIdentityTdscdma cellIdentityTdscdma;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoWcdma.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoWcdma.aidl
index cf7b135..d02824d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoWcdma.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfoWcdma.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CellInfoWcdma {
android.hardware.radio.network.CellIdentityWcdma cellIdentityWcdma;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
index fe734c8..b9e6f82 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ClosedSubscriberGroupInfo {
boolean csgIndication;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
index 6b022b6..0de7e20 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
@@ -32,8 +32,9 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum Domain {
- CS = (1 << 0),
- PS = (1 << 1),
+ CS = (1 << 0) /* 1 */,
+ PS = (1 << 1) /* 2 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
index 071e6b5..c5b067e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EmergencyMode {
EMERGENCY_WWAN = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index 2797aff..471c7a0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyNetworkScanTrigger {
android.hardware.radio.AccessNetwork[] accessNetwork;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
index 7d99a53..3b8083d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyRegResult {
android.hardware.radio.AccessNetwork accessNetwork;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyScanType.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyScanType.aidl
index 5e86c76..0681a73 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyScanType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyScanType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EmergencyScanType {
NO_PREFERENCE = 0,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranBands.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranBands.aidl
index 57fac3f..82257ec 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranBands.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranBands.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EutranBands {
BAND_1 = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
index 90e342a..bb34fe1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -32,14 +32,15 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EutranRegistrationInfo {
android.hardware.radio.network.LteVopsInfo lteVopsInfo;
android.hardware.radio.network.NrIndicators nrIndicators;
android.hardware.radio.network.EutranRegistrationInfo.AttachResultType lteAttachResultType;
int extraInfo;
- const int EXTRA_CSFB_NOT_PREFERRED = (1 << 0);
- const int EXTRA_SMS_ONLY = (1 << 1);
+ const int EXTRA_CSFB_NOT_PREFERRED = (1 << 0) /* 1 */;
+ const int EXTRA_SMS_ONLY = (1 << 1) /* 2 */;
enum AttachResultType {
NONE,
EPS_ONLY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EvdoSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EvdoSignalStrength.aidl
index 7c56711..e97e17d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EvdoSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EvdoSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EvdoSignalStrength {
int dbm;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GeranBands.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GeranBands.aidl
index 135935f..ee0d419 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GeranBands.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GeranBands.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum GeranBands {
BAND_T380 = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GsmSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GsmSignalStrength.aidl
index 2b53b39..65847ef 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GsmSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/GsmSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable GsmSignalStrength {
int signalStrength;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index 382ddd8..cbc1e30 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@VintfStability
interface IRadioNetwork {
oneway void getAllowedNetworkTypesBitmap(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkIndication.aidl
index 0f017ea..05a36ef 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@VintfStability
interface IRadioNetworkIndication {
oneway void barringInfoChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.CellIdentity cellIdentity, in android.hardware.radio.network.BarringInfo[] barringInfos);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
index bfe8fa3..c86bebc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@VintfStability
interface IRadioNetworkResponse {
oneway void acknowledgeRequest(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IndicationFilter.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IndicationFilter.aidl
index 00ba346..7847fbe 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IndicationFilter.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IndicationFilter.aidl
@@ -32,15 +32,16 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum IndicationFilter {
NONE = 0,
- ALL = (~0),
- SIGNAL_STRENGTH = (1 << 0),
- FULL_NETWORK_STATE = (1 << 1),
- DATA_CALL_DORMANCY_CHANGED = (1 << 2),
- LINK_CAPACITY_ESTIMATE = (1 << 3),
- PHYSICAL_CHANNEL_CONFIG = (1 << 4),
- REGISTRATION_FAILURE = (1 << 5),
- BARRING_INFO = (1 << 6),
+ ALL = (~0) /* -1 */,
+ SIGNAL_STRENGTH = (1 << 0) /* 1 */,
+ FULL_NETWORK_STATE = (1 << 1) /* 2 */,
+ DATA_CALL_DORMANCY_CHANGED = (1 << 2) /* 4 */,
+ LINK_CAPACITY_ESTIMATE = (1 << 3) /* 8 */,
+ PHYSICAL_CHANNEL_CONFIG = (1 << 4) /* 16 */,
+ REGISTRATION_FAILURE = (1 << 5) /* 32 */,
+ BARRING_INFO = (1 << 6) /* 64 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LceDataInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LceDataInfo.aidl
index 27b16c1..6dc6d3e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LceDataInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LceDataInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LceDataInfo {
int lastHopCapacityKbps;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LinkCapacityEstimate.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LinkCapacityEstimate.aidl
index 5707b8e..3fc4b5c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LinkCapacityEstimate.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LinkCapacityEstimate.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LinkCapacityEstimate {
int downlinkCapacityKbps;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteSignalStrength.aidl
index b5b8579..eb2ca28 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LteSignalStrength {
int signalStrength;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteVopsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteVopsInfo.aidl
index 6d8dd4e..f8d3aa1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteVopsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/LteVopsInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LteVopsInfo {
boolean isVopsSupported;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
index 6039740..60eaf77 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NetworkScanRequest {
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
index 4e392d0..695a194 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NetworkScanResult {
int status;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NgranBands.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NgranBands.aidl
index 5904690..fb939df 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NgranBands.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NgranBands.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum NgranBands {
BAND_1 = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrDualConnectivityState.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrDualConnectivityState.aidl
index 62c2a56..7af15a7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrDualConnectivityState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrDualConnectivityState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
enum NrDualConnectivityState {
ENABLE = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrIndicators.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrIndicators.aidl
index 88429f6..efcd6d3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrIndicators.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrIndicators.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NrIndicators {
boolean isEndcAvailable;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
index 7d6ab82..11e7356 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NrSignalStrength {
int ssRsrp;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
index e5a0a70..61146aa 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable NrVopsInfo {
byte vopsSupported;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/OperatorInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/OperatorInfo.aidl
index 034150e..abe2bea 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/OperatorInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/OperatorInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable OperatorInfo {
String alphaLong;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhoneRestrictedState.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhoneRestrictedState.aidl
index 4e3e39e..44cab0e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhoneRestrictedState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhoneRestrictedState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum PhoneRestrictedState {
NONE = 0x00,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
index 928c6b7..7d64f7e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhysicalChannelConfig {
android.hardware.radio.network.CellConnectionStatus status;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfigBand.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
index efc64a6..2e50e67 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union PhysicalChannelConfigBand {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
index 1566bb5..8229207 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioAccessSpecifier {
android.hardware.radio.AccessNetwork accessNetwork;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifierBands.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
index a6ac12a..9ba420e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
union RadioAccessSpecifierBands {
boolean noinit;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
index 74696fb..6058e30 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioBandMode {
BAND_MODE_UNSPECIFIED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
index 711c9ac..f11b911 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RegState {
NOT_REG_MT_NOT_SEARCHING_OP = 0,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
index f0a03ae..625d970 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RegStateResult {
android.hardware.radio.network.RegState regState;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegistrationFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegistrationFailCause.aidl
index 8acf8ab..56f516d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegistrationFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegistrationFailCause.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RegistrationFailCause {
NONE = 0,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalStrength.aidl
index 1c50190..da7db9a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SignalStrength {
android.hardware.radio.network.GsmSignalStrength gsm;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
index 744eed7..77b4831 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SignalThresholdInfo {
int signalMeasurement;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SuppSvcNotification.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SuppSvcNotification.aidl
index b62c71b..5192eae 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SuppSvcNotification.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SuppSvcNotification.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SuppSvcNotification {
boolean isMT;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/TdscdmaSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/TdscdmaSignalStrength.aidl
index d74c950..fe209e5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/TdscdmaSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/TdscdmaSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable TdscdmaSignalStrength {
int signalStrength;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
index 3ca16b5..a6f4d13 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum UsageSetting {
VOICE_CENTRIC = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UtranBands.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UtranBands.aidl
index 8be3da2..977afe3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UtranBands.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UtranBands.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum UtranBands {
BAND_1 = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/WcdmaSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/WcdmaSignalStrength.aidl
index 9112527..b765ab6 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/WcdmaSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/WcdmaSignalStrength.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.network;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable WcdmaSignalStrength {
int signalStrength;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
index 8a41fb9..898b616 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable AppStatus {
int appType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
index 6bc3919..066777a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CardPowerState {
POWER_DOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
index 46cb7be..1a9d621 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CardStatus {
int cardState;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/Carrier.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/Carrier.aidl
index cc56888..24fff2e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/Carrier.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/Carrier.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable Carrier {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
index 3700de3..84cdf5d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CarrierRestrictions {
android.hardware.radio.sim.Carrier[] allowedCarriers;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CdmaSubscriptionSource.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
index 080aa5e..13b06e7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CdmaSubscriptionSource {
RUIM_SIM,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
index 901b251..1728e41 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSim.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@VintfStability
interface IRadioSim {
oneway void areUiccApplicationsEnabled(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimIndication.aidl
index d4371b8..a74b65a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@VintfStability
interface IRadioSimIndication {
oneway void carrierInfoForImsiEncryption(in android.hardware.radio.RadioIndicationType info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
index d7c2100..c653847 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IRadioSimResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@VintfStability
interface IRadioSimResponse {
oneway void acknowledgeRequest(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIo.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIo.aidl
index 5a312dc..661518d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable IccIo {
int command;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIoResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIoResult.aidl
index 6c6bde2..1e418cd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIoResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/IccIoResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable IccIoResult {
int sw1;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/ImsiEncryptionInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
index 05e71cd..40722e5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsiEncryptionInfo {
String mcc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
index 5e96fc6..aaf9f3e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
enum PbReceivedStatus {
PB_RECEIVED_OK = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PersoSubstate.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PersoSubstate.aidl
index dc1d960..7952308 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PersoSubstate.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PersoSubstate.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum PersoSubstate {
UNKNOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookCapacity.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookCapacity.aidl
index 7531c96..b020687 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookCapacity.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookCapacity.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhonebookCapacity {
int maxAdnRecords;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookRecordInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookRecordInfo.aidl
index 2e96a4b..1a6943b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookRecordInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PhonebookRecordInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhonebookRecordInfo {
int recordId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PinState.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PinState.aidl
index 663ea73..924929b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PinState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PinState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum PinState {
UNKNOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SelectUiccSub.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SelectUiccSub.aidl
index 02121e6..57ca2a5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SelectUiccSub.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SelectUiccSub.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SelectUiccSub {
int slot;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SessionInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SessionInfo.aidl
index 1329141..5c81e3d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SessionInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SessionInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SessionInfo {
int sessionId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimApdu.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimApdu.aidl
index c391e5a..45f6e48 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimApdu.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimApdu.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SimApdu {
int sessionId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index d59fcab..5a5e8ac 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SimLockMultiSimPolicy {
NO_MULTISIM_POLICY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
index 69bf476..81ba510 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.sim;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SimRefreshResult {
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/AudioQuality.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/AudioQuality.aidl
index 1ab2902..8725c7f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/AudioQuality.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/AudioQuality.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum AudioQuality {
UNSPECIFIED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
index 10d2ee7..b45a45b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable Call {
int state;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CallForwardInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CallForwardInfo.aidl
index 8e7aaab..51c8758 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CallForwardInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CallForwardInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CallForwardInfo {
int status;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaCallWaiting.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaCallWaiting.aidl
index 310f9a0..0b36be4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaCallWaiting.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaCallWaiting.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaCallWaiting {
String number;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index b6b562c..300b03f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaDisplayInfoRecord {
String alphaBuf;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
index 24ae775..2f7f5f0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaInformationRecord {
int name;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
index e34b393..4e4a7ee 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaLineControlInfoRecord {
byte lineCtrlPolarityIncluded;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
index aeb0347..c3b0d5a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaNumberInfoRecord {
String number;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
index fad3841..ae35fba 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CdmaOtaProvisionStatus {
SPL_UNLOCKED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
index b61b91b..93c7c6b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaRedirectingNumberInfoRecord {
android.hardware.radio.voice.CdmaNumberInfoRecord redirectingNumber;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
index 6c7b264..69447b4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaSignalInfoRecord {
boolean isPresent;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
index 438231c..69d79aa 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaT53AudioControlInfoRecord {
byte upLink;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
index 1b254f5..83b6fb9 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CdmaT53ClirInfoRecord {
byte cause;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CfData.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CfData.aidl
index 7e799c7..fc811f2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CfData.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CfData.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CfData {
android.hardware.radio.voice.CallForwardInfo[] cfInfo;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
index a34149a..c38c801 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum ClipStatus {
CLIP_PROVISIONED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Dial.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Dial.aidl
index 2b2e759..26041f0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Dial.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Dial.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable Dial {
String address;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
index 4e1dfc0..3099a20 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EmergencyCallRouting {
UNKNOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyNumber.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyNumber.aidl
index ac3867e..2129f39 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyNumber.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyNumber.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyNumber {
String number;
@@ -40,8 +41,8 @@
int categories;
String[] urns;
int sources;
- const int SOURCE_NETWORK_SIGNALING = (1 << 0);
- const int SOURCE_SIM = (1 << 1);
- const int SOURCE_MODEM_CONFIG = (1 << 2);
- const int SOURCE_DEFAULT = (1 << 3);
+ const int SOURCE_NETWORK_SIGNALING = (1 << 0) /* 1 */;
+ const int SOURCE_SIM = (1 << 1) /* 2 */;
+ const int SOURCE_MODEM_CONFIG = (1 << 2) /* 4 */;
+ const int SOURCE_DEFAULT = (1 << 3) /* 8 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyServiceCategory.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyServiceCategory.aidl
index 0a70d2d..819baf8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyServiceCategory.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyServiceCategory.aidl
@@ -32,14 +32,15 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum EmergencyServiceCategory {
UNSPECIFIED = 0,
- POLICE = (1 << 0),
- AMBULANCE = (1 << 1),
- FIRE_BRIGADE = (1 << 2),
- MARINE_GUARD = (1 << 3),
- MOUNTAIN_RESCUE = (1 << 4),
- MIEC = (1 << 5),
- AIEC = (1 << 6),
+ POLICE = (1 << 0) /* 1 */,
+ AMBULANCE = (1 << 1) /* 2 */,
+ FIRE_BRIGADE = (1 << 2) /* 4 */,
+ MARINE_GUARD = (1 << 3) /* 8 */,
+ MOUNTAIN_RESCUE = (1 << 4) /* 16 */,
+ MIEC = (1 << 5) /* 32 */,
+ AIEC = (1 << 6) /* 64 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoice.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoice.aidl
index 603b1d6..d0a9451 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoice.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoice.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@VintfStability
interface IRadioVoice {
oneway void acceptCall(in int serial);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceIndication.aidl
index 189ed43..4614ee1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceIndication.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@VintfStability
interface IRadioVoiceIndication {
oneway void callRing(in android.hardware.radio.RadioIndicationType type, in boolean isGsm, in android.hardware.radio.voice.CdmaSignalInfoRecord record);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceResponse.aidl
index 7acc044..46927c2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/IRadioVoiceResponse.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@VintfStability
interface IRadioVoiceResponse {
oneway void acceptCallResponse(in android.hardware.radio.RadioResponseInfo info);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
index 7d54623..0cac135 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum LastCallFailCause {
UNOBTAINABLE_NUMBER = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 221acf7..151adf2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LastCallFailCauseInfo {
android.hardware.radio.voice.LastCallFailCause causeCode;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SrvccState.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SrvccState.aidl
index 4b5c216..981ba02 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SrvccState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SrvccState.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum SrvccState {
HANDOVER_STARTED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
index f18b404..24365dc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SsInfoData {
int[] ssInfo;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 75f3de5..999f47c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable StkCcUnsolSsResult {
int serviceType;
@@ -72,13 +73,13 @@
const int TELESERVICE_TYPE_SMS_SERVICES = 4;
const int TELESERVICE_TYPE_ALL_TELESERVICES_EXCEPT_SMS = 5;
const int SUPP_SERVICE_CLASS_NONE = 0;
- const int SUPP_SERVICE_CLASS_VOICE = (1 << 0);
- const int SUPP_SERVICE_CLASS_DATA = (1 << 1);
- const int SUPP_SERVICE_CLASS_FAX = (1 << 2);
- const int SUPP_SERVICE_CLASS_SMS = (1 << 3);
- const int SUPP_SERVICE_CLASS_DATA_SYNC = (1 << 4);
- const int SUPP_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
- const int SUPP_SERVICE_CLASS_PACKET = (1 << 6);
- const int SUPP_SERVICE_CLASS_PAD = (1 << 7);
- const int SUPP_SERVICE_CLASS_MAX = (1 << 7);
+ const int SUPP_SERVICE_CLASS_VOICE = (1 << 0) /* 1 */;
+ const int SUPP_SERVICE_CLASS_DATA = (1 << 1) /* 2 */;
+ const int SUPP_SERVICE_CLASS_FAX = (1 << 2) /* 4 */;
+ const int SUPP_SERVICE_CLASS_SMS = (1 << 3) /* 8 */;
+ const int SUPP_SERVICE_CLASS_DATA_SYNC = (1 << 4) /* 16 */;
+ const int SUPP_SERVICE_CLASS_DATA_ASYNC = (1 << 5) /* 32 */;
+ const int SUPP_SERVICE_CLASS_PACKET = (1 << 6) /* 64 */;
+ const int SUPP_SERVICE_CLASS_PAD = (1 << 7) /* 128 */;
+ const int SUPP_SERVICE_CLASS_MAX = (1 << 7) /* 128 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/TtyMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/TtyMode.aidl
index e432e65..41ff6b8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/TtyMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/TtyMode.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum TtyMode {
OFF,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UssdModeType.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UssdModeType.aidl
index 424e73f..9e80f03 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UssdModeType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UssdModeType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum UssdModeType {
NOTIFY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
index 9313760..3c84c8d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio.voice;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable UusInfo {
int uusType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
index 9641651..73a267b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum AccessNetwork {
UNKNOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
index b7b074b..1298ab0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioAccessFamily {
UNKNOWN = (1 << android.hardware.radio.RadioTechnology.UNKNOWN) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
index 9785825..970cd1e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioConst {
const int MAX_RILDS = 3;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
index 98606e5..02c5370 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioError {
NONE = 0,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioIndicationType.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioIndicationType.aidl
index 58b35a5..316f92f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioIndicationType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioIndicationType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioIndicationType {
UNSOLICITED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
index b2a7a06..f03a73b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfo {
android.hardware.radio.RadioResponseType type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
index 37ed7bb..2e0c315 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfoModem {
android.hardware.radio.RadioResponseType type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseType.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseType.aidl
index 1ee62bd..8bdb45b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseType.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioResponseType {
SOLICITED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
index b6af5aa..7c6a657 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioTechnology {
UNKNOWN,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
index 2af7e53..85e9850 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
@@ -32,6 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.radio;
+/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum RadioTechnologyFamily {
THREE_GPP,
diff --git a/radio/aidl/android/hardware/radio/AccessNetwork.aidl b/radio/aidl/android/hardware/radio/AccessNetwork.aidl
index 2885642..4099f83 100644
--- a/radio/aidl/android/hardware/radio/AccessNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/AccessNetwork.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
index edf33ba..9ab4583 100644
--- a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.RadioTechnology;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioConst.aidl b/radio/aidl/android/hardware/radio/RadioConst.aidl
index 6591ef1..7b923b9 100644
--- a/radio/aidl/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/android/hardware/radio/RadioConst.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RadioConst {
diff --git a/radio/aidl/android/hardware/radio/RadioError.aidl b/radio/aidl/android/hardware/radio/RadioError.aidl
index 2031399..9c39bc4 100644
--- a/radio/aidl/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/android/hardware/radio/RadioError.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioIndicationType.aidl b/radio/aidl/android/hardware/radio/RadioIndicationType.aidl
index 2dcc492..594b147 100644
--- a/radio/aidl/android/hardware/radio/RadioIndicationType.aidl
+++ b/radio/aidl/android/hardware/radio/RadioIndicationType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
index f70a3fe..25195aa 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.RadioError;
import android.hardware.radio.RadioResponseType;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RadioResponseInfo {
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
index 13abfb9..286f397 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.RadioError;
import android.hardware.radio.RadioResponseType;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RadioResponseInfoModem {
diff --git a/radio/aidl/android/hardware/radio/RadioResponseType.aidl b/radio/aidl/android/hardware/radio/RadioResponseType.aidl
index cd4a305..000f478 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseType.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
index 4b51152..7ae428b 100644
--- a/radio/aidl/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl b/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
index a2b989d..4b5498c 100644
--- a/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
+++ b/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
index 85c2cee..1075ef7 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
@@ -28,6 +28,7 @@
import android.hardware.radio.config.IRadioConfigResponse;
import android.hardware.radio.config.SlotPortMapping;
+/** @hide */
@VintfStability
oneway interface IRadioConfig {
/**
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfigIndication.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfigIndication.aidl
index abf55f1..ed2366b 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfigIndication.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfigIndication.aidl
@@ -20,6 +20,7 @@
/**
* Interface declaring unsolicited radio config indications.
+ * @hide
*/
@VintfStability
oneway interface IRadioConfigIndication {
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
index 0d36bbd..cb3533e 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -21,6 +21,7 @@
/**
* Interface declaring response functions to solicited radio config requests.
+ * @hide
*/
@VintfStability
oneway interface IRadioConfigResponse {
diff --git a/radio/aidl/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl b/radio/aidl/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
index b18ea0e..1d9b66e 100644
--- a/radio/aidl/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
+++ b/radio/aidl/android/hardware/radio/config/MultipleEnabledProfilesMode.aidl
@@ -20,6 +20,7 @@
* Multiple Enabled Profiles(MEP) mode is the jointly supported MEP mode. As per section 3.4.1.1 of
* GSMA spec SGP.22 v3.0,there are 3 supported MEP modes: MEP-A1, MEP-A2 and MEP-B.
* If there is no jointly supported MEP mode, supported MEP mode is set to NONE.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/config/PhoneCapability.aidl b/radio/aidl/android/hardware/radio/config/PhoneCapability.aidl
index 8e4f338..35d6b5d 100644
--- a/radio/aidl/android/hardware/radio/config/PhoneCapability.aidl
+++ b/radio/aidl/android/hardware/radio/config/PhoneCapability.aidl
@@ -20,6 +20,7 @@
* Phone capability which describes the data connection capability of modem.
* It's used to evaluate possible phone config change, for example from single
* SIM device to multi-SIM device.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/config/SimPortInfo.aidl b/radio/aidl/android/hardware/radio/config/SimPortInfo.aidl
index db24719..f579639 100644
--- a/radio/aidl/android/hardware/radio/config/SimPortInfo.aidl
+++ b/radio/aidl/android/hardware/radio/config/SimPortInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.config;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SimPortInfo {
diff --git a/radio/aidl/android/hardware/radio/config/SimSlotStatus.aidl b/radio/aidl/android/hardware/radio/config/SimSlotStatus.aidl
index 6a36d5e..34f98c5 100644
--- a/radio/aidl/android/hardware/radio/config/SimSlotStatus.aidl
+++ b/radio/aidl/android/hardware/radio/config/SimSlotStatus.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.config.MultipleEnabledProfilesMode;
import android.hardware.radio.config.SimPortInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SimSlotStatus {
diff --git a/radio/aidl/android/hardware/radio/config/SlotPortMapping.aidl b/radio/aidl/android/hardware/radio/config/SlotPortMapping.aidl
index c78afcb..30cca50 100644
--- a/radio/aidl/android/hardware/radio/config/SlotPortMapping.aidl
+++ b/radio/aidl/android/hardware/radio/config/SlotPortMapping.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.config;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SlotPortMapping {
diff --git a/radio/aidl/android/hardware/radio/data/ApnAuthType.aidl b/radio/aidl/android/hardware/radio/data/ApnAuthType.aidl
index a4116db..1d1d851 100644
--- a/radio/aidl/android/hardware/radio/data/ApnAuthType.aidl
+++ b/radio/aidl/android/hardware/radio/data/ApnAuthType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/ApnTypes.aidl b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
index ed1256d..366570a 100644
--- a/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
+++ b/radio/aidl/android/hardware/radio/data/ApnTypes.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
index 071ce55..e015e8e 100644
--- a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
index ea4e751..613387f 100644
--- a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.data.PdpProtocolType;
import android.hardware.radio.data.TrafficDescriptor;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable DataProfileInfo {
diff --git a/radio/aidl/android/hardware/radio/data/DataRequestReason.aidl b/radio/aidl/android/hardware/radio/data/DataRequestReason.aidl
index 44b47f8..b16081d 100644
--- a/radio/aidl/android/hardware/radio/data/DataRequestReason.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataRequestReason.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
index e4ee444..a762e34 100644
--- a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@Backing(type="byte")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/EpsQos.aidl b/radio/aidl/android/hardware/radio/data/EpsQos.aidl
index 8965d6e..42eee32 100644
--- a/radio/aidl/android/hardware/radio/data/EpsQos.aidl
+++ b/radio/aidl/android/hardware/radio/data/EpsQos.aidl
@@ -20,6 +20,7 @@
/**
* LTE/EPS Quality of Service parameters as per 3gpp spec 24.301 sec 9.9.4.3.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/IRadioData.aidl b/radio/aidl/android/hardware/radio/data/IRadioData.aidl
index 0171d39..519d425 100644
--- a/radio/aidl/android/hardware/radio/data/IRadioData.aidl
+++ b/radio/aidl/android/hardware/radio/data/IRadioData.aidl
@@ -34,6 +34,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioDataResponse and IRadioDataIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioData {
diff --git a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
index 938c695..c3fdcaa 100644
--- a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
+++ b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
@@ -25,6 +25,7 @@
/**
* Interface declaring unsolicited radio indications for data APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioDataIndication {
diff --git a/radio/aidl/android/hardware/radio/data/IRadioDataResponse.aidl b/radio/aidl/android/hardware/radio/data/IRadioDataResponse.aidl
index 06c83c1..b714844 100644
--- a/radio/aidl/android/hardware/radio/data/IRadioDataResponse.aidl
+++ b/radio/aidl/android/hardware/radio/data/IRadioDataResponse.aidl
@@ -23,6 +23,7 @@
/**
* Interface declaring response functions to solicited radio requests for data APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioDataResponse {
diff --git a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
index c720de0..1838f2e 100644
--- a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
+++ b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable KeepaliveRequest {
diff --git a/radio/aidl/android/hardware/radio/data/KeepaliveStatus.aidl b/radio/aidl/android/hardware/radio/data/KeepaliveStatus.aidl
index 0b829c4..162fc37 100644
--- a/radio/aidl/android/hardware/radio/data/KeepaliveStatus.aidl
+++ b/radio/aidl/android/hardware/radio/data/KeepaliveStatus.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable KeepaliveStatus {
diff --git a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
index 12a7637..957973d 100644
--- a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
@@ -18,6 +18,7 @@
/**
* Describes a data link address for mobile data connection.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/NrQos.aidl b/radio/aidl/android/hardware/radio/data/NrQos.aidl
index 4078fdc..f636e6b 100644
--- a/radio/aidl/android/hardware/radio/data/NrQos.aidl
+++ b/radio/aidl/android/hardware/radio/data/NrQos.aidl
@@ -20,6 +20,7 @@
/**
* 5G Quality of Service parameters as per 3gpp spec 24.501 sec 9.11.4.12
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/OsAppId.aidl b/radio/aidl/android/hardware/radio/data/OsAppId.aidl
index 88e7832..ae38cf3 100644
--- a/radio/aidl/android/hardware/radio/data/OsAppId.aidl
+++ b/radio/aidl/android/hardware/radio/data/OsAppId.aidl
@@ -18,6 +18,7 @@
/**
* This struct represents the OsId + OsAppId as defined in TS 24.526 Section 5.2
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/PcoDataInfo.aidl b/radio/aidl/android/hardware/radio/data/PcoDataInfo.aidl
index 38a821f..a487bb3 100644
--- a/radio/aidl/android/hardware/radio/data/PcoDataInfo.aidl
+++ b/radio/aidl/android/hardware/radio/data/PcoDataInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable PcoDataInfo {
diff --git a/radio/aidl/android/hardware/radio/data/PdpProtocolType.aidl b/radio/aidl/android/hardware/radio/data/PdpProtocolType.aidl
index 792a503..27e541d 100644
--- a/radio/aidl/android/hardware/radio/data/PdpProtocolType.aidl
+++ b/radio/aidl/android/hardware/radio/data/PdpProtocolType.aidl
@@ -18,6 +18,7 @@
/**
* Specifies the type of packet data protocol which is defined in TS 27.007 section 10.1.1.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/data/PortRange.aidl b/radio/aidl/android/hardware/radio/data/PortRange.aidl
index 5c83ca4..7326966 100644
--- a/radio/aidl/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/android/hardware/radio/data/PortRange.aidl
@@ -20,6 +20,7 @@
* Defines range of ports. start and end are the first and last port numbers (inclusive) in the
* range. Both start and end are in PORT_RANGE_MIN to PORT_RANGE_MAX range. A single port shall
* be represented by the same start and end value.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/Qos.aidl b/radio/aidl/android/hardware/radio/data/Qos.aidl
index d9ab9e7..e98d030 100644
--- a/radio/aidl/android/hardware/radio/data/Qos.aidl
+++ b/radio/aidl/android/hardware/radio/data/Qos.aidl
@@ -21,6 +21,7 @@
/**
* EPS or NR QOS parameters
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/QosBandwidth.aidl b/radio/aidl/android/hardware/radio/data/QosBandwidth.aidl
index e841548..f2eca41 100644
--- a/radio/aidl/android/hardware/radio/data/QosBandwidth.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosBandwidth.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable QosBandwidth {
diff --git a/radio/aidl/android/hardware/radio/data/QosFilter.aidl b/radio/aidl/android/hardware/radio/data/QosFilter.aidl
index f5dc7ec..4a2b61d 100644
--- a/radio/aidl/android/hardware/radio/data/QosFilter.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosFilter.aidl
@@ -23,6 +23,7 @@
/**
* See 3gpp 24.008 10.5.6.12 and 3gpp 24.501 9.11.4.13
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/QosFilterIpsecSpi.aidl b/radio/aidl/android/hardware/radio/data/QosFilterIpsecSpi.aidl
index 5059c28..83c4fe1 100644
--- a/radio/aidl/android/hardware/radio/data/QosFilterIpsecSpi.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosFilterIpsecSpi.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union QosFilterIpsecSpi {
diff --git a/radio/aidl/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl b/radio/aidl/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
index 6f14934..4591174 100644
--- a/radio/aidl/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosFilterIpv6FlowLabel.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union QosFilterIpv6FlowLabel {
diff --git a/radio/aidl/android/hardware/radio/data/QosFilterTypeOfService.aidl b/radio/aidl/android/hardware/radio/data/QosFilterTypeOfService.aidl
index f5770a4..8d27399 100644
--- a/radio/aidl/android/hardware/radio/data/QosFilterTypeOfService.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosFilterTypeOfService.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.data;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union QosFilterTypeOfService {
diff --git a/radio/aidl/android/hardware/radio/data/QosSession.aidl b/radio/aidl/android/hardware/radio/data/QosSession.aidl
index 770b124..1a8eb2c 100644
--- a/radio/aidl/android/hardware/radio/data/QosSession.aidl
+++ b/radio/aidl/android/hardware/radio/data/QosSession.aidl
@@ -21,6 +21,7 @@
/**
* QOS session associated with a dedicated bearer
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index 14b0ffc..4e9e954 100644
--- a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -21,6 +21,7 @@
/**
* This struct represents a single route selection descriptor as defined in 3GPP TS 24.526.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
index fee54ac..b8f01c0 100644
--- a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -24,6 +24,7 @@
import android.hardware.radio.data.SliceInfo;
import android.hardware.radio.data.TrafficDescriptor;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SetupDataCallResult {
diff --git a/radio/aidl/android/hardware/radio/data/SliceInfo.aidl b/radio/aidl/android/hardware/radio/data/SliceInfo.aidl
index 7ad7fc3..809b8e0 100644
--- a/radio/aidl/android/hardware/radio/data/SliceInfo.aidl
+++ b/radio/aidl/android/hardware/radio/data/SliceInfo.aidl
@@ -18,6 +18,7 @@
/**
* This struct represents a S-NSSAI as defined in 3GPP TS 24.501.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/SlicingConfig.aidl b/radio/aidl/android/hardware/radio/data/SlicingConfig.aidl
index e94b58c..47ac41e 100644
--- a/radio/aidl/android/hardware/radio/data/SlicingConfig.aidl
+++ b/radio/aidl/android/hardware/radio/data/SlicingConfig.aidl
@@ -21,6 +21,7 @@
/**
* This struct represents the current slicing configuration.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/TrafficDescriptor.aidl b/radio/aidl/android/hardware/radio/data/TrafficDescriptor.aidl
index 2c117a5..098c77a 100644
--- a/radio/aidl/android/hardware/radio/data/TrafficDescriptor.aidl
+++ b/radio/aidl/android/hardware/radio/data/TrafficDescriptor.aidl
@@ -22,6 +22,7 @@
* This struct represents a traffic descriptor. A valid struct must have at least one of the
* optional values present. This is based on the definition of traffic descriptor in
* TS 24.526 Section 5.2.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/data/UrspRule.aidl b/radio/aidl/android/hardware/radio/data/UrspRule.aidl
index 0499edd..f2028b4 100644
--- a/radio/aidl/android/hardware/radio/data/UrspRule.aidl
+++ b/radio/aidl/android/hardware/radio/data/UrspRule.aidl
@@ -21,6 +21,7 @@
/**
* This struct represents a single URSP rule as defined in 3GPP TS 24.526.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index 70faa1e..c96f59f 100644
--- a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -16,10 +16,10 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ConnectionFailureInfo {
-
@VintfStability
@Backing(type="int")
enum ConnectionFailureReason {
diff --git a/radio/aidl/android/hardware/radio/ims/EpsFallbackReason.aidl b/radio/aidl/android/hardware/radio/ims/EpsFallbackReason.aidl
index 670638b..5300fbe 100644
--- a/radio/aidl/android/hardware/radio/ims/EpsFallbackReason.aidl
+++ b/radio/aidl/android/hardware/radio/ims/EpsFallbackReason.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl b/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
index bd661a7..05d6035 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
@@ -34,6 +34,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioImsResponse and IRadioImsIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioIms {
@@ -90,9 +91,8 @@
*
* Response function is IRadioImsResponse.startImsTrafficResponse()
*/
- void startImsTraffic(int serial, int token,
- ImsTrafficType imsTrafficType, AccessNetwork accessNetworkType,
- ImsCall.Direction trafficDirection);
+ void startImsTraffic(int serial, int token, ImsTrafficType imsTrafficType,
+ AccessNetwork accessNetworkType, ImsCall.Direction trafficDirection);
/**
* Indicates IMS traffic has been stopped.
@@ -123,8 +123,8 @@
* @param radioImsResponse Object containing response functions
* @param radioImsIndication Object containing radio indications
*/
- void setResponseFunctions(in IRadioImsResponse radioImsResponse,
- in IRadioImsIndication radioImsIndication);
+ void setResponseFunctions(
+ in IRadioImsResponse radioImsResponse, in IRadioImsIndication radioImsIndication);
/**
* Access Network Bitrate Recommendation Query (ANBRQ), see 3GPP TS 26.114.
@@ -138,7 +138,8 @@
*
* Response function is IRadioImsResponse.sendAnbrQueryResponse()
*/
- void sendAnbrQuery(int serial, ImsStreamType mediaType, ImsStreamDirection direction, int bitsPerSecond);
+ void sendAnbrQuery(
+ int serial, ImsStreamType mediaType, ImsStreamDirection direction, int bitsPerSecond);
/**
* Provides a list of IMS call information to radio.
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl b/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
index d123d07..58e30ce 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
@@ -24,6 +24,7 @@
/**
* Interface declaring unsolicited radio indications for ims APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioImsIndication {
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl b/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
index ff516cc..b8a5a94 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
@@ -21,10 +21,10 @@
/**
* Interface declaring response functions to solicited radio requests for ims APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioImsResponse {
-
/**
* @param info Response info struct containing response type, serial no. and error
*
@@ -73,8 +73,8 @@
* RadioError:INVALID_ARGUMENTS
* RadioError:NO_RESOURCES
*/
- void startImsTrafficResponse(in RadioResponseInfo info,
- in @nullable ConnectionFailureInfo failureInfo);
+ void startImsTrafficResponse(
+ in RadioResponseInfo info, in @nullable ConnectionFailureInfo failureInfo);
/**
* @param info Response info struct containing response type, serial no. and error
diff --git a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
index b71682f..427c1f5 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
@@ -18,10 +18,10 @@
import android.hardware.radio.AccessNetwork;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ImsCall {
-
@Backing(type="int")
enum CallType {
NORMAL,
diff --git a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index eac8db4..acfe51c 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
index 662f9e9..5158386 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.ims.ImsRegistrationState;
import android.hardware.radio.ims.SuggestedAction;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ImsRegistration {
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl
index fd5c0fa..187cb38 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
@@ -25,4 +26,4 @@
/** IMS is successfully registered */
REGISTERED,
-}
\ No newline at end of file
+}
diff --git a/radio/aidl/android/hardware/radio/ims/ImsStreamDirection.aidl b/radio/aidl/android/hardware/radio/ims/ImsStreamDirection.aidl
index c0cea32..42ce1bd 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsStreamDirection.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsStreamDirection.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/ims/ImsStreamType.aidl b/radio/aidl/android/hardware/radio/ims/ImsStreamType.aidl
index c12a0c1..b88dc60 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsStreamType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsStreamType.aidl
@@ -16,8 +16,10 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum ImsStreamType {
/** Media Stream Type - Audio **/
AUDIO = 1,
diff --git a/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl b/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
index 5a824c0..5af43f9 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
@@ -40,4 +41,4 @@
/** Ut/XCAP (XML Configuration Access Protocol) */
UT_XCAP
-}
\ No newline at end of file
+}
diff --git a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
index 38e6cdb..16858f9 100644
--- a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
@@ -16,10 +16,10 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SrvccCall {
-
@VintfStability
@Backing(type="int")
enum CallType {
diff --git a/radio/aidl/android/hardware/radio/ims/SuggestedAction.aidl b/radio/aidl/android/hardware/radio/ims/SuggestedAction.aidl
index 2d12ed6..443042d 100644
--- a/radio/aidl/android/hardware/radio/ims/SuggestedAction.aidl
+++ b/radio/aidl/android/hardware/radio/ims/SuggestedAction.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.ims;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
index 66d8ef0..dc2a162 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
@@ -16,9 +16,13 @@
package android.hardware.radio.ims.media;
-/** AMR codec mode to represent the bit rate. See 3ggp Specs 26.976 & 26.071 */
+/**
+ * AMR codec mode to represent the bit rate. See 3ggp Specs 26.976 & 26.071
+ * @hide
+ */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum AmrMode {
/** 4.75 kbps for AMR / 6.6 kbps for AMR-WB */
AMR_MODE_0 = 1 << 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
index 4ed3a24..9d7ab05 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
@@ -18,7 +18,9 @@
import android.hardware.radio.ims.media.AmrMode;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable AmrParams {
/** mode-set: AMR codec mode to represent the bit rate */
AmrMode amrMode;
diff --git a/radio/aidl/android/hardware/radio/ims/media/AnbrMode.aidl b/radio/aidl/android/hardware/radio/ims/media/AnbrMode.aidl
index f758cd4..af6f92f 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AnbrMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AnbrMode.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.ims.media.CodecMode;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable AnbrMode {
diff --git a/radio/aidl/android/hardware/radio/ims/media/CallQuality.aidl b/radio/aidl/android/hardware/radio/ims/media/CallQuality.aidl
index a8f7b16..dcf9623 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CallQuality.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CallQuality.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable CallQuality {
/**
* downlink CallQualityLevel for a given ongoing call
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecMode.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecMode.aidl
index aa1b3a4..6858ef4 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecMode.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.ims.media.AmrMode;
import android.hardware.radio.ims.media.EvsMode;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union CodecMode {
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
index 0aa5505..74de6ec 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
@@ -19,7 +19,9 @@
import android.hardware.radio.ims.media.CodecSpecificParams;
import android.hardware.radio.ims.media.CodecType;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable CodecParams {
/** Negotiated codec type */
CodecType codecType;
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecSpecificParams.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecSpecificParams.aidl
index 4410c81..86dcea0 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecSpecificParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecSpecificParams.aidl
@@ -19,7 +19,9 @@
import android.hardware.radio.ims.media.AmrParams;
import android.hardware.radio.ims.media.EvsParams;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
union CodecSpecificParams {
AmrParams amr;
EvsParams evs;
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
index 31218e3..99fbac4 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
@@ -16,8 +16,10 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum CodecType {
/** Adaptive Multi-Rate */
AMR = 1 << 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/DtmfParams.aidl b/radio/aidl/android/hardware/radio/ims/media/DtmfParams.aidl
index a7dcb0d..d2926f0 100644
--- a/radio/aidl/android/hardware/radio/ims/media/DtmfParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/DtmfParams.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable DtmfParams {
/**
* Dynamic payload type number to be used for DTMF RTP packets received.
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsBandwidth.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsBandwidth.aidl
index 8278514..279c489 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsBandwidth.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsBandwidth.aidl
@@ -15,9 +15,14 @@
*/
package android.hardware.radio.ims.media;
-/** EVS Speech codec bandwidths, See 3gpp spec 26.441 Table 1 */
+
+/**
+ * EVS Speech codec bandwidths, See 3gpp spec 26.441 Table 1
+ * @hide
+ */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum EvsBandwidth {
NONE = 0,
NARROW_BAND = 1 << 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
index 95bd6c7..12d981b 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
@@ -16,9 +16,13 @@
package android.hardware.radio.ims.media;
-/** EVS codec mode to represent the bit rate. See 3ggp Spec 26.952 Table 5.1 */
+/**
+ * EVS codec mode to represent the bit rate. See 3ggp Spec 26.952 Table 5.1
+ * @hide
+ */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum EvsMode {
/** 6.6 kbps for EVS AMR-WB IO */
EVS_MODE_0 = 1 << 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
index d138c83..52c3bf9 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
@@ -19,7 +19,9 @@
import android.hardware.radio.ims.media.EvsBandwidth;
import android.hardware.radio.ims.media.EvsMode;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable EvsParams {
/** EVS codec bandwidth */
EvsBandwidth bandwidth;
diff --git a/radio/aidl/android/hardware/radio/ims/media/IImsMedia.aidl b/radio/aidl/android/hardware/radio/ims/media/IImsMedia.aidl
index ecf1370..0af86c7 100644
--- a/radio/aidl/android/hardware/radio/ims/media/IImsMedia.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/IImsMedia.aidl
@@ -23,10 +23,10 @@
/**
* This interface is used by IMS media framework to talk to RTP stack located in another processor.
+ * @hide
*/
@VintfStability
oneway interface IImsMedia {
-
/**
* Set the listener functions for receiving notifications from the RTP stack.
*
diff --git a/radio/aidl/android/hardware/radio/ims/media/IImsMediaListener.aidl b/radio/aidl/android/hardware/radio/ims/media/IImsMediaListener.aidl
index 228acb7..371edd2 100644
--- a/radio/aidl/android/hardware/radio/ims/media/IImsMediaListener.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/IImsMediaListener.aidl
@@ -21,6 +21,7 @@
/**
* Interface declaring listener functions for unsolicited IMS media notifications.
+ * @hide
*/
@VintfStability
oneway interface IImsMediaListener {
diff --git a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
index ec2fa2b..deb741b 100644
--- a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSession.aidl
@@ -24,6 +24,7 @@
/**
* Session specific interface used by IMS media framework to talk to the vendor RTP stack.
+ * @hide
*/
@VintfStability
oneway interface IImsMediaSession {
diff --git a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
index 8341da2..442c018 100644
--- a/radio/aidl/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/IImsMediaSessionListener.aidl
@@ -24,6 +24,7 @@
/**
* Interface declaring listener functions for unsolicited IMS media notifications per session.
+ * @hide
*/
@VintfStability
oneway interface IImsMediaSessionListener {
diff --git a/radio/aidl/android/hardware/radio/ims/media/LocalEndPoint.aidl b/radio/aidl/android/hardware/radio/ims/media/LocalEndPoint.aidl
index 2bd48c6..29f25bb 100644
--- a/radio/aidl/android/hardware/radio/ims/media/LocalEndPoint.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/LocalEndPoint.aidl
@@ -18,7 +18,9 @@
import android.os.ParcelFileDescriptor;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable LocalEndPoint {
/** Socket file descriptor for RTP traffic */
ParcelFileDescriptor rtpFd;
diff --git a/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl b/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
index e5c34c7..4ae36df 100644
--- a/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/MediaDirection.aidl
@@ -26,9 +26,11 @@
* Receive-Only : RTP_RX | RTCP_TX | RTCP_RX - eg. Remote Hold.
* Send-Receive : RTP_TX | RTP_RX | RTCP_TX | RTCP_RX - eg. Active call.
* Send-Only : RTP_TX | RTCP_TX | RTCP_RX - eg. Simplex call, voice mail, etc
+ * @hide
*/
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum MediaDirection {
/**
* No RTP/RTCP flow in either direction. The implementation
diff --git a/radio/aidl/android/hardware/radio/ims/media/MediaQualityStatus.aidl b/radio/aidl/android/hardware/radio/ims/media/MediaQualityStatus.aidl
index b99e501..b617f91 100644
--- a/radio/aidl/android/hardware/radio/ims/media/MediaQualityStatus.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/MediaQualityStatus.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable MediaQualityStatus {
/**
* Rtp inactivity observed as per threshold set by
diff --git a/radio/aidl/android/hardware/radio/ims/media/MediaQualityThreshold.aidl b/radio/aidl/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
index bf98928..25473d0 100644
--- a/radio/aidl/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/MediaQualityThreshold.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable MediaQualityThreshold {
/** Array including threshold values in milliseconds for monitoring RTP inactivity */
int[] rtpInactivityTimerMillis;
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtcpConfig.aidl b/radio/aidl/android/hardware/radio/ims/media/RtcpConfig.aidl
index 98bbfc6..9cb3c0e 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtcpConfig.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtcpConfig.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable RtcpConfig {
/** Canonical name that will be sent to all session participants */
String canonicalName;
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 7f6839a..88180d7 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -16,25 +16,28 @@
package android.hardware.radio.ims.media;
-/** RTP Control Protocol Extended Reports (RTCP XR) Blocks, See RFC 3611 section 4 */
-
+/**
+ * RTP Control Protocol Extended Reports (RTCP XR) Blocks, See RFC 3611 section 4
+ * @hide
+ */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum RtcpXrReportBlockType {
/** Disable RTCP XR */
RTCPXR_NONE = 0,
/** Loss RLE Report Block */
- RTCPXR_LOSS_RLE_REPORT_BLOCK = 1 << 0,
+ RTCPXR_LOSS_RLE_REPORT_BLOCK = 1 << 0,
/** Duplicate RLE Report Block */
- RTCPXR_DUPLICATE_RLE_REPORT_BLOCK = 1 << 1,
+ RTCPXR_DUPLICATE_RLE_REPORT_BLOCK = 1 << 1,
/** Packet Receipt Times Report Block */
- RTCPXR_PACKET_RECEIPT_TIMES_REPORT_BLOCK = 1 << 2,
+ RTCPXR_PACKET_RECEIPT_TIMES_REPORT_BLOCK = 1 << 2,
/** Receiver Reference Time Report Block */
- RTCPXR_RECEIVER_REFERENCE_TIME_REPORT_BLOCK = 1 << 3,
+ RTCPXR_RECEIVER_REFERENCE_TIME_REPORT_BLOCK = 1 << 3,
/** DLRR Report Block */
- RTCPXR_DLRR_REPORT_BLOCK = 1 << 4,
+ RTCPXR_DLRR_REPORT_BLOCK = 1 << 4,
/** Statistics Summary Report Block */
- RTCPXR_STATISTICS_SUMMARY_REPORT_BLOCK = 1 << 5,
+ RTCPXR_STATISTICS_SUMMARY_REPORT_BLOCK = 1 << 5,
/** VoIP Metrics Report Block */
- RTCPXR_VOIP_METRICS_REPORT_BLOCK = 1 << 6,
+ RTCPXR_VOIP_METRICS_REPORT_BLOCK = 1 << 6,
}
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpAddress.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpAddress.aidl
index 2db73a3..c17e4b2 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpAddress.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpAddress.aidl
@@ -16,7 +16,9 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable RtpAddress {
/** Point to point IP address */
String ipAddress;
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
index f93b112..3c5c4dd 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -22,7 +22,9 @@
import android.hardware.radio.ims.media.RtpAddress;
import android.hardware.radio.ims.media.RtpSessionParams;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable RtpConfig {
/** Media flow direction. The bitfield of MediaDirection(s) */
int direction;
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpError.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpError.aidl
index 11a3468..84f972f 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpError.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpError.aidl
@@ -16,8 +16,10 @@
package android.hardware.radio.ims.media;
+/** @hide */
@VintfStability
@Backing(type="int")
+@JavaDerive(toString=true)
enum RtpError {
/** Success */
NONE = 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpHeaderExtension.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
index 76b13dc..19e855a 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpHeaderExtension.aidl
@@ -16,8 +16,12 @@
package android.hardware.radio.ims.media;
-/** RTP Header Extensions, see RFC 8285 */
+/**
+ * RTP Header Extensions, see RFC 8285
+ * @hide
+ */
@VintfStability
+@JavaDerive(toString=true)
parcelable RtpHeaderExtension {
/** Local identifier */
int localId;
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpSessionParams.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpSessionParams.aidl
index f93c52c..ae5c7e6 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpSessionParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpSessionParams.aidl
@@ -19,7 +19,9 @@
import android.hardware.radio.ims.media.CodecParams;
import android.hardware.radio.ims.media.DtmfParams;
+/** @hide */
@VintfStability
+@JavaDerive(toString=true)
parcelable RtpSessionParams {
/**
* ptime: Recommended length of time in milliseconds represented by the media
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
index 4173f15..35a6a8d 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaBroadcastSmsConfigInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaBroadcastSmsConfigInfo {
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsAck.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsAck.aidl
index 85ef692..2544ab5 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsAck.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsAck.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSmsAck {
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsAddress.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsAddress.aidl
index 8e521df..a7ad233 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsAddress.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsAddress.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSmsAddress {
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsMessage.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsMessage.aidl
index d4fb26f..51388b6 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsMessage.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsMessage.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.messaging.CdmaSmsAddress;
import android.hardware.radio.messaging.CdmaSmsSubaddress;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSmsMessage {
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index 18e5837..19d84ff 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSmsSubaddress {
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
index 4191985..897ec80 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsWriteArgs.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.messaging.CdmaSmsMessage;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSmsWriteArgs {
diff --git a/radio/aidl/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl b/radio/aidl/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
index 5138c3c..b4ab518 100644
--- a/radio/aidl/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/GsmBroadcastSmsConfigInfo.aidl
@@ -18,6 +18,7 @@
/**
* Which types of Cell Broadcast Message (CBM) are to be received by the ME
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/messaging/GsmSmsMessage.aidl b/radio/aidl/android/hardware/radio/messaging/GsmSmsMessage.aidl
index b256c9a..9a1a7b9 100644
--- a/radio/aidl/android/hardware/radio/messaging/GsmSmsMessage.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/GsmSmsMessage.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable GsmSmsMessage {
diff --git a/radio/aidl/android/hardware/radio/messaging/IRadioMessaging.aidl b/radio/aidl/android/hardware/radio/messaging/IRadioMessaging.aidl
index 8bd84a3..44818ff 100644
--- a/radio/aidl/android/hardware/radio/messaging/IRadioMessaging.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/IRadioMessaging.aidl
@@ -35,6 +35,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioMessagingResponse and IRadioMessagingIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioMessaging {
diff --git a/radio/aidl/android/hardware/radio/messaging/IRadioMessagingIndication.aidl b/radio/aidl/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
index 8834cd9..a177c2c 100644
--- a/radio/aidl/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/IRadioMessagingIndication.aidl
@@ -21,6 +21,7 @@
/**
* Interface declaring unsolicited radio indications for messaging APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioMessagingIndication {
diff --git a/radio/aidl/android/hardware/radio/messaging/IRadioMessagingResponse.aidl b/radio/aidl/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
index 8cbc869..84c34ca 100644
--- a/radio/aidl/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/IRadioMessagingResponse.aidl
@@ -23,6 +23,7 @@
/**
* Interface declaring response functions to solicited radio requests for messaging APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioMessagingResponse {
diff --git a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
index d4be044..5f9f82b 100644
--- a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.messaging.CdmaSmsMessage;
import android.hardware.radio.messaging.GsmSmsMessage;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ImsSmsMessage {
diff --git a/radio/aidl/android/hardware/radio/messaging/SendSmsResult.aidl b/radio/aidl/android/hardware/radio/messaging/SendSmsResult.aidl
index 80e059c..ea93727 100644
--- a/radio/aidl/android/hardware/radio/messaging/SendSmsResult.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/SendSmsResult.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SendSmsResult {
diff --git a/radio/aidl/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl b/radio/aidl/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
index eb15bf1..6f529eb 100644
--- a/radio/aidl/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/SmsAcknowledgeFailCause.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/messaging/SmsWriteArgs.aidl b/radio/aidl/android/hardware/radio/messaging/SmsWriteArgs.aidl
index 6eef941..64ce606 100644
--- a/radio/aidl/android/hardware/radio/messaging/SmsWriteArgs.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/SmsWriteArgs.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.messaging;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SmsWriteArgs {
diff --git a/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl b/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
index b2a56d4..db77c51 100644
--- a/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.modem.ActivityStatsTechSpecificInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ActivityStatsInfo {
diff --git a/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
index fcc2df2..7ca4021 100644
--- a/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.AccessNetwork;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ActivityStatsTechSpecificInfo {
diff --git a/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl b/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
index ad0d59c..c1f4cd6 100644
--- a/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/DeviceStateType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.modem;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/modem/HardwareConfig.aidl b/radio/aidl/android/hardware/radio/modem/HardwareConfig.aidl
index 8eb1f2d..323e5c9 100644
--- a/radio/aidl/android/hardware/radio/modem/HardwareConfig.aidl
+++ b/radio/aidl/android/hardware/radio/modem/HardwareConfig.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.modem.HardwareConfigModem;
import android.hardware.radio.modem.HardwareConfigSim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable HardwareConfig {
diff --git a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
index f5e2c27..1ba3562 100644
--- a/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/HardwareConfigModem.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.RadioTechnology;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable HardwareConfigModem {
diff --git a/radio/aidl/android/hardware/radio/modem/HardwareConfigSim.aidl b/radio/aidl/android/hardware/radio/modem/HardwareConfigSim.aidl
index c82bc6e..a5747c1 100644
--- a/radio/aidl/android/hardware/radio/modem/HardwareConfigSim.aidl
+++ b/radio/aidl/android/hardware/radio/modem/HardwareConfigSim.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.modem;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable HardwareConfigSim {
diff --git a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
index 2011c53..0d51584 100644
--- a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
@@ -31,6 +31,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioModemResponse and IRadioModemIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioModem {
@@ -244,5 +245,5 @@
*
* Response function is IRadioModemResponse.getImeiResponse()
*/
- void getImei(in int serial);
+ void getImei(in int serial);
}
diff --git a/radio/aidl/android/hardware/radio/modem/IRadioModemIndication.aidl b/radio/aidl/android/hardware/radio/modem/IRadioModemIndication.aidl
index c61de99..4b98277 100644
--- a/radio/aidl/android/hardware/radio/modem/IRadioModemIndication.aidl
+++ b/radio/aidl/android/hardware/radio/modem/IRadioModemIndication.aidl
@@ -23,6 +23,7 @@
/**
* Interface declaring unsolicited radio indications for modem APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioModemIndication {
diff --git a/radio/aidl/android/hardware/radio/modem/IRadioModemResponse.aidl b/radio/aidl/android/hardware/radio/modem/IRadioModemResponse.aidl
index fd4bffb..b6946f3 100644
--- a/radio/aidl/android/hardware/radio/modem/IRadioModemResponse.aidl
+++ b/radio/aidl/android/hardware/radio/modem/IRadioModemResponse.aidl
@@ -19,11 +19,12 @@
import android.hardware.radio.RadioResponseInfo;
import android.hardware.radio.modem.ActivityStatsInfo;
import android.hardware.radio.modem.HardwareConfig;
-import android.hardware.radio.modem.RadioCapability;
import android.hardware.radio.modem.ImeiInfo;
+import android.hardware.radio.modem.RadioCapability;
/**
* Interface declaring response functions to solicited radio requests for modem APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioModemResponse {
diff --git a/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl b/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
index 2d25bb7..6d33505 100644
--- a/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ImeiInfo.aidl
@@ -18,26 +18,25 @@
/**
* ImeiInfo to encapsulate the IMEI information from modem
+ * @hide
*/
-
@VintfStability
@JavaDerive(toString=true)
parcelable ImeiInfo {
-
@VintfStability
@Backing(type="int")
/**
* ImeiType enum is used identify the IMEI as primary or secondary as mentioned in GSMA TS.37
*/
enum ImeiType {
- /**
- * This is the primary IMEI of the device as mentioned in the GSMA TS.37. In a multi-SIM
- * device the modem must set one IMEI with this type as mentioned in GSMA TS37_2.2_REQ_8.
- * A single SIM with one IMEI must by default set that IMEI with this type.
- */
- PRIMARY = 1,
- /** This is not the primary IMEI of the device */
- SECONDARY = 2,
+ /**
+ * This is the primary IMEI of the device as mentioned in the GSMA TS.37. In a multi-SIM
+ * device the modem must set one IMEI with this type as mentioned in GSMA TS37_2.2_REQ_8.
+ * A single SIM with one IMEI must by default set that IMEI with this type.
+ */
+ PRIMARY = 1,
+ /** This is not the primary IMEI of the device */
+ SECONDARY = 2,
}
/** Primary or secondary IMEI as mentioned in GSMA spec TS.37 */
@@ -48,8 +47,8 @@
* SIM activations or swaps.
*/
String imei;
- /**
+ /**
* IMEI software version, see 3gpp spec 23.003 section 6.
*/
String svn;
-}
\ No newline at end of file
+}
diff --git a/radio/aidl/android/hardware/radio/modem/NvItem.aidl b/radio/aidl/android/hardware/radio/modem/NvItem.aidl
index 310b1ad..b405137 100644
--- a/radio/aidl/android/hardware/radio/modem/NvItem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/NvItem.aidl
@@ -16,7 +16,10 @@
package android.hardware.radio.modem;
-/** @deprecated NV APIs are deprecated starting from Android U. */
+/**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ * @hide
+ */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl b/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
index 6472f23..c57253b 100644
--- a/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/NvWriteItem.aidl
@@ -18,7 +18,10 @@
import android.hardware.radio.modem.NvItem;
-/** @deprecated NV APIs are deprecated starting from Android U. */
+/**
+ * @deprecated NV APIs are deprecated starting from Android U.
+ * @hide
+ */
@VintfStability
@JavaDerive(toString=true)
parcelable NvWriteItem {
diff --git a/radio/aidl/android/hardware/radio/modem/RadioCapability.aidl b/radio/aidl/android/hardware/radio/modem/RadioCapability.aidl
index 16cba09..9781595 100644
--- a/radio/aidl/android/hardware/radio/modem/RadioCapability.aidl
+++ b/radio/aidl/android/hardware/radio/modem/RadioCapability.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.modem;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RadioCapability {
diff --git a/radio/aidl/android/hardware/radio/modem/RadioState.aidl b/radio/aidl/android/hardware/radio/modem/RadioState.aidl
index dedad25..c36dbe0 100644
--- a/radio/aidl/android/hardware/radio/modem/RadioState.aidl
+++ b/radio/aidl/android/hardware/radio/modem/RadioState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.modem;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
index 6476fe8..e290a52 100644
--- a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
@@ -16,7 +16,10 @@
package android.hardware.radio.modem;
-/** Note: This will be deprecated along with nvResetConfig in Android U. */
+/**
+ * Note: This will be deprecated along with nvResetConfig in Android U.
+ * @hide
+ */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl b/radio/aidl/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
index 8b95ced..9c48a8d 100644
--- a/radio/aidl/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/AccessTechnologySpecificInfo.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.network.EutranRegistrationInfo;
import android.hardware.radio.network.NrVopsInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union AccessTechnologySpecificInfo {
diff --git a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
index 2759406..f12e35c 100644
--- a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.network.BarringTypeSpecificInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable BarringInfo {
diff --git a/radio/aidl/android/hardware/radio/network/BarringTypeSpecificInfo.aidl b/radio/aidl/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
index 3db3bf3..b4a3bdf 100644
--- a/radio/aidl/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/BarringTypeSpecificInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable BarringTypeSpecificInfo {
diff --git a/radio/aidl/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl b/radio/aidl/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
index b06fabb..91b8500 100644
--- a/radio/aidl/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/Cdma2000RegistrationInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable Cdma2000RegistrationInfo {
diff --git a/radio/aidl/android/hardware/radio/network/CdmaRoamingType.aidl b/radio/aidl/android/hardware/radio/network/CdmaRoamingType.aidl
index 2fea519..0bb7c04 100644
--- a/radio/aidl/android/hardware/radio/network/CdmaRoamingType.aidl
+++ b/radio/aidl/android/hardware/radio/network/CdmaRoamingType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
index 1286f67..ae7aa93 100644
--- a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/CellConnectionStatus.aidl b/radio/aidl/android/hardware/radio/network/CellConnectionStatus.aidl
index da36ff0..3bc19e1 100644
--- a/radio/aidl/android/hardware/radio/network/CellConnectionStatus.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellConnectionStatus.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentity.aidl b/radio/aidl/android/hardware/radio/network/CellIdentity.aidl
index e34866b..6142087 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentity.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentity.aidl
@@ -25,6 +25,7 @@
/**
* A union representing the CellIdentity of a single cell.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
index 5bb26c1..b93988f 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.network.OperatorInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellIdentityCdma {
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
index 60f42b6..bc02adc 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.network.OperatorInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellIdentityGsm {
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
index bfa58ac..27c2580 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.network.EutranBands;
import android.hardware.radio.network.OperatorInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellIdentityLte {
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
index d51a18e..4192845 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
@@ -22,6 +22,7 @@
/**
* The CellIdentity structure should be reported once for each element of the PLMN-IdentityInfoList
* broadcast in SIB1 CellAccessRelatedInfo as per 3GPP TS 38.331 Section 6.3.2.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
index f6e790f..33ffc6f 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.ClosedSubscriberGroupInfo;
import android.hardware.radio.network.OperatorInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellIdentityTdscdma {
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
index a76509b..b6e328a 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.ClosedSubscriberGroupInfo;
import android.hardware.radio.network.OperatorInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellIdentityWcdma {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
index 161ac71..4895326 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellConnectionStatus;
import android.hardware.radio.network.CellInfoRatSpecificInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfo {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoCdma.aidl b/radio/aidl/android/hardware/radio/network/CellInfoCdma.aidl
index 5408104..0a2bc54 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoCdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoCdma.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.network.CellIdentityCdma;
import android.hardware.radio.network.EvdoSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoCdma {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoGsm.aidl b/radio/aidl/android/hardware/radio/network/CellInfoGsm.aidl
index cadcd91..db84510 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoGsm.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoGsm.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellIdentityGsm;
import android.hardware.radio.network.GsmSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoGsm {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoLte.aidl b/radio/aidl/android/hardware/radio/network/CellInfoLte.aidl
index 443a668..3d9b2f3 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoLte.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoLte.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellIdentityLte;
import android.hardware.radio.network.LteSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoLte {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoNr.aidl b/radio/aidl/android/hardware/radio/network/CellInfoNr.aidl
index 6b3d4f4..61591a9 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoNr.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoNr.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellIdentityNr;
import android.hardware.radio.network.NrSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoNr {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl b/radio/aidl/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
index 76e92a4..10a4a5f 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoRatSpecificInfo.aidl
@@ -23,6 +23,7 @@
import android.hardware.radio.network.CellInfoTdscdma;
import android.hardware.radio.network.CellInfoWcdma;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union CellInfoRatSpecificInfo {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoTdscdma.aidl b/radio/aidl/android/hardware/radio/network/CellInfoTdscdma.aidl
index fb9c984..ff0fff3 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoTdscdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoTdscdma.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellIdentityTdscdma;
import android.hardware.radio.network.TdscdmaSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoTdscdma {
diff --git a/radio/aidl/android/hardware/radio/network/CellInfoWcdma.aidl b/radio/aidl/android/hardware/radio/network/CellInfoWcdma.aidl
index 2d6a2e5..c38e306 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfoWcdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfoWcdma.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.CellIdentityWcdma;
import android.hardware.radio.network.WcdmaSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CellInfoWcdma {
diff --git a/radio/aidl/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl b/radio/aidl/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
index a2d82d7..d61c1dc 100644
--- a/radio/aidl/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/ClosedSubscriberGroupInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable ClosedSubscriberGroupInfo {
diff --git a/radio/aidl/android/hardware/radio/network/Domain.aidl b/radio/aidl/android/hardware/radio/network/Domain.aidl
index be5f320..bb169bd 100644
--- a/radio/aidl/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/android/hardware/radio/network/Domain.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
index 25031a9..7a2ed9c 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index 0a22e4c..ea4bfeb 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -18,9 +18,10 @@
import android.hardware.radio.AccessNetwork;
import android.hardware.radio.network.EmergencyScanType;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
-parcelable EmergencyNetworkScanTrigger{
+parcelable EmergencyNetworkScanTrigger {
/**
* Access network to be prioritized during emergency scan. The 1st entry has the highest
* priority.
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
index 2215149..af2750e 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.Domain;
import android.hardware.radio.network.RegState;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable EmergencyRegResult {
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyScanType.aidl b/radio/aidl/android/hardware/radio/network/EmergencyScanType.aidl
index 72c5490..efa6c02 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyScanType.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyScanType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/EutranBands.aidl b/radio/aidl/android/hardware/radio/network/EutranBands.aidl
index 72e76e3..969a1b7 100644
--- a/radio/aidl/android/hardware/radio/network/EutranBands.aidl
+++ b/radio/aidl/android/hardware/radio/network/EutranBands.aidl
@@ -18,6 +18,7 @@
/**
* EUTRAN bands up to V16.4.0
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
index b986944..fb319c1 100644
--- a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.network.LteVopsInfo;
import android.hardware.radio.network.NrIndicators;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable EutranRegistrationInfo {
diff --git a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
index c3b3898..fc7cc1b 100644
--- a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable EvdoSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/GeranBands.aidl b/radio/aidl/android/hardware/radio/network/GeranBands.aidl
index 0e5b7b2..29d829f 100644
--- a/radio/aidl/android/hardware/radio/network/GeranBands.aidl
+++ b/radio/aidl/android/hardware/radio/network/GeranBands.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
index 796f80f..d569cf7 100644
--- a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable GsmSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index f22cdb0..878ad23 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -32,11 +32,13 @@
/**
* This interface is used by telephony and telecom to talk to cellular radio for network APIs.
+ * All functions apply to both terrestrial and extraterrestrial (satellite) based cellular networks.
* All the functions have minimum one parameter:
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioNetworkResponse and IRadioNetworkIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioNetwork {
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
index 47d932d..2c6f4e7 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
@@ -21,16 +21,17 @@
import android.hardware.radio.network.BarringInfo;
import android.hardware.radio.network.CellIdentity;
import android.hardware.radio.network.CellInfo;
+import android.hardware.radio.network.EmergencyRegResult;
import android.hardware.radio.network.LinkCapacityEstimate;
import android.hardware.radio.network.NetworkScanResult;
import android.hardware.radio.network.PhoneRestrictedState;
import android.hardware.radio.network.PhysicalChannelConfig;
import android.hardware.radio.network.SignalStrength;
import android.hardware.radio.network.SuppSvcNotification;
-import android.hardware.radio.network.EmergencyRegResult;
/**
* Interface declaring unsolicited radio indications for network APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioNetworkIndication {
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 457b5b9..db37a0e 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -33,6 +33,7 @@
/**
* Interface declaring response functions to solicited radio requests for network APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioNetworkResponse {
diff --git a/radio/aidl/android/hardware/radio/network/IndicationFilter.aidl b/radio/aidl/android/hardware/radio/network/IndicationFilter.aidl
index 9cab28d..7b95273 100644
--- a/radio/aidl/android/hardware/radio/network/IndicationFilter.aidl
+++ b/radio/aidl/android/hardware/radio/network/IndicationFilter.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/LceDataInfo.aidl b/radio/aidl/android/hardware/radio/network/LceDataInfo.aidl
index fdbdc2b..c855b18 100644
--- a/radio/aidl/android/hardware/radio/network/LceDataInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/LceDataInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable LceDataInfo {
diff --git a/radio/aidl/android/hardware/radio/network/LinkCapacityEstimate.aidl b/radio/aidl/android/hardware/radio/network/LinkCapacityEstimate.aidl
index 6461719..0aea27c 100644
--- a/radio/aidl/android/hardware/radio/network/LinkCapacityEstimate.aidl
+++ b/radio/aidl/android/hardware/radio/network/LinkCapacityEstimate.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable LinkCapacityEstimate {
diff --git a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
index 2d97c45..21d3ec7 100644
--- a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable LteSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/LteVopsInfo.aidl b/radio/aidl/android/hardware/radio/network/LteVopsInfo.aidl
index fb3b986..a320acb 100644
--- a/radio/aidl/android/hardware/radio/network/LteVopsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/LteVopsInfo.aidl
@@ -19,6 +19,7 @@
/**
* Type to define the LTE specific network capabilities for voice over PS including emergency and
* normal voice calls.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
index ae173c7..37f2cf1 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.network.RadioAccessSpecifier;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable NetworkScanRequest {
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
index 6d83f74..4465046 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.RadioError;
import android.hardware.radio.network.CellInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable NetworkScanResult {
diff --git a/radio/aidl/android/hardware/radio/network/NgranBands.aidl b/radio/aidl/android/hardware/radio/network/NgranBands.aidl
index 53c7a3d..a87a0d1 100644
--- a/radio/aidl/android/hardware/radio/network/NgranBands.aidl
+++ b/radio/aidl/android/hardware/radio/network/NgranBands.aidl
@@ -18,6 +18,7 @@
/**
* NGRAN bands up to V16.5.0
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/NrDualConnectivityState.aidl b/radio/aidl/android/hardware/radio/network/NrDualConnectivityState.aidl
index e293dff..00e19fe 100644
--- a/radio/aidl/android/hardware/radio/network/NrDualConnectivityState.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrDualConnectivityState.aidl
@@ -18,6 +18,7 @@
/**
* NR Dual connectivity state
+ * @hide
*/
@VintfStability
@Backing(type="byte")
diff --git a/radio/aidl/android/hardware/radio/network/NrIndicators.aidl b/radio/aidl/android/hardware/radio/network/NrIndicators.aidl
index 32cc964..214272c 100644
--- a/radio/aidl/android/hardware/radio/network/NrIndicators.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrIndicators.aidl
@@ -18,6 +18,7 @@
/**
* The parameters of NR 5G Non-Standalone.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
index 30ae067..65daf36 100644
--- a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable NrSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
index 197f401..71961a3 100644
--- a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
@@ -19,6 +19,7 @@
/**
* Type to define the NR specific network capabilities for voice over PS including emergency and
* normal voice calls.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/OperatorInfo.aidl b/radio/aidl/android/hardware/radio/network/OperatorInfo.aidl
index 56f4dca..36dbadf 100644
--- a/radio/aidl/android/hardware/radio/network/OperatorInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/OperatorInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable OperatorInfo {
diff --git a/radio/aidl/android/hardware/radio/network/PhoneRestrictedState.aidl b/radio/aidl/android/hardware/radio/network/PhoneRestrictedState.aidl
index 23ae3b1..de3527c 100644
--- a/radio/aidl/android/hardware/radio/network/PhoneRestrictedState.aidl
+++ b/radio/aidl/android/hardware/radio/network/PhoneRestrictedState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
index 9996953..ecb9463 100644
--- a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.network.CellConnectionStatus;
import android.hardware.radio.network.PhysicalChannelConfigBand;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable PhysicalChannelConfig {
diff --git a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfigBand.aidl b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
index 707a032..aa0e9b2 100644
--- a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
+++ b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfigBand.aidl
@@ -21,6 +21,7 @@
import android.hardware.radio.network.NgranBands;
import android.hardware.radio.network.UtranBands;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union PhysicalChannelConfigBand {
diff --git a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
index 8504248..b3cee47 100644
--- a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.AccessNetwork;
import android.hardware.radio.network.RadioAccessSpecifierBands;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RadioAccessSpecifier {
diff --git a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifierBands.aidl b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
index 38afee5..4bf694a 100644
--- a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifierBands.aidl
@@ -21,6 +21,7 @@
import android.hardware.radio.network.NgranBands;
import android.hardware.radio.network.UtranBands;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
union RadioAccessSpecifierBands {
diff --git a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
index 45c4a51..364a562 100644
--- a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/RegState.aidl b/radio/aidl/android/hardware/radio/network/RegState.aidl
index bdba4c4..de2d5f6 100644
--- a/radio/aidl/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegState.aidl
@@ -20,6 +20,7 @@
* Please note that registration state UNKNOWN is treated as "out of service" in Android telephony.
* Registration state REG_DENIED must be returned if Location Update Reject (with cause 17 - Network
* Failure) is received repeatedly from the network, to facilitate "managed roaming".
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
index f1d2972..57a73c0 100644
--- a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
@@ -22,6 +22,7 @@
import android.hardware.radio.network.RegState;
import android.hardware.radio.network.RegistrationFailCause;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable RegStateResult {
diff --git a/radio/aidl/android/hardware/radio/network/RegistrationFailCause.aidl b/radio/aidl/android/hardware/radio/network/RegistrationFailCause.aidl
index 9549f2e..2955f96 100644
--- a/radio/aidl/android/hardware/radio/network/RegistrationFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegistrationFailCause.aidl
@@ -19,6 +19,7 @@
/**
* Call fail causes for Circuit-switched service enumerated in 3GPP TS 24.008, 10.5.3.6 and
* 10.5.147. Additional detail is available in 3GPP TS 24.008 Annex G.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
index ddb4582..5fed522 100644
--- a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
@@ -24,6 +24,7 @@
import android.hardware.radio.network.TdscdmaSignalStrength;
import android.hardware.radio.network.WcdmaSignalStrength;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
index 0a8e9ce..e440a64 100644
--- a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -20,6 +20,7 @@
/**
* Contains the threshold values of each signal measurement type.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/network/SuppSvcNotification.aidl b/radio/aidl/android/hardware/radio/network/SuppSvcNotification.aidl
index d4229e1..3b8c8b2 100644
--- a/radio/aidl/android/hardware/radio/network/SuppSvcNotification.aidl
+++ b/radio/aidl/android/hardware/radio/network/SuppSvcNotification.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SuppSvcNotification {
diff --git a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
index ec9ca6b..4afdd0f 100644
--- a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable TdscdmaSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/network/UsageSetting.aidl b/radio/aidl/android/hardware/radio/network/UsageSetting.aidl
index 5a714a4..0b6cfdd 100644
--- a/radio/aidl/android/hardware/radio/network/UsageSetting.aidl
+++ b/radio/aidl/android/hardware/radio/network/UsageSetting.aidl
@@ -21,6 +21,7 @@
*
* <p>Also refer to "UE's usage setting" as defined in 3gpp 24.301 section 3.1 and 3gpp 23.221
* Annex A.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/UtranBands.aidl b/radio/aidl/android/hardware/radio/network/UtranBands.aidl
index a0fd427..8478b66 100644
--- a/radio/aidl/android/hardware/radio/network/UtranBands.aidl
+++ b/radio/aidl/android/hardware/radio/network/UtranBands.aidl
@@ -18,6 +18,7 @@
/**
* UTRAN bands up to V15.0.0
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
index 7595c05..ace89ed 100644
--- a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.network;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable WcdmaSignalStrength {
diff --git a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
index c072f6a..7fe8e40 100644
--- a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.sim.PersoSubstate;
import android.hardware.radio.sim.PinState;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable AppStatus {
diff --git a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
index f8b5922..2598dcb 100644
--- a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
index 1419c51..043bfa4 100644
--- a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
@@ -21,6 +21,7 @@
import android.hardware.radio.sim.AppStatus;
import android.hardware.radio.sim.PinState;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CardStatus {
diff --git a/radio/aidl/android/hardware/radio/sim/Carrier.aidl b/radio/aidl/android/hardware/radio/sim/Carrier.aidl
index d25214f..8b27088 100644
--- a/radio/aidl/android/hardware/radio/sim/Carrier.aidl
+++ b/radio/aidl/android/hardware/radio/sim/Carrier.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable Carrier {
diff --git a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
index edbec2c..d5e0c43 100644
--- a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.sim.Carrier;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CarrierRestrictions {
@@ -25,12 +26,12 @@
@Backing(type="int")
/** This enum defines the carrier restriction status values */
enum CarrierRestrictionStatus {
- /**
- * Carrier restriction status value is unknown, used in cases where modem is dependent on
- * external module to know about the lock status and the module hasn’t yet provided the lock
- * status. For example, when the lock status is maintained on a cloud server and device has
- * just booted after out of box and not yet connected to the internet.
- */
+ /**
+ * Carrier restriction status value is unknown, used in cases where modem is dependent on
+ * external module to know about the lock status and the module hasn’t yet provided the lock
+ * status. For example, when the lock status is maintained on a cloud server and device has
+ * just booted after out of box and not yet connected to the internet.
+ */
UNKNOWN = 0,
/** There is no carrier restriction on the device */
NOT_RESTRICTED = 1,
diff --git a/radio/aidl/android/hardware/radio/sim/CdmaSubscriptionSource.aidl b/radio/aidl/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
index 6aa6926..4c6c1ef 100644
--- a/radio/aidl/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CdmaSubscriptionSource.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
index 3823a71..1453664 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
@@ -37,6 +37,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioSimResponse and IRadioSimIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioSim {
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSimIndication.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSimIndication.aidl
index a139040..fc6355d 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSimIndication.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSimIndication.aidl
@@ -24,6 +24,7 @@
/**
* Interface declaring unsolicited radio indications for SIM APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioSimIndication {
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
index 90f172f..48253d4 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
@@ -27,6 +27,7 @@
/**
* Interface declaring response functions to solicited radio requests for SIM APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioSimResponse {
diff --git a/radio/aidl/android/hardware/radio/sim/IccIo.aidl b/radio/aidl/android/hardware/radio/sim/IccIo.aidl
index f173c8e..0877b7a 100644
--- a/radio/aidl/android/hardware/radio/sim/IccIo.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IccIo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable IccIo {
diff --git a/radio/aidl/android/hardware/radio/sim/IccIoResult.aidl b/radio/aidl/android/hardware/radio/sim/IccIoResult.aidl
index efcbbda..ac89698 100644
--- a/radio/aidl/android/hardware/radio/sim/IccIoResult.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IccIoResult.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable IccIoResult {
diff --git a/radio/aidl/android/hardware/radio/sim/ImsiEncryptionInfo.aidl b/radio/aidl/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
index ba1dda5..b31b081 100644
--- a/radio/aidl/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
+++ b/radio/aidl/android/hardware/radio/sim/ImsiEncryptionInfo.aidl
@@ -18,6 +18,7 @@
/**
* Carrier specific Information sent by the carrier, which will be used to encrypt IMSI and IMPI.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
index b1385a4..f9414a8 100644
--- a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -18,6 +18,7 @@
/**
* Enum representing the status of the received PB indication.
+ * @hide
*/
@VintfStability
@Backing(type="byte")
diff --git a/radio/aidl/android/hardware/radio/sim/PersoSubstate.aidl b/radio/aidl/android/hardware/radio/sim/PersoSubstate.aidl
index f85c84b..4da86c5 100644
--- a/radio/aidl/android/hardware/radio/sim/PersoSubstate.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PersoSubstate.aidl
@@ -19,6 +19,7 @@
/**
* Additional personalization categories in addition to those specified in 3GPP TS 22.022 and
* 3GPP2 C.S0068-0.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/sim/PhonebookCapacity.aidl b/radio/aidl/android/hardware/radio/sim/PhonebookCapacity.aidl
index 97c3dba..2212fda 100644
--- a/radio/aidl/android/hardware/radio/sim/PhonebookCapacity.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PhonebookCapacity.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable PhonebookCapacity {
diff --git a/radio/aidl/android/hardware/radio/sim/PhonebookRecordInfo.aidl b/radio/aidl/android/hardware/radio/sim/PhonebookRecordInfo.aidl
index c4db0e6..1653c31 100644
--- a/radio/aidl/android/hardware/radio/sim/PhonebookRecordInfo.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PhonebookRecordInfo.aidl
@@ -19,6 +19,7 @@
/**
* Phonebook-record-information specified by EF_ADN (Abbreviated dialing numbers) record of SIM
* as per 3GPP spec 31.102 v15 Section-4.4.2.3.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/PinState.aidl b/radio/aidl/android/hardware/radio/sim/PinState.aidl
index 85048bb..f5f3108 100644
--- a/radio/aidl/android/hardware/radio/sim/PinState.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PinState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/SelectUiccSub.aidl b/radio/aidl/android/hardware/radio/sim/SelectUiccSub.aidl
index 553404b..70a2191 100644
--- a/radio/aidl/android/hardware/radio/sim/SelectUiccSub.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SelectUiccSub.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SelectUiccSub {
diff --git a/radio/aidl/android/hardware/radio/sim/SessionInfo.aidl b/radio/aidl/android/hardware/radio/sim/SessionInfo.aidl
index 9e3e8ed..585118a 100644
--- a/radio/aidl/android/hardware/radio/sim/SessionInfo.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SessionInfo.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SessionInfo {
diff --git a/radio/aidl/android/hardware/radio/sim/SimApdu.aidl b/radio/aidl/android/hardware/radio/sim/SimApdu.aidl
index 9799f2b..d0e3c39 100644
--- a/radio/aidl/android/hardware/radio/sim/SimApdu.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimApdu.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SimApdu {
diff --git a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index 6490d51..18f97f7 100644
--- a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
index 69aff66..943f1d2 100644
--- a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.sim;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SimRefreshResult {
diff --git a/radio/aidl/android/hardware/radio/voice/AudioQuality.aidl b/radio/aidl/android/hardware/radio/voice/AudioQuality.aidl
index dc47172..334ae3d 100644
--- a/radio/aidl/android/hardware/radio/voice/AudioQuality.aidl
+++ b/radio/aidl/android/hardware/radio/voice/AudioQuality.aidl
@@ -19,6 +19,7 @@
/**
* Audio codec which is used on GSM, UMTS, and CDMA. These values must be opaque to the Android
* framework. Only for display.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/voice/Call.aidl b/radio/aidl/android/hardware/radio/voice/Call.aidl
index b09d7a0..ee0b025 100644
--- a/radio/aidl/android/hardware/radio/voice/Call.aidl
+++ b/radio/aidl/android/hardware/radio/voice/Call.aidl
@@ -19,6 +19,7 @@
import android.hardware.radio.voice.AudioQuality;
import android.hardware.radio.voice.UusInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable Call {
diff --git a/radio/aidl/android/hardware/radio/voice/CallForwardInfo.aidl b/radio/aidl/android/hardware/radio/voice/CallForwardInfo.aidl
index c4143b9..9b4ecd9 100644
--- a/radio/aidl/android/hardware/radio/voice/CallForwardInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CallForwardInfo.aidl
@@ -18,6 +18,7 @@
/**
* See also com.android.internal.telephony.gsm.CallForwardInfo
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaCallWaiting.aidl b/radio/aidl/android/hardware/radio/voice/CdmaCallWaiting.aidl
index 4d447d7..d97b319 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaCallWaiting.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaCallWaiting.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.voice.CdmaSignalInfoRecord;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaCallWaiting {
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index 522f7ae..7e5a68d 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -22,6 +22,7 @@
* the form: display_tag, display_len, and display_len occurrences of the char field if the
* display_tag is not 10000000 or 10000001. To save space, the records are stored consecutively in
* a byte buffer. The display_tag, display_len and chari fields are all 1 byte.
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
index 1a4f1b3..f5c656b 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -24,10 +24,11 @@
import android.hardware.radio.voice.CdmaT53AudioControlInfoRecord;
import android.hardware.radio.voice.CdmaT53ClirInfoRecord;
-@VintfStability
/**
* Max length of CdmaInformationRecords[] is CDMA_MAX_NUMBER_OF_INFO_RECS
+ * @hide
*/
+@VintfStability
@JavaDerive(toString=true)
parcelable CdmaInformationRecord {
const int CDMA_MAX_NUMBER_OF_INFO_RECS = 10;
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
index 8bfc5f7..15c22a0 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaLineControlInfoRecord.aidl
@@ -18,6 +18,7 @@
/**
* Line Control Information Record as defined in C.S0005 section 3.7.5.15
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
index 9084b25..b04e273 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -20,6 +20,7 @@
* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
* Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
* Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl b/radio/aidl/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
index 81fb003..b6444ab 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaOtaProvisionStatus.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
index 5c9e2f2..691712e 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.voice.CdmaNumberInfoRecord;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CdmaRedirectingNumberInfoRecord {
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
index 3334475..4302ba4 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaSignalInfoRecord.aidl
@@ -18,6 +18,7 @@
/**
* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
index 9795cf0..44ac2b4 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaT53AudioControlInfoRecord.aidl
@@ -18,6 +18,7 @@
/**
* T53 Audio Control Information Record
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
index 5ccd251..564d761 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaT53ClirInfoRecord.aidl
@@ -18,6 +18,7 @@
/**
* T53 CLIR Information Record
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/CfData.aidl b/radio/aidl/android/hardware/radio/voice/CfData.aidl
index 8f4c227..84304f4 100644
--- a/radio/aidl/android/hardware/radio/voice/CfData.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CfData.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.voice.CallForwardInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable CfData {
diff --git a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
index 4021471..0a2ea2c 100644
--- a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/Dial.aidl b/radio/aidl/android/hardware/radio/voice/Dial.aidl
index ca028ad..a874181 100644
--- a/radio/aidl/android/hardware/radio/voice/Dial.aidl
+++ b/radio/aidl/android/hardware/radio/voice/Dial.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.voice.UusInfo;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable Dial {
diff --git a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
index d623346..9f8993d 100644
--- a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -18,6 +18,7 @@
/**
* Indicates how the implementation should handle the emergency call if it is required by Android.
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/voice/EmergencyNumber.aidl b/radio/aidl/android/hardware/radio/voice/EmergencyNumber.aidl
index e380ce8..30f29a9 100644
--- a/radio/aidl/android/hardware/radio/voice/EmergencyNumber.aidl
+++ b/radio/aidl/android/hardware/radio/voice/EmergencyNumber.aidl
@@ -37,6 +37,7 @@
* 3gpp 23.167, Section 6 - Functional description;
* 3gpp 24.503, Section 5.1.6.8.1 - General;
* RFC 5031
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/EmergencyServiceCategory.aidl b/radio/aidl/android/hardware/radio/voice/EmergencyServiceCategory.aidl
index a4ac7aa..80f873a 100644
--- a/radio/aidl/android/hardware/radio/voice/EmergencyServiceCategory.aidl
+++ b/radio/aidl/android/hardware/radio/voice/EmergencyServiceCategory.aidl
@@ -31,6 +31,7 @@
* services are associated with this emergency number.
*
* Reference: 3gpp 22.101, Section 10 - Emergency Calls
+ * @hide
*/
@VintfStability
@Backing(type="int")
diff --git a/radio/aidl/android/hardware/radio/voice/IRadioVoice.aidl b/radio/aidl/android/hardware/radio/voice/IRadioVoice.aidl
index c05d237..bf9b9cb 100644
--- a/radio/aidl/android/hardware/radio/voice/IRadioVoice.aidl
+++ b/radio/aidl/android/hardware/radio/voice/IRadioVoice.aidl
@@ -30,6 +30,7 @@
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with IRadioVoiceResponse and IRadioVoiceIndication.
+ * @hide
*/
@VintfStability
oneway interface IRadioVoice {
diff --git a/radio/aidl/android/hardware/radio/voice/IRadioVoiceIndication.aidl b/radio/aidl/android/hardware/radio/voice/IRadioVoiceIndication.aidl
index 437fef6..9de6364 100644
--- a/radio/aidl/android/hardware/radio/voice/IRadioVoiceIndication.aidl
+++ b/radio/aidl/android/hardware/radio/voice/IRadioVoiceIndication.aidl
@@ -28,6 +28,7 @@
/**
* Interface declaring unsolicited radio indications for voice APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioVoiceIndication {
diff --git a/radio/aidl/android/hardware/radio/voice/IRadioVoiceResponse.aidl b/radio/aidl/android/hardware/radio/voice/IRadioVoiceResponse.aidl
index 39e3ace..21264df 100644
--- a/radio/aidl/android/hardware/radio/voice/IRadioVoiceResponse.aidl
+++ b/radio/aidl/android/hardware/radio/voice/IRadioVoiceResponse.aidl
@@ -25,6 +25,7 @@
/**
* Interface declaring response functions to solicited radio requests for voice APIs.
+ * @hide
*/
@VintfStability
oneway interface IRadioVoiceResponse {
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
index 5c8c819..9a38197 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 078722a..4ed17d2 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -18,6 +18,7 @@
import android.hardware.radio.voice.LastCallFailCause;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable LastCallFailCauseInfo {
diff --git a/radio/aidl/android/hardware/radio/voice/SrvccState.aidl b/radio/aidl/android/hardware/radio/voice/SrvccState.aidl
index 08eb877..923518d 100644
--- a/radio/aidl/android/hardware/radio/voice/SrvccState.aidl
+++ b/radio/aidl/android/hardware/radio/voice/SrvccState.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
index b944bf4..c965a7d 100644
--- a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable SsInfoData {
diff --git a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 7982275..9fe4024 100644
--- a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -20,6 +20,7 @@
import android.hardware.radio.voice.CfData;
import android.hardware.radio.voice.SsInfoData;
+/** @hide */
@VintfStability
@JavaDerive(toString=true)
parcelable StkCcUnsolSsResult {
diff --git a/radio/aidl/android/hardware/radio/voice/TtyMode.aidl b/radio/aidl/android/hardware/radio/voice/TtyMode.aidl
index e8dd723..b9203e1 100644
--- a/radio/aidl/android/hardware/radio/voice/TtyMode.aidl
+++ b/radio/aidl/android/hardware/radio/voice/TtyMode.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/UssdModeType.aidl b/radio/aidl/android/hardware/radio/voice/UssdModeType.aidl
index cece4bd..d43462e 100644
--- a/radio/aidl/android/hardware/radio/voice/UssdModeType.aidl
+++ b/radio/aidl/android/hardware/radio/voice/UssdModeType.aidl
@@ -16,6 +16,7 @@
package android.hardware.radio.voice;
+/** @hide */
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
diff --git a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
index 220a8fc..5d499ca 100644
--- a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
@@ -18,6 +18,7 @@
/**
* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
+ * @hide
*/
@VintfStability
@JavaDerive(toString=true)
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index 5cf1378..66970db 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -31,20 +31,20 @@
"-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
],
shared_libs: [
- "android.hardware.radio.config-V2-ndk",
+ "android.hardware.radio.config-V3-ndk",
"android.hardware.radio.config@1.0",
"android.hardware.radio.config@1.1",
"android.hardware.radio.config@1.2",
"android.hardware.radio.config@1.3",
- "android.hardware.radio.data-V2-ndk",
- "android.hardware.radio.ims-V1-ndk",
- "android.hardware.radio.ims.media-V1-ndk",
- "android.hardware.radio.messaging-V2-ndk",
- "android.hardware.radio.modem-V2-ndk",
- "android.hardware.radio.network-V2-ndk",
+ "android.hardware.radio.data-V3-ndk",
+ "android.hardware.radio.ims-V2-ndk",
+ "android.hardware.radio.ims.media-V2-ndk",
+ "android.hardware.radio.messaging-V3-ndk",
+ "android.hardware.radio.modem-V3-ndk",
+ "android.hardware.radio.network-V3-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.sim-V2-ndk",
- "android.hardware.radio.voice-V2-ndk",
+ "android.hardware.radio.sim-V3-ndk",
+ "android.hardware.radio.voice-V3-ndk",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
"android.hardware.radio@1.2",
diff --git a/radio/aidl/compat/service/Android.bp b/radio/aidl/compat/service/Android.bp
index dff0182..62c99fe 100644
--- a/radio/aidl/compat/service/Android.bp
+++ b/radio/aidl/compat/service/Android.bp
@@ -34,20 +34,20 @@
],
shared_libs: [
"android.hardware.radio-library.compat",
- "android.hardware.radio.config-V2-ndk",
+ "android.hardware.radio.config-V3-ndk",
"android.hardware.radio.config@1.0",
"android.hardware.radio.config@1.1",
"android.hardware.radio.config@1.2",
"android.hardware.radio.config@1.3",
- "android.hardware.radio.data-V2-ndk",
- "android.hardware.radio.ims-V1-ndk",
- "android.hardware.radio.ims.media-V1-ndk",
- "android.hardware.radio.messaging-V2-ndk",
- "android.hardware.radio.modem-V2-ndk",
- "android.hardware.radio.network-V2-ndk",
+ "android.hardware.radio.data-V3-ndk",
+ "android.hardware.radio.ims-V2-ndk",
+ "android.hardware.radio.ims.media-V2-ndk",
+ "android.hardware.radio.messaging-V3-ndk",
+ "android.hardware.radio.modem-V3-ndk",
+ "android.hardware.radio.network-V3-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.sim-V2-ndk",
- "android.hardware.radio.voice-V2-ndk",
+ "android.hardware.radio.sim-V3-ndk",
+ "android.hardware.radio.voice-V3-ndk",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
"android.hardware.radio@1.2",
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index e79d3c0..ddb1b33 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -71,17 +71,17 @@
"libvintf",
],
static_libs: [
- "android.hardware.radio-V2-ndk",
- "android.hardware.radio.config-V2-ndk",
- "android.hardware.radio.data-V2-ndk",
- "android.hardware.radio.ims-V1-ndk",
- "android.hardware.radio.ims.media-V1-ndk",
- "android.hardware.radio.messaging-V2-ndk",
- "android.hardware.radio.modem-V2-ndk",
- "android.hardware.radio.network-V2-ndk",
+ "android.hardware.radio-V3-ndk",
+ "android.hardware.radio.config-V3-ndk",
+ "android.hardware.radio.data-V3-ndk",
+ "android.hardware.radio.ims-V2-ndk",
+ "android.hardware.radio.ims.media-V2-ndk",
+ "android.hardware.radio.messaging-V3-ndk",
+ "android.hardware.radio.modem-V3-ndk",
+ "android.hardware.radio.network-V3-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.sim-V2-ndk",
- "android.hardware.radio.voice-V2-ndk",
+ "android.hardware.radio.sim-V3-ndk",
+ "android.hardware.radio.voice-V3-ndk",
],
test_suites: [
"general-tests",
diff --git a/sensors/2.1/vts/functional/AndroidTest.xml b/sensors/2.1/vts/functional/AndroidTest.xml
index 2ef8dc6..2d21c7f 100644
--- a/sensors/2.1/vts/functional/AndroidTest.xml
+++ b/sensors/2.1/vts/functional/AndroidTest.xml
@@ -22,13 +22,13 @@
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
- <option name="push" value="VtsHalSensorsV2_1TargetTest->/data/local/tmp/VtsHalSensorsV2_1TargetTest" />
+ <option name="push" value="VtsHalSensorsV2_1TargetTest->/data/local/tests/unrestricted/VtsHalSensorsV2_1TargetTest" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-timeout" value="900000" />
<option name="runtime-hint" value="300000"/>
- <option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="native-test-device-path" value="/data/local/tests/unrestricted" />
<option name="module-name" value="VtsHalSensorsV2_1TargetTest" />
</test>
</configuration>
diff --git a/sensors/2.1/vts/functional/TEST_MAPPING b/sensors/2.1/vts/functional/TEST_MAPPING
new file mode 100644
index 0000000..0129f39
--- /dev/null
+++ b/sensors/2.1/vts/functional/TEST_MAPPING
@@ -0,0 +1,12 @@
+{
+ "presubmit": [
+ {
+ "name": "VtsHalSensorsV2_1TargetTest"
+ }
+ ],
+ "kernel-presubmit": [
+ {
+ "name": "VtsHalSensorsV2_1TargetTest"
+ }
+ ]
+}
diff --git a/sensors/aidl/TEST_MAPPING b/sensors/aidl/TEST_MAPPING
new file mode 100644
index 0000000..6de4549
--- /dev/null
+++ b/sensors/aidl/TEST_MAPPING
@@ -0,0 +1,12 @@
+{
+ "presubmit": [
+ {
+ "name": "VtsAidlHalSensorsTargetTest"
+ }
+ ],
+ "kernel-presubmit": [
+ {
+ "name": "VtsAidlHalSensorsTargetTest"
+ }
+ ]
+}
diff --git a/sensors/aidl/vts/AndroidTest.xml b/sensors/aidl/vts/AndroidTest.xml
index 99caf28..2d3382e 100644
--- a/sensors/aidl/vts/AndroidTest.xml
+++ b/sensors/aidl/vts/AndroidTest.xml
@@ -22,13 +22,13 @@
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
- <option name="push" value="VtsAidlHalSensorsTargetTest->/data/local/tmp/VtsAidlHalSensorsTargetTest" />
+ <option name="push" value="VtsAidlHalSensorsTargetTest->/data/local/tests/unrestricted/VtsAidlHalSensorsTargetTest" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-timeout" value="900000" />
<option name="runtime-hint" value="300000"/>
- <option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="native-test-device-path" value="/data/local/tests/unrestricted" />
<option name="module-name" value="VtsAidlHalSensorsTargetTest" />
</test>
</configuration>
diff --git a/sensors/aidl/vts/SensorsAidlTestSharedMemory.h b/sensors/aidl/vts/SensorsAidlTestSharedMemory.h
index 4b5916a..200f26f 100644
--- a/sensors/aidl/vts/SensorsAidlTestSharedMemory.h
+++ b/sensors/aidl/vts/SensorsAidlTestSharedMemory.h
@@ -17,7 +17,11 @@
#ifndef ANDROID_SENSORS_AIDL_TEST_SHARED_MEMORY_H
#define ANDROID_SENSORS_AIDL_TEST_SHARED_MEMORY_H
-#include "sensors-vts-utils/GrallocWrapper.h"
+#include <aidl/android/hardware/graphics/common/BufferUsage.h>
+#include <aidl/android/hardware/graphics/common/PixelFormat.h>
+#include <ui/GraphicBuffer.h>
+#include <ui/GraphicBufferAllocator.h>
+#include <ui/GraphicBufferMapper.h>
#include <aidlcommonsupport/NativeHandle.h>
#include <android-base/macros.h>
@@ -28,6 +32,8 @@
#include <cutils/ashmem.h>
+using ::aidl::android::hardware::graphics::common::BufferUsage;
+using ::aidl::android::hardware::graphics::common::PixelFormat;
using ::aidl::android::hardware::sensors::BnSensors;
using ::aidl::android::hardware::sensors::Event;
using ::aidl::android::hardware::sensors::ISensors;
@@ -53,12 +59,22 @@
}
ISensors::SharedMemInfo getSharedMemInfo() const {
- ISensors::SharedMemInfo mem = {
- .type = mType,
- .format = ISensors::SharedMemInfo::SharedMemFormat::SENSORS_EVENT,
- .size = static_cast<int32_t>(mSize),
- .memoryHandle = android::dupToAidl(mNativeHandle)};
- return mem;
+ if (mType == ISensors::SharedMemInfo::SharedMemType::GRALLOC) {
+ ISensors::SharedMemInfo mem = {
+ .type = mType,
+ .format = ISensors::SharedMemInfo::SharedMemFormat::SENSORS_EVENT,
+ .size = static_cast<int32_t>(mSize),
+ .memoryHandle = android::dupToAidl(mBufferHandle)};
+ return mem;
+
+ } else {
+ ISensors::SharedMemInfo mem = {
+ .type = mType,
+ .format = ISensors::SharedMemInfo::SharedMemFormat::SENSORS_EVENT,
+ .size = static_cast<int32_t>(mSize),
+ .memoryHandle = android::dupToAidl(mNativeHandle)};
+ return mem;
+ }
}
char* getBuffer() const { return mBuffer; }
size_t getSize() const { return mSize; }
@@ -141,17 +157,26 @@
}
case ISensors::SharedMemInfo::SharedMemType::GRALLOC: {
if (mSize != 0) {
- mGrallocWrapper->freeBuffer(mNativeHandle);
- mNativeHandle = nullptr;
+ android::status_t status =
+ android::GraphicBufferAllocator::get().free(mBufferHandle);
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory Gralloc failed to free buffer. Status: "
+ "%s",
+ android::statusToString(status).c_str());
+ }
+ mBufferHandle = nullptr;
+ mBuffer = nullptr;
mSize = 0;
}
break;
}
default: {
- if (mNativeHandle != nullptr || mSize != 0 || mBuffer != nullptr) {
+ if (mNativeHandle != nullptr || mSize != 0 || mBuffer != nullptr ||
+ mBufferHandle != nullptr) {
ALOGE("SensorsAidlTestSharedMemory %p not properly destructed: "
- "type %d, native handle %p, size %zu, buffer %p",
- this, static_cast<int>(mType), mNativeHandle, mSize, mBuffer);
+ "type %d, native handle %p, size %zu, buffer %p, buffer handle %p",
+ this, static_cast<int>(mType), mNativeHandle, mSize, mBuffer,
+ mBufferHandle);
}
break;
}
@@ -185,14 +210,33 @@
break;
}
case ISensors::SharedMemInfo::SharedMemType::GRALLOC: {
- mGrallocWrapper = std::make_unique<::android::GrallocWrapper>();
- if (!mGrallocWrapper->isInitialized()) {
+ static constexpr uint64_t kBufferUsage =
+ static_cast<uint64_t>(BufferUsage::SENSOR_DIRECT_DATA) |
+ static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN) |
+ static_cast<uint64_t>(BufferUsage::CPU_WRITE_RARELY);
+
+ uint32_t stride = 0;
+ buffer_handle_t bufferHandle;
+ android::status_t status = android::GraphicBufferAllocator::get().allocate(
+ size, 1, static_cast<int>(PixelFormat::BLOB), 1, kBufferUsage,
+ &bufferHandle, &stride, "SensorVts");
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory failed to allocate memory. Status: %s",
+ android::statusToString(status).c_str());
break;
}
-
- std::pair<native_handle_t*, void*> buf = mGrallocWrapper->allocate(size);
- handle = buf.first;
- buffer = static_cast<char*>(buf.second);
+ // Per the HAL, all-zeros Rect means the entire buffer
+ android::Rect rect = {0, 0, 0, 0};
+ void* ret;
+ status = android::GraphicBufferMapper::get().lock(bufferHandle, kBufferUsage, rect,
+ &ret);
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory failed to import buffer: Status: %s",
+ android::statusToString(status).c_str());
+ } else {
+ buffer = static_cast<char*>(ret);
+ mBufferHandle = bufferHandle;
+ }
break;
}
default:
@@ -208,9 +252,9 @@
ISensors::SharedMemInfo::SharedMemType mType;
native_handle_t* mNativeHandle;
+ buffer_handle_t mBufferHandle;
size_t mSize;
char* mBuffer;
- std::unique_ptr<::android::GrallocWrapper> mGrallocWrapper;
DISALLOW_COPY_AND_ASSIGN(SensorsAidlTestSharedMemory);
};
diff --git a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
index 618acbb..456aee7 100644
--- a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
+++ b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
@@ -921,9 +921,15 @@
continue;
}
+ // Skip sensors with no events
+ const std::vector<Event> events = callback.getEvents(sensor.sensorHandle);
+ if (events.empty()) {
+ continue;
+ }
+
// Ensure that the first event received is not stale by ensuring that its timestamp is
// sufficiently different from the previous event
- const Event newEvent = callback.getEvents(sensor.sensorHandle).front();
+ const Event newEvent = events.front();
std::chrono::milliseconds delta =
duration_cast<std::chrono::milliseconds>(std::chrono::nanoseconds(
newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle]));
diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
index aa6e881..becc93c 100644
--- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
+++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
@@ -52,8 +52,6 @@
using ::android::hardware::sensors::V1_0::Vec3;
using ::android::hardware::sensors::V2_1::implementation::convertToOldSensorInfos;
using std::chrono::duration_cast;
-using std::chrono::microseconds;
-using std::chrono::milliseconds;
using std::chrono::nanoseconds;
using EventV1_0 = ::android::hardware::sensors::V1_0::Event;
@@ -91,7 +89,7 @@
}
void waitForFlushEvents(const std::vector<SensorInfoType>& sensorsToWaitFor,
- int32_t numCallsToFlush, milliseconds timeout) {
+ int32_t numCallsToFlush, std::chrono::milliseconds timeout) {
std::unique_lock<std::recursive_mutex> lock(mFlushMutex);
mFlushCV.wait_for(lock, timeout,
[&] { return flushesReceived(sensorsToWaitFor, numCallsToFlush); });
@@ -102,7 +100,8 @@
return mEventMap[sensorHandle];
}
- void waitForEvents(const std::vector<SensorInfoType>& sensorsToWaitFor, milliseconds timeout) {
+ void waitForEvents(const std::vector<SensorInfoType>& sensorsToWaitFor,
+ std::chrono::milliseconds timeout) {
std::unique_lock<std::recursive_mutex> lock(mEventMutex);
mEventCV.wait_for(lock, timeout, [&] { return eventsReceived(sensorsToWaitFor); });
}
@@ -472,7 +471,7 @@
}
// Wait for events to be written back to the Event FMQ
- callback.waitForEvents(sensors, milliseconds(1000) /* timeout */);
+ callback.waitForEvents(sensors, std::chrono::milliseconds(1000) /* timeout */);
getEnvironment()->unregisterCallback();
for (const auto& s : sensors) {
@@ -623,7 +622,7 @@
}
// Wait up to one second for the flush events
- callback.waitForFlushEvents(sensors, flushCalls, milliseconds(1000) /* timeout */);
+ callback.waitForFlushEvents(sensors, flushCalls, std::chrono::milliseconds(1000) /* timeout */);
// Deactivate all sensors after waiting for flush events so pending flush events are not
// abandoned by the HAL.
@@ -748,8 +747,8 @@
}
TEST_P(SensorsHidlTest, NoStaleEvents) {
- constexpr milliseconds kFiveHundredMs(500);
- constexpr milliseconds kOneSecond(1000);
+ constexpr std::chrono::milliseconds kFiveHundredMs(500);
+ constexpr std::chrono::milliseconds kOneSecond(1000);
// Register the callback to receive sensor events
EventCallback callback;
@@ -757,10 +756,11 @@
// This test is not valid for one-shot, on-change or special-report-mode sensors
const std::vector<SensorInfoType> sensors = getNonOneShotAndNonOnChangeAndNonSpecialSensors();
- milliseconds maxMinDelay(0);
+ std::chrono::milliseconds maxMinDelay(0);
for (const SensorInfoType& sensor : sensors) {
- milliseconds minDelay = duration_cast<milliseconds>(microseconds(sensor.minDelay));
- maxMinDelay = milliseconds(std::max(maxMinDelay.count(), minDelay.count()));
+ std::chrono::milliseconds minDelay = duration_cast<std::chrono::milliseconds>(
+ std::chrono::microseconds(sensor.minDelay));
+ maxMinDelay = std::chrono::milliseconds(std::max(maxMinDelay.count(), minDelay.count()));
}
// Activate the sensors so that they start generating events
@@ -787,7 +787,7 @@
}
// Allow some time to pass, reset the callback, then reactivate the sensors
- usleep(duration_cast<microseconds>(kOneSecond + (5 * maxMinDelay)).count());
+ usleep(duration_cast<std::chrono::microseconds>(kOneSecond + (5 * maxMinDelay)).count());
callback.reset();
activateAllSensors(true);
callback.waitForEvents(sensors, kFiveHundredMs + (5 * maxMinDelay));
@@ -806,12 +806,19 @@
continue;
}
+ // Skip sensors with no events
+ const std::vector<EventType> events = callback.getEvents(sensor.sensorHandle);
+ if (events.empty()) {
+ continue;
+ }
+
// Ensure that the first event received is not stale by ensuring that its timestamp is
// sufficiently different from the previous event
- const EventType newEvent = callback.getEvents(sensor.sensorHandle).front();
- milliseconds delta = duration_cast<milliseconds>(
+ const EventType newEvent = events.front();
+ std::chrono::milliseconds delta = duration_cast<std::chrono::milliseconds>(
nanoseconds(newEvent.timestamp - lastEventTimestampMap[sensor.sensorHandle]));
- milliseconds sensorMinDelay = duration_cast<milliseconds>(microseconds(sensor.minDelay));
+ std::chrono::milliseconds sensorMinDelay = duration_cast<std::chrono::milliseconds>(
+ std::chrono::microseconds(sensor.minDelay));
ASSERT_GE(delta, kFiveHundredMs + (3 * sensorMinDelay));
}
}
diff --git a/sensors/common/vts/utils/Android.bp b/sensors/common/vts/utils/Android.bp
index b35280a..ab3984c 100644
--- a/sensors/common/vts/utils/Android.bp
+++ b/sensors/common/vts/utils/Android.bp
@@ -35,6 +35,7 @@
"libbinder_ndk",
"libutils",
"libvndksupport",
+ "libui",
],
static_libs: [
"libaidlcommonsupport",
@@ -50,9 +51,6 @@
"android.hardware.graphics.common-ndk_shared",
],
cflags: ["-DLOG_TAG=\"sensors_hidl_hal_test\""],
- srcs: [
- "GrallocWrapper.cpp",
- ],
export_include_dirs: [
"include",
],
@@ -64,6 +62,7 @@
"libbinder_ndk",
"libutils",
"libvndksupport",
+ "libui",
],
static_libs: [
"android.hardware.sensors@1.0",
@@ -71,13 +70,4 @@
"android.hardware.sensors@2.1",
"libaidlcommonsupport",
],
- whole_static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.allocator@3.0",
- "android.hardware.graphics.allocator@4.0",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@2.1",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
- ],
}
diff --git a/sensors/common/vts/utils/GrallocWrapper.cpp b/sensors/common/vts/utils/GrallocWrapper.cpp
deleted file mode 100644
index a15e7fe..0000000
--- a/sensors/common/vts/utils/GrallocWrapper.cpp
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "GrallocWrapper.h"
-
-#include <aidl/android/hardware/graphics/allocator/IAllocator.h>
-#include <aidlcommonsupport/NativeHandle.h>
-#include <android/binder_manager.h>
-#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
-#include <android/hardware/graphics/allocator/3.0/IAllocator.h>
-#include <android/hardware/graphics/allocator/4.0/IAllocator.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
-#include <android/hardware/graphics/mapper/2.1/IMapper.h>
-#include <android/hardware/graphics/mapper/3.0/IMapper.h>
-#include <android/hardware/graphics/mapper/4.0/IMapper.h>
-
-#include <utils/Log.h>
-
-#include <cinttypes>
-#include <memory>
-#include <type_traits>
-
-using IAllocatorAidl = ::aidl::android::hardware::graphics::allocator::IAllocator;
-using IAllocator2 = ::android::hardware::graphics::allocator::V2_0::IAllocator;
-using IAllocator3 = ::android::hardware::graphics::allocator::V3_0::IAllocator;
-using IAllocator4 = ::android::hardware::graphics::allocator::V4_0::IAllocator;
-using IMapper2 = ::android::hardware::graphics::mapper::V2_0::IMapper;
-using IMapper2_1 = ::android::hardware::graphics::mapper::V2_1::IMapper;
-using IMapper3 = ::android::hardware::graphics::mapper::V3_0::IMapper;
-using IMapper4 = ::android::hardware::graphics::mapper::V4_0::IMapper;
-
-using Error2 = ::android::hardware::graphics::mapper::V2_0::Error;
-using Error3 = ::android::hardware::graphics::mapper::V3_0::Error;
-using Error4 = ::android::hardware::graphics::mapper::V4_0::Error;
-
-using ::aidl::android::hardware::common::NativeHandle;
-using ::aidl::android::hardware::graphics::allocator::AllocationResult;
-
-using ::android::hardware::graphics::common::V1_0::BufferUsage;
-using ::android::hardware::graphics::common::V1_0::PixelFormat;
-
-using ::android::hardware::hidl_handle;
-using ::android::hardware::hidl_string;
-using ::android::hardware::hidl_vec;
-
-namespace android {
-
-// Since we use the same APIs across allocator/mapper HALs but they have major
-// version differences (meaning they are not related through inheritance), we
-// create a common interface abstraction for the IAllocator + IMapper combination
-// (major versions need to match in the current HALs, e.g. IAllocator 3.0 needs to
-// be paired with IMapper 3.0, so these are tied together)
-class IGrallocHalWrapper {
- public:
- virtual ~IGrallocHalWrapper() = default;
-
- // IAllocator
- virtual native_handle_t* allocate(uint32_t size) = 0;
- virtual void freeBuffer(native_handle_t* bufferHandle) = 0;
-
- // IMapper
- virtual void* lock(native_handle_t* bufferHandle) = 0;
- virtual void unlock(native_handle_t* bufferHandle) = 0;
-};
-
-namespace {
-
-bool failed(Error2 error) {
- return (error != Error2::NONE);
-}
-bool failed(Error3 error) {
- return (error != Error3::NONE);
-}
-bool failed(Error4 error) {
- return (error != Error4::NONE);
-}
-
-template <typename>
-struct FirstArg;
-
-// Template specialization for pointer to a non-static member function, which exposes
-// the type of the first argument given to said function
-template <typename ReturnType, typename ClassT, typename Arg1, typename... OtherArgs>
-struct FirstArg<ReturnType (ClassT::*)(Arg1, OtherArgs...)> {
- using type = Arg1;
-};
-
-// Alias to FirstArg which also removes any reference type and const associated
-template <typename T>
-using BaseTypeOfFirstArg = typename std::remove_const<
- typename std::remove_reference<typename FirstArg<T>::type>::type>::type;
-
-// Since all the type and function names are the same for the things we use across the major HAL
-// versions, we use template magic to avoid repeating ourselves.
-template <typename AllocatorT, typename MapperT,
- template <typename> typename AllocatorWrapperT = sp>
-class GrallocHalWrapper : public IGrallocHalWrapper {
- public:
- GrallocHalWrapper(const AllocatorWrapperT<AllocatorT>& allocator, const sp<MapperT>& mapper)
- : mAllocator(allocator), mMapper(mapper) {
- if (mapper->isRemote()) {
- ALOGE("Mapper is in passthrough mode");
- }
- }
-
- virtual native_handle_t* allocate(uint32_t size) override;
- virtual void freeBuffer(native_handle_t* bufferHandle) override;
-
- virtual void* lock(native_handle_t* bufferHandle) override;
- virtual void unlock(native_handle_t* bufferHandle) override;
-
- private:
- static constexpr uint64_t kBufferUsage =
- static_cast<uint64_t>(BufferUsage::SENSOR_DIRECT_DATA | BufferUsage::CPU_READ_OFTEN |
- BufferUsage::CPU_WRITE_RARELY);
- AllocatorWrapperT<AllocatorT> mAllocator;
- sp<MapperT> mMapper;
-
- // v2.0 and v3.0 use vec<uint32_t> for BufferDescriptor, but v4.0 uses vec<uint8_t>, so use
- // some template magic to deduce the right type based off of the first argument to allocate(),
- // which is always the version-specific BufferDescriptor type
- typedef BaseTypeOfFirstArg<decltype(&AllocatorT::allocate)> BufferDescriptorT;
-
- BufferDescriptorT getDescriptor(uint32_t size);
- native_handle_t* importBuffer(const hidl_handle& rawHandle);
-};
-
-template <>
-native_handle_t* GrallocHalWrapper<IAllocatorAidl, IMapper4, std::shared_ptr>::allocate(
- uint32_t size) {
- constexpr uint32_t kBufferCount = 1;
- BufferDescriptorT descriptor = getDescriptor(size);
- native_handle_t* bufferHandle = nullptr;
-
- AllocationResult result;
- auto status = mAllocator->allocate(descriptor, kBufferCount, &result);
- if (!status.isOk()) {
- status_t error = status.getExceptionCode();
- ALOGE("Failed to allocate buffer: %" PRId32, static_cast<int32_t>(error));
- } else if (result.buffers.size() != kBufferCount) {
- ALOGE("Invalid buffer array size (got %zu, expected %" PRIu32 ")", result.buffers.size(),
- kBufferCount);
- } else {
- // Convert from AIDL NativeHandle to native_handle_t to hidl_handle
- hidl_handle hidlHandle;
- hidlHandle.setTo(dupFromAidl(result.buffers[0]), /*shouldOwn*/ true);
- bufferHandle = importBuffer(hidlHandle);
- }
-
- return bufferHandle;
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-native_handle_t* GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::allocate(
- uint32_t size) {
- constexpr uint32_t kBufferCount = 1;
- BufferDescriptorT descriptor = getDescriptor(size);
- native_handle_t* bufferHandle = nullptr;
-
- auto callback = [&](auto error, uint32_t /*stride*/, const hidl_vec<hidl_handle>& buffers) {
- if (failed(error)) {
- ALOGE("Failed to allocate buffer: %" PRId32, static_cast<int32_t>(error));
- } else if (buffers.size() != kBufferCount) {
- ALOGE("Invalid buffer array size (got %zu, expected %" PRIu32 ")", buffers.size(),
- kBufferCount);
- } else {
- bufferHandle = importBuffer(buffers[0]);
- }
- };
-
- mAllocator->allocate(descriptor, kBufferCount, callback);
- return bufferHandle;
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-void GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::freeBuffer(
- native_handle_t* bufferHandle) {
- auto error = mMapper->freeBuffer(bufferHandle);
- if (!error.isOk() || failed(error)) {
- ALOGE("Failed to free buffer %p", bufferHandle);
- }
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-typename GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::BufferDescriptorT
-GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::getDescriptor(uint32_t size) {
- typename MapperT::BufferDescriptorInfo descriptorInfo = {
- .width = size,
- .height = 1,
- .layerCount = 1,
- .format = static_cast<decltype(descriptorInfo.format)>(PixelFormat::BLOB),
- .usage = kBufferUsage,
- };
-
- BufferDescriptorT descriptor;
- auto callback = [&](auto error, const BufferDescriptorT& tmpDescriptor) {
- if (failed(error)) {
- ALOGE("Failed to create descriptor: %" PRId32, static_cast<int32_t>(error));
- } else {
- descriptor = tmpDescriptor;
- }
- };
-
- mMapper->createDescriptor(descriptorInfo, callback);
- return descriptor;
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-native_handle_t* GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::importBuffer(
- const hidl_handle& rawHandle) {
- native_handle_t* bufferHandle = nullptr;
-
- mMapper->importBuffer(rawHandle, [&](auto error, void* tmpBuffer) {
- if (failed(error)) {
- ALOGE("Failed to import buffer %p: %" PRId32, rawHandle.getNativeHandle(),
- static_cast<int32_t>(error));
- } else {
- bufferHandle = static_cast<native_handle_t*>(tmpBuffer);
- }
- });
-
- return bufferHandle;
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-void* GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::lock(
- native_handle_t* bufferHandle) {
- // Per the HAL, all-zeros Rect means the entire buffer
- typename MapperT::Rect accessRegion = {};
- hidl_handle acquireFenceHandle; // No fence needed, already safe to lock
-
- void* data = nullptr;
- mMapper->lock(bufferHandle, kBufferUsage, accessRegion, acquireFenceHandle,
- [&](auto error, void* tmpData, ...) { // V3/4 pass extra args we don't use
- if (failed(error)) {
- ALOGE("Failed to lock buffer %p: %" PRId32, bufferHandle,
- static_cast<int32_t>(error));
- } else {
- data = tmpData;
- }
- });
-
- return data;
-}
-
-template <typename AllocatorT, typename MapperT, template <typename> typename AllocatorWrapperT>
-void GrallocHalWrapper<AllocatorT, MapperT, AllocatorWrapperT>::unlock(
- native_handle_t* bufferHandle) {
- mMapper->unlock(bufferHandle, [&](auto error, const hidl_handle& /*releaseFence*/) {
- if (failed(error)) {
- ALOGE("Failed to unlock buffer %p: %" PRId32, bufferHandle,
- static_cast<int32_t>(error));
- }
- });
-}
-
-} // anonymous namespace
-
-GrallocWrapper::GrallocWrapper() {
- sp<IAllocator4> allocator4 = IAllocator4::getService();
- sp<IMapper4> mapper4 = IMapper4::getService();
-
- const auto kAllocatorSvc = std::string(IAllocatorAidl::descriptor) + "/default";
- std::shared_ptr<IAllocatorAidl> allocatorAidl;
- if (AServiceManager_isDeclared(kAllocatorSvc.c_str())) {
- allocatorAidl = IAllocatorAidl::fromBinder(
- ndk::SpAIBinder(AServiceManager_checkService(kAllocatorSvc.c_str())));
- }
-
- // As of T, AIDL Allocator is supported only with HIDL Mapper4
- // (ref: VtsHalGraphicsAllocatorAidl_TargetTest.cpp)
- if (allocatorAidl != nullptr && mapper4 != nullptr) {
- ALOGD("Using AIDL IAllocator + HIDL IMapper v4.0");
- mGrallocHal = std::unique_ptr<IGrallocHalWrapper>(
- new GrallocHalWrapper<IAllocatorAidl, IMapper4, std::shared_ptr>(allocatorAidl,
- mapper4));
- } else if (allocator4 != nullptr && mapper4 != nullptr) {
- ALOGD("AIDL IAllocator not found, using HIDL IAllocator/IMapper v4.0");
- mGrallocHal = std::unique_ptr<IGrallocHalWrapper>(
- new GrallocHalWrapper<IAllocator4, IMapper4>(allocator4, mapper4));
- } else {
- ALOGD("Graphics HALs 4.0 not found (allocator %d mapper %d), falling back to 3.0",
- (allocator4 != nullptr), (mapper4 != nullptr));
-
- sp<IAllocator3> allocator3 = IAllocator3::getService();
- sp<IMapper3> mapper3 = IMapper3::getService();
-
- if (allocator3 != nullptr && mapper3 != nullptr) {
- mGrallocHal = std::unique_ptr<IGrallocHalWrapper>(
- new GrallocHalWrapper<IAllocator3, IMapper3>(allocator3, mapper3));
- } else {
- ALOGD("Graphics HALs 3.0 not found (allocator %d mapper %d), falling back to 2.x",
- (allocator3 != nullptr), (mapper3 != nullptr));
-
- sp<IAllocator2> allocator2 = IAllocator2::getService();
- sp<IMapper2> mapper2 = IMapper2_1::getService();
- if (mapper2 == nullptr) {
- mapper2 = IMapper2::getService();
- }
-
- if (allocator2 != nullptr && mapper2 != nullptr) {
- mGrallocHal = std::unique_ptr<IGrallocHalWrapper>(
- new GrallocHalWrapper<IAllocator2, IMapper2>(allocator2, mapper2));
- } else {
- ALOGE("Couldn't open graphics HALs (2.x allocator %d mapper %d)",
- (allocator2 != nullptr), (mapper2 != nullptr));
- }
- }
- }
-}
-
-GrallocWrapper::~GrallocWrapper() {
- for (auto bufferHandle : mAllocatedBuffers) {
- mGrallocHal->unlock(bufferHandle);
- mGrallocHal->freeBuffer(bufferHandle);
- }
- mAllocatedBuffers.clear();
-}
-
-std::pair<native_handle_t*, void*> GrallocWrapper::allocate(uint32_t size) {
- native_handle_t* bufferHandle = mGrallocHal->allocate(size);
- void* buffer = nullptr;
- if (bufferHandle) {
- buffer = mGrallocHal->lock(bufferHandle);
- if (buffer) {
- mAllocatedBuffers.insert(bufferHandle);
- } else {
- mGrallocHal->freeBuffer(bufferHandle);
- bufferHandle = nullptr;
- }
- }
- return std::make_pair<>(bufferHandle, buffer);
-}
-
-void GrallocWrapper::freeBuffer(native_handle_t* bufferHandle) {
- if (mAllocatedBuffers.erase(bufferHandle)) {
- mGrallocHal->unlock(bufferHandle);
- mGrallocHal->freeBuffer(bufferHandle);
- }
-}
-
-} // namespace android
diff --git a/sensors/common/vts/utils/include/sensors-vts-utils/GrallocWrapper.h b/sensors/common/vts/utils/include/sensors-vts-utils/GrallocWrapper.h
deleted file mode 100644
index ebbcb2c..0000000
--- a/sensors/common/vts/utils/include/sensors-vts-utils/GrallocWrapper.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <utils/NativeHandle.h>
-
-#include <memory>
-#include <string>
-#include <unordered_set>
-#include <utility>
-
-namespace android {
-
-class IGrallocHalWrapper;
-
-// Reference: hardware/interfaces/graphics/mapper/2.0/vts/functional/
-class GrallocWrapper {
- public:
- GrallocWrapper();
- ~GrallocWrapper();
-
- // After constructing this object, this function must be called to check the result. If it
- // returns false, other methods are not safe to call.
- bool isInitialized() const { return (mGrallocHal != nullptr); };
-
- // Allocates a gralloc buffer suitable for direct channel sensors usage with the given size.
- // The buffer should be freed using freeBuffer when it's not needed anymore; otherwise it'll
- // be freed when this object is destroyed.
- // Returns a handle to the buffer, and a CPU-accessible pointer for reading. On failure, both
- // will be set to nullptr.
- std::pair<native_handle_t*, void*> allocate(uint32_t size);
-
- // Releases a gralloc buffer previously returned by allocate()
- void freeBuffer(native_handle_t* bufferHandle);
-
- private:
- std::unique_ptr<IGrallocHalWrapper> mGrallocHal;
-
- // Keep track of all cloned and imported handles. When a test fails with
- // ASSERT_*, the destructor will free the handles for the test.
- std::unordered_set<native_handle_t*> mAllocatedBuffers;
-};
-
-} // namespace android
diff --git a/sensors/common/vts/utils/include/sensors-vts-utils/SensorsTestSharedMemory.h b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsTestSharedMemory.h
index 39084a4..b96adb3 100644
--- a/sensors/common/vts/utils/include/sensors-vts-utils/SensorsTestSharedMemory.h
+++ b/sensors/common/vts/utils/include/sensors-vts-utils/SensorsTestSharedMemory.h
@@ -17,7 +17,11 @@
#ifndef ANDROID_SENSORS_TEST_SHARED_MEMORY_H
#define ANDROID_SENSORS_TEST_SHARED_MEMORY_H
-#include "GrallocWrapper.h"
+#include <aidl/android/hardware/graphics/common/BufferUsage.h>
+#include <aidl/android/hardware/graphics/common/PixelFormat.h>
+#include <ui/GraphicBuffer.h>
+#include <ui/GraphicBufferAllocator.h>
+#include <ui/GraphicBufferMapper.h>
#include <android-base/macros.h>
#include <log/log.h>
@@ -28,6 +32,8 @@
#include <cutils/ashmem.h>
using namespace ::android::hardware::sensors::V1_0;
+using ::aidl::android::hardware::graphics::common::BufferUsage;
+using ::aidl::android::hardware::graphics::common::PixelFormat;
template <class SensorTypeVersion, class EventType>
class SensorsTestSharedMemory {
@@ -48,11 +54,20 @@
}
SharedMemInfo getSharedMemInfo() const {
- SharedMemInfo mem = {.type = mType,
- .format = SharedMemFormat::SENSORS_EVENT,
- .size = static_cast<uint32_t>(mSize),
- .memoryHandle = mNativeHandle};
- return mem;
+ if (mType == SharedMemType::GRALLOC) {
+ SharedMemInfo mem = {.type = mType,
+ .format = SharedMemFormat::SENSORS_EVENT,
+ .size = static_cast<uint32_t>(mSize),
+ .memoryHandle = mBufferHandle};
+ return mem;
+
+ } else {
+ SharedMemInfo mem = {.type = mType,
+ .format = SharedMemFormat::SENSORS_EVENT,
+ .size = static_cast<uint32_t>(mSize),
+ .memoryHandle = mNativeHandle};
+ return mem;
+ }
}
char* getBuffer() const { return mBuffer; }
size_t getSize() const { return mSize; }
@@ -128,17 +143,26 @@
}
case SharedMemType::GRALLOC: {
if (mSize != 0) {
- mGrallocWrapper->freeBuffer(mNativeHandle);
- mNativeHandle = nullptr;
+ android::status_t status =
+ android::GraphicBufferAllocator::get().free(mBufferHandle);
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory Gralloc failed to free buffer. Status: "
+ "%s",
+ android::statusToString(status).c_str());
+ }
+ mBufferHandle = nullptr;
+ mBuffer = nullptr;
mSize = 0;
}
break;
}
default: {
- if (mNativeHandle != nullptr || mSize != 0 || mBuffer != nullptr) {
- ALOGE("SensorsTestSharedMemory %p not properly destructed: "
- "type %d, native handle %p, size %zu, buffer %p",
- this, static_cast<int>(mType), mNativeHandle, mSize, mBuffer);
+ if (mNativeHandle != nullptr || mSize != 0 || mBuffer != nullptr ||
+ mBufferHandle != nullptr) {
+ ALOGE("SensorsAidlTestSharedMemory %p not properly destructed: "
+ "type %d, native handle %p, size %zu, buffer %p, buffer handle %p",
+ this, static_cast<int>(mType), mNativeHandle, mSize, mBuffer,
+ mBufferHandle);
}
break;
}
@@ -171,14 +195,33 @@
break;
}
case SharedMemType::GRALLOC: {
- mGrallocWrapper = std::make_unique<::android::GrallocWrapper>();
- if (!mGrallocWrapper->isInitialized()) {
+ static constexpr uint64_t kBufferUsage =
+ static_cast<uint64_t>(BufferUsage::SENSOR_DIRECT_DATA) |
+ static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN) |
+ static_cast<uint64_t>(BufferUsage::CPU_WRITE_RARELY);
+
+ uint32_t stride = 0;
+ buffer_handle_t bufferHandle;
+ android::status_t status = android::GraphicBufferAllocator::get().allocate(
+ size, 1, static_cast<int>(PixelFormat::BLOB), 1, kBufferUsage,
+ &bufferHandle, &stride, "SensorVts");
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory failed to allocate memory. Status: %s",
+ android::statusToString(status).c_str());
break;
}
-
- std::pair<native_handle_t*, void*> buf = mGrallocWrapper->allocate(size);
- handle = buf.first;
- buffer = static_cast<char*>(buf.second);
+ // Per the HAL, all-zeros Rect means the entire buffer
+ android::Rect rect = {0, 0, 0, 0};
+ void* ret;
+ status = android::GraphicBufferMapper::get().lock(bufferHandle, kBufferUsage, rect,
+ &ret);
+ if (status != android::OK) {
+ ALOGE("SensorsAidlTestSharedMemory failed to import buffer: Status: %s",
+ android::statusToString(status).c_str());
+ } else {
+ buffer = static_cast<char*>(ret);
+ mBufferHandle = bufferHandle;
+ }
break;
}
default:
@@ -194,9 +237,9 @@
SharedMemType mType;
native_handle_t* mNativeHandle;
+ buffer_handle_t mBufferHandle;
size_t mSize;
char* mBuffer;
- std::unique_ptr<::android::GrallocWrapper> mGrallocWrapper;
DISALLOW_COPY_AND_ASSIGN(SensorsTestSharedMemory);
};
diff --git a/soundtrigger/aidl/cli/java/android/hardware/soundtrigger3/cli/SthalCli.java b/soundtrigger/aidl/cli/java/android/hardware/soundtrigger3/cli/SthalCli.java
index 127f062..41e2533 100644
--- a/soundtrigger/aidl/cli/java/android/hardware/soundtrigger3/cli/SthalCli.java
+++ b/soundtrigger/aidl/cli/java/android/hardware/soundtrigger3/cli/SthalCli.java
@@ -289,6 +289,8 @@
Properties properties = new Properties();
properties.implementor = "Android";
properties.description = "Mock STHAL";
+ properties.uuid = "a5af2d2a-4cc4-4b69-a22f-c9d5b6d492c3";
+ properties.supportedModelArch = "Mock arch";
properties.maxSoundModels = 2;
properties.maxKeyPhrases = 1;
properties.recognitionModes =
diff --git a/thermal/aidl/Android.bp b/thermal/aidl/Android.bp
index efc763c..9382b94 100644
--- a/thermal/aidl/Android.bp
+++ b/thermal/aidl/Android.bp
@@ -35,6 +35,9 @@
java: {
platform_apis: true,
},
+ rust: {
+ enabled: true,
+ },
},
versions_with_info: [
{
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 835fbfa..4b0eb65 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -128,7 +128,8 @@
ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
// Expect to fail with null callback
status = mThermal->registerThermalChangedCallback(nullptr);
- ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
+ ASSERT_TRUE(status.getExceptionCode() == EX_ILLEGAL_ARGUMENT
+ || status.getExceptionCode() == EX_NULL_POINTER);
std::shared_ptr<ThermalCallback> localThermalCallback =
ndk::SharedRefBase::make<ThermalCallback>();
// Expect to succeed with different callback
@@ -139,7 +140,8 @@
ASSERT_TRUE(status.isOk()) << status.getMessage();
// Expect to fail with null callback
status = mThermal->unregisterThermalChangedCallback(nullptr);
- ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
+ ASSERT_TRUE(status.getExceptionCode() == EX_ILLEGAL_ARGUMENT
+ || status.getExceptionCode() == EX_NULL_POINTER);
}
// Test Thermal->registerThermalChangedCallbackWithType.
@@ -150,7 +152,8 @@
ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
// Expect to fail with null callback
status = mThermal->registerThermalChangedCallbackWithType(nullptr, TemperatureType::SKIN);
- ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
+ ASSERT_TRUE(status.getExceptionCode() == EX_ILLEGAL_ARGUMENT
+ || status.getExceptionCode() == EX_NULL_POINTER);
std::shared_ptr<ThermalCallback> localThermalCallback =
ndk::SharedRefBase::make<ThermalCallback>();
// Expect to succeed with different callback
@@ -162,7 +165,8 @@
ASSERT_TRUE(status.isOk()) << status.getMessage();
// Expect to fail with null callback
status = mThermal->unregisterThermalChangedCallback(nullptr);
- ASSERT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
+ ASSERT_TRUE(status.getExceptionCode() == EX_ILLEGAL_ARGUMENT
+ || status.getExceptionCode() == EX_NULL_POINTER);
}
// Test Thermal->getCurrentTemperatures().
diff --git a/tv/input/aidl/Android.bp b/tv/input/aidl/Android.bp
index 35f510a..cd69130 100644
--- a/tv/input/aidl/Android.bp
+++ b/tv/input/aidl/Android.bp
@@ -35,6 +35,5 @@
],
},
],
- frozen: true,
-
+ frozen: false,
}
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
index 94fe665..3c1cb74 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
@@ -37,4 +37,5 @@
android.hardware.tv.input.TvMessageEventType type;
int streamId;
android.hardware.tv.input.TvMessage[] messages;
+ int deviceId;
}
diff --git a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
index a3afd41..4121fc7 100644
--- a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
@@ -32,17 +32,20 @@
* Notifies the client that an TV message event has occurred. For possible event types,
* check {@link android.hardware.tv.input.TvMessageEventType}.
*
- * The first message in a list of messages contained in a
+ * <p> For implementations of version 1, The first message in a list of messages contained in a
* {@link android.hardware.tv.input.TvMessageEvent} should always have a
* {@link android.hardware.tv.input.TvMessage#subType} of "device_id",
* otherwise the event is discarded. When the subType of a message is "device_id", the ID of
* the device that sent the message should be contained in
- * {@link android.hardware.tv.input.TvMessage#groupId}
+ * {@link android.hardware.tv.input.TvMessage#groupId}.
*
- * Invoking this callback for the first time immediately triggers
+ * <p> For version 2 and beyond, the device ID should be contained in
+ * {@link android.hardware.tv.input.TvMessageEvent#deviceId}.
+ *
+ * <p> Invoking this callback for the first time immediately triggers
* {@link android.hardware.tv.input.ITvInput#getTvMessageQueueDesc}. It is
- * expected for the queue to be ready with
- * the relevant messages for the event before this callback is called.
+ * expected for the queue to be ready with the relevant messages for the event before this
+ * callback is called.
*
* @param event Event passed to the client.
*/
diff --git a/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
index 74a078a..e04a725 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
@@ -25,4 +25,5 @@
int streamId;
TvMessage[] messages;
+ int deviceId;
}
diff --git a/tv/input/aidl/default/TvInput.cpp b/tv/input/aidl/default/TvInput.cpp
index 2ee8bcf..f6a64c4 100644
--- a/tv/input/aidl/default/TvInput.cpp
+++ b/tv/input/aidl/default/TvInput.cpp
@@ -43,6 +43,9 @@
new TvStreamConfigWrapper(11, 360, 480, false))}};
mStreamConfigs[3] = {{5, shared_ptr<TvStreamConfigWrapper>(
new TvStreamConfigWrapper(5, 1080, 1920, false))}};
+
+ mQueue = shared_ptr<AidlMessageQueue<int8_t, SynchronizedReadWrite>>(
+ new (std::nothrow) AidlMessageQueue<int8_t, SynchronizedReadWrite>(8));
}
::ndk::ScopedAStatus TvInput::setCallback(const shared_ptr<ITvInputCallback>& in_callback) {
@@ -74,7 +77,9 @@
return ::ndk::ScopedAStatus::fromServiceSpecificError(STATUS_INVALID_ARGUMENTS);
}
+ // When calling notifyTvMessage, make sure to verify against this map.
mTvMessageEventEnabled[deviceId][streamId][in_type] = enabled;
+
return ::ndk::ScopedAStatus::ok();
}
@@ -82,11 +87,17 @@
MQDescriptor<int8_t, SynchronizedReadWrite>* out_queue, int32_t in_deviceId,
int32_t in_streamId) {
ALOGV("%s", __FUNCTION__);
+ ::ndk::ScopedAStatus status = ::ndk::ScopedAStatus::ok();
if (mStreamConfigs.count(in_deviceId) == 0) {
ALOGW("Device with id %d isn't available", in_deviceId);
- return ::ndk::ScopedAStatus::fromServiceSpecificError(STATUS_INVALID_ARGUMENTS);
+ status = ::ndk::ScopedAStatus::fromServiceSpecificError(STATUS_INVALID_ARGUMENTS);
+ } else if (!mQueue->isValid()) {
+ ALOGE("Tv Message Queue was not properly initialized");
+ status = ::ndk::ScopedAStatus::fromServiceSpecificError(STATUS_INVALID_STATE);
+ } else {
+ *out_queue = mQueue->dupeDesc();
}
- return ::ndk::ScopedAStatus::ok();
+ return status;
}
::ndk::ScopedAStatus TvInput::getStreamConfigurations(int32_t in_deviceId,
diff --git a/tv/input/aidl/default/TvInput.h b/tv/input/aidl/default/TvInput.h
index 5776961..595f017 100644
--- a/tv/input/aidl/default/TvInput.h
+++ b/tv/input/aidl/default/TvInput.h
@@ -66,6 +66,7 @@
map<int32_t, shared_ptr<TvInputDeviceInfoWrapper>> mDeviceInfos;
map<int32_t, map<int32_t, shared_ptr<TvStreamConfigWrapper>>> mStreamConfigs;
TvMessageEnabledMap mTvMessageEventEnabled;
+ shared_ptr<AidlMessageQueue<int8_t, SynchronizedReadWrite>> mQueue;
};
} // namespace input
diff --git a/tv/input/aidl/vts/functional/Android.bp b/tv/input/aidl/vts/functional/Android.bp
index 22487ea..930c5a8 100644
--- a/tv/input/aidl/vts/functional/Android.bp
+++ b/tv/input/aidl/vts/functional/Android.bp
@@ -32,7 +32,7 @@
"libvndksupport",
"libfmq",
"android.hardware.common.fmq-V1-ndk",
- "android.hardware.tv.input-V1-ndk",
+ "android.hardware.tv.input-V2-ndk",
],
require_root: true,
}
diff --git a/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp b/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
index 8d3395b..746ae1e 100644
--- a/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
+++ b/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
@@ -355,8 +355,12 @@
}
int32_t stream_id = streamConfigs[0].streamId;
ALOGD("GetTvMessageQueueTest: device_id=%d, stream_id=%d", device_id, stream_id);
- MQDescriptor<int8_t, SynchronizedReadWrite> queue;
- tv_input_->getTvMessageQueueDesc(&queue, device_id, stream_id);
+ MQDescriptor<int8_t, SynchronizedReadWrite> queueDescriptor;
+ AidlMessageQueue<int8_t, SynchronizedReadWrite>* queue;
+ tv_input_->getTvMessageQueueDesc(&queueDescriptor, device_id, stream_id);
+ queue = new (std::nothrow) AidlMessageQueue<int8_t, SynchronizedReadWrite>(queueDescriptor);
+ ASSERT_TRUE(queue->isValid());
+ delete queue;
}
INSTANTIATE_TEST_SUITE_P(PerInstance, TvInputAidlTest,
diff --git a/wifi/aidl/default/wifi.cpp b/wifi/aidl/default/wifi.cpp
index 34a7f35..255266b 100644
--- a/wifi/aidl/default/wifi.cpp
+++ b/wifi/aidl/default/wifi.cpp
@@ -16,6 +16,7 @@
#include "wifi.h"
+#include <android-base/file.h>
#include <android-base/logging.h>
#include "aidl_return_util.h"
@@ -91,6 +92,7 @@
if (!chip.get()) continue;
chip->dump(fd, args, numArgs);
}
+ ::android::base::WriteStringToFd("\n", fd);
return STATUS_OK;
}
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
index ca3c4b7..986e3a8 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
@@ -197,9 +197,26 @@
bool configureChipToSupportConcurrencyType(const std::shared_ptr<IWifiChip>& wifi_chip,
IfaceConcurrencyType type, int* configured_mode_id) {
+ if (!wifi_chip.get()) {
+ return false;
+ }
return configureChipToSupportConcurrencyTypeInternal(wifi_chip, type, configured_mode_id);
}
+bool doesChipSupportConcurrencyType(const std::shared_ptr<IWifiChip>& wifi_chip,
+ IfaceConcurrencyType type) {
+ if (!wifi_chip.get()) {
+ return false;
+ }
+ std::vector<IWifiChip::ChipMode> chip_modes;
+ auto status = wifi_chip->getAvailableModes(&chip_modes);
+ if (!status.isOk()) {
+ return false;
+ }
+ int mode_id;
+ return findAnyModeSupportingConcurrencyType(type, chip_modes, &mode_id);
+}
+
void stopWifiService(const char* instance_name) {
std::shared_ptr<IWifi> wifi = getWifi(instance_name);
if (wifi != nullptr) {
@@ -208,6 +225,9 @@
}
int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip) {
+ if (!wifi_chip.get()) {
+ return 0;
+ }
int32_t features = 0;
if (wifi_chip->getFeatureSet(&features).isOk()) {
return features;
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
index 0d70c3b..921d689 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
@@ -42,6 +42,9 @@
// Configure the chip in a mode to support the creation of the provided iface type.
bool configureChipToSupportConcurrencyType(const std::shared_ptr<IWifiChip>& wifi_chip,
IfaceConcurrencyType type, int* configured_mode_id);
+// Check whether the chip supports the creation of the provided iface type.
+bool doesChipSupportConcurrencyType(const std::shared_ptr<IWifiChip>& wifi_chip,
+ IfaceConcurrencyType type);
// Used to trigger IWifi.stop() at the end of every test.
void stopWifiService(const char* instance_name);
int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip);
diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
index bbd27f9..740f833 100644
--- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
@@ -63,6 +63,10 @@
return mode_id;
}
+ bool isConcurrencyTypeSupported(IfaceConcurrencyType type) {
+ return doesChipSupportConcurrencyType(wifi_chip_, type);
+ }
+
std::shared_ptr<IWifiStaIface> configureChipForStaAndGetIface() {
std::shared_ptr<IWifiStaIface> iface;
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
@@ -532,6 +536,9 @@
* CreateApIface
*/
TEST_P(WifiChipAidlTest, CreateApIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) {
+ GTEST_SKIP() << "AP is not supported";
+ }
configureChipForApAndGetIface();
}
@@ -549,6 +556,9 @@
* CreateP2pIface
*/
TEST_P(WifiChipAidlTest, CreateP2pIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) {
+ GTEST_SKIP() << "P2P is not supported";
+ }
configureChipForP2pAndGetIface();
}
@@ -583,6 +593,9 @@
* GetP2pIfaceNames
*/
TEST_P(WifiChipAidlTest, GetP2pIfaceNames) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) {
+ GTEST_SKIP() << "P2P is not supported";
+ }
configureChipForConcurrencyType(IfaceConcurrencyType::P2P);
std::vector<std::string> iface_names;
@@ -607,6 +620,9 @@
* GetApIfaceNames
*/
TEST_P(WifiChipAidlTest, GetApIfaceNames) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) {
+ GTEST_SKIP() << "AP is not supported";
+ }
configureChipForConcurrencyType(IfaceConcurrencyType::AP);
std::vector<std::string> iface_names;
@@ -679,6 +695,9 @@
* GetP2pIface
*/
TEST_P(WifiChipAidlTest, GetP2pIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) {
+ GTEST_SKIP() << "P2P is not supported";
+ }
std::shared_ptr<IWifiP2pIface> iface = configureChipForP2pAndGetIface();
std::string iface_name = getP2pIfaceName(iface);
@@ -697,6 +716,9 @@
* GetApIface
*/
TEST_P(WifiChipAidlTest, GetApIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) {
+ GTEST_SKIP() << "AP is not supported";
+ }
std::shared_ptr<IWifiApIface> iface = configureChipForApAndGetIface();
std::string iface_name = getApIfaceName(iface);
@@ -755,6 +777,9 @@
* RemoveP2pIface
*/
TEST_P(WifiChipAidlTest, RemoveP2pIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) {
+ GTEST_SKIP() << "P2P is not supported";
+ }
std::shared_ptr<IWifiP2pIface> iface = configureChipForP2pAndGetIface();
std::string iface_name = getP2pIfaceName(iface);
@@ -771,6 +796,9 @@
* RemoveApIface
*/
TEST_P(WifiChipAidlTest, RemoveApIface) {
+ if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) {
+ GTEST_SKIP() << "AP is not supported";
+ }
std::shared_ptr<IWifiApIface> iface = configureChipForApAndGetIface();
std::string iface_name = getApIfaceName(iface);