[automerger skipped] Merge "Strongbox may not support 1024 bit key size for RSA." into stage-aosp-udc-ts-dev am: fcabe78a65 am: 051d4535a7 am: a3cb81db14 -s ours
am skip reason: Merged-In I32bb28001aca9b69eedb1bd3d0bcff43052d06e4 with SHA-1 9d1d8b7327 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23895311
Change-Id: Id8f9d66ece891f622ca5ed73b72f92ff9d49f7d9
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/TEST_MAPPING b/audio/aidl/TEST_MAPPING
index 3e06595..81c99f7 100644
--- a/audio/aidl/TEST_MAPPING
+++ b/audio/aidl/TEST_MAPPING
@@ -4,6 +4,9 @@
"name": "VtsHalAudioCoreTargetTest"
},
{
+ "name": "audio_policy_config_xml_converter_tests"
+ },
+ {
"name": "VtsHalAudioEffectFactoryTargetTest"
},
{
diff --git a/audio/aidl/common/include/Utils.h b/audio/aidl/common/include/Utils.h
index 305c924..3b08de7 100644
--- a/audio/aidl/common/include/Utils.h
+++ b/audio/aidl/common/include/Utils.h
@@ -29,6 +29,21 @@
#include <aidl/android/media/audio/common/AudioMode.h>
#include <aidl/android/media/audio/common/AudioOutputFlags.h>
#include <aidl/android/media/audio/common/PcmType.h>
+#include <android/binder_auto_utils.h>
+
+namespace ndk {
+
+// This enables use of 'error/expected_utils' for ScopedAStatus.
+
+inline bool errorIsOk(const ScopedAStatus& s) {
+ return s.isOk();
+}
+
+inline std::string errorToString(const ScopedAStatus& s) {
+ return s.getDescription();
+}
+
+} // namespace ndk
namespace aidl::android::hardware::audio::common {
@@ -102,7 +117,8 @@
constexpr bool isDefaultAudioFormat(
const ::aidl::android::media::audio::common::AudioFormatDescription& desc) {
return desc.type == ::aidl::android::media::audio::common::AudioFormatType::DEFAULT &&
- desc.pcm == ::aidl::android::media::audio::common::PcmType::DEFAULT;
+ desc.pcm == ::aidl::android::media::audio::common::PcmType::DEFAULT &&
+ desc.encoding.empty();
}
constexpr bool isTelephonyDeviceType(
@@ -111,30 +127,6 @@
device == ::aidl::android::media::audio::common::AudioDeviceType::OUT_TELEPHONY_TX;
}
-constexpr bool isUsbInputDeviceType(::aidl::android::media::audio::common::AudioDeviceType type) {
- switch (type) {
- case ::aidl::android::media::audio::common::AudioDeviceType::IN_DOCK:
- case ::aidl::android::media::audio::common::AudioDeviceType::IN_ACCESSORY:
- case ::aidl::android::media::audio::common::AudioDeviceType::IN_DEVICE:
- case ::aidl::android::media::audio::common::AudioDeviceType::IN_HEADSET:
- return true;
- default:
- return false;
- }
-}
-
-constexpr bool isUsbOutputtDeviceType(::aidl::android::media::audio::common::AudioDeviceType type) {
- switch (type) {
- case ::aidl::android::media::audio::common::AudioDeviceType::OUT_DOCK:
- case ::aidl::android::media::audio::common::AudioDeviceType::OUT_ACCESSORY:
- case ::aidl::android::media::audio::common::AudioDeviceType::OUT_DEVICE:
- case ::aidl::android::media::audio::common::AudioDeviceType::OUT_HEADSET:
- return true;
- default:
- return false;
- }
-}
-
constexpr bool isValidAudioMode(::aidl::android::media::audio::common::AudioMode mode) {
return std::find(kValidAudioModes.begin(), kValidAudioModes.end(), mode) !=
kValidAudioModes.end();
diff --git a/audio/aidl/default/AidlConversionXsdc.cpp b/audio/aidl/default/AidlConversionXsdc.cpp
new file mode 100644
index 0000000..c404d67
--- /dev/null
+++ b/audio/aidl/default/AidlConversionXsdc.cpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "AHAL_AidlXsdc"
+#include <android-base/logging.h>
+#include <error/expected_utils.h>
+#include <media/AidlConversionCppNdk.h>
+#include <media/TypeConverter.h>
+
+#include "core-impl/AidlConversionXsdc.h"
+
+using aidl::android::media::audio::common::AudioFormatDescription;
+
+namespace xsd = android::audio::policy::configuration;
+
+namespace aidl::android::hardware::audio::core::internal {
+
+ConversionResult<AudioFormatDescription> xsdc2aidl_AudioFormatDescription(const std::string& xsdc) {
+ return legacy2aidl_audio_format_t_AudioFormatDescription(::android::formatFromString(xsdc));
+}
+
+ConversionResult<SurroundSoundConfig::SurroundFormatFamily> xsdc2aidl_SurroundFormatFamily(
+ const ::xsd::SurroundFormats::Format& xsdc) {
+ SurroundSoundConfig::SurroundFormatFamily aidl;
+ aidl.primaryFormat = VALUE_OR_RETURN(xsdc2aidl_AudioFormatDescription(xsdc.getName()));
+ if (xsdc.hasSubformats()) {
+ aidl.subFormats = VALUE_OR_RETURN(convertContainer<std::vector<AudioFormatDescription>>(
+ xsdc.getSubformats(), xsdc2aidl_AudioFormatDescription));
+ }
+ return aidl;
+}
+
+ConversionResult<SurroundSoundConfig> xsdc2aidl_SurroundSoundConfig(
+ const ::xsd::SurroundSound& xsdc) {
+ SurroundSoundConfig aidl;
+ if (!xsdc.hasFormats() || !xsdc.getFirstFormats()->hasFormat()) return aidl;
+ aidl.formatFamilies = VALUE_OR_RETURN(
+ convertContainer<std::vector<SurroundSoundConfig::SurroundFormatFamily>>(
+ xsdc.getFirstFormats()->getFormat(), xsdc2aidl_SurroundFormatFamily));
+ return aidl;
+}
+
+} // namespace aidl::android::hardware::audio::core::internal
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index c9edae0..78b59d4 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -18,6 +18,7 @@
"libbinder_ndk",
"libcutils",
"libfmq",
+ "libnbaio_mono",
"libstagefright_foundation",
"libtinyalsav2",
"libutils",
@@ -65,6 +66,7 @@
],
export_include_dirs: ["include"],
srcs: [
+ "AidlConversionXsdc.cpp",
"AudioPolicyConfigXmlConverter.cpp",
"Bluetooth.cpp",
"Config.cpp",
@@ -75,6 +77,10 @@
"Stream.cpp",
"StreamStub.cpp",
"Telephony.cpp",
+ "r_submix/ModuleRemoteSubmix.cpp",
+ "r_submix/RemoteSubmixUtils.cpp",
+ "r_submix/SubmixRoute.cpp",
+ "r_submix/StreamRemoteSubmix.cpp",
"usb/ModuleUsb.cpp",
"usb/StreamUsb.cpp",
"usb/UsbAlsaMixerControl.cpp",
@@ -92,6 +98,21 @@
"audio_policy_configuration_aidl_default",
"audio_policy_engine_configuration_aidl_default",
],
+ shared_libs: [
+ "libaudio_aidl_conversion_common_ndk",
+ "libmedia_helper",
+ "libstagefright_foundation",
+ ],
+ export_shared_lib_headers: [
+ "libaudio_aidl_conversion_common_ndk",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wthread-safety",
+ "-DBACKEND_NDK",
+ ],
}
cc_binary {
@@ -108,7 +129,63 @@
static_libs: [
"libaudioserviceexampleimpl",
],
+ shared_libs: [
+ "libaudio_aidl_conversion_common_ndk",
+ "libmedia_helper",
+ "libstagefright_foundation",
+ ],
srcs: ["main.cpp"],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wthread-safety",
+ "-DBACKEND_NDK",
+ ],
+}
+
+cc_test {
+ name: "audio_policy_config_xml_converter_tests",
+ vendor_available: true,
+ defaults: [
+ "latest_android_media_audio_common_types_ndk_static",
+ "latest_android_hardware_audio_core_ndk_static",
+ ],
+ shared_libs: [
+ "libaudio_aidl_conversion_common_ndk",
+ "libaudioaidlcommon",
+ "libaudioutils",
+ "libbase",
+ "libbinder_ndk",
+ "libcutils",
+ "libmedia_helper",
+ "libstagefright_foundation",
+ "libutils",
+ "libxml2",
+ ],
+ header_libs: [
+ "libaudio_system_headers",
+ "libaudioaidl_headers",
+ "libxsdc-utils",
+ ],
+ generated_sources: [
+ "audio_policy_configuration_aidl_default",
+ ],
+ generated_headers: [
+ "audio_policy_configuration_aidl_default",
+ ],
+ srcs: [
+ "AudioPolicyConfigXmlConverter.cpp",
+ "tests/AudioPolicyConfigXmlConverterTest.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wthread-safety",
+ "-DBACKEND_NDK",
+ ],
+ test_suites: ["general-tests"],
}
cc_defaults {
diff --git a/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp b/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
index 6290912..7452c8e 100644
--- a/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
+++ b/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
@@ -21,11 +21,17 @@
#include <functional>
#include <unordered_map>
+#define LOG_TAG "AHAL_ApmXmlConverter"
+#include <android-base/logging.h>
+
#include <aidl/android/media/audio/common/AudioHalEngineConfig.h>
+#include <media/stagefright/foundation/MediaDefs.h>
#include <system/audio-base-utils.h>
+#include "core-impl/AidlConversionXsdc.h"
#include "core-impl/AudioPolicyConfigXmlConverter.h"
+using aidl::android::media::audio::common::AudioFormatDescription;
using aidl::android::media::audio::common::AudioHalEngineConfig;
using aidl::android::media::audio::common::AudioHalVolumeCurve;
using aidl::android::media::audio::common::AudioHalVolumeGroup;
@@ -68,13 +74,13 @@
getXsdcConfig()->getVolumes());
}
aidlVolumeCurve.curvePoints =
- convertCollectionToAidl<std::string, AudioHalVolumeCurve::CurvePoint>(
+ convertCollectionToAidlUnchecked<std::string, AudioHalVolumeCurve::CurvePoint>(
mVolumesReferenceMap.at(xsdcVolumeCurve.getRef()).getPoint(),
std::bind(&AudioPolicyConfigXmlConverter::convertCurvePointToAidl, this,
std::placeholders::_1));
} else {
aidlVolumeCurve.curvePoints =
- convertCollectionToAidl<std::string, AudioHalVolumeCurve::CurvePoint>(
+ convertCollectionToAidlUnchecked<std::string, AudioHalVolumeCurve::CurvePoint>(
xsdcVolumeCurve.getPoint(),
std::bind(&AudioPolicyConfigXmlConverter::convertCurvePointToAidl, this,
std::placeholders::_1));
@@ -87,6 +93,22 @@
convertVolumeCurveToAidl(xsdcVolumeCurve));
}
+const SurroundSoundConfig& AudioPolicyConfigXmlConverter::getSurroundSoundConfig() {
+ static const SurroundSoundConfig aidlSurroundSoundConfig = [this]() {
+ if (auto xsdcConfig = getXsdcConfig(); xsdcConfig && xsdcConfig->hasSurroundSound()) {
+ auto configConv = xsdc2aidl_SurroundSoundConfig(*xsdcConfig->getFirstSurroundSound());
+ if (configConv.ok()) {
+ return configConv.value();
+ }
+ LOG(ERROR) << "There was an error converting surround formats to AIDL: "
+ << configConv.error();
+ }
+ LOG(WARNING) << "Audio policy config does not have <surroundSound> section, using default";
+ return getDefaultSurroundSoundConfig();
+ }();
+ return aidlSurroundSoundConfig;
+}
+
const AudioHalEngineConfig& AudioPolicyConfigXmlConverter::getAidlEngineConfig() {
if (mAidlEngineConfig.volumeGroups.empty() && getXsdcConfig() &&
getXsdcConfig()->hasVolumes()) {
@@ -95,6 +117,47 @@
return mAidlEngineConfig;
}
+// static
+const SurroundSoundConfig& AudioPolicyConfigXmlConverter::getDefaultSurroundSoundConfig() {
+ // Provide a config similar to the one used by the framework by default
+ // (see AudioPolicyConfig::setDefaultSurroundFormats).
+#define ENCODED_FORMAT(format) \
+ AudioFormatDescription { \
+ .encoding = ::android::format \
+ }
+#define SIMPLE_FORMAT(format) \
+ SurroundSoundConfig::SurroundFormatFamily { \
+ .primaryFormat = ENCODED_FORMAT(format) \
+ }
+
+ static const SurroundSoundConfig defaultConfig = {
+ .formatFamilies = {
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_AC3),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_EAC3),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DTS),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DTS_HD),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DTS_HD_MA),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DTS_UHD_P1),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DTS_UHD_P2),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_DOLBY_TRUEHD),
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_EAC3_JOC),
+ SurroundSoundConfig::SurroundFormatFamily{
+ .primaryFormat = ENCODED_FORMAT(MEDIA_MIMETYPE_AUDIO_AAC_LC),
+ .subFormats =
+ {
+ ENCODED_FORMAT(MEDIA_MIMETYPE_AUDIO_AAC_HE_V1),
+ ENCODED_FORMAT(MEDIA_MIMETYPE_AUDIO_AAC_HE_V2),
+ ENCODED_FORMAT(MEDIA_MIMETYPE_AUDIO_AAC_ELD),
+ ENCODED_FORMAT(MEDIA_MIMETYPE_AUDIO_AAC_XHE),
+ }},
+ SIMPLE_FORMAT(MEDIA_MIMETYPE_AUDIO_AC4),
+ }};
+#undef SIMPLE_FORMAT
+#undef ENCODED_FORMAT
+
+ return defaultConfig;
+}
+
void AudioPolicyConfigXmlConverter::mapStreamsToVolumeCurves() {
if (getXsdcConfig()->hasVolumes()) {
for (const xsd::Volumes& xsdcWrapperType : getXsdcConfig()->getVolumes()) {
diff --git a/audio/aidl/default/Config.cpp b/audio/aidl/default/Config.cpp
index 87c0ace..d1023da 100644
--- a/audio/aidl/default/Config.cpp
+++ b/audio/aidl/default/Config.cpp
@@ -27,9 +27,16 @@
namespace aidl::android::hardware::audio::core {
ndk::ScopedAStatus Config::getSurroundSoundConfig(SurroundSoundConfig* _aidl_return) {
- SurroundSoundConfig surroundSoundConfig;
- // TODO: parse from XML; for now, use empty config as default
- *_aidl_return = std::move(surroundSoundConfig);
+ static const SurroundSoundConfig surroundSoundConfig = [this]() {
+ SurroundSoundConfig surroundCfg;
+ if (mAudioPolicyConverter.getStatus() == ::android::OK) {
+ surroundCfg = mAudioPolicyConverter.getSurroundSoundConfig();
+ } else {
+ LOG(WARNING) << __func__ << mAudioPolicyConverter.getError();
+ }
+ return surroundCfg;
+ }();
+ *_aidl_return = surroundSoundConfig;
LOG(DEBUG) << __func__ << ": returning " << _aidl_return->toString();
return ndk::ScopedAStatus::ok();
}
@@ -47,10 +54,14 @@
LOG(WARNING) << __func__ << mAudioPolicyConverter.getError();
}
}
+ // Logging full contents of the config is an overkill, just provide statistics.
+ LOG(DEBUG) << "getEngineConfig: number of strategies parsed: "
+ << engConfig.productStrategies.size()
+ << ", default strategy: " << engConfig.defaultProductStrategyId
+ << ", number of volume groups parsed: " << engConfig.volumeGroups.size();
return engConfig;
}();
*_aidl_return = returnEngCfg;
- LOG(DEBUG) << __func__ << ": returning " << _aidl_return->toString();
return ndk::ScopedAStatus::ok();
}
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/Configuration.cpp b/audio/aidl/default/Configuration.cpp
index e1e1f79..d41ea67 100644
--- a/audio/aidl/default/Configuration.cpp
+++ b/audio/aidl/default/Configuration.cpp
@@ -81,6 +81,8 @@
deviceExt.device.address = "bottom";
} else if (devType == AudioDeviceType::IN_MICROPHONE_BACK && connection.empty()) {
deviceExt.device.address = "back";
+ } else if (devType == AudioDeviceType::IN_SUBMIX || devType == AudioDeviceType::OUT_SUBMIX) {
+ deviceExt.device.address = "0";
}
deviceExt.device.type.connection = std::move(connection);
deviceExt.flags = flags;
@@ -365,8 +367,10 @@
// Device ports
- AudioPort rsubmixOutDevice = createPort(c.nextPortId++, "Remote Submix Out", 0, false,
- createDeviceExt(AudioDeviceType::OUT_SUBMIX, 0));
+ AudioPort rsubmixOutDevice =
+ createPort(c.nextPortId++, "Remote Submix Out", 0, false,
+ createDeviceExt(AudioDeviceType::OUT_SUBMIX, 0,
+ AudioDeviceDescription::CONNECTION_VIRTUAL));
rsubmixOutDevice.profiles.push_back(
createProfile(PcmType::INT_24_BIT, {AudioChannelLayout::LAYOUT_STEREO}, {48000}));
c.ports.push_back(rsubmixOutDevice);
diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp
index 71d111b..f3f674f 100644
--- a/audio/aidl/default/EffectConfig.cpp
+++ b/audio/aidl/default/EffectConfig.cpp
@@ -18,6 +18,7 @@
#include <string>
#define LOG_TAG "AHAL_EffectConfig"
#include <android-base/logging.h>
+#include <system/audio_aidl_utils.h>
#include <system/audio_effects/audio_effects_conf.h>
#include <system/audio_effects/effect_uuid.h>
@@ -162,7 +163,7 @@
RETURN_VALUE_IF((libraryUuid.uuid == getEffectUuidZero()), false, "invalidUuidAttribute");
LOG(DEBUG) << __func__ << (isProxy ? " proxy " : libraryUuid.name) << " : "
- << libraryUuid.uuid.toString();
+ << ::android::audio::utils::toString(libraryUuid.uuid);
return true;
}
@@ -250,6 +251,7 @@
V("downmix", Downmix) \
V("dynamics_processing", DynamicsProcessing) \
V("equalizer", Equalizer) \
+ V("extensioneffect", Extension) \
V("haptic_generator", HapticGenerator) \
V("loudness_enhancer", LoudnessEnhancer) \
V("env_reverb", EnvReverb) \
diff --git a/audio/aidl/default/EffectFactory.cpp b/audio/aidl/default/EffectFactory.cpp
index 7073a10..8ed62c9 100644
--- a/audio/aidl/default/EffectFactory.cpp
+++ b/audio/aidl/default/EffectFactory.cpp
@@ -25,6 +25,7 @@
#include <android-base/logging.h>
#include <android/binder_ibinder_platform.h>
+#include <system/audio_aidl_utils.h>
#include <system/audio_effects/effect_uuid.h>
#include <system/thread_defs.h>
@@ -47,7 +48,7 @@
for (const auto& it : mEffectMap) {
if (auto spEffect = it.first.lock()) {
LOG(ERROR) << __func__ << " erase remaining instance UUID "
- << it.second.first.toString();
+ << ::android::audio::utils::toString(it.second.first);
destroyEffectImpl(spEffect);
}
}
@@ -123,7 +124,7 @@
ndk::ScopedAStatus Factory::createEffect(const AudioUuid& in_impl_uuid,
std::shared_ptr<IEffect>* _aidl_return) {
- LOG(DEBUG) << __func__ << ": UUID " << in_impl_uuid.toString();
+ LOG(DEBUG) << __func__ << ": UUID " << ::android::audio::utils::toString(in_impl_uuid);
if (mEffectLibMap.count(in_impl_uuid)) {
auto& entry = mEffectLibMap[in_impl_uuid];
getDlSyms(entry);
@@ -163,7 +164,8 @@
"dlNulldestroyEffectFunc");
RETURN_IF_BINDER_EXCEPTION(interface->destroyEffectFunc(in_handle));
} else {
- LOG(ERROR) << __func__ << ": UUID " << uuid.toString() << " does not exist in libMap!";
+ LOG(ERROR) << __func__ << ": UUID " << ::android::audio::utils::toString(uuid)
+ << " does not exist in libMap!";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
mEffectMap.erase(effectIt);
@@ -207,8 +209,8 @@
return false;
}
- LOG(INFO) << __func__ << " dlopen lib:" << path << "\nimpl:" << impl.toString()
- << "\nhandle:" << libHandle;
+ LOG(INFO) << __func__ << " dlopen lib:" << path
+ << "\nimpl:" << ::android::audio::utils::toString(impl) << "\nhandle:" << libHandle;
auto interface = new effect_dl_interface_s{nullptr, nullptr, nullptr};
mEffectLibMap.insert(
{impl,
@@ -228,8 +230,10 @@
id.uuid = configLib.uuid;
id.proxy = proxyUuid;
LOG(DEBUG) << __func__ << " loading lib " << path->second << ": typeUuid "
- << id.type.toString() << "\nimplUuid " << id.uuid.toString() << " proxyUuid "
- << (proxyUuid.has_value() ? proxyUuid->toString() : "null");
+ << ::android::audio::utils::toString(id.type) << "\nimplUuid "
+ << ::android::audio::utils::toString(id.uuid) << " proxyUuid "
+ << (proxyUuid.has_value() ? ::android::audio::utils::toString(proxyUuid.value())
+ : "null");
if (openEffectLibrary(id.uuid, path->second)) {
mIdentitySet.insert(std::move(id));
}
diff --git a/audio/aidl/default/EngineConfigXmlConverter.cpp b/audio/aidl/default/EngineConfigXmlConverter.cpp
index 5f17d71..96b555c 100644
--- a/audio/aidl/default/EngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/EngineConfigXmlConverter.cpp
@@ -140,7 +140,7 @@
aidlAttributesGroup.volumeGroupName = xsdcAttributesGroup.getVolumeGroup();
if (xsdcAttributesGroup.hasAttributes_optional()) {
aidlAttributesGroup.attributes =
- convertCollectionToAidl<xsd::AttributesType, AudioAttributes>(
+ convertCollectionToAidlUnchecked<xsd::AttributesType, AudioAttributes>(
xsdcAttributesGroup.getAttributes_optional(),
std::bind(&EngineConfigXmlConverter::convertAudioAttributesToAidl, this,
std::placeholders::_1));
@@ -172,7 +172,7 @@
if (xsdcProductStrategy.hasAttributesGroup()) {
aidlProductStrategy.attributesGroups =
- convertCollectionToAidl<xsd::AttributesGroup, AudioHalAttributesGroup>(
+ convertCollectionToAidlUnchecked<xsd::AttributesGroup, AudioHalAttributesGroup>(
xsdcProductStrategy.getAttributesGroup(),
std::bind(&EngineConfigXmlConverter::convertAttributesGroupToAidl, this,
std::placeholders::_1));
@@ -204,13 +204,13 @@
getXsdcConfig()->getVolumes());
}
aidlVolumeCurve.curvePoints =
- convertCollectionToAidl<std::string, AudioHalVolumeCurve::CurvePoint>(
+ convertCollectionToAidlUnchecked<std::string, AudioHalVolumeCurve::CurvePoint>(
mVolumesReferenceMap.at(xsdcVolumeCurve.getRef()).getPoint(),
std::bind(&EngineConfigXmlConverter::convertCurvePointToAidl, this,
std::placeholders::_1));
} else {
aidlVolumeCurve.curvePoints =
- convertCollectionToAidl<std::string, AudioHalVolumeCurve::CurvePoint>(
+ convertCollectionToAidlUnchecked<std::string, AudioHalVolumeCurve::CurvePoint>(
xsdcVolumeCurve.getPoint(),
std::bind(&EngineConfigXmlConverter::convertCurvePointToAidl, this,
std::placeholders::_1));
@@ -224,10 +224,11 @@
aidlVolumeGroup.name = xsdcVolumeGroup.getName();
aidlVolumeGroup.minIndex = xsdcVolumeGroup.getIndexMin();
aidlVolumeGroup.maxIndex = xsdcVolumeGroup.getIndexMax();
- aidlVolumeGroup.volumeCurves = convertCollectionToAidl<xsd::Volume, AudioHalVolumeCurve>(
- xsdcVolumeGroup.getVolume(),
- std::bind(&EngineConfigXmlConverter::convertVolumeCurveToAidl, this,
- std::placeholders::_1));
+ aidlVolumeGroup.volumeCurves =
+ convertCollectionToAidlUnchecked<xsd::Volume, AudioHalVolumeCurve>(
+ xsdcVolumeGroup.getVolume(),
+ std::bind(&EngineConfigXmlConverter::convertVolumeCurveToAidl, this,
+ std::placeholders::_1));
return aidlVolumeGroup;
}
@@ -251,7 +252,7 @@
aidlCapCriterionType.name = xsdcCriterionType.getName();
aidlCapCriterionType.isInclusive = !(static_cast<bool>(xsdcCriterionType.getType()));
aidlCapCriterionType.values =
- convertWrappedCollectionToAidl<xsd::ValuesType, xsd::ValueType, std::string>(
+ convertWrappedCollectionToAidlUnchecked<xsd::ValuesType, xsd::ValueType, std::string>(
xsdcCriterionType.getValues(), &xsd::ValuesType::getValue,
std::bind(&EngineConfigXmlConverter::convertCriterionTypeValueToAidl, this,
std::placeholders::_1));
@@ -266,9 +267,9 @@
initProductStrategyMap();
if (getXsdcConfig()->hasProductStrategies()) {
mAidlEngineConfig.productStrategies =
- convertWrappedCollectionToAidl<xsd::ProductStrategies,
- xsd::ProductStrategies::ProductStrategy,
- AudioHalProductStrategy>(
+ convertWrappedCollectionToAidlUnchecked<xsd::ProductStrategies,
+ xsd::ProductStrategies::ProductStrategy,
+ AudioHalProductStrategy>(
getXsdcConfig()->getProductStrategies(),
&xsd::ProductStrategies::getProductStrategy,
std::bind(&EngineConfigXmlConverter::convertProductStrategyToAidl, this,
@@ -278,7 +279,7 @@
}
}
if (getXsdcConfig()->hasVolumeGroups()) {
- mAidlEngineConfig.volumeGroups = convertWrappedCollectionToAidl<
+ mAidlEngineConfig.volumeGroups = convertWrappedCollectionToAidlUnchecked<
xsd::VolumeGroupsType, xsd::VolumeGroupsType::VolumeGroup, AudioHalVolumeGroup>(
getXsdcConfig()->getVolumeGroups(), &xsd::VolumeGroupsType::getVolumeGroup,
std::bind(&EngineConfigXmlConverter::convertVolumeGroupToAidl, this,
@@ -287,19 +288,17 @@
if (getXsdcConfig()->hasCriteria() && getXsdcConfig()->hasCriterion_types()) {
AudioHalEngineConfig::CapSpecificConfig capSpecificConfig;
capSpecificConfig.criteria =
- convertWrappedCollectionToAidl<xsd::CriteriaType, xsd::CriterionType,
- AudioHalCapCriterion>(
+ convertWrappedCollectionToAidlUnchecked<xsd::CriteriaType, xsd::CriterionType,
+ AudioHalCapCriterion>(
getXsdcConfig()->getCriteria(), &xsd::CriteriaType::getCriterion,
std::bind(&EngineConfigXmlConverter::convertCapCriterionToAidl, this,
std::placeholders::_1));
- capSpecificConfig.criterionTypes =
- convertWrappedCollectionToAidl<xsd::CriterionTypesType, xsd::CriterionTypeType,
- AudioHalCapCriterionType>(
- getXsdcConfig()->getCriterion_types(),
- &xsd::CriterionTypesType::getCriterion_type,
- std::bind(&EngineConfigXmlConverter::convertCapCriterionTypeToAidl, this,
- std::placeholders::_1));
+ capSpecificConfig.criterionTypes = convertWrappedCollectionToAidlUnchecked<
+ xsd::CriterionTypesType, xsd::CriterionTypeType, AudioHalCapCriterionType>(
+ getXsdcConfig()->getCriterion_types(), &xsd::CriterionTypesType::getCriterion_type,
+ std::bind(&EngineConfigXmlConverter::convertCapCriterionTypeToAidl, this,
+ std::placeholders::_1));
mAidlEngineConfig.capSpecificConfig = capSpecificConfig;
}
}
-} // namespace aidl::android::hardware::audio::core::internal
\ No newline at end of file
+} // namespace aidl::android::hardware::audio::core::internal
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 6b417a4..48d1458 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -18,19 +18,19 @@
#include <set>
#define LOG_TAG "AHAL_Module"
-#include <android-base/logging.h>
-#include <android/binder_ibinder_platform.h>
-
#include <Utils.h>
#include <aidl/android/media/audio/common/AudioInputFlags.h>
#include <aidl/android/media/audio/common/AudioOutputFlags.h>
+#include <android-base/logging.h>
+#include <android/binder_ibinder_platform.h>
+#include <error/expected_utils.h>
#include "core-impl/Bluetooth.h"
#include "core-impl/Module.h"
+#include "core-impl/ModuleRemoteSubmix.h"
#include "core-impl/ModuleUsb.h"
#include "core-impl/SoundDose.h"
#include "core-impl/StreamStub.h"
-#include "core-impl/StreamUsb.h"
#include "core-impl/Telephony.h"
#include "core-impl/utils.h"
@@ -112,37 +112,14 @@
switch (type) {
case Module::Type::USB:
return ndk::SharedRefBase::make<ModuleUsb>(type);
- case Type::DEFAULT:
case Type::R_SUBMIX:
+ return ndk::SharedRefBase::make<ModuleRemoteSubmix>(type);
+ case Type::DEFAULT:
default:
return ndk::SharedRefBase::make<Module>(type);
}
}
-// static
-StreamIn::CreateInstance Module::getStreamInCreator(Type type) {
- switch (type) {
- case Type::USB:
- return StreamInUsb::createInstance;
- case Type::DEFAULT:
- case Type::R_SUBMIX:
- default:
- return StreamInStub::createInstance;
- }
-}
-
-// static
-StreamOut::CreateInstance Module::getStreamOutCreator(Type type) {
- switch (type) {
- case Type::USB:
- return StreamOutUsb::createInstance;
- case Type::DEFAULT:
- case Type::R_SUBMIX:
- default:
- return StreamOutStub::createInstance;
- }
-}
-
std::ostream& operator<<(std::ostream& os, Module::Type t) {
switch (t) {
case Module::Type::DEFAULT:
@@ -187,7 +164,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
LOG(DEBUG) << __func__ << ": frame size " << frameSize << " bytes";
- if (frameSize > kMaximumStreamBufferSizeBytes / in_bufferSizeFrames) {
+ if (frameSize > static_cast<size_t>(kMaximumStreamBufferSizeBytes / in_bufferSizeFrames)) {
LOG(ERROR) << __func__ << ": buffer size " << in_bufferSizeFrames
<< " frames is too large, maximum size is "
<< kMaximumStreamBufferSizeBytes / frameSize;
@@ -206,8 +183,9 @@
StreamContext temp(
std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
- portConfigIt->format.value(), portConfigIt->channelMask.value(),
- portConfigIt->sampleRate.value().value,
+ portConfigIt->portId, portConfigIt->format.value(),
+ 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);
if (temp.isValid()) {
@@ -281,7 +259,7 @@
<< " does not correspond to a mix port";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
- const int32_t maxOpenStreamCount = portIt->ext.get<AudioPortExt::Tag::mix>().maxOpenStreamCount;
+ const size_t maxOpenStreamCount = portIt->ext.get<AudioPortExt::Tag::mix>().maxOpenStreamCount;
if (maxOpenStreamCount != 0 && mStreams.count(portId) >= maxOpenStreamCount) {
LOG(ERROR) << __func__ << ": port id " << portId
<< " has already reached maximum allowed opened stream count: "
@@ -339,30 +317,61 @@
do_insert(patch.sinkPortConfigIds);
}
-void Module::updateStreamsConnectedState(const AudioPatch& oldPatch, const AudioPatch& newPatch) {
+ndk::ScopedAStatus Module::updateStreamsConnectedState(const AudioPatch& oldPatch,
+ const AudioPatch& newPatch) {
// Streams from the old patch need to be disconnected, streams from the new
// patch need to be connected. If the stream belongs to both patches, no need
// to update it.
- std::set<int32_t> idsToDisconnect, idsToConnect;
+ auto maybeFailure = ndk::ScopedAStatus::ok();
+ std::set<int32_t> idsToDisconnect, idsToConnect, idsToDisconnectOnFailure;
idsToDisconnect.insert(oldPatch.sourcePortConfigIds.begin(),
oldPatch.sourcePortConfigIds.end());
idsToDisconnect.insert(oldPatch.sinkPortConfigIds.begin(), oldPatch.sinkPortConfigIds.end());
idsToConnect.insert(newPatch.sourcePortConfigIds.begin(), newPatch.sourcePortConfigIds.end());
idsToConnect.insert(newPatch.sinkPortConfigIds.begin(), newPatch.sinkPortConfigIds.end());
std::for_each(idsToDisconnect.begin(), idsToDisconnect.end(), [&](const auto& portConfigId) {
- if (idsToConnect.count(portConfigId) == 0) {
- LOG(DEBUG) << "The stream on port config id " << portConfigId << " is not connected";
- mStreams.setStreamIsConnected(portConfigId, {});
+ if (idsToConnect.count(portConfigId) == 0 && mStreams.count(portConfigId) != 0) {
+ if (auto status = mStreams.setStreamConnectedDevices(portConfigId, {}); status.isOk()) {
+ LOG(DEBUG) << "updateStreamsConnectedState: The stream on port config id "
+ << portConfigId << " has been disconnected";
+ } else {
+ // Disconnection is tricky to roll back, just register a failure.
+ maybeFailure = std::move(status);
+ }
}
});
+ if (!maybeFailure.isOk()) return maybeFailure;
std::for_each(idsToConnect.begin(), idsToConnect.end(), [&](const auto& portConfigId) {
- if (idsToDisconnect.count(portConfigId) == 0) {
+ if (idsToDisconnect.count(portConfigId) == 0 && mStreams.count(portConfigId) != 0) {
const auto connectedDevices = findConnectedDevices(portConfigId);
- LOG(DEBUG) << "The stream on port config id " << portConfigId
- << " is connected to: " << ::android::internal::ToString(connectedDevices);
- mStreams.setStreamIsConnected(portConfigId, connectedDevices);
+ if (connectedDevices.empty()) {
+ // This is important as workers use the vector size to derive the connection status.
+ LOG(FATAL) << "updateStreamsConnectedState: No connected devices found for port "
+ "config id "
+ << portConfigId;
+ }
+ if (auto status = mStreams.setStreamConnectedDevices(portConfigId, connectedDevices);
+ status.isOk()) {
+ LOG(DEBUG) << "updateStreamsConnectedState: The stream on port config id "
+ << portConfigId << " has been connected to: "
+ << ::android::internal::ToString(connectedDevices);
+ } else {
+ maybeFailure = std::move(status);
+ idsToDisconnectOnFailure.insert(portConfigId);
+ }
}
});
+ if (!maybeFailure.isOk()) {
+ LOG(WARNING) << __func__ << ": Due to a failure, disconnecting streams on port config ids "
+ << ::android::internal::ToString(idsToDisconnectOnFailure);
+ std::for_each(idsToDisconnectOnFailure.begin(), idsToDisconnectOnFailure.end(),
+ [&](const auto& portConfigId) {
+ auto status = mStreams.setStreamConnectedDevices(portConfigId, {});
+ (void)status.isOk(); // Can't do much about a failure here.
+ });
+ return maybeFailure;
+ }
+ return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Module::setModuleDebug(
@@ -469,10 +478,7 @@
}
if (!mDebug.simulateDeviceConnections) {
- if (ndk::ScopedAStatus status = populateConnectedDevicePort(&connectedPort);
- !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(populateConnectedDevicePort(&connectedPort));
} else {
auto& connectedProfiles = getConfig().connectedProfiles;
if (auto connectedProfilesIt = connectedProfiles.find(templateId);
@@ -486,6 +492,17 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
+ for (auto profile : connectedPort.profiles) {
+ if (profile.channelMasks.empty()) {
+ LOG(ERROR) << __func__ << ": the profile " << profile.name << " has no channel masks";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ if (profile.sampleRates.empty()) {
+ LOG(ERROR) << __func__ << ": the profile " << profile.name << " has no sample rates";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ }
+
connectedPort.id = ++getConfig().nextPortId;
auto [connectedPortsIt, _] =
mConnectedDevicePorts.insert(std::pair(connectedPort.id, std::vector<int32_t>()));
@@ -647,34 +664,26 @@
LOG(DEBUG) << __func__ << ": port config id " << in_args.portConfigId << ", buffer size "
<< in_args.bufferSizeFrames << " frames";
AudioPort* port = nullptr;
- if (auto status = findPortIdForNewStream(in_args.portConfigId, &port); !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(findPortIdForNewStream(in_args.portConfigId, &port));
if (port->flags.getTag() != AudioIoFlags::Tag::input) {
LOG(ERROR) << __func__ << ": port config id " << in_args.portConfigId
<< " does not correspond to an input mix port";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
StreamContext context;
- if (auto status = createStreamContext(in_args.portConfigId, in_args.bufferSizeFrames, nullptr,
- nullptr, &context);
- !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(createStreamContext(in_args.portConfigId, in_args.bufferSizeFrames,
+ nullptr, nullptr, &context));
context.fillDescriptor(&_aidl_return->desc);
std::shared_ptr<StreamIn> stream;
- ndk::ScopedAStatus status = getStreamInCreator(mType)(in_args.sinkMetadata, std::move(context),
- mConfig->microphones, &stream);
- if (!status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(createInputStream(in_args.sinkMetadata, std::move(context),
+ mConfig->microphones, &stream));
StreamWrapper streamWrapper(stream);
+ if (auto patchIt = mPatches.find(in_args.portConfigId); patchIt != mPatches.end()) {
+ RETURN_STATUS_IF_ERROR(
+ streamWrapper.setConnectedDevices(findConnectedDevices(in_args.portConfigId)));
+ }
AIBinder_setMinSchedulerPolicy(streamWrapper.getBinder().get(), SCHED_NORMAL,
ANDROID_PRIORITY_AUDIO);
- auto patchIt = mPatches.find(in_args.portConfigId);
- if (patchIt != mPatches.end()) {
- streamWrapper.setStreamIsConnected(findConnectedDevices(in_args.portConfigId));
- }
mStreams.insert(port->id, in_args.portConfigId, std::move(streamWrapper));
_aidl_return->stream = std::move(stream);
return ndk::ScopedAStatus::ok();
@@ -686,9 +695,7 @@
<< (in_args.offloadInfo.has_value()) << ", buffer size " << in_args.bufferSizeFrames
<< " frames";
AudioPort* port = nullptr;
- if (auto status = findPortIdForNewStream(in_args.portConfigId, &port); !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(findPortIdForNewStream(in_args.portConfigId, &port));
if (port->flags.getTag() != AudioIoFlags::Tag::output) {
LOG(ERROR) << __func__ << ": port config id " << in_args.portConfigId
<< " does not correspond to an output mix port";
@@ -709,26 +716,20 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
StreamContext context;
- if (auto status = createStreamContext(in_args.portConfigId, in_args.bufferSizeFrames,
- isNonBlocking ? in_args.callback : nullptr,
- in_args.eventCallback, &context);
- !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(createStreamContext(in_args.portConfigId, in_args.bufferSizeFrames,
+ isNonBlocking ? in_args.callback : nullptr,
+ in_args.eventCallback, &context));
context.fillDescriptor(&_aidl_return->desc);
std::shared_ptr<StreamOut> stream;
- ndk::ScopedAStatus status = getStreamOutCreator(mType)(
- in_args.sourceMetadata, std::move(context), in_args.offloadInfo, &stream);
- if (!status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(createOutputStream(in_args.sourceMetadata, std::move(context),
+ in_args.offloadInfo, &stream));
StreamWrapper streamWrapper(stream);
+ if (auto patchIt = mPatches.find(in_args.portConfigId); patchIt != mPatches.end()) {
+ RETURN_STATUS_IF_ERROR(
+ streamWrapper.setConnectedDevices(findConnectedDevices(in_args.portConfigId)));
+ }
AIBinder_setMinSchedulerPolicy(streamWrapper.getBinder().get(), SCHED_NORMAL,
ANDROID_PRIORITY_AUDIO);
- auto patchIt = mPatches.find(in_args.portConfigId);
- if (patchIt != mPatches.end()) {
- streamWrapper.setStreamIsConnected(findConnectedDevices(in_args.portConfigId));
- }
mStreams.insert(port->id, in_args.portConfigId, std::move(streamWrapper));
_aidl_return->stream = std::move(stream);
return ndk::ScopedAStatus::ok();
@@ -796,10 +797,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
}
-
- if (auto status = checkAudioPatchEndpointsMatch(sources, sinks); !status.isOk()) {
- return status;
- }
+ RETURN_STATUS_IF_ERROR(checkAudioPatchEndpointsMatch(sources, sinks));
auto& patches = getConfig().patches;
auto existing = patches.end();
@@ -834,13 +832,20 @@
if (existing == patches.end()) {
_aidl_return->id = getConfig().nextPatchId++;
patches.push_back(*_aidl_return);
- existing = patches.begin() + (patches.size() - 1);
} else {
oldPatch = *existing;
- *existing = *_aidl_return;
}
- registerPatch(*existing);
- updateStreamsConnectedState(oldPatch, *_aidl_return);
+ patchesBackup = mPatches;
+ registerPatch(*_aidl_return);
+ if (auto status = updateStreamsConnectedState(oldPatch, *_aidl_return); !status.isOk()) {
+ mPatches = std::move(*patchesBackup);
+ if (existing == patches.end()) {
+ patches.pop_back();
+ } else {
+ *existing = oldPatch;
+ }
+ return status;
+ }
LOG(DEBUG) << __func__ << ": " << (oldPatch.id == 0 ? "created" : "updated") << " patch "
<< _aidl_return->toString();
@@ -992,8 +997,12 @@
auto& patches = getConfig().patches;
auto patchIt = findById<AudioPatch>(patches, in_patchId);
if (patchIt != patches.end()) {
+ auto patchesBackup = mPatches;
cleanUpPatch(patchIt->id);
- updateStreamsConnectedState(*patchIt, AudioPatch{});
+ if (auto status = updateStreamsConnectedState(*patchIt, AudioPatch{}); !status.isOk()) {
+ mPatches = std::move(patchesBackup);
+ return status;
+ }
patches.erase(patchIt);
LOG(DEBUG) << __func__ << ": erased patch " << in_patchId;
return ndk::ScopedAStatus::ok();
@@ -1325,6 +1334,22 @@
return mIsMmapSupported.value();
}
+ndk::ScopedAStatus Module::createInputStream(const SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result) {
+ return createStreamInstance<StreamInStub>(result, sinkMetadata, std::move(context),
+ microphones);
+}
+
+ndk::ScopedAStatus Module::createOutputStream(const SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo,
+ std::shared_ptr<StreamOut>* result) {
+ return createStreamInstance<StreamOutStub>(result, sourceMetadata, std::move(context),
+ offloadInfo);
+}
+
ndk::ScopedAStatus Module::populateConnectedDevicePort(AudioPort* audioPort __unused) {
LOG(VERBOSE) << __func__ << ": do nothing and return ok";
return ndk::ScopedAStatus::ok();
diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index 77b0601..251dea0 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -152,6 +152,7 @@
case Tag::halReservedExit:
if (const int32_t cookie = command.get<Tag::halReservedExit>();
cookie == mInternalCommandCookie) {
+ mDriver->shutdown();
setClosed();
// This is an internal command, no need to reply.
return Status::EXIT;
@@ -165,10 +166,15 @@
case Tag::start:
if (mState == StreamDescriptor::State::STANDBY ||
mState == StreamDescriptor::State::DRAINING) {
- populateReply(&reply, mIsConnected);
- mState = mState == StreamDescriptor::State::STANDBY
- ? StreamDescriptor::State::IDLE
- : StreamDescriptor::State::ACTIVE;
+ if (::android::status_t status = mDriver->start(); status == ::android::OK) {
+ populateReply(&reply, mIsConnected);
+ mState = mState == StreamDescriptor::State::STANDBY
+ ? StreamDescriptor::State::IDLE
+ : StreamDescriptor::State::ACTIVE;
+ } else {
+ LOG(ERROR) << __func__ << ": start failed: " << status;
+ mState = StreamDescriptor::State::ERROR;
+ }
} else {
populateReplyWrongState(&reply, command);
}
@@ -364,6 +370,7 @@
case Tag::halReservedExit:
if (const int32_t cookie = command.get<Tag::halReservedExit>();
cookie == mInternalCommandCookie) {
+ mDriver->shutdown();
setClosed();
// This is an internal command, no need to reply.
return Status::EXIT;
@@ -375,26 +382,36 @@
populateReply(&reply, mIsConnected);
break;
case Tag::start: {
- bool commandAccepted = true;
+ std::optional<StreamDescriptor::State> nextState;
switch (mState) {
case StreamDescriptor::State::STANDBY:
- mState = StreamDescriptor::State::IDLE;
+ nextState = StreamDescriptor::State::IDLE;
break;
case StreamDescriptor::State::PAUSED:
- mState = StreamDescriptor::State::ACTIVE;
+ nextState = StreamDescriptor::State::ACTIVE;
break;
case StreamDescriptor::State::DRAIN_PAUSED:
- switchToTransientState(StreamDescriptor::State::DRAINING);
+ nextState = StreamDescriptor::State::DRAINING;
break;
case StreamDescriptor::State::TRANSFER_PAUSED:
- switchToTransientState(StreamDescriptor::State::TRANSFERRING);
+ nextState = StreamDescriptor::State::TRANSFERRING;
break;
default:
populateReplyWrongState(&reply, command);
- commandAccepted = false;
}
- if (commandAccepted) {
- populateReply(&reply, mIsConnected);
+ if (nextState.has_value()) {
+ if (::android::status_t status = mDriver->start(); status == ::android::OK) {
+ populateReply(&reply, mIsConnected);
+ if (*nextState == StreamDescriptor::State::IDLE ||
+ *nextState == StreamDescriptor::State::ACTIVE) {
+ mState = *nextState;
+ } else {
+ switchToTransientState(*nextState);
+ }
+ } else {
+ LOG(ERROR) << __func__ << ": start failed: " << status;
+ mState = StreamDescriptor::State::ERROR;
+ }
}
} break;
case Tag::burst:
@@ -567,8 +584,7 @@
return !fatal;
}
-template <class Metadata>
-StreamCommonImpl<Metadata>::~StreamCommonImpl() {
+StreamCommonImpl::~StreamCommonImpl() {
if (!isClosed()) {
LOG(ERROR) << __func__ << ": stream was not closed prior to destruction, resource leak";
stopWorker();
@@ -576,19 +592,16 @@
}
}
-template <class Metadata>
-void StreamCommonImpl<Metadata>::createStreamCommon(
+ndk::ScopedAStatus StreamCommonImpl::initInstance(
const std::shared_ptr<StreamCommonInterface>& delegate) {
- if (mCommon != nullptr) {
- LOG(FATAL) << __func__ << ": attempting to create the common interface twice";
- }
- mCommon = ndk::SharedRefBase::make<StreamCommon>(delegate);
+ mCommon = ndk::SharedRefBase::make<StreamCommonDelegator>(delegate);
mCommonBinder = mCommon->asBinder();
AIBinder_setMinSchedulerPolicy(mCommonBinder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
+ return mWorker->start() ? ndk::ScopedAStatus::ok()
+ : ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::getStreamCommon(
+ndk::ScopedAStatus StreamCommonImpl::getStreamCommonCommon(
std::shared_ptr<IStreamCommon>* _aidl_return) {
if (mCommon == nullptr) {
LOG(FATAL) << __func__ << ": the common interface was not created";
@@ -598,30 +611,26 @@
return ndk::ScopedAStatus::ok();
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::updateHwAvSyncId(int32_t in_hwAvSyncId) {
+ndk::ScopedAStatus StreamCommonImpl::updateHwAvSyncId(int32_t in_hwAvSyncId) {
LOG(DEBUG) << __func__ << ": id " << in_hwAvSyncId;
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::getVendorParameters(
+ndk::ScopedAStatus StreamCommonImpl::getVendorParameters(
const std::vector<std::string>& in_ids, std::vector<VendorParameter>* _aidl_return) {
LOG(DEBUG) << __func__ << ": id count: " << in_ids.size();
(void)_aidl_return;
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::setVendorParameters(
+ndk::ScopedAStatus StreamCommonImpl::setVendorParameters(
const std::vector<VendorParameter>& in_parameters, bool in_async) {
LOG(DEBUG) << __func__ << ": parameters count " << in_parameters.size()
<< ", async: " << in_async;
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::addEffect(
+ndk::ScopedAStatus StreamCommonImpl::addEffect(
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) {
if (in_effect == nullptr) {
LOG(DEBUG) << __func__ << ": null effect";
@@ -631,8 +640,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::removeEffect(
+ndk::ScopedAStatus StreamCommonImpl::removeEffect(
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) {
if (in_effect == nullptr) {
LOG(DEBUG) << __func__ << ": null effect";
@@ -642,8 +650,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::close() {
+ndk::ScopedAStatus StreamCommonImpl::close() {
LOG(DEBUG) << __func__;
if (!isClosed()) {
stopWorker();
@@ -659,8 +666,7 @@
}
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::prepareToClose() {
+ndk::ScopedAStatus StreamCommonImpl::prepareToClose() {
LOG(DEBUG) << __func__;
if (!isClosed()) {
return ndk::ScopedAStatus::ok();
@@ -669,8 +675,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
-template <class Metadata>
-void StreamCommonImpl<Metadata>::stopWorker() {
+void StreamCommonImpl::stopWorker() {
if (auto commandMQ = mContext.getCommandMQ(); commandMQ != nullptr) {
LOG(DEBUG) << __func__ << ": asking the worker to exit...";
auto cmd = StreamDescriptor::Command::make<StreamDescriptor::Command::Tag::halReservedExit>(
@@ -686,10 +691,12 @@
}
}
-template <class Metadata>
-ndk::ScopedAStatus StreamCommonImpl<Metadata>::updateMetadata(const Metadata& metadata) {
+ndk::ScopedAStatus StreamCommonImpl::updateMetadataCommon(const Metadata& metadata) {
LOG(DEBUG) << __func__;
if (!isClosed()) {
+ if (metadata.index() != mMetadata.index()) {
+ LOG(FATAL) << __func__ << ": changing metadata variant is not allowed";
+ }
mMetadata = metadata;
return ndk::ScopedAStatus::ok();
}
@@ -697,12 +704,10 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
-// static
-ndk::ScopedAStatus StreamIn::initInstance(const std::shared_ptr<StreamIn>& stream) {
- if (auto status = stream->init(); !status.isOk()) {
- return status;
- }
- stream->createStreamCommon(stream);
+ndk::ScopedAStatus StreamCommonImpl::setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
+ mWorker->setIsConnected(!devices.empty());
+ mConnectedDevices = devices;
return ndk::ScopedAStatus::ok();
}
@@ -716,12 +721,8 @@
}
} // namespace
-StreamIn::StreamIn(const SinkMetadata& sinkMetadata, StreamContext&& context,
- const DriverInterface::CreateInstance& createDriver,
- const StreamWorkerInterface::CreateInstance& createWorker,
- const std::vector<MicrophoneInfo>& microphones)
- : StreamCommonImpl<SinkMetadata>(sinkMetadata, std::move(context), createDriver, createWorker),
- mMicrophones(transformMicrophones(microphones)) {
+StreamIn::StreamIn(const std::vector<MicrophoneInfo>& microphones)
+ : mMicrophones(transformMicrophones(microphones)) {
LOG(DEBUG) << __func__;
}
@@ -729,9 +730,9 @@
std::vector<MicrophoneDynamicInfo>* _aidl_return) {
std::vector<MicrophoneDynamicInfo> result;
std::vector<MicrophoneDynamicInfo::ChannelMapping> channelMapping{
- getChannelCount(mContext.getChannelLayout()),
+ getChannelCount(getContext().getChannelLayout()),
MicrophoneDynamicInfo::ChannelMapping::DIRECT};
- for (auto it = mConnectedDevices.begin(); it != mConnectedDevices.end(); ++it) {
+ for (auto it = getConnectedDevices().begin(); it != getConnectedDevices().end(); ++it) {
if (auto micIt = mMicrophones.find(*it); micIt != mMicrophones.end()) {
MicrophoneDynamicInfo dynMic;
dynMic.id = micIt->second;
@@ -777,22 +778,8 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-// static
-ndk::ScopedAStatus StreamOut::initInstance(const std::shared_ptr<StreamOut>& stream) {
- if (auto status = stream->init(); !status.isOk()) {
- return status;
- }
- stream->createStreamCommon(stream);
- return ndk::ScopedAStatus::ok();
-}
-
-StreamOut::StreamOut(const SourceMetadata& sourceMetadata, StreamContext&& context,
- const DriverInterface::CreateInstance& createDriver,
- const StreamWorkerInterface::CreateInstance& createWorker,
- const std::optional<AudioOffloadInfo>& offloadInfo)
- : StreamCommonImpl<SourceMetadata>(sourceMetadata, std::move(context), createDriver,
- createWorker),
- mOffloadInfo(offloadInfo) {
+StreamOut::StreamOut(const std::optional<AudioOffloadInfo>& offloadInfo)
+ : mOffloadInfo(offloadInfo) {
LOG(DEBUG) << __func__;
}
diff --git a/audio/aidl/default/StreamStub.cpp b/audio/aidl/default/StreamStub.cpp
index 2467320..2dcf4d4 100644
--- a/audio/aidl/default/StreamStub.cpp
+++ b/audio/aidl/default/StreamStub.cpp
@@ -31,34 +31,69 @@
namespace aidl::android::hardware::audio::core {
-DriverStub::DriverStub(const StreamContext& context, bool isInput)
- : mFrameSizeBytes(context.getFrameSize()),
- mSampleRate(context.getSampleRate()),
- mIsAsynchronous(!!context.getAsyncCallback()),
- mIsInput(isInput) {}
+StreamStub::StreamStub(const Metadata& metadata, StreamContext&& context)
+ : StreamCommonImpl(metadata, std::move(context)),
+ mFrameSizeBytes(getContext().getFrameSize()),
+ mSampleRate(getContext().getSampleRate()),
+ mIsAsynchronous(!!getContext().getAsyncCallback()),
+ mIsInput(isInput(metadata)) {}
-::android::status_t DriverStub::init() {
+::android::status_t StreamStub::init() {
+ mIsInitialized = true;
usleep(500);
return ::android::OK;
}
-::android::status_t DriverStub::drain(StreamDescriptor::DrainMode) {
+::android::status_t StreamStub::drain(StreamDescriptor::DrainMode) {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
usleep(500);
return ::android::OK;
}
-::android::status_t DriverStub::flush() {
+::android::status_t StreamStub::flush() {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
usleep(500);
return ::android::OK;
}
-::android::status_t DriverStub::pause() {
+::android::status_t StreamStub::pause() {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
usleep(500);
return ::android::OK;
}
-::android::status_t DriverStub::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
+::android::status_t StreamStub::standby() {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
+ usleep(500);
+ mIsStandby = true;
+ return ::android::OK;
+}
+
+::android::status_t StreamStub::start() {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
+ usleep(500);
+ mIsStandby = false;
+ return ::android::OK;
+}
+
+::android::status_t StreamStub::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) {
+ if (!mIsInitialized) {
+ LOG(FATAL) << __func__ << ": must not happen for an uninitialized driver";
+ }
+ if (mIsStandby) {
+ LOG(FATAL) << __func__ << ": must not happen while in standby";
+ }
static constexpr float kMicrosPerSecond = MICROS_PER_SECOND;
static constexpr float kScaleFactor = .8f;
if (mIsAsynchronous) {
@@ -79,69 +114,16 @@
return ::android::OK;
}
-::android::status_t DriverStub::standby() {
- usleep(500);
- return ::android::OK;
-}
-
-::android::status_t DriverStub::setConnectedDevices(
- const std::vector<AudioDevice>& connectedDevices __unused) {
- usleep(500);
- return ::android::OK;
-}
-
-// static
-ndk::ScopedAStatus StreamInStub::createInstance(const SinkMetadata& sinkMetadata,
- StreamContext&& context,
- const std::vector<MicrophoneInfo>& microphones,
- std::shared_ptr<StreamIn>* result) {
- std::shared_ptr<StreamIn> stream =
- ndk::SharedRefBase::make<StreamInStub>(sinkMetadata, std::move(context), microphones);
- if (auto status = initInstance(stream); !status.isOk()) {
- return status;
- }
- *result = std::move(stream);
- return ndk::ScopedAStatus::ok();
+void StreamStub::shutdown() {
+ mIsInitialized = false;
}
StreamInStub::StreamInStub(const SinkMetadata& sinkMetadata, StreamContext&& context,
const std::vector<MicrophoneInfo>& microphones)
- : StreamIn(
- sinkMetadata, std::move(context),
- [](const StreamContext& ctx) -> DriverInterface* {
- return new DriverStub(ctx, true /*isInput*/);
- },
- [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
- // The default worker implementation is used.
- return new StreamInWorker(ctx, driver);
- },
- microphones) {}
-
-// static
-ndk::ScopedAStatus StreamOutStub::createInstance(const SourceMetadata& sourceMetadata,
- StreamContext&& context,
- const std::optional<AudioOffloadInfo>& offloadInfo,
- std::shared_ptr<StreamOut>* result) {
- std::shared_ptr<StreamOut> stream = ndk::SharedRefBase::make<StreamOutStub>(
- sourceMetadata, std::move(context), offloadInfo);
- if (auto status = initInstance(stream); !status.isOk()) {
- return status;
- }
- *result = std::move(stream);
- return ndk::ScopedAStatus::ok();
-}
+ : StreamStub(sinkMetadata, std::move(context)), StreamIn(microphones) {}
StreamOutStub::StreamOutStub(const SourceMetadata& sourceMetadata, StreamContext&& context,
const std::optional<AudioOffloadInfo>& offloadInfo)
- : StreamOut(
- sourceMetadata, std::move(context),
- [](const StreamContext& ctx) -> DriverInterface* {
- return new DriverStub(ctx, false /*isInput*/);
- },
- [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
- // The default worker implementation is used.
- return new StreamOutWorker(ctx, driver);
- },
- offloadInfo) {}
+ : StreamStub(sourceMetadata, std::move(context)), StreamOut(offloadInfo) {}
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/config/audioPolicy/api/current.txt b/audio/aidl/default/config/audioPolicy/api/current.txt
index fabb93b..e2bc833 100644
--- a/audio/aidl/default/config/audioPolicy/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/api/current.txt
@@ -33,14 +33,19 @@
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_INDEX_MASK_8;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_INDEX_MASK_9;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_2POINT0POINT2;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_2POINT1;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_2POINT1POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_3POINT0POINT2;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_3POINT1;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_3POINT1POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_5POINT1;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_6;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_FRONT_BACK;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_MONO;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_PENTA;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_QUAD;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_STEREO;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_TRI;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_CALL_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO;
diff --git a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
index d57790a..9a3a447 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -535,12 +535,17 @@
<xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_MONO"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_STEREO"/>
+ <xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ <xs:enumeration value="AUDIO_CHANNEL_IN_TRI"/>
+ <xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_6"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_2POINT0POINT2"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_2POINT1POINT2"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_3POINT0POINT2"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_3POINT1POINT2"/>
+ <xs:enumeration value="AUDIO_CHANNEL_IN_QUAD"/>
+ <xs:enumeration value="AUDIO_CHANNEL_IN_PENTA"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_5POINT1"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO"/>
<xs:enumeration value="AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO"/>
diff --git a/audio/aidl/default/extension/ExtensionEffect.cpp b/audio/aidl/default/extension/ExtensionEffect.cpp
index c4eebc0..4a4d71b6 100644
--- a/audio/aidl/default/extension/ExtensionEffect.cpp
+++ b/audio/aidl/default/extension/ExtensionEffect.cpp
@@ -30,8 +30,8 @@
using aidl::android::hardware::audio::effect::DefaultExtension;
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::ExtensionEffect;
-using aidl::android::hardware::audio::effect::getEffectUuidExtensionImpl;
-using aidl::android::hardware::audio::effect::getEffectUuidExtensionType;
+using aidl::android::hardware::audio::effect::getEffectImplUuidExtension;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidExtension;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::Range;
using aidl::android::hardware::audio::effect::VendorExtension;
@@ -39,7 +39,7 @@
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != getEffectUuidExtensionImpl()) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidExtension()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -54,7 +54,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != getEffectUuidExtensionImpl()) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidExtension()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -67,8 +67,8 @@
const std::string ExtensionEffect::kEffectName = "ExtensionEffectExample";
const Descriptor ExtensionEffect::kDescriptor = {
- .common = {.id = {.type = getEffectUuidExtensionType(),
- .uuid = getEffectUuidExtensionImpl(),
+ .common = {.id = {.type = getEffectTypeUuidExtension(),
+ .uuid = getEffectImplUuidExtension(),
.proxy = std::nullopt},
.name = ExtensionEffect::kEffectName,
.implementor = "The Android Open Source Project"}};
diff --git a/audio/aidl/default/include/core-impl/AidlConversionXsdc.h b/audio/aidl/default/include/core-impl/AidlConversionXsdc.h
new file mode 100644
index 0000000..c9aefc7
--- /dev/null
+++ b/audio/aidl/default/include/core-impl/AidlConversionXsdc.h
@@ -0,0 +1,32 @@
+/*
+ * 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/audio/core/SurroundSoundConfig.h>
+#include <aidl/android/media/audio/common/AudioFormatDescription.h>
+#include <android_audio_policy_configuration.h>
+#include <media/AidlConversionUtil.h>
+
+namespace aidl::android::hardware::audio::core::internal {
+
+ConversionResult<::aidl::android::media::audio::common::AudioFormatDescription>
+xsdc2aidl_AudioFormatDescription(const std::string& xsdc);
+
+ConversionResult<SurroundSoundConfig> xsdc2aidl_SurroundSoundConfig(
+ const ::android::audio::policy::configuration::SurroundSound& xsdc);
+
+} // namespace aidl::android::hardware::audio::core::internal
diff --git a/audio/aidl/default/include/core-impl/AudioPolicyConfigXmlConverter.h b/audio/aidl/default/include/core-impl/AudioPolicyConfigXmlConverter.h
index 47918f0..090d585 100644
--- a/audio/aidl/default/include/core-impl/AudioPolicyConfigXmlConverter.h
+++ b/audio/aidl/default/include/core-impl/AudioPolicyConfigXmlConverter.h
@@ -18,6 +18,7 @@
#include <string>
+#include <aidl/android/hardware/audio/core/SurroundSoundConfig.h>
#include <aidl/android/media/audio/common/AudioHalEngineConfig.h>
#include <android_audio_policy_configuration.h>
#include <android_audio_policy_configuration_enums.h>
@@ -35,6 +36,10 @@
::android::status_t getStatus() const { return mConverter.getStatus(); }
const ::aidl::android::media::audio::common::AudioHalEngineConfig& getAidlEngineConfig();
+ const SurroundSoundConfig& getSurroundSoundConfig();
+
+ // Public for testing purposes.
+ static const SurroundSoundConfig& getDefaultSurroundSoundConfig();
private:
const std::optional<::android::audio::policy::configuration::AudioPolicyConfiguration>&
@@ -48,7 +53,6 @@
void parseVolumes();
::aidl::android::media::audio::common::AudioHalVolumeCurve::CurvePoint convertCurvePointToAidl(
const std::string& xsdcCurvePoint);
-
::aidl::android::media::audio::common::AudioHalVolumeCurve convertVolumeCurveToAidl(
const ::android::audio::policy::configuration::Volume& xsdcVolumeCurve);
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 83ecfaa..4a23637 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -33,39 +33,13 @@
static constexpr int32_t kLatencyMs = 10;
enum Type : int { DEFAULT, R_SUBMIX, USB };
+ static std::shared_ptr<Module> createInstance(Type type);
+
explicit Module(Type type) : mType(type) {}
- static std::shared_ptr<Module> createInstance(Type type);
- static StreamIn::CreateInstance getStreamInCreator(Type type);
- static StreamOut::CreateInstance getStreamOutCreator(Type type);
-
- private:
- struct VendorDebug {
- static const std::string kForceTransientBurstName;
- static const std::string kForceSynchronousDrainName;
- bool forceTransientBurst = false;
- bool forceSynchronousDrain = false;
- };
- // Helper used for interfaces that require a persistent instance. We hold them via a strong
- // pointer. The binder token is retained for a call to 'setMinSchedulerPolicy'.
- template <class C>
- struct ChildInterface : private std::pair<std::shared_ptr<C>, ndk::SpAIBinder> {
- ChildInterface() {}
- ChildInterface& operator=(const std::shared_ptr<C>& c) {
- return operator=(std::shared_ptr<C>(c));
- }
- ChildInterface& operator=(std::shared_ptr<C>&& c) {
- this->first = std::move(c);
- this->second = this->first->asBinder();
- AIBinder_setMinSchedulerPolicy(this->second.get(), SCHED_NORMAL,
- ANDROID_PRIORITY_AUDIO);
- return *this;
- }
- explicit operator bool() const { return !!this->first; }
- C& operator*() const { return *(this->first); }
- C* operator->() const { return this->first; }
- std::shared_ptr<C> getPtr() const { return this->first; }
- };
+ protected:
+ // The vendor extension done via inheritance can override interface methods and augment
+ // a call to the base implementation.
ndk::ScopedAStatus setModuleDebug(
const ::aidl::android::hardware::audio::core::ModuleDebug& in_debug) override;
@@ -146,29 +120,46 @@
ndk::ScopedAStatus getAAudioMixerBurstCount(int32_t* _aidl_return) override;
ndk::ScopedAStatus getAAudioHardwareBurstMinUsec(int32_t* _aidl_return) override;
- void cleanUpPatch(int32_t patchId);
- ndk::ScopedAStatus createStreamContext(
- int32_t in_portConfigId, int64_t in_bufferSizeFrames,
- std::shared_ptr<IStreamCallback> asyncCallback,
- std::shared_ptr<IStreamOutEventCallback> outEventCallback,
- ::aidl::android::hardware::audio::core::StreamContext* out_context);
- std::vector<::aidl::android::media::audio::common::AudioDevice> findConnectedDevices(
- int32_t portConfigId);
- std::set<int32_t> findConnectedPortConfigIds(int32_t portConfigId);
- ndk::ScopedAStatus findPortIdForNewStream(
- int32_t in_portConfigId, ::aidl::android::media::audio::common::AudioPort** port);
- internal::Configuration& getConfig();
- template <typename C>
- std::set<int32_t> portIdsFromPortConfigIds(C portConfigIds);
- void registerPatch(const AudioPatch& patch);
- void updateStreamsConnectedState(const AudioPatch& oldPatch, const AudioPatch& newPatch);
- bool isMmapSupported();
-
// This value is used for all AudioPatches.
static constexpr int32_t kMinimumStreamBufferSizeFrames = 256;
// The maximum stream buffer size is 1 GiB = 2 ** 30 bytes;
static constexpr int32_t kMaximumStreamBufferSizeBytes = 1 << 30;
+ private:
+ struct VendorDebug {
+ static const std::string kForceTransientBurstName;
+ static const std::string kForceSynchronousDrainName;
+ bool forceTransientBurst = false;
+ bool forceSynchronousDrain = false;
+ };
+ // Helper used for interfaces that require a persistent instance. We hold them via a strong
+ // pointer. The binder token is retained for a call to 'setMinSchedulerPolicy'.
+ template <class C>
+ struct ChildInterface : private std::pair<std::shared_ptr<C>, ndk::SpAIBinder> {
+ ChildInterface() {}
+ ChildInterface& operator=(const std::shared_ptr<C>& c) {
+ return operator=(std::shared_ptr<C>(c));
+ }
+ ChildInterface& operator=(std::shared_ptr<C>&& c) {
+ this->first = std::move(c);
+ this->second = this->first->asBinder();
+ AIBinder_setMinSchedulerPolicy(this->second.get(), SCHED_NORMAL,
+ ANDROID_PRIORITY_AUDIO);
+ return *this;
+ }
+ explicit operator bool() const { return !!this->first; }
+ C& operator*() const { return *(this->first); }
+ C* operator->() const { return this->first; }
+ std::shared_ptr<C> getPtr() const { return this->first; }
+ };
+ // ids of device ports created at runtime via 'connectExternalDevice'.
+ // Also stores a list of ids of mix ports with dynamic profiles that were populated from
+ // the connected port. This list can be empty, thus an int->int multimap can't be used.
+ using ConnectedDevicePorts = std::map<int32_t, std::vector<int32_t>>;
+ // Maps port ids and port config ids to patch ids.
+ // Multimap because both ports and configs can be used by multiple patches.
+ using Patches = std::multimap<int32_t, int32_t>;
+
const Type mType;
std::unique_ptr<internal::Configuration> mConfig;
ModuleDebug mDebug;
@@ -177,19 +168,29 @@
ChildInterface<IBluetooth> mBluetooth;
ChildInterface<IBluetoothA2dp> mBluetoothA2dp;
ChildInterface<IBluetoothLe> mBluetoothLe;
- // ids of device ports created at runtime via 'connectExternalDevice'.
- // Also stores ids of mix ports with dynamic profiles which got populated from the connected
- // port.
- std::map<int32_t, std::vector<int32_t>> mConnectedDevicePorts;
+ ConnectedDevicePorts mConnectedDevicePorts;
Streams mStreams;
- // Maps port ids and port config ids to patch ids.
- // Multimap because both ports and configs can be used by multiple patches.
- std::multimap<int32_t, int32_t> mPatches;
+ Patches mPatches;
bool mMicMute = false;
+ bool mMasterMute = false;
+ float mMasterVolume = 1.0f;
ChildInterface<sounddose::ISoundDose> mSoundDose;
std::optional<bool> mIsMmapSupported;
protected:
+ // The following virtual functions are intended for vendor extension via inheritance.
+
+ virtual ndk::ScopedAStatus createInputStream(
+ const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result);
+ virtual ndk::ScopedAStatus createOutputStream(
+ const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo,
+ std::shared_ptr<StreamOut>* result);
// If the module is unable to populate the connected device port correctly, the returned error
// code must correspond to the errors of `IModule.connectedExternalDevice` method.
virtual ndk::ScopedAStatus populateConnectedDevicePort(
@@ -204,8 +205,31 @@
virtual ndk::ScopedAStatus onMasterMuteChanged(bool mute);
virtual ndk::ScopedAStatus onMasterVolumeChanged(float volume);
- bool mMasterMute = false;
- float mMasterVolume = 1.0f;
+ // Utility and helper functions accessible to subclasses.
+ void cleanUpPatch(int32_t patchId);
+ ndk::ScopedAStatus createStreamContext(
+ int32_t in_portConfigId, int64_t in_bufferSizeFrames,
+ std::shared_ptr<IStreamCallback> asyncCallback,
+ std::shared_ptr<IStreamOutEventCallback> outEventCallback,
+ ::aidl::android::hardware::audio::core::StreamContext* out_context);
+ std::vector<::aidl::android::media::audio::common::AudioDevice> findConnectedDevices(
+ int32_t portConfigId);
+ std::set<int32_t> findConnectedPortConfigIds(int32_t portConfigId);
+ ndk::ScopedAStatus findPortIdForNewStream(
+ int32_t in_portConfigId, ::aidl::android::media::audio::common::AudioPort** port);
+ internal::Configuration& getConfig();
+ const ConnectedDevicePorts& getConnectedDevicePorts() const { return mConnectedDevicePorts; }
+ bool getMasterMute() const { return mMasterMute; }
+ bool getMasterVolume() const { return mMasterVolume; }
+ bool getMicMute() const { return mMicMute; }
+ const Patches& getPatches() const { return mPatches; }
+ const Streams& getStreams() const { return mStreams; }
+ bool isMmapSupported();
+ template <typename C>
+ std::set<int32_t> portIdsFromPortConfigIds(C portConfigIds);
+ void registerPatch(const AudioPatch& patch);
+ ndk::ScopedAStatus updateStreamsConnectedState(const AudioPatch& oldPatch,
+ const AudioPatch& newPatch);
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/ModuleRemoteSubmix.h b/audio/aidl/default/include/core-impl/ModuleRemoteSubmix.h
new file mode 100644
index 0000000..7b1d375
--- /dev/null
+++ b/audio/aidl/default/include/core-impl/ModuleRemoteSubmix.h
@@ -0,0 +1,59 @@
+/*
+ * 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 "core-impl/Module.h"
+
+namespace aidl::android::hardware::audio::core {
+
+class ModuleRemoteSubmix : public Module {
+ public:
+ explicit ModuleRemoteSubmix(Module::Type type) : Module(type) {}
+
+ private:
+ // IModule interfaces
+ ndk::ScopedAStatus getTelephony(std::shared_ptr<ITelephony>* _aidl_return) override;
+ ndk::ScopedAStatus getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) override;
+ ndk::ScopedAStatus getMicMute(bool* _aidl_return) override;
+ ndk::ScopedAStatus setMicMute(bool in_mute) override;
+
+ // Module interfaces
+ ndk::ScopedAStatus createInputStream(
+ const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result) override;
+ ndk::ScopedAStatus createOutputStream(
+ const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo,
+ std::shared_ptr<StreamOut>* result) override;
+ ndk::ScopedAStatus populateConnectedDevicePort(
+ ::aidl::android::media::audio::common::AudioPort* audioPort) override;
+ ndk::ScopedAStatus checkAudioPatchEndpointsMatch(
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sources,
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sinks)
+ override;
+ void onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort,
+ bool connected) override;
+ ndk::ScopedAStatus onMasterMuteChanged(bool mute) override;
+ ndk::ScopedAStatus onMasterVolumeChanged(float volume) override;
+};
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/ModuleUsb.h b/audio/aidl/default/include/core-impl/ModuleUsb.h
index 1aa2244..5a5429d 100644
--- a/audio/aidl/default/include/core-impl/ModuleUsb.h
+++ b/audio/aidl/default/include/core-impl/ModuleUsb.h
@@ -32,6 +32,17 @@
ndk::ScopedAStatus setMicMute(bool in_mute) override;
// Module interfaces
+ ndk::ScopedAStatus createInputStream(
+ const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result) override;
+ ndk::ScopedAStatus createOutputStream(
+ const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo,
+ std::shared_ptr<StreamOut>* result) override;
ndk::ScopedAStatus populateConnectedDevicePort(
::aidl::android::media::audio::common::AudioPort* audioPort) override;
ndk::ScopedAStatus checkAudioPatchEndpointsMatch(
diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index 65680df..aaf5860 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -25,6 +25,7 @@
#include <variant>
#include <StreamWorker.h>
+#include <Utils.h>
#include <aidl/android/hardware/audio/common/SinkMetadata.h>
#include <aidl/android/hardware/audio/common/SourceMetadata.h>
#include <aidl/android/hardware/audio/core/BnStreamCommon.h>
@@ -34,8 +35,10 @@
#include <aidl/android/hardware/audio/core/IStreamOutEventCallback.h>
#include <aidl/android/hardware/audio/core/StreamDescriptor.h>
#include <aidl/android/media/audio/common/AudioDevice.h>
+#include <aidl/android/media/audio/common/AudioIoFlags.h>
#include <aidl/android/media/audio/common/AudioOffloadInfo.h>
#include <aidl/android/media/audio/common/MicrophoneInfo.h>
+#include <error/expected_utils.h>
#include <fmq/AidlMessageQueue.h>
#include <system/thread_defs.h>
#include <utils/Errors.h>
@@ -75,18 +78,23 @@
StreamContext() = default;
StreamContext(std::unique_ptr<CommandMQ> commandMQ, std::unique_ptr<ReplyMQ> replyMQ,
+ int portId,
const ::aidl::android::media::audio::common::AudioFormatDescription& format,
const ::aidl::android::media::audio::common::AudioChannelLayout& channelLayout,
- int sampleRate, std::unique_ptr<DataMQ> dataMQ,
+ int sampleRate, const ::aidl::android::media::audio::common::AudioIoFlags& flags,
+ int32_t mixPortHandle, std::unique_ptr<DataMQ> dataMQ,
std::shared_ptr<IStreamCallback> asyncCallback,
std::shared_ptr<IStreamOutEventCallback> outEventCallback,
DebugParameters debugParameters)
: mCommandMQ(std::move(commandMQ)),
mInternalCommandCookie(std::rand()),
mReplyMQ(std::move(replyMQ)),
+ mPortId(portId),
mFormat(format),
mChannelLayout(channelLayout),
mSampleRate(sampleRate),
+ mFlags(flags),
+ mMixPortHandle(mixPortHandle),
mDataMQ(std::move(dataMQ)),
mAsyncCallback(asyncCallback),
mOutEventCallback(outEventCallback),
@@ -95,9 +103,12 @@
: mCommandMQ(std::move(other.mCommandMQ)),
mInternalCommandCookie(other.mInternalCommandCookie),
mReplyMQ(std::move(other.mReplyMQ)),
+ mPortId(other.mPortId),
mFormat(other.mFormat),
mChannelLayout(other.mChannelLayout),
mSampleRate(other.mSampleRate),
+ mFlags(std::move(other.mFlags)),
+ mMixPortHandle(other.mMixPortHandle),
mDataMQ(std::move(other.mDataMQ)),
mAsyncCallback(std::move(other.mAsyncCallback)),
mOutEventCallback(std::move(other.mOutEventCallback)),
@@ -106,9 +117,12 @@
mCommandMQ = std::move(other.mCommandMQ);
mInternalCommandCookie = other.mInternalCommandCookie;
mReplyMQ = std::move(other.mReplyMQ);
+ mPortId = std::move(other.mPortId);
mFormat = std::move(other.mFormat);
mChannelLayout = std::move(other.mChannelLayout);
mSampleRate = other.mSampleRate;
+ mFlags = std::move(other.mFlags);
+ mMixPortHandle = other.mMixPortHandle;
mDataMQ = std::move(other.mDataMQ);
mAsyncCallback = std::move(other.mAsyncCallback);
mOutEventCallback = std::move(other.mOutEventCallback);
@@ -126,13 +140,16 @@
::aidl::android::media::audio::common::AudioFormatDescription getFormat() const {
return mFormat;
}
+ ::aidl::android::media::audio::common::AudioIoFlags getFlags() const { return mFlags; }
bool getForceTransientBurst() const { return mDebugParameters.forceTransientBurst; }
bool getForceSynchronousDrain() const { return mDebugParameters.forceSynchronousDrain; }
size_t getFrameSize() const;
int getInternalCommandCookie() const { return mInternalCommandCookie; }
+ int32_t getMixPortHandle() const { return mMixPortHandle; }
std::shared_ptr<IStreamOutEventCallback> getOutEventCallback() const {
return mOutEventCallback;
}
+ int getPortId() const { return mPortId; }
ReplyMQ* getReplyMQ() const { return mReplyMQ.get(); }
int getTransientStateDelayMs() const { return mDebugParameters.transientStateDelayMs; }
int getSampleRate() const { return mSampleRate; }
@@ -143,32 +160,31 @@
std::unique_ptr<CommandMQ> mCommandMQ;
int mInternalCommandCookie; // The value used to confirm that the command was posted internally
std::unique_ptr<ReplyMQ> mReplyMQ;
+ int mPortId;
::aidl::android::media::audio::common::AudioFormatDescription mFormat;
::aidl::android::media::audio::common::AudioChannelLayout mChannelLayout;
int mSampleRate;
+ ::aidl::android::media::audio::common::AudioIoFlags mFlags;
+ int32_t mMixPortHandle;
std::unique_ptr<DataMQ> mDataMQ;
std::shared_ptr<IStreamCallback> mAsyncCallback;
std::shared_ptr<IStreamOutEventCallback> mOutEventCallback; // Only used by output streams
DebugParameters mDebugParameters;
};
+// This interface provides operations of the stream which are executed on the worker thread.
struct DriverInterface {
- using CreateInstance = std::function<DriverInterface*(const StreamContext&)>;
virtual ~DriverInterface() = default;
- // This function is called once, on the main thread, before starting the worker thread.
- virtual ::android::status_t init() = 0;
- // This function is called from Binder pool thread. It must be done in a thread-safe manner
- // if this method and other methods in this interface share data.
- virtual ::android::status_t setConnectedDevices(
- const std::vector<::aidl::android::media::audio::common::AudioDevice>&
- connectedDevices) = 0;
- // All the functions below are called on the worker thread.
+ // All the methods below are called on the worker thread.
+ virtual ::android::status_t init() = 0; // This function is only called once.
virtual ::android::status_t drain(StreamDescriptor::DrainMode mode) = 0;
virtual ::android::status_t flush() = 0;
virtual ::android::status_t pause() = 0;
+ virtual ::android::status_t standby() = 0;
+ virtual ::android::status_t start() = 0;
virtual ::android::status_t transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) = 0;
- virtual ::android::status_t standby() = 0;
+ virtual void shutdown() = 0; // This function is only called once.
};
class StreamWorkerCommonLogic : public ::android::hardware::audio::common::StreamLogic {
@@ -285,14 +301,20 @@
};
using StreamOutWorker = StreamWorkerImpl<StreamOutWorkerLogic>;
-// This provides a C++ interface with methods of the IStreamCommon Binder interface,
-// but intentionally does not inherit from it. This is needed to avoid inheriting
-// StreamIn and StreamOut from two Binder interface classes, as these parts of the class
-// will be reference counted separately.
-//
-// The implementation of these common methods is in the StreamCommonImpl template class.
+// This interface provides operations of the stream which are executed on a Binder pool thread.
+// These methods originate both from the AIDL interface and its implementation.
struct StreamCommonInterface {
+ using ConnectedDevices = std::vector<::aidl::android::media::audio::common::AudioDevice>;
+ using Metadata =
+ std::variant<::aidl::android::hardware::audio::common::SinkMetadata /*IStreamIn*/,
+ ::aidl::android::hardware::audio::common::SourceMetadata /*IStreamOut*/>;
+
+ static constexpr bool isInput(const Metadata& metadata) { return metadata.index() == 0; }
+
virtual ~StreamCommonInterface() = default;
+ // Methods below originate from the 'IStreamCommon' interface.
+ // This is semantically equivalent to inheriting from 'IStreamCommon' with a benefit
+ // that concrete stream implementations can inherit both from this interface and IStreamIn/Out.
virtual ndk::ScopedAStatus close() = 0;
virtual ndk::ScopedAStatus prepareToClose() = 0;
virtual ndk::ScopedAStatus updateHwAvSyncId(int32_t in_hwAvSyncId) = 0;
@@ -306,11 +328,30 @@
virtual ndk::ScopedAStatus removeEffect(
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>&
in_effect) = 0;
+ // Methods below are common for both 'IStreamIn' and 'IStreamOut'. Note that
+ // 'updateMetadata' in them uses an individual structure which is wrapped here.
+ // The 'Common' suffix is added to distinguish them from the methods from 'IStreamIn/Out'.
+ virtual ndk::ScopedAStatus getStreamCommonCommon(
+ std::shared_ptr<IStreamCommon>* _aidl_return) = 0;
+ virtual ndk::ScopedAStatus updateMetadataCommon(const Metadata& metadata) = 0;
+ // Methods below are called by implementation of 'IModule', 'IStreamIn' and 'IStreamOut'.
+ virtual ndk::ScopedAStatus initInstance(
+ const std::shared_ptr<StreamCommonInterface>& delegate) = 0;
+ virtual const StreamContext& getContext() const = 0;
+ virtual bool isClosed() const = 0;
+ virtual const ConnectedDevices& getConnectedDevices() const = 0;
+ virtual ndk::ScopedAStatus setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) = 0;
};
-class StreamCommon : public BnStreamCommon {
+// This is equivalent to automatically generated 'IStreamCommonDelegator' but uses
+// a weak pointer to avoid creating a reference loop. The loop will occur because
+// 'IStreamIn/Out.getStreamCommon' must return the same instance every time, thus
+// the stream implementation must hold a strong pointer to an instance of 'IStreamCommon'.
+// Also, we use 'StreamCommonInterface' here instead of 'IStreamCommon'.
+class StreamCommonDelegator : public BnStreamCommon {
public:
- explicit StreamCommon(const std::shared_ptr<StreamCommonInterface>& delegate)
+ explicit StreamCommonDelegator(const std::shared_ptr<StreamCommonInterface>& delegate)
: mDelegate(delegate) {}
private:
@@ -361,9 +402,20 @@
std::weak_ptr<StreamCommonInterface> mDelegate;
};
-template <class Metadata>
-class StreamCommonImpl : public StreamCommonInterface {
+// The implementation of DriverInterface must be provided by each concrete stream implementation.
+class StreamCommonImpl : virtual public StreamCommonInterface, virtual public DriverInterface {
public:
+ StreamCommonImpl(const Metadata& metadata, StreamContext&& context,
+ const StreamWorkerInterface::CreateInstance& createWorker)
+ : mMetadata(metadata),
+ mContext(std::move(context)),
+ mWorker(createWorker(mContext, this)) {}
+ StreamCommonImpl(const Metadata& metadata, StreamContext&& context)
+ : StreamCommonImpl(
+ metadata, std::move(context),
+ isInput(metadata) ? getDefaultInWorkerCreator() : getDefaultOutWorkerCreator()) {}
+ ~StreamCommonImpl();
+
ndk::ScopedAStatus close() override;
ndk::ScopedAStatus prepareToClose() override;
ndk::ScopedAStatus updateHwAvSyncId(int32_t in_hwAvSyncId) override;
@@ -378,46 +430,50 @@
const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect)
override;
- ndk::ScopedAStatus getStreamCommon(std::shared_ptr<IStreamCommon>* _aidl_return);
- ndk::ScopedAStatus init() {
- return mWorker->start() ? ndk::ScopedAStatus::ok()
- : ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
- }
- bool isClosed() const { return mWorker->isClosed(); }
- void setIsConnected(
- const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
- mWorker->setIsConnected(!devices.empty());
- mConnectedDevices = devices;
- mDriver->setConnectedDevices(devices);
- }
- ndk::ScopedAStatus updateMetadata(const Metadata& metadata);
+ ndk::ScopedAStatus getStreamCommonCommon(std::shared_ptr<IStreamCommon>* _aidl_return) override;
+ ndk::ScopedAStatus updateMetadataCommon(const Metadata& metadata) override;
+
+ ndk::ScopedAStatus initInstance(
+ const std::shared_ptr<StreamCommonInterface>& delegate) override;
+ const StreamContext& getContext() const override { return mContext; }
+ bool isClosed() const override { return mWorker->isClosed(); }
+ const ConnectedDevices& getConnectedDevices() const override { return mConnectedDevices; }
+ ndk::ScopedAStatus setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices)
+ override;
protected:
- StreamCommonImpl(const Metadata& metadata, StreamContext&& context,
- const DriverInterface::CreateInstance& createDriver,
- const StreamWorkerInterface::CreateInstance& createWorker)
- : mMetadata(metadata),
- mContext(std::move(context)),
- mDriver(createDriver(mContext)),
- mWorker(createWorker(mContext, mDriver.get())) {}
- ~StreamCommonImpl();
- void stopWorker();
- void createStreamCommon(const std::shared_ptr<StreamCommonInterface>& delegate);
+ static StreamWorkerInterface::CreateInstance getDefaultInWorkerCreator() {
+ return [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
+ return new StreamInWorker(ctx, driver);
+ };
+ }
+ static StreamWorkerInterface::CreateInstance getDefaultOutWorkerCreator() {
+ return [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
+ return new StreamOutWorker(ctx, driver);
+ };
+ }
- std::shared_ptr<StreamCommon> mCommon;
- ndk::SpAIBinder mCommonBinder;
+ void stopWorker();
+
Metadata mMetadata;
StreamContext mContext;
- std::unique_ptr<DriverInterface> mDriver;
std::unique_ptr<StreamWorkerInterface> mWorker;
- std::vector<::aidl::android::media::audio::common::AudioDevice> mConnectedDevices;
+ std::shared_ptr<StreamCommonDelegator> mCommon;
+ ndk::SpAIBinder mCommonBinder;
+ ConnectedDevices mConnectedDevices;
};
-class StreamIn : public StreamCommonImpl<::aidl::android::hardware::audio::common::SinkMetadata>,
- public BnStreamIn {
+// Note: 'StreamIn/Out' can not be used on their own. Instead, they must be used for defining
+// concrete input/output stream implementations.
+class StreamIn : virtual public StreamCommonInterface, public BnStreamIn {
+ protected:
ndk::ScopedAStatus getStreamCommon(std::shared_ptr<IStreamCommon>* _aidl_return) override {
- return StreamCommonImpl<::aidl::android::hardware::audio::common::SinkMetadata>::
- getStreamCommon(_aidl_return);
+ return getStreamCommonCommon(_aidl_return);
+ }
+ ndk::ScopedAStatus updateMetadata(const ::aidl::android::hardware::audio::common::SinkMetadata&
+ in_sinkMetadata) override {
+ return updateMetadataCommon(in_sinkMetadata);
}
ndk::ScopedAStatus getActiveMicrophones(
std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return)
@@ -426,49 +482,26 @@
ndk::ScopedAStatus setMicrophoneDirection(MicrophoneDirection in_direction) override;
ndk::ScopedAStatus getMicrophoneFieldDimension(float* _aidl_return) override;
ndk::ScopedAStatus setMicrophoneFieldDimension(float in_zoom) override;
- ndk::ScopedAStatus updateMetadata(const ::aidl::android::hardware::audio::common::SinkMetadata&
- in_sinkMetadata) override {
- return StreamCommonImpl<::aidl::android::hardware::audio::common::SinkMetadata>::
- updateMetadata(in_sinkMetadata);
- }
ndk::ScopedAStatus getHwGain(std::vector<float>* _aidl_return) override;
ndk::ScopedAStatus setHwGain(const std::vector<float>& in_channelGains) override;
- protected:
friend class ndk::SharedRefBase;
- static ndk::ScopedAStatus initInstance(const std::shared_ptr<StreamIn>& stream);
-
- StreamIn(const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
- StreamContext&& context, const DriverInterface::CreateInstance& createDriver,
- const StreamWorkerInterface::CreateInstance& createWorker,
- const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
- void createStreamCommon(const std::shared_ptr<StreamIn>& myPtr) {
- StreamCommonImpl<
- ::aidl::android::hardware::audio::common::SinkMetadata>::createStreamCommon(myPtr);
- }
+ explicit StreamIn(
+ const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
const std::map<::aidl::android::media::audio::common::AudioDevice, std::string> mMicrophones;
-
- public:
- using CreateInstance = std::function<ndk::ScopedAStatus(
- const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
- StreamContext&& context,
- const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
- std::shared_ptr<StreamIn>* result)>;
};
-class StreamOut : public StreamCommonImpl<::aidl::android::hardware::audio::common::SourceMetadata>,
- public BnStreamOut {
+class StreamOut : virtual public StreamCommonInterface, public BnStreamOut {
+ protected:
ndk::ScopedAStatus getStreamCommon(std::shared_ptr<IStreamCommon>* _aidl_return) override {
- return StreamCommonImpl<::aidl::android::hardware::audio::common::SourceMetadata>::
- getStreamCommon(_aidl_return);
+ return getStreamCommonCommon(_aidl_return);
}
ndk::ScopedAStatus updateMetadata(
const ::aidl::android::hardware::audio::common::SourceMetadata& in_sourceMetadata)
override {
- return StreamCommonImpl<::aidl::android::hardware::audio::common::SourceMetadata>::
- updateMetadata(in_sourceMetadata);
+ return updateMetadataCommon(in_sourceMetadata);
}
ndk::ScopedAStatus updateOffloadMetadata(
const ::aidl::android::hardware::audio::common::AudioOffloadMetadata&
@@ -493,34 +526,27 @@
override;
ndk::ScopedAStatus selectPresentation(int32_t in_presentationId, int32_t in_programId) override;
- void createStreamCommon(const std::shared_ptr<StreamOut>& myPtr) {
- StreamCommonImpl<::aidl::android::hardware::audio::common::SourceMetadata>::
- createStreamCommon(myPtr);
- }
-
- protected:
friend class ndk::SharedRefBase;
- static ndk::ScopedAStatus initInstance(const std::shared_ptr<StreamOut>& stream);
-
- StreamOut(const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
- StreamContext&& context, const DriverInterface::CreateInstance& createDriver,
- const StreamWorkerInterface::CreateInstance& createWorker,
- const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
- offloadInfo);
+ explicit StreamOut(const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo);
std::optional<::aidl::android::media::audio::common::AudioOffloadInfo> mOffloadInfo;
std::optional<::aidl::android::hardware::audio::common::AudioOffloadMetadata> mOffloadMetadata;
-
- public:
- using CreateInstance = std::function<ndk::ScopedAStatus(
- const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
- StreamContext&& context,
- const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
- offloadInfo,
- std::shared_ptr<StreamOut>* result)>;
};
+// The recommended way to create a stream instance.
+// 'StreamImpl' is the concrete stream implementation, 'StreamInOrOut' is either 'StreamIn' or
+// 'StreamOut', the rest are the arguments forwarded to the constructor of 'StreamImpl'.
+template <class StreamImpl, class StreamInOrOut, class... Args>
+ndk::ScopedAStatus createStreamInstance(std::shared_ptr<StreamInOrOut>* result, Args&&... args) {
+ std::shared_ptr<StreamInOrOut> stream =
+ ::ndk::SharedRefBase::make<StreamImpl>(std::forward<Args>(args)...);
+ RETURN_STATUS_IF_ERROR(stream->initInstance(stream));
+ *result = std::move(stream);
+ return ndk::ScopedAStatus::ok();
+}
+
class StreamWrapper {
public:
explicit StreamWrapper(const std::shared_ptr<StreamIn>& streamIn)
@@ -529,25 +555,18 @@
: mStream(streamOut), mStreamBinder(streamOut->asBinder()) {}
ndk::SpAIBinder getBinder() const { return mStreamBinder; }
bool isStreamOpen() const {
- return std::visit(
- [](auto&& ws) -> bool {
- auto s = ws.lock();
- return s && !s->isClosed();
- },
- mStream);
+ auto s = mStream.lock();
+ return s && !s->isClosed();
}
- void setStreamIsConnected(
+ ndk::ScopedAStatus setConnectedDevices(
const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
- std::visit(
- [&](auto&& ws) {
- auto s = ws.lock();
- if (s) s->setIsConnected(devices);
- },
- mStream);
+ auto s = mStream.lock();
+ if (s) return s->setConnectedDevices(devices);
+ return ndk::ScopedAStatus::ok();
}
private:
- std::variant<std::weak_ptr<StreamIn>, std::weak_ptr<StreamOut>> mStream;
+ std::weak_ptr<StreamCommonInterface> mStream;
ndk::SpAIBinder mStreamBinder;
};
@@ -565,12 +584,13 @@
mStreams.insert(std::pair{portConfigId, sw});
mStreams.insert(std::pair{portId, std::move(sw)});
}
- void setStreamIsConnected(
+ ndk::ScopedAStatus setStreamConnectedDevices(
int32_t portConfigId,
const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
if (auto it = mStreams.find(portConfigId); it != mStreams.end()) {
- it->second.setStreamIsConnected(devices);
+ return it->second.setConnectedDevices(devices);
}
+ return ndk::ScopedAStatus::ok();
}
private:
diff --git a/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h b/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h
new file mode 100644
index 0000000..2253ec7
--- /dev/null
+++ b/audio/aidl/default/include/core-impl/StreamRemoteSubmix.h
@@ -0,0 +1,98 @@
+/*
+ * 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 <mutex>
+#include <vector>
+
+#include "core-impl/Stream.h"
+#include "r_submix/SubmixRoute.h"
+
+namespace aidl::android::hardware::audio::core {
+
+using aidl::android::hardware::audio::core::r_submix::AudioConfig;
+using aidl::android::hardware::audio::core::r_submix::SubmixRoute;
+
+class StreamRemoteSubmix : public StreamCommonImpl {
+ public:
+ StreamRemoteSubmix(const Metadata& metadata, StreamContext&& context);
+
+ ::android::status_t init() override;
+ ::android::status_t drain(StreamDescriptor::DrainMode) override;
+ ::android::status_t flush() override;
+ ::android::status_t pause() override;
+ ::android::status_t standby() override;
+ ::android::status_t start() override;
+ ::android::status_t transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
+ int32_t* latencyMs) override;
+ void shutdown() override;
+
+ // Overridden methods of 'StreamCommonImpl', called on a Binder thread.
+ ndk::ScopedAStatus prepareToClose() override;
+
+ private:
+ size_t getPipeSizeInFrames();
+ size_t getStreamPipeSizeInFrames();
+ ::android::status_t outWrite(void* buffer, size_t frameCount, size_t* actualFrameCount);
+ ::android::status_t inRead(void* buffer, size_t frameCount, size_t* actualFrameCount);
+
+ const int mPortId;
+ const bool mIsInput;
+ AudioConfig mStreamConfig;
+ std::shared_ptr<SubmixRoute> mCurrentRoute = nullptr;
+
+ // Mutex lock to protect vector of submix routes, each of these submix routes have their mutex
+ // locks and none of the mutex locks should be taken together.
+ static std::mutex sSubmixRoutesLock;
+ static std::map<int32_t, std::shared_ptr<SubmixRoute>> sSubmixRoutes
+ GUARDED_BY(sSubmixRoutesLock);
+
+ // limit for number of read error log entries to avoid spamming the logs
+ static constexpr int kMaxReadErrorLogs = 5;
+ // The duration of kMaxReadFailureAttempts * READ_ATTEMPT_SLEEP_MS must be strictly inferior
+ // to the duration of a record buffer at the current record sample rate (of the device, not of
+ // the recording itself). Here we have: 3 * 5ms = 15ms < 1024 frames * 1000 / 48000 = 21.333ms
+ static constexpr int kMaxReadFailureAttempts = 3;
+ // 5ms between two read attempts when pipe is empty
+ static constexpr int kReadAttemptSleepUs = 5000;
+};
+
+class StreamInRemoteSubmix final : public StreamRemoteSubmix, public StreamIn {
+ public:
+ friend class ndk::SharedRefBase;
+ StreamInRemoteSubmix(
+ const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
+
+ private:
+ ndk::ScopedAStatus getActiveMicrophones(
+ std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return)
+ override;
+};
+
+class StreamOutRemoteSubmix final : public StreamRemoteSubmix, public StreamOut {
+ public:
+ friend class ndk::SharedRefBase;
+ StreamOutRemoteSubmix(
+ const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo);
+};
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/StreamStub.h b/audio/aidl/default/include/core-impl/StreamStub.h
index df0182c..6b1b2dd 100644
--- a/audio/aidl/default/include/core-impl/StreamStub.h
+++ b/audio/aidl/default/include/core-impl/StreamStub.h
@@ -20,36 +20,31 @@
namespace aidl::android::hardware::audio::core {
-class DriverStub : public DriverInterface {
+class StreamStub : public StreamCommonImpl {
public:
- DriverStub(const StreamContext& context, bool isInput);
+ StreamStub(const Metadata& metadata, StreamContext&& context);
+ // Methods of 'DriverInterface'.
::android::status_t init() override;
- ::android::status_t setConnectedDevices(
- const std::vector<::aidl::android::media::audio::common::AudioDevice>& connectedDevices)
- override;
::android::status_t drain(StreamDescriptor::DrainMode) override;
::android::status_t flush() override;
::android::status_t pause() override;
+ ::android::status_t standby() override;
+ ::android::status_t start() override;
::android::status_t transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) override;
- ::android::status_t standby() override;
+ void shutdown() override;
private:
const size_t mFrameSizeBytes;
const int mSampleRate;
const bool mIsAsynchronous;
const bool mIsInput;
+ bool mIsInitialized = false; // Used for validating the state machine logic.
+ bool mIsStandby = true; // Used for validating the state machine logic.
};
-class StreamInStub final : public StreamIn {
+class StreamInStub final : public StreamStub, public StreamIn {
public:
- static ndk::ScopedAStatus createInstance(
- const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
- StreamContext&& context,
- const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
- std::shared_ptr<StreamIn>* result);
-
- private:
friend class ndk::SharedRefBase;
StreamInStub(
const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
@@ -57,16 +52,8 @@
const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
};
-class StreamOutStub final : public StreamOut {
+class StreamOutStub final : public StreamStub, public StreamOut {
public:
- static ndk::ScopedAStatus createInstance(
- const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
- StreamContext&& context,
- const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
- offloadInfo,
- std::shared_ptr<StreamOut>* result);
-
- private:
friend class ndk::SharedRefBase;
StreamOutStub(const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
StreamContext&& context,
diff --git a/audio/aidl/default/include/core-impl/StreamUsb.h b/audio/aidl/default/include/core-impl/StreamUsb.h
index 36e64cb..8c40782 100644
--- a/audio/aidl/default/include/core-impl/StreamUsb.h
+++ b/audio/aidl/default/include/core-impl/StreamUsb.h
@@ -16,7 +16,10 @@
#pragma once
+#include <atomic>
+#include <functional>
#include <mutex>
+#include <optional>
#include <vector>
#include <aidl/android/media/audio/common/AudioChannelLayout.h>
@@ -30,71 +33,64 @@
namespace aidl::android::hardware::audio::core {
-class DriverUsb : public DriverInterface {
+class StreamUsb : public StreamCommonImpl {
public:
- DriverUsb(const StreamContext& context, bool isInput);
+ StreamUsb(const Metadata& metadata, StreamContext&& context);
+ // Methods of 'DriverInterface'.
::android::status_t init() override;
- ::android::status_t setConnectedDevices(
- const std::vector<::aidl::android::media::audio::common::AudioDevice>& connectedDevices)
- override;
::android::status_t drain(StreamDescriptor::DrainMode) override;
::android::status_t flush() override;
::android::status_t pause() override;
+ ::android::status_t standby() override;
+ ::android::status_t start() override;
::android::status_t transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) override;
- ::android::status_t standby() override;
+ void shutdown() override;
+
+ // Overridden methods of 'StreamCommonImpl', called on a Binder thread.
+ const ConnectedDevices& getConnectedDevices() const override;
+ ndk::ScopedAStatus setConnectedDevices(const ConnectedDevices& devices) override;
private:
- ::android::status_t exitStandby();
+ using AlsaDeviceProxyDeleter = std::function<void(alsa_device_proxy*)>;
+ using AlsaDeviceProxy = std::unique_ptr<alsa_device_proxy, AlsaDeviceProxyDeleter>;
- std::mutex mLock;
+ static std::optional<struct pcm_config> maybePopulateConfig(const StreamContext& context,
+ bool isInput);
+
+ mutable std::mutex mLock;
const size_t mFrameSizeBytes;
- std::optional<struct pcm_config> mConfig;
const bool mIsInput;
- // Cached device addresses for connected devices.
- std::vector<::aidl::android::media::audio::common::AudioDeviceAddress> mConnectedDevices
- GUARDED_BY(mLock);
- std::vector<std::shared_ptr<alsa_device_proxy>> mAlsaDeviceProxies GUARDED_BY(mLock);
- bool mIsStandby = true;
+ const std::optional<struct pcm_config> mConfig;
+ std::atomic<bool> mConnectedDevicesUpdated = false;
+ // All fields below are only used on the worker thread.
+ std::vector<AlsaDeviceProxy> mAlsaDeviceProxies;
};
-class StreamInUsb final : public StreamIn {
- ndk::ScopedAStatus getActiveMicrophones(
- std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return)
- override;
-
+class StreamInUsb final : public StreamUsb, public StreamIn {
public:
- static ndk::ScopedAStatus createInstance(
- const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
- StreamContext&& context,
- const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones,
- std::shared_ptr<StreamIn>* result);
-
- private:
friend class ndk::SharedRefBase;
StreamInUsb(
const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
StreamContext&& context,
const std::vector<::aidl::android::media::audio::common::MicrophoneInfo>& microphones);
-};
-
-class StreamOutUsb final : public StreamOut {
- public:
- static ndk::ScopedAStatus createInstance(
- const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
- StreamContext&& context,
- const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
- offloadInfo,
- std::shared_ptr<StreamOut>* result);
private:
+ ndk::ScopedAStatus getActiveMicrophones(
+ std::vector<::aidl::android::media::audio::common::MicrophoneDynamicInfo>* _aidl_return)
+ override;
+};
+
+class StreamOutUsb final : public StreamUsb, public StreamOut {
+ public:
friend class ndk::SharedRefBase;
StreamOutUsb(const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
StreamContext&& context,
const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
offloadInfo);
+ private:
ndk::ScopedAStatus getHwVolume(std::vector<float>* _aidl_return) override;
ndk::ScopedAStatus setHwVolume(const std::vector<float>& in_channelVolumes) override;
diff --git a/audio/aidl/default/include/core-impl/XmlConverter.h b/audio/aidl/default/include/core-impl/XmlConverter.h
index ec23edb..a68a6fd 100644
--- a/audio/aidl/default/include/core-impl/XmlConverter.h
+++ b/audio/aidl/default/include/core-impl/XmlConverter.h
@@ -20,6 +20,7 @@
#include <string>
#include <unordered_map>
+#include <media/AidlConversionUtil.h>
#include <system/audio_config.h>
#include <utils/Errors.h>
@@ -78,7 +79,7 @@
* </Modules>
*/
template <typename W, typename X, typename A>
-static std::vector<A> convertWrappedCollectionToAidl(
+std::vector<A> convertWrappedCollectionToAidlUnchecked(
const std::vector<W>& xsdcWrapperTypeVec,
std::function<const std::vector<X>&(const W&)> getInnerTypeVec,
std::function<A(const X&)> convertToAidl) {
@@ -100,12 +101,12 @@
}
template <typename X, typename A>
-static std::vector<A> convertCollectionToAidl(const std::vector<X>& xsdcTypeVec,
- std::function<A(const X&)> convertToAidl) {
+std::vector<A> convertCollectionToAidlUnchecked(const std::vector<X>& xsdcTypeVec,
+ std::function<A(const X&)> itemConversion) {
std::vector<A> resultAidlTypeVec;
resultAidlTypeVec.reserve(xsdcTypeVec.size());
std::transform(xsdcTypeVec.begin(), xsdcTypeVec.end(), std::back_inserter(resultAidlTypeVec),
- convertToAidl);
+ itemConversion);
return resultAidlTypeVec;
}
@@ -121,8 +122,7 @@
* </Wrapper>
*/
template <typename W, typename R>
-static std::unordered_map<std::string, R> generateReferenceMap(
- const std::vector<W>& xsdcWrapperTypeVec) {
+std::unordered_map<std::string, R> generateReferenceMap(const std::vector<W>& xsdcWrapperTypeVec) {
std::unordered_map<std::string, R> resultMap;
if (!xsdcWrapperTypeVec.empty()) {
/*
diff --git a/audio/aidl/default/main.cpp b/audio/aidl/default/main.cpp
index af71aa8..12c0c4b 100644
--- a/audio/aidl/default/main.cpp
+++ b/audio/aidl/default/main.cpp
@@ -64,6 +64,7 @@
auto modules = {createModule(Module::Type::DEFAULT, "default"),
createModule(Module::Type::R_SUBMIX, "r_submix"),
createModule(Module::Type::USB, "usb")};
+ (void)modules;
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/audio/aidl/default/r_submix/ModuleRemoteSubmix.cpp b/audio/aidl/default/r_submix/ModuleRemoteSubmix.cpp
new file mode 100644
index 0000000..2b79f51
--- /dev/null
+++ b/audio/aidl/default/r_submix/ModuleRemoteSubmix.cpp
@@ -0,0 +1,125 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "AHAL_ModuleRemoteSubmix"
+
+#include <vector>
+
+#include <android-base/logging.h>
+
+#include "RemoteSubmixUtils.h"
+#include "core-impl/ModuleRemoteSubmix.h"
+#include "core-impl/StreamRemoteSubmix.h"
+
+using aidl::android::hardware::audio::common::SinkMetadata;
+using aidl::android::hardware::audio::common::SourceMetadata;
+using aidl::android::media::audio::common::AudioOffloadInfo;
+using aidl::android::media::audio::common::AudioPort;
+using aidl::android::media::audio::common::AudioPortConfig;
+using aidl::android::media::audio::common::MicrophoneInfo;
+
+namespace aidl::android::hardware::audio::core {
+
+ndk::ScopedAStatus ModuleRemoteSubmix::getTelephony(std::shared_ptr<ITelephony>* _aidl_return) {
+ *_aidl_return = nullptr;
+ LOG(DEBUG) << __func__ << ": returning null";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) {
+ *_aidl_return = nullptr;
+ LOG(DEBUG) << __func__ << ": returning null";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::getMicMute(bool* _aidl_return __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::setMicMute(bool in_mute __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::createInputStream(
+ const SinkMetadata& sinkMetadata, StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones, std::shared_ptr<StreamIn>* result) {
+ return createStreamInstance<StreamInRemoteSubmix>(result, sinkMetadata, std::move(context),
+ microphones);
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::createOutputStream(
+ const SourceMetadata& sourceMetadata, StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo, std::shared_ptr<StreamOut>* result) {
+ return createStreamInstance<StreamOutRemoteSubmix>(result, sourceMetadata, std::move(context),
+ offloadInfo);
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::populateConnectedDevicePort(AudioPort* audioPort) {
+ LOG(VERBOSE) << __func__ << ": Profiles already populated by Configuration";
+ for (auto profile : audioPort->profiles) {
+ for (auto channelMask : profile.channelMasks) {
+ if (!r_submix::isChannelMaskSupported(channelMask)) {
+ LOG(ERROR) << __func__ << ": the profile " << profile.name
+ << " has unsupported channel mask : " << channelMask.toString();
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ }
+ for (auto sampleRate : profile.sampleRates) {
+ if (!r_submix::isSampleRateSupported(sampleRate)) {
+ LOG(ERROR) << __func__ << ": the profile " << profile.name
+ << " has unsupported sample rate : " << sampleRate;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::checkAudioPatchEndpointsMatch(
+ const std::vector<AudioPortConfig*>& sources, const std::vector<AudioPortConfig*>& sinks) {
+ for (const auto& source : sources) {
+ for (const auto& sink : sinks) {
+ if (source->sampleRate != sink->sampleRate ||
+ source->channelMask != sink->channelMask || source->format != sink->format) {
+ LOG(ERROR) << __func__
+ << ": mismatch port configuration, source=" << source->toString()
+ << ", sink=" << sink->toString();
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+void ModuleRemoteSubmix::onExternalDeviceConnectionChanged(
+ const ::aidl::android::media::audio::common::AudioPort& audioPort __unused,
+ bool connected __unused) {
+ LOG(DEBUG) << __func__ << ": do nothing and return";
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::onMasterMuteChanged(bool __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleRemoteSubmix::onMasterVolumeChanged(float __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/r_submix/RemoteSubmixUtils.cpp b/audio/aidl/default/r_submix/RemoteSubmixUtils.cpp
new file mode 100644
index 0000000..2f5d17d
--- /dev/null
+++ b/audio/aidl/default/r_submix/RemoteSubmixUtils.cpp
@@ -0,0 +1,47 @@
+/*
+ * 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 <vector>
+
+#include "RemoteSubmixUtils.h"
+
+namespace aidl::android::hardware::audio::core::r_submix {
+
+bool isChannelMaskSupported(const AudioChannelLayout& channelMask) {
+ const static std::vector<AudioChannelLayout> kSupportedChannelMask = {
+ AudioChannelLayout::make<AudioChannelLayout::Tag::layoutMask>(
+ AudioChannelLayout::LAYOUT_MONO),
+ AudioChannelLayout::make<AudioChannelLayout::Tag::layoutMask>(
+ AudioChannelLayout::LAYOUT_STEREO)};
+
+ if (std::find(kSupportedChannelMask.begin(), kSupportedChannelMask.end(), channelMask) !=
+ kSupportedChannelMask.end()) {
+ return true;
+ }
+ return false;
+}
+
+bool isSampleRateSupported(int sampleRate) {
+ const static std::vector<int> kSupportedSampleRates = {8000, 11025, 12000, 16000, 22050,
+ 24000, 32000, 44100, 48000};
+
+ if (std::find(kSupportedSampleRates.begin(), kSupportedSampleRates.end(), sampleRate) !=
+ kSupportedSampleRates.end()) {
+ return true;
+ }
+ return false;
+}
+
+} // namespace aidl::android::hardware::audio::core::r_submix
diff --git a/audio/aidl/default/r_submix/RemoteSubmixUtils.h b/audio/aidl/default/r_submix/RemoteSubmixUtils.h
new file mode 100644
index 0000000..952a992
--- /dev/null
+++ b/audio/aidl/default/r_submix/RemoteSubmixUtils.h
@@ -0,0 +1,30 @@
+/*
+ * 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/media/audio/common/AudioChannelLayout.h>
+#include <aidl/android/media/audio/common/AudioFormatDescription.h>
+
+using aidl::android::media::audio::common::AudioChannelLayout;
+
+namespace aidl::android::hardware::audio::core::r_submix {
+
+bool isChannelMaskSupported(const AudioChannelLayout& channelMask);
+
+bool isSampleRateSupported(int sampleRate);
+
+} // namespace aidl::android::hardware::audio::core::r_submix
diff --git a/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp b/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp
new file mode 100644
index 0000000..5af0d91
--- /dev/null
+++ b/audio/aidl/default/r_submix/StreamRemoteSubmix.cpp
@@ -0,0 +1,352 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "AHAL_StreamRemoteSubmix"
+#include <android-base/logging.h>
+
+#include <cmath>
+
+#include "core-impl/StreamRemoteSubmix.h"
+
+using aidl::android::hardware::audio::common::SinkMetadata;
+using aidl::android::hardware::audio::common::SourceMetadata;
+using aidl::android::media::audio::common::AudioOffloadInfo;
+using aidl::android::media::audio::common::MicrophoneDynamicInfo;
+using aidl::android::media::audio::common::MicrophoneInfo;
+
+namespace aidl::android::hardware::audio::core {
+
+StreamRemoteSubmix::StreamRemoteSubmix(const Metadata& metadata, StreamContext&& context)
+ : StreamCommonImpl(metadata, std::move(context)),
+ mPortId(context.getPortId()),
+ mIsInput(isInput(metadata)) {
+ mStreamConfig.frameSize = context.getFrameSize();
+ mStreamConfig.format = context.getFormat();
+ mStreamConfig.channelLayout = context.getChannelLayout();
+ mStreamConfig.sampleRate = context.getSampleRate();
+}
+
+std::mutex StreamRemoteSubmix::sSubmixRoutesLock;
+std::map<int32_t, std::shared_ptr<SubmixRoute>> StreamRemoteSubmix::sSubmixRoutes;
+
+::android::status_t StreamRemoteSubmix::init() {
+ {
+ std::lock_guard guard(sSubmixRoutesLock);
+ if (sSubmixRoutes.find(mPortId) != sSubmixRoutes.end()) {
+ mCurrentRoute = sSubmixRoutes[mPortId];
+ }
+ }
+ // If route is not available for this port, add it.
+ if (mCurrentRoute == nullptr) {
+ // Initialize the pipe.
+ mCurrentRoute = std::make_shared<SubmixRoute>();
+ if (::android::OK != mCurrentRoute->createPipe(mStreamConfig)) {
+ LOG(ERROR) << __func__ << ": create pipe failed";
+ return ::android::NO_INIT;
+ }
+ {
+ std::lock_guard guard(sSubmixRoutesLock);
+ sSubmixRoutes.emplace(mPortId, mCurrentRoute);
+ }
+ } else {
+ if (!mCurrentRoute->isStreamConfigValid(mIsInput, mStreamConfig)) {
+ LOG(ERROR) << __func__ << ": invalid stream config";
+ return ::android::NO_INIT;
+ }
+ sp<MonoPipe> sink = mCurrentRoute->getSink();
+ if (sink == nullptr) {
+ LOG(ERROR) << __func__ << ": nullptr sink when opening stream";
+ return ::android::NO_INIT;
+ }
+ // If the sink has been shutdown or pipe recreation is forced, delete the pipe and
+ // recreate it.
+ if (sink->isShutdown()) {
+ LOG(DEBUG) << __func__ << ": Non-nullptr shut down sink when opening stream";
+ if (::android::OK != mCurrentRoute->resetPipe()) {
+ LOG(ERROR) << __func__ << ": reset pipe failed";
+ return ::android::NO_INIT;
+ }
+ }
+ }
+
+ mCurrentRoute->openStream(mIsInput);
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::drain(StreamDescriptor::DrainMode) {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::flush() {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::pause() {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::standby() {
+ mCurrentRoute->standby(mIsInput);
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::start() {
+ mCurrentRoute->exitStandby(mIsInput);
+ return ::android::OK;
+}
+
+ndk::ScopedAStatus StreamRemoteSubmix::prepareToClose() {
+ if (!mIsInput) {
+ std::shared_ptr<SubmixRoute> route = nullptr;
+ {
+ std::lock_guard guard(sSubmixRoutesLock);
+ if (sSubmixRoutes.find(mPortId) != sSubmixRoutes.end()) {
+ route = sSubmixRoutes[mPortId];
+ }
+ }
+ if (route != nullptr) {
+ sp<MonoPipe> sink = route->getSink();
+ if (sink == nullptr) {
+ ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ LOG(DEBUG) << __func__ << ": shutting down MonoPipe sink";
+
+ sink->shutdown(true);
+ } else {
+ LOG(DEBUG) << __func__ << ": stream already closed.";
+ ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+// Remove references to the specified input and output streams. When the device no longer
+// references input and output streams destroy the associated pipe.
+void StreamRemoteSubmix::shutdown() {
+ mCurrentRoute->closeStream(mIsInput);
+ // If all stream instances are closed, we can remove route information for this port.
+ if (!mCurrentRoute->hasAtleastOneStreamOpen()) {
+ mCurrentRoute->releasePipe();
+ LOG(DEBUG) << __func__ << ": pipe destroyed";
+
+ std::lock_guard guard(sSubmixRoutesLock);
+ sSubmixRoutes.erase(mPortId);
+ }
+ mCurrentRoute.reset();
+}
+
+::android::status_t StreamRemoteSubmix::transfer(void* buffer, size_t frameCount,
+ size_t* actualFrameCount, int32_t* latencyMs) {
+ *latencyMs = (getStreamPipeSizeInFrames() * MILLIS_PER_SECOND) / mStreamConfig.sampleRate;
+ LOG(VERBOSE) << __func__ << ": Latency " << *latencyMs << "ms";
+
+ sp<MonoPipe> sink = mCurrentRoute->getSink();
+ if (sink != nullptr) {
+ if (sink->isShutdown()) {
+ sink.clear();
+ LOG(VERBOSE) << __func__ << ": pipe shutdown, ignoring the transfer.";
+ // the pipe has already been shutdown, this buffer will be lost but we must simulate
+ // timing so we don't drain the output faster than realtime
+ const size_t delayUs = static_cast<size_t>(
+ std::roundf(frameCount * MICROS_PER_SECOND / mStreamConfig.sampleRate));
+ usleep(delayUs);
+
+ *actualFrameCount = frameCount;
+ return ::android::OK;
+ }
+ } else {
+ LOG(ERROR) << __func__ << ": transfer without a pipe!";
+ return ::android::UNEXPECTED_NULL;
+ }
+
+ return (mIsInput ? inRead(buffer, frameCount, actualFrameCount)
+ : outWrite(buffer, frameCount, actualFrameCount));
+}
+
+// Calculate the maximum size of the pipe buffer in frames for the specified stream.
+size_t StreamRemoteSubmix::getStreamPipeSizeInFrames() {
+ auto pipeConfig = mCurrentRoute->mPipeConfig;
+ const size_t maxFrameSize = std::max(mStreamConfig.frameSize, pipeConfig.frameSize);
+ return (pipeConfig.frameCount * pipeConfig.frameSize) / maxFrameSize;
+}
+
+::android::status_t StreamRemoteSubmix::outWrite(void* buffer, size_t frameCount,
+ size_t* actualFrameCount) {
+ sp<MonoPipe> sink = mCurrentRoute->getSink();
+ if (sink != nullptr) {
+ if (sink->isShutdown()) {
+ sink.clear();
+ LOG(VERBOSE) << __func__ << ": pipe shutdown, ignoring the write.";
+ // the pipe has already been shutdown, this buffer will be lost but we must
+ // simulate timing so we don't drain the output faster than realtime
+ const size_t delayUs = static_cast<size_t>(
+ std::roundf(frameCount * MICROS_PER_SECOND / mStreamConfig.sampleRate));
+ usleep(delayUs);
+ *actualFrameCount = frameCount;
+ return ::android::OK;
+ }
+ } else {
+ LOG(FATAL) << __func__ << ": without a pipe!";
+ return ::android::UNKNOWN_ERROR;
+ }
+
+ const size_t availableToWrite = sink->availableToWrite();
+ // NOTE: sink has been checked above and sink and source life cycles are synchronized
+ sp<MonoPipeReader> source = mCurrentRoute->getSource();
+ // If the write to the sink should be blocked, flush enough frames from the pipe to make space
+ // to write the most recent data.
+ if (!mCurrentRoute->shouldBlockWrite() && availableToWrite < frameCount) {
+ static uint8_t flushBuffer[64];
+ const size_t flushBufferSizeFrames = sizeof(flushBuffer) / mStreamConfig.frameSize;
+ size_t framesToFlushFromSource = frameCount - availableToWrite;
+ LOG(VERBOSE) << __func__ << ": flushing " << framesToFlushFromSource
+ << " frames from the pipe to avoid blocking";
+ while (framesToFlushFromSource) {
+ const size_t flushSize = std::min(framesToFlushFromSource, flushBufferSizeFrames);
+ framesToFlushFromSource -= flushSize;
+ // read does not block
+ source->read(flushBuffer, flushSize);
+ }
+ }
+
+ ssize_t writtenFrames = sink->write(buffer, frameCount);
+ if (writtenFrames < 0) {
+ if (writtenFrames == (ssize_t)::android::NEGOTIATE) {
+ LOG(ERROR) << __func__ << ": write to pipe returned NEGOTIATE";
+ sink.clear();
+ *actualFrameCount = 0;
+ return ::android::UNKNOWN_ERROR;
+ } else {
+ // write() returned UNDERRUN or WOULD_BLOCK, retry
+ LOG(ERROR) << __func__ << ": write to pipe returned unexpected " << writtenFrames;
+ writtenFrames = sink->write(buffer, frameCount);
+ }
+ }
+ sink.clear();
+
+ if (writtenFrames < 0) {
+ LOG(ERROR) << __func__ << ": failed writing to pipe with " << writtenFrames;
+ *actualFrameCount = 0;
+ return ::android::UNKNOWN_ERROR;
+ }
+ LOG(VERBOSE) << __func__ << ": wrote " << writtenFrames << "frames";
+ *actualFrameCount = writtenFrames;
+ return ::android::OK;
+}
+
+::android::status_t StreamRemoteSubmix::inRead(void* buffer, size_t frameCount,
+ size_t* actualFrameCount) {
+ // about to read from audio source
+ sp<MonoPipeReader> source = mCurrentRoute->getSource();
+ if (source == nullptr) {
+ int readErrorCount = mCurrentRoute->notifyReadError();
+ if (readErrorCount < kMaxReadErrorLogs) {
+ LOG(ERROR)
+ << __func__
+ << ": no audio pipe yet we're trying to read! (not all errors will be logged)";
+ } else {
+ LOG(ERROR) << __func__ << ": Read errors " << readErrorCount;
+ }
+ const size_t delayUs = static_cast<size_t>(
+ std::roundf(frameCount * MICROS_PER_SECOND / mStreamConfig.sampleRate));
+ usleep(delayUs);
+ memset(buffer, 0, mStreamConfig.frameSize * frameCount);
+ *actualFrameCount = frameCount;
+ return ::android::OK;
+ }
+
+ // read the data from the pipe
+ int attempts = 0;
+ const size_t delayUs = static_cast<size_t>(std::roundf(kReadAttemptSleepUs));
+ char* buff = (char*)buffer;
+ size_t remainingFrames = frameCount;
+
+ while ((remainingFrames > 0) && (attempts < kMaxReadFailureAttempts)) {
+ LOG(VERBOSE) << __func__ << ": frames available to read " << source->availableToRead();
+
+ ssize_t framesRead = source->read(buff, remainingFrames);
+
+ LOG(VERBOSE) << __func__ << ": frames read " << framesRead;
+
+ if (framesRead > 0) {
+ remainingFrames -= framesRead;
+ buff += framesRead * mStreamConfig.frameSize;
+ LOG(VERBOSE) << __func__ << ": (attempts = " << attempts << ") got " << framesRead
+ << " frames, remaining=" << remainingFrames;
+ } else {
+ attempts++;
+ LOG(WARNING) << __func__ << ": read returned " << framesRead
+ << " , read failure attempts = " << attempts;
+ usleep(delayUs);
+ }
+ }
+ // done using the source
+ source.clear();
+
+ if (remainingFrames > 0) {
+ const size_t remainingBytes = remainingFrames * mStreamConfig.frameSize;
+ LOG(VERBOSE) << __func__ << ": clearing remaining_frames = " << remainingFrames;
+ memset(((char*)buffer) + (mStreamConfig.frameSize * frameCount) - remainingBytes, 0,
+ remainingBytes);
+ }
+
+ long readCounterFrames = mCurrentRoute->updateReadCounterFrames(frameCount);
+ *actualFrameCount = frameCount;
+
+ // compute how much we need to sleep after reading the data by comparing the wall clock with
+ // the projected time at which we should return.
+ // wall clock after reading from the pipe
+ auto recordDurationUs = std::chrono::steady_clock::now() - mCurrentRoute->getRecordStartTime();
+
+ // readCounterFrames contains the number of frames that have been read since the beginning of
+ // recording (including this call): it's converted to usec and compared to how long we've been
+ // recording for, which gives us how long we must wait to sync the projected recording time, and
+ // the observed recording time.
+ static constexpr float kScaleFactor = .8f;
+ const size_t projectedVsObservedOffsetUs =
+ kScaleFactor * (static_cast<size_t>(std::roundf((readCounterFrames * MICROS_PER_SECOND /
+ mStreamConfig.sampleRate) -
+ recordDurationUs.count())));
+
+ LOG(VERBOSE) << __func__ << ": record duration " << recordDurationUs.count()
+ << " microseconds, will wait: " << projectedVsObservedOffsetUs << " microseconds";
+ if (projectedVsObservedOffsetUs > 0) {
+ usleep(projectedVsObservedOffsetUs);
+ }
+ return ::android::OK;
+}
+
+StreamInRemoteSubmix::StreamInRemoteSubmix(const SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones)
+ : StreamRemoteSubmix(sinkMetadata, std::move(context)), StreamIn(microphones) {}
+
+ndk::ScopedAStatus StreamInRemoteSubmix::getActiveMicrophones(
+ std::vector<MicrophoneDynamicInfo>* _aidl_return) {
+ LOG(DEBUG) << __func__ << ": not supported";
+ *_aidl_return = std::vector<MicrophoneDynamicInfo>();
+ return ndk::ScopedAStatus::ok();
+}
+
+StreamOutRemoteSubmix::StreamOutRemoteSubmix(const SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo)
+ : StreamRemoteSubmix(sourceMetadata, std::move(context)), StreamOut(offloadInfo) {}
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/r_submix/SubmixRoute.cpp b/audio/aidl/default/r_submix/SubmixRoute.cpp
new file mode 100644
index 0000000..8f5b8cb
--- /dev/null
+++ b/audio/aidl/default/r_submix/SubmixRoute.cpp
@@ -0,0 +1,230 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "AHAL_SubmixRoute"
+#include <android-base/logging.h>
+#include <media/AidlConversionCppNdk.h>
+
+#include <Utils.h>
+
+#include "SubmixRoute.h"
+
+using aidl::android::hardware::audio::common::getChannelCount;
+
+namespace aidl::android::hardware::audio::core::r_submix {
+
+// Verify a submix input or output stream can be opened.
+bool SubmixRoute::isStreamConfigValid(bool isInput, const AudioConfig streamConfig) {
+ // If the stream is already open, don't open it again.
+ // ENABLE_LEGACY_INPUT_OPEN is default behaviour
+ if (!isInput && isStreamOutOpen()) {
+ LOG(ERROR) << __func__ << ": output stream already open.";
+ return false;
+ }
+ // If either stream is open, verify the existing pipe config matches the stream config.
+ if (hasAtleastOneStreamOpen() && !isStreamConfigCompatible(streamConfig)) {
+ return false;
+ }
+ return true;
+}
+
+// Compare this stream config with existing pipe config, returning false if they do *not*
+// match, true otherwise.
+bool SubmixRoute::isStreamConfigCompatible(const AudioConfig streamConfig) {
+ if (streamConfig.channelLayout != mPipeConfig.channelLayout) {
+ LOG(ERROR) << __func__ << ": channel count mismatch, stream channels = "
+ << streamConfig.channelLayout.toString()
+ << " pipe config channels = " << mPipeConfig.channelLayout.toString();
+ return false;
+ }
+ if (streamConfig.sampleRate != mPipeConfig.sampleRate) {
+ LOG(ERROR) << __func__
+ << ": sample rate mismatch, stream sample rate = " << streamConfig.sampleRate
+ << " pipe config sample rate = " << mPipeConfig.sampleRate;
+ return false;
+ }
+ if (streamConfig.format != mPipeConfig.format) {
+ LOG(ERROR) << __func__
+ << ": format mismatch, stream format = " << streamConfig.format.toString()
+ << " pipe config format = " << mPipeConfig.format.toString();
+ return false;
+ }
+ return true;
+}
+
+bool SubmixRoute::hasAtleastOneStreamOpen() {
+ std::lock_guard guard(mLock);
+ return (mStreamInOpen || mStreamOutOpen);
+}
+
+// We DO NOT block if:
+// - no peer input stream is present
+// - the peer input is in standby AFTER having been active.
+// We DO block if:
+// - the input was never activated to avoid discarding first frames in the pipe in case capture
+// start was delayed
+bool SubmixRoute::shouldBlockWrite() {
+ std::lock_guard guard(mLock);
+ return (mStreamInOpen || (mStreamInStandby && (mReadCounterFrames != 0)));
+}
+
+int SubmixRoute::notifyReadError() {
+ std::lock_guard guard(mLock);
+ return ++mReadErrorCount;
+}
+
+long SubmixRoute::updateReadCounterFrames(size_t frameCount) {
+ std::lock_guard guard(mLock);
+ mReadCounterFrames += frameCount;
+ return mReadCounterFrames;
+}
+
+void SubmixRoute::openStream(bool isInput) {
+ std::lock_guard guard(mLock);
+ if (isInput) {
+ if (mStreamInOpen) {
+ mInputRefCount++;
+ } else {
+ mInputRefCount = 1;
+ mStreamInOpen = true;
+ }
+ mStreamInStandby = true;
+ mReadCounterFrames = 0;
+ mReadErrorCount = 0;
+ } else {
+ mStreamOutOpen = true;
+ }
+}
+
+void SubmixRoute::closeStream(bool isInput) {
+ std::lock_guard guard(mLock);
+ if (isInput) {
+ mInputRefCount--;
+ if (mInputRefCount == 0) {
+ mStreamInOpen = false;
+ if (mSink != nullptr) {
+ mSink->shutdown(true);
+ }
+ }
+ } else {
+ mStreamOutOpen = false;
+ }
+}
+
+// If SubmixRoute doesn't exist for a port, create a pipe for the submix audio device of size
+// buffer_size_frames and store config of the submix audio device.
+::android::status_t SubmixRoute::createPipe(const AudioConfig streamConfig) {
+ const int channelCount = getChannelCount(streamConfig.channelLayout);
+ const audio_format_t audioFormat = VALUE_OR_RETURN_STATUS(
+ aidl2legacy_AudioFormatDescription_audio_format_t(streamConfig.format));
+ const ::android::NBAIO_Format format =
+ ::android::Format_from_SR_C(streamConfig.sampleRate, channelCount, audioFormat);
+ const ::android::NBAIO_Format offers[1] = {format};
+ size_t numCounterOffers = 0;
+
+ const size_t pipeSizeInFrames =
+ r_submix::kDefaultPipeSizeInFrames *
+ ((float)streamConfig.sampleRate / r_submix::kDefaultSampleRateHz);
+ LOG(VERBOSE) << __func__ << ": creating pipe, rate : " << streamConfig.sampleRate
+ << ", pipe size : " << pipeSizeInFrames;
+
+ // Create a MonoPipe with optional blocking set to true.
+ sp<MonoPipe> sink = sp<MonoPipe>::make(pipeSizeInFrames, format, true /*writeCanBlock*/);
+ if (sink == nullptr) {
+ LOG(FATAL) << __func__ << ": sink is null";
+ return ::android::UNEXPECTED_NULL;
+ }
+
+ // Negotiation between the source and sink cannot fail as the device open operation
+ // creates both ends of the pipe using the same audio format.
+ ssize_t index = sink->negotiate(offers, 1, nullptr, numCounterOffers);
+ if (index != 0) {
+ LOG(FATAL) << __func__ << ": Negotiation for the sink failed, index = " << index;
+ return ::android::BAD_INDEX;
+ }
+ sp<MonoPipeReader> source = sp<MonoPipeReader>::make(sink.get());
+ if (source == nullptr) {
+ LOG(FATAL) << __func__ << ": source is null";
+ return ::android::UNEXPECTED_NULL;
+ }
+ numCounterOffers = 0;
+ index = source->negotiate(offers, 1, nullptr, numCounterOffers);
+ if (index != 0) {
+ LOG(FATAL) << __func__ << ": Negotiation for the source failed, index = " << index;
+ return ::android::BAD_INDEX;
+ }
+ LOG(VERBOSE) << __func__ << ": created pipe";
+
+ mPipeConfig = streamConfig;
+ mPipeConfig.frameCount = sink->maxFrames();
+
+ LOG(VERBOSE) << __func__ << ": Pipe frame size : " << mPipeConfig.frameSize
+ << ", pipe frames : " << mPipeConfig.frameCount;
+
+ // Save references to the source and sink.
+ {
+ std::lock_guard guard(mLock);
+ mSink = std::move(sink);
+ mSource = std::move(source);
+ }
+
+ return ::android::OK;
+}
+
+// Release references to the sink and source.
+void SubmixRoute::releasePipe() {
+ std::lock_guard guard(mLock);
+ mSink.clear();
+ mSource.clear();
+}
+
+::android::status_t SubmixRoute::resetPipe() {
+ releasePipe();
+ return createPipe(mPipeConfig);
+}
+
+void SubmixRoute::standby(bool isInput) {
+ std::lock_guard guard(mLock);
+
+ if (isInput) {
+ mStreamInStandby = true;
+ } else {
+ mStreamOutStandby = true;
+ mStreamOutStandbyTransition = !mStreamOutStandbyTransition;
+ }
+}
+
+void SubmixRoute::exitStandby(bool isInput) {
+ std::lock_guard guard(mLock);
+
+ if (isInput) {
+ if (mStreamInStandby || mStreamOutStandbyTransition) {
+ mStreamInStandby = false;
+ mStreamOutStandbyTransition = false;
+ // keep track of when we exit input standby (== first read == start "real recording")
+ // or when we start recording silence, and reset projected time
+ mRecordStartTime = std::chrono::steady_clock::now();
+ mReadCounterFrames = 0;
+ }
+ } else {
+ if (mStreamOutStandby) {
+ mStreamOutStandby = false;
+ mStreamOutStandbyTransition = true;
+ }
+ }
+}
+
+} // namespace aidl::android::hardware::audio::core::r_submix
diff --git a/audio/aidl/default/r_submix/SubmixRoute.h b/audio/aidl/default/r_submix/SubmixRoute.h
new file mode 100644
index 0000000..5f7ea75
--- /dev/null
+++ b/audio/aidl/default/r_submix/SubmixRoute.h
@@ -0,0 +1,138 @@
+/*
+ * 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 <mutex>
+
+#include <audio_utils/clock.h>
+
+#include <media/nbaio/MonoPipe.h>
+#include <media/nbaio/MonoPipeReader.h>
+
+#include <aidl/android/media/audio/common/AudioChannelLayout.h>
+
+#include "core-impl/Stream.h"
+
+using aidl::android::media::audio::common::AudioChannelLayout;
+using aidl::android::media::audio::common::AudioFormatDescription;
+using aidl::android::media::audio::common::AudioFormatType;
+using aidl::android::media::audio::common::PcmType;
+using ::android::MonoPipe;
+using ::android::MonoPipeReader;
+using ::android::sp;
+
+namespace aidl::android::hardware::audio::core::r_submix {
+
+static constexpr int kDefaultSampleRateHz = 48000;
+// Size at default sample rate
+// NOTE: This value will be rounded up to the nearest power of 2 by MonoPipe().
+static constexpr int kDefaultPipeSizeInFrames = (1024 * 4);
+
+// Configuration of the audio stream.
+struct AudioConfig {
+ int sampleRate = kDefaultSampleRateHz;
+ AudioFormatDescription format =
+ AudioFormatDescription{.type = AudioFormatType::PCM, .pcm = PcmType::INT_16_BIT};
+ AudioChannelLayout channelLayout =
+ AudioChannelLayout::make<AudioChannelLayout::Tag::layoutMask>(
+ AudioChannelLayout::LAYOUT_STEREO);
+ size_t frameSize;
+ size_t frameCount;
+};
+
+class SubmixRoute {
+ public:
+ AudioConfig mPipeConfig;
+
+ bool isStreamInOpen() {
+ std::lock_guard guard(mLock);
+ return mStreamInOpen;
+ }
+ bool getStreamInStandby() {
+ std::lock_guard guard(mLock);
+ return mStreamInStandby;
+ }
+ bool isStreamOutOpen() {
+ std::lock_guard guard(mLock);
+ return mStreamOutOpen;
+ }
+ bool getStreamOutStandby() {
+ std::lock_guard guard(mLock);
+ return mStreamOutStandby;
+ }
+ long getReadCounterFrames() {
+ std::lock_guard guard(mLock);
+ return mReadCounterFrames;
+ }
+ int getReadErrorCount() {
+ std::lock_guard guard(mLock);
+ return mReadErrorCount;
+ }
+ std::chrono::time_point<std::chrono::steady_clock> getRecordStartTime() {
+ std::lock_guard guard(mLock);
+ return mRecordStartTime;
+ }
+ sp<MonoPipe> getSink() {
+ std::lock_guard guard(mLock);
+ return mSink;
+ }
+ sp<MonoPipeReader> getSource() {
+ std::lock_guard guard(mLock);
+ return mSource;
+ }
+
+ bool isStreamConfigValid(bool isInput, const AudioConfig streamConfig);
+ void closeStream(bool isInput);
+ ::android::status_t createPipe(const AudioConfig streamConfig);
+ void exitStandby(bool isInput);
+ bool hasAtleastOneStreamOpen();
+ int notifyReadError();
+ void openStream(bool isInput);
+ void releasePipe();
+ ::android::status_t resetPipe();
+ bool shouldBlockWrite();
+ void standby(bool isInput);
+ long updateReadCounterFrames(size_t frameCount);
+
+ private:
+ bool isStreamConfigCompatible(const AudioConfig streamConfig);
+
+ std::mutex mLock;
+
+ bool mStreamInOpen GUARDED_BY(mLock) = false;
+ int mInputRefCount GUARDED_BY(mLock) = 0;
+ bool mStreamInStandby GUARDED_BY(mLock) = true;
+ bool mStreamOutStandbyTransition GUARDED_BY(mLock) = false;
+ bool mStreamOutOpen GUARDED_BY(mLock) = false;
+ bool mStreamOutStandby GUARDED_BY(mLock) = true;
+ // how many frames have been requested to be read since standby
+ long mReadCounterFrames GUARDED_BY(mLock) = 0;
+ int mReadErrorCount GUARDED_BY(mLock) = 0;
+ // wall clock when recording starts
+ std::chrono::time_point<std::chrono::steady_clock> mRecordStartTime GUARDED_BY(mLock);
+
+ // Pipe variables: they handle the ring buffer that "pipes" audio:
+ // - from the submix virtual audio output == what needs to be played
+ // remotely, seen as an output for the client
+ // - to the virtual audio source == what is captured by the component
+ // which "records" the submix / virtual audio source, and handles it as needed.
+ // A usecase example is one where the component capturing the audio is then sending it over
+ // Wifi for presentation on a remote Wifi Display device (e.g. a dongle attached to a TV, or a
+ // TV with Wifi Display capabilities), or to a wireless audio player.
+ sp<MonoPipe> mSink GUARDED_BY(mLock);
+ sp<MonoPipeReader> mSource GUARDED_BY(mLock);
+};
+
+} // namespace aidl::android::hardware::audio::core::r_submix
diff --git a/audio/aidl/default/tests/AudioPolicyConfigXmlConverterTest.cpp b/audio/aidl/default/tests/AudioPolicyConfigXmlConverterTest.cpp
new file mode 100644
index 0000000..572bc5a
--- /dev/null
+++ b/audio/aidl/default/tests/AudioPolicyConfigXmlConverterTest.cpp
@@ -0,0 +1,50 @@
+/*
+ * 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 <memory>
+// #include <string>
+// #include <vector>
+
+#include <android-base/macros.h>
+#include <gtest/gtest.h>
+#define LOG_TAG "AudioPolicyConfigXmlConverterTest"
+#include <log/log.h>
+
+#include <core-impl/AudioPolicyConfigXmlConverter.h>
+#include <media/AidlConversionCppNdk.h>
+
+using aidl::android::hardware::audio::core::internal::AudioPolicyConfigXmlConverter;
+using aidl::android::media::audio::common::AudioFormatDescription;
+
+namespace {
+
+void ValidateAudioFormatDescription(const AudioFormatDescription& format) {
+ auto conv = ::aidl::android::aidl2legacy_AudioFormatDescription_audio_format_t(format);
+ ASSERT_TRUE(conv.ok()) << format.toString();
+}
+
+} // namespace
+
+TEST(AudioPolicyConfigXmlConverterTest, DefaultSurroundSoundConfigIsValid) {
+ auto config = AudioPolicyConfigXmlConverter::getDefaultSurroundSoundConfig();
+ for (const auto& family : config.formatFamilies) {
+ EXPECT_NO_FATAL_FAILURE(ValidateAudioFormatDescription(family.primaryFormat));
+ SCOPED_TRACE(family.primaryFormat.toString());
+ for (const auto& sub : family.subFormats) {
+ EXPECT_NO_FATAL_FAILURE(ValidateAudioFormatDescription(sub));
+ }
+ }
+}
diff --git a/audio/aidl/default/usb/ModuleUsb.cpp b/audio/aidl/default/usb/ModuleUsb.cpp
index ecdbd5c..5c9d477 100644
--- a/audio/aidl/default/usb/ModuleUsb.cpp
+++ b/audio/aidl/default/usb/ModuleUsb.cpp
@@ -25,22 +25,27 @@
#include "UsbAlsaMixerControl.h"
#include "UsbAlsaUtils.h"
#include "core-impl/ModuleUsb.h"
+#include "core-impl/StreamUsb.h"
extern "C" {
#include "alsa_device_profile.h"
}
-using aidl::android::hardware::audio::common::isUsbInputDeviceType;
+using aidl::android::hardware::audio::common::SinkMetadata;
+using aidl::android::hardware::audio::common::SourceMetadata;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioDeviceAddress;
using aidl::android::media::audio::common::AudioDeviceDescription;
using aidl::android::media::audio::common::AudioDeviceType;
using aidl::android::media::audio::common::AudioFormatDescription;
using aidl::android::media::audio::common::AudioFormatType;
+using aidl::android::media::audio::common::AudioIoFlags;
+using aidl::android::media::audio::common::AudioOffloadInfo;
using aidl::android::media::audio::common::AudioPort;
using aidl::android::media::audio::common::AudioPortConfig;
using aidl::android::media::audio::common::AudioPortExt;
using aidl::android::media::audio::common::AudioProfile;
+using aidl::android::media::audio::common::MicrophoneInfo;
namespace aidl::android::hardware::audio::core {
@@ -97,6 +102,25 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
+ndk::ScopedAStatus ModuleUsb::createInputStream(const SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result) {
+ return createStreamInstance<StreamInUsb>(result, sinkMetadata, std::move(context), microphones);
+}
+
+ndk::ScopedAStatus ModuleUsb::createOutputStream(const SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo,
+ std::shared_ptr<StreamOut>* result) {
+ if (offloadInfo.has_value()) {
+ LOG(ERROR) << __func__ << ": offload is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ return createStreamInstance<StreamOutUsb>(result, sourceMetadata, std::move(context),
+ offloadInfo);
+}
+
ndk::ScopedAStatus ModuleUsb::populateConnectedDevicePort(AudioPort* audioPort) {
if (audioPort->ext.getTag() != AudioPortExt::Tag::device) {
LOG(ERROR) << __func__ << ": port id " << audioPort->id << " is not a device port";
@@ -117,7 +141,7 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
- const bool isInput = isUsbInputDeviceType(devicePort.device.type.type);
+ const bool isInput = audioPort->flags.getTag() == AudioIoFlags::input;
alsa_device_profile profile;
profile_init(&profile, isInput ? PCM_IN : PCM_OUT);
profile.card = alsaAddress[0];
@@ -175,8 +199,8 @@
return;
}
const int card = address.get<AudioDeviceAddress::alsa>()[0];
- usb::UsbAlsaMixerControl::getInstance().setDeviceConnectionState(card, mMasterMute,
- mMasterVolume, connected);
+ usb::UsbAlsaMixerControl::getInstance().setDeviceConnectionState(card, getMasterMute(),
+ getMasterVolume(), connected);
}
ndk::ScopedAStatus ModuleUsb::onMasterMuteChanged(bool mute) {
diff --git a/audio/aidl/default/usb/StreamUsb.cpp b/audio/aidl/default/usb/StreamUsb.cpp
index 5d1d7fe..17e1ab4 100644
--- a/audio/aidl/default/usb/StreamUsb.cpp
+++ b/audio/aidl/default/usb/StreamUsb.cpp
@@ -14,10 +14,13 @@
* limitations under the License.
*/
+#include <limits>
+
#define LOG_TAG "AHAL_StreamUsb"
#include <android-base/logging.h>
#include <Utils.h>
+#include <error/expected_utils.h>
#include "UsbAlsaMixerControl.h"
#include "UsbAlsaUtils.h"
@@ -42,116 +45,126 @@
namespace aidl::android::hardware::audio::core {
-DriverUsb::DriverUsb(const StreamContext& context, bool isInput)
- : mFrameSizeBytes(context.getFrameSize()), mIsInput(isInput) {
+StreamUsb::StreamUsb(const Metadata& metadata, StreamContext&& context)
+ : StreamCommonImpl(metadata, std::move(context)),
+ mFrameSizeBytes(getContext().getFrameSize()),
+ mIsInput(isInput(metadata)),
+ mConfig(maybePopulateConfig(getContext(), mIsInput)) {}
+
+// static
+std::optional<struct pcm_config> StreamUsb::maybePopulateConfig(const StreamContext& context,
+ bool isInput) {
struct pcm_config config;
config.channels = usb::getChannelCountFromChannelMask(context.getChannelLayout(), isInput);
if (config.channels == 0) {
LOG(ERROR) << __func__ << ": invalid channel=" << context.getChannelLayout().toString();
- return;
+ return std::nullopt;
}
config.format = usb::aidl2legacy_AudioFormatDescription_pcm_format(context.getFormat());
if (config.format == PCM_FORMAT_INVALID) {
LOG(ERROR) << __func__ << ": invalid format=" << context.getFormat().toString();
- return;
+ return std::nullopt;
}
config.rate = context.getSampleRate();
if (config.rate == 0) {
LOG(ERROR) << __func__ << ": invalid sample rate=" << config.rate;
- return;
+ return std::nullopt;
}
- mConfig = config;
+ return config;
}
-::android::status_t DriverUsb::init() {
+::android::status_t StreamUsb::init() {
return mConfig.has_value() ? ::android::OK : ::android::NO_INIT;
}
-::android::status_t DriverUsb::setConnectedDevices(
+const StreamCommonInterface::ConnectedDevices& StreamUsb::getConnectedDevices() const {
+ std::lock_guard guard(mLock);
+ return mConnectedDevices;
+}
+
+ndk::ScopedAStatus StreamUsb::setConnectedDevices(
const std::vector<AudioDevice>& connectedDevices) {
if (mIsInput && connectedDevices.size() > 1) {
LOG(ERROR) << __func__ << ": wrong device size(" << connectedDevices.size()
<< ") for input stream";
- return ::android::BAD_VALUE;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
for (const auto& connectedDevice : connectedDevices) {
if (connectedDevice.address.getTag() != AudioDeviceAddress::alsa) {
LOG(ERROR) << __func__ << ": bad device address" << connectedDevice.address.toString();
- return ::android::BAD_VALUE;
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
}
std::lock_guard guard(mLock);
- mAlsaDeviceProxies.clear();
- mConnectedDevices.clear();
- for (const auto& connectedDevice : connectedDevices) {
- mConnectedDevices.push_back(connectedDevice.address);
- }
- return ::android::OK;
+ RETURN_STATUS_IF_ERROR(StreamCommonImpl::setConnectedDevices(connectedDevices));
+ mConnectedDevicesUpdated.store(true, std::memory_order_release);
+ return ndk::ScopedAStatus::ok();
}
-::android::status_t DriverUsb::drain(StreamDescriptor::DrainMode) {
+::android::status_t StreamUsb::drain(StreamDescriptor::DrainMode) {
usleep(1000);
return ::android::OK;
}
-::android::status_t DriverUsb::flush() {
+::android::status_t StreamUsb::flush() {
usleep(1000);
return ::android::OK;
}
-::android::status_t DriverUsb::pause() {
+::android::status_t StreamUsb::pause() {
usleep(1000);
return ::android::OK;
}
-::android::status_t DriverUsb::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
+::android::status_t StreamUsb::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) {
- if (!mConfig.has_value() || mConnectedDevices.empty()) {
- LOG(ERROR) << __func__ << ": failed, has config: " << mConfig.has_value()
- << ", has connected devices: " << mConnectedDevices.empty();
- return ::android::NO_INIT;
- }
- if (mIsStandby) {
- if (::android::status_t status = exitStandby(); status != ::android::OK) {
- LOG(ERROR) << __func__ << ": failed to exit standby, status=" << status;
- return status;
- }
- }
- std::vector<std::shared_ptr<alsa_device_proxy>> alsaDeviceProxies;
- {
- std::lock_guard guard(mLock);
- alsaDeviceProxies = mAlsaDeviceProxies;
+ if (mConnectedDevicesUpdated.load(std::memory_order_acquire)) {
+ // 'setConnectedDevices' has been called. I/O will be restarted.
+ *actualFrameCount = 0;
+ *latencyMs = StreamDescriptor::LATENCY_UNKNOWN;
+ return ::android::OK;
}
const size_t bytesToTransfer = frameCount * mFrameSizeBytes;
+ unsigned maxLatency = 0;
if (mIsInput) {
+ if (mAlsaDeviceProxies.empty()) {
+ LOG(FATAL) << __func__ << ": no input devices";
+ return ::android::NO_INIT;
+ }
// For input case, only support single device.
- proxy_read(alsaDeviceProxies[0].get(), buffer, bytesToTransfer);
+ proxy_read(mAlsaDeviceProxies[0].get(), buffer, bytesToTransfer);
+ maxLatency = proxy_get_latency(mAlsaDeviceProxies[0].get());
} else {
- for (auto& proxy : alsaDeviceProxies) {
+ for (auto& proxy : mAlsaDeviceProxies) {
proxy_write(proxy.get(), buffer, bytesToTransfer);
+ maxLatency = std::max(maxLatency, proxy_get_latency(proxy.get()));
}
}
*actualFrameCount = frameCount;
- *latencyMs = Module::kLatencyMs;
+ maxLatency = std::min(maxLatency, static_cast<unsigned>(std::numeric_limits<int32_t>::max()));
+ *latencyMs = maxLatency;
return ::android::OK;
}
-::android::status_t DriverUsb::standby() {
- if (!mIsStandby) {
- std::lock_guard guard(mLock);
- mAlsaDeviceProxies.clear();
- mIsStandby = true;
- }
+::android::status_t StreamUsb::standby() {
+ mAlsaDeviceProxies.clear();
return ::android::OK;
}
-::android::status_t DriverUsb::exitStandby() {
+void StreamUsb::shutdown() {
+ mAlsaDeviceProxies.clear();
+}
+
+::android::status_t StreamUsb::start() {
std::vector<AudioDeviceAddress> connectedDevices;
{
std::lock_guard guard(mLock);
- connectedDevices = mConnectedDevices;
+ std::transform(mConnectedDevices.begin(), mConnectedDevices.end(),
+ std::back_inserter(connectedDevices),
+ [](const auto& device) { return device.address; });
+ mConnectedDevicesUpdated.store(false, std::memory_order_release);
}
- std::vector<std::shared_ptr<alsa_device_proxy>> alsaDeviceProxies;
+ decltype(mAlsaDeviceProxies) alsaDeviceProxies;
for (const auto& device : connectedDevices) {
alsa_device_profile profile;
profile_init(&profile, mIsInput ? PCM_IN : PCM_OUT);
@@ -163,16 +176,16 @@
return ::android::UNKNOWN_ERROR;
}
- auto proxy = std::shared_ptr<alsa_device_proxy>(new alsa_device_proxy(),
- [](alsa_device_proxy* proxy) {
- proxy_close(proxy);
- free(proxy);
- });
+ AlsaDeviceProxy proxy(new alsa_device_proxy, [](alsa_device_proxy* proxy) {
+ proxy_close(proxy);
+ free(proxy);
+ });
// Always ask for alsa configure as required since the configuration should be supported
// by the connected device. That is guaranteed by `setAudioPortConfig` and
// `setAudioPatch`.
- if (int err =
- proxy_prepare(proxy.get(), &profile, &mConfig.value(), true /*is_bit_perfect*/);
+ if (int err = proxy_prepare(proxy.get(), &profile,
+ const_cast<struct pcm_config*>(&mConfig.value()),
+ true /*is_bit_perfect*/);
err != 0) {
LOG(ERROR) << __func__ << ": fail to prepare for device address=" << device.toString()
<< " error=" << err;
@@ -185,40 +198,13 @@
}
alsaDeviceProxies.push_back(std::move(proxy));
}
- {
- std::lock_guard guard(mLock);
- mAlsaDeviceProxies = alsaDeviceProxies;
- }
- mIsStandby = false;
+ mAlsaDeviceProxies = std::move(alsaDeviceProxies);
return ::android::OK;
}
-// static
-ndk::ScopedAStatus StreamInUsb::createInstance(const SinkMetadata& sinkMetadata,
- StreamContext&& context,
- const std::vector<MicrophoneInfo>& microphones,
- std::shared_ptr<StreamIn>* result) {
- std::shared_ptr<StreamIn> stream =
- ndk::SharedRefBase::make<StreamInUsb>(sinkMetadata, std::move(context), microphones);
- if (auto status = initInstance(stream); !status.isOk()) {
- return status;
- }
- *result = std::move(stream);
- return ndk::ScopedAStatus::ok();
-}
-
StreamInUsb::StreamInUsb(const SinkMetadata& sinkMetadata, StreamContext&& context,
const std::vector<MicrophoneInfo>& microphones)
- : StreamIn(
- sinkMetadata, std::move(context),
- [](const StreamContext& ctx) -> DriverInterface* {
- return new DriverUsb(ctx, true /*isInput*/);
- },
- [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
- // The default worker implementation is used.
- return new StreamInWorker(ctx, driver);
- },
- microphones) {}
+ : StreamUsb(sinkMetadata, std::move(context)), StreamIn(microphones) {}
ndk::ScopedAStatus StreamInUsb::getActiveMicrophones(
std::vector<MicrophoneDynamicInfo>* _aidl_return __unused) {
@@ -226,37 +212,10 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-// static
-ndk::ScopedAStatus StreamOutUsb::createInstance(const SourceMetadata& sourceMetadata,
- StreamContext&& context,
- const std::optional<AudioOffloadInfo>& offloadInfo,
- std::shared_ptr<StreamOut>* result) {
- if (offloadInfo.has_value()) {
- LOG(ERROR) << __func__ << ": offload is not supported";
- return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
- }
- std::shared_ptr<StreamOut> stream =
- ndk::SharedRefBase::make<StreamOutUsb>(sourceMetadata, std::move(context), offloadInfo);
- if (auto status = initInstance(stream); !status.isOk()) {
- return status;
- }
- *result = std::move(stream);
- return ndk::ScopedAStatus::ok();
-}
-
StreamOutUsb::StreamOutUsb(const SourceMetadata& sourceMetadata, StreamContext&& context,
const std::optional<AudioOffloadInfo>& offloadInfo)
- : StreamOut(
- sourceMetadata, std::move(context),
- [](const StreamContext& ctx) -> DriverInterface* {
- return new DriverUsb(ctx, false /*isInput*/);
- },
- [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
- // The default worker implementation is used.
- return new StreamOutWorker(ctx, driver);
- },
- offloadInfo) {
- mChannelCount = getChannelCount(mContext.getChannelLayout());
+ : StreamUsb(sourceMetadata, std::move(context)), StreamOut(offloadInfo) {
+ mChannelCount = getChannelCount(getContext().getChannelLayout());
}
ndk::ScopedAStatus StreamOutUsb::getHwVolume(std::vector<float>* _aidl_return) {
@@ -265,7 +224,7 @@
}
ndk::ScopedAStatus StreamOutUsb::setHwVolume(const std::vector<float>& in_channelVolumes) {
- for (const auto& device : mConnectedDevices) {
+ for (const auto& device : getConnectedDevices()) {
if (device.address.getTag() != AudioDeviceAddress::alsa) {
LOG(DEBUG) << __func__ << ": skip as the device address is not alsa";
continue;
diff --git a/audio/aidl/default/usb/UsbAlsaMixerControl.cpp b/audio/aidl/default/usb/UsbAlsaMixerControl.cpp
index b5337d1..6c0c24b 100644
--- a/audio/aidl/default/usb/UsbAlsaMixerControl.cpp
+++ b/audio/aidl/default/usb/UsbAlsaMixerControl.cpp
@@ -99,16 +99,6 @@
return minValue + std::ceil((maxValue - minValue) * fValue);
}
-float volumeIntegerToFloat(int iValue, int maxValue, int minValue) {
- if (iValue > maxValue) {
- return 1.0f;
- }
- if (iValue < minValue) {
- return 0.0f;
- }
- return static_cast<float>(iValue - minValue) / (maxValue - minValue);
-}
-
} // namespace
ndk::ScopedAStatus AlsaMixer::setMasterMute(bool muted) {
@@ -146,11 +136,14 @@
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
const int numValues = it->second->getNumValues();
+ if (numValues < 0) {
+ LOG(FATAL) << __func__ << ": negative number of values: " << numValues;
+ }
const int maxValue = it->second->getMaxValue();
const int minValue = it->second->getMinValue();
std::vector<int> values;
size_t i = 0;
- for (; i < numValues && i < values.size(); ++i) {
+ for (; i < static_cast<size_t>(numValues) && i < values.size(); ++i) {
values.emplace_back(volumeFloatToInteger(volumes[i], maxValue, minValue));
}
if (int err = it->second->setArray(values.data(), values.size()); err != 0) {
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index 4e84f6b..685d07d 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -30,6 +30,7 @@
#include <android/binder_auto_utils.h>
#include <fmq/AidlMessageQueue.h>
#include <gtest/gtest.h>
+#include <system/audio_aidl_utils.h>
#include <system/audio_effects/aidl_effects_utils.h>
#include <system/audio_effects/effect_uuid.h>
@@ -51,6 +52,7 @@
using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::AudioUuid;
using aidl::android::media::audio::common::PcmType;
+using ::android::audio::utils::toString;
using ::android::hardware::EventFlag;
const AudioFormatDescription kDefaultFormatDescription = {
@@ -63,6 +65,12 @@
::aidl::android::hardware::common::fmq::SynchronizedReadWrite>
DataMQ;
+static inline std::string getPrefix(Descriptor& descriptor) {
+ std::string prefix = "Implementor_" + descriptor.common.implementor + "_name_" +
+ descriptor.common.name + "_UUID_" + toString(descriptor.common.id.uuid);
+ return prefix;
+}
+
class EffectHelper {
public:
static void create(std::shared_ptr<IFactory> factory, std::shared_ptr<IEffect>& effect,
@@ -71,7 +79,7 @@
auto& id = desc.common.id;
ASSERT_STATUS(status, factory->createEffect(id.uuid, &effect));
if (status == EX_NONE) {
- ASSERT_NE(effect, nullptr) << id.uuid.toString();
+ ASSERT_NE(effect, nullptr) << toString(id.uuid);
}
}
diff --git a/audio/aidl/vts/TestUtils.h b/audio/aidl/vts/TestUtils.h
index 72ca56f..10c2fc6 100644
--- a/audio/aidl/vts/TestUtils.h
+++ b/audio/aidl/vts/TestUtils.h
@@ -77,3 +77,10 @@
#define EXPECT_STATUS(expected, ret) \
EXPECT_PRED_FORMAT2(::android::hardware::audio::common::testing::detail::assertResult, \
expected, ret)
+
+#define SKIP_TEST_IF_DATA_UNSUPPORTED(flags) \
+ ({ \
+ if ((flags).hwAcceleratorMode == Flags::HardwareAccelerator::TUNNEL || (flags).bypass) { \
+ GTEST_SKIP() << "Skip data path for offload"; \
+ } \
+ })
\ No newline at end of file
diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp
index 8828c41..1a7c3d4 100644
--- a/audio/aidl/vts/VtsHalAECTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp
@@ -162,10 +162,8 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string echoDelay = std::to_string(std::get<PARAM_ECHO_DELAY>(info.param));
std::string mobileMode = std::get<PARAM_MOBILE_MODE>(info.param) ? "true" : "false";
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_EchoDelay_" + echoDelay +
- "_MobileMode_" + mobileMode;
+ std::string name =
+ getPrefix(descriptor) + "_EchoDelay_" + echoDelay + "_MobileMode_" + mobileMode;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
index edfcdf6..65c6a8f 100644
--- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
@@ -177,11 +177,9 @@
std::to_string(std::get<PARAM_MAX_COMPRESSION_GAIN>(info.param));
std::string enableLimiter = std::to_string(std::get<PARAM_ENABLE_LIMITER>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_target_peak_level_" +
- targetPeakLevel + "_max_compression_gain_" + maxCompressionGain +
- "_enable_limiter_" + enableLimiter;
+ std::string name = getPrefix(descriptor) + "_target_peak_level_" + targetPeakLevel +
+ "_max_compression_gain_" + maxCompressionGain + "_enable_limiter_" +
+ enableLimiter;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
index 8ba8e45..46a569e 100644
--- a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
@@ -183,9 +183,7 @@
std::string margin =
std::to_string(static_cast<int>(std::get<PARAM_SATURATION_MARGIN>(info.param)));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_digital_gain_" + gain +
+ std::string name = getPrefix(descriptor) + "_digital_gain_" + gain +
"_level_estimator_" + estimator + "_margin_" + margin;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
diff --git a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
index e5e06eb..f82e8e5 100644
--- a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
@@ -20,21 +20,27 @@
#include <unordered_set>
#include <vector>
+#define LOG_TAG "VtsHalAudioCore.Config"
+
+#include <Utils.h>
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
#include <aidl/android/hardware/audio/core/IConfig.h>
#include <aidl/android/media/audio/common/AudioFlag.h>
#include <aidl/android/media/audio/common/AudioProductStrategyType.h>
-#define LOG_TAG "VtsHalAudioCore.Config"
#include <android-base/logging.h>
#include "AudioHalBinderServiceUtil.h"
#include "TestUtils.h"
using namespace android;
+using aidl::android::hardware::audio::common::isDefaultAudioFormat;
using aidl::android::hardware::audio::core::IConfig;
+using aidl::android::hardware::audio::core::SurroundSoundConfig;
using aidl::android::media::audio::common::AudioAttributes;
using aidl::android::media::audio::common::AudioFlag;
+using aidl::android::media::audio::common::AudioFormatDescription;
+using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::AudioHalAttributesGroup;
using aidl::android::media::audio::common::AudioHalCapCriterion;
using aidl::android::media::audio::common::AudioHalCapCriterionType;
@@ -46,6 +52,7 @@
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioStreamType;
using aidl::android::media::audio::common::AudioUsage;
+using aidl::android::media::audio::common::PcmType;
class AudioCoreConfig : public testing::TestWithParam<std::string> {
public:
@@ -58,6 +65,7 @@
void RestartService() {
ASSERT_NE(mConfig, nullptr);
mEngineConfig.reset();
+ mSurroundSoundConfig.reset();
mConfig = IConfig::fromBinder(mBinderUtil.restartService());
ASSERT_NE(mConfig, nullptr);
}
@@ -70,6 +78,14 @@
}
}
+ void SetUpSurroundSoundConfig() {
+ if (mSurroundSoundConfig == nullptr) {
+ auto tempConfig = std::make_unique<SurroundSoundConfig>();
+ ASSERT_IS_OK(mConfig->getSurroundSoundConfig(tempConfig.get()));
+ mSurroundSoundConfig = std::move(tempConfig);
+ }
+ }
+
static bool IsProductStrategyTypeReservedForSystemUse(const AudioProductStrategyType& pst) {
switch (pst) {
case AudioProductStrategyType::SYS_RESERVED_NONE:
@@ -325,9 +341,41 @@
}
}
+ void ValidateAudioFormatDescription(const AudioFormatDescription& format) {
+ EXPECT_NE(AudioFormatType::SYS_RESERVED_INVALID, format.type);
+ if (format.type == AudioFormatType::PCM) {
+ EXPECT_NE(PcmType::DEFAULT, format.pcm);
+ EXPECT_TRUE(format.encoding.empty()) << format.encoding;
+ } else {
+ EXPECT_FALSE(format.encoding.empty());
+ }
+ }
+
+ /**
+ * Verify that the surround sound configuration is not empty.
+ * Verify each of the formatFamilies has a non-empty primaryFormat.
+ * Verify that each format only appears once.
+ */
+ void ValidateSurroundSoundConfig() {
+ EXPECT_FALSE(mSurroundSoundConfig->formatFamilies.empty());
+ std::set<AudioFormatDescription> formatSet;
+ for (const SurroundSoundConfig::SurroundFormatFamily& family :
+ mSurroundSoundConfig->formatFamilies) {
+ EXPECT_NO_FATAL_FAILURE(ValidateAudioFormatDescription(family.primaryFormat));
+ EXPECT_FALSE(isDefaultAudioFormat(family.primaryFormat));
+ EXPECT_TRUE(formatSet.insert(family.primaryFormat).second);
+ for (const AudioFormatDescription& subformat : family.subFormats) {
+ EXPECT_NO_FATAL_FAILURE(ValidateAudioFormatDescription(subformat));
+ EXPECT_FALSE(isDefaultAudioFormat(subformat));
+ EXPECT_TRUE(formatSet.insert(subformat).second);
+ }
+ }
+ }
+
private:
std::shared_ptr<IConfig> mConfig;
std::unique_ptr<AudioHalEngineConfig> mEngineConfig;
+ std::unique_ptr<SurroundSoundConfig> mSurroundSoundConfig;
AudioHalBinderServiceUtil mBinderUtil;
};
@@ -344,6 +392,11 @@
EXPECT_NO_FATAL_FAILURE(ValidateAudioHalEngineConfig());
}
+TEST_P(AudioCoreConfig, GetSurroundSoundConfigIsValid) {
+ ASSERT_NO_FATAL_FAILURE(SetUpSurroundSoundConfig());
+ EXPECT_NO_FATAL_FAILURE(ValidateSurroundSoundConfig());
+}
+
INSTANTIATE_TEST_SUITE_P(AudioCoreConfigTest, AudioCoreConfig,
testing::ValuesIn(android::getAidlHalInstanceNames(IConfig::descriptor)),
android::PrintInstanceNameToString);
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 825b865..0012cd5 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -2763,6 +2763,7 @@
ASSERT_NO_FATAL_FAILURE(patch.SetUp(module.get()));
std::vector<MicrophoneDynamicInfo> activeMics;
EXPECT_IS_OK(stream.get()->getActiveMicrophones(&activeMics));
+ EXPECT_FALSE(activeMics.empty());
for (const auto& mic : activeMics) {
EXPECT_NE(micInfos.end(),
std::find_if(micInfos.begin(), micInfos.end(),
diff --git a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
index 9cd6c22..8084a59 100644
--- a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
@@ -36,6 +36,11 @@
#include "EffectFactoryHelper.h"
#include "TestUtils.h"
+#include <system/audio_aidl_utils.h>
+
+using namespace android;
+using ::android::audio::utils::toString;
+
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
@@ -93,7 +98,7 @@
std::shared_ptr<IEffect> effect;
EXPECT_STATUS(expectStatus, mEffectFactory->createEffect(uuid, &effect));
if (expectStatus == EX_NONE) {
- EXPECT_NE(effect, nullptr) << " null effect with uuid: " << uuid.toString();
+ EXPECT_NE(effect, nullptr) << " null effect with uuid: " << toString(uuid);
effects.push_back(std::move(effect));
}
}
@@ -148,7 +153,7 @@
}
std::string msg = " missing type UUID:\n";
for (const auto& uuid : typeUuidSet) {
- msg += (uuid.toString() + "\n");
+ msg += (toString(uuid) + "\n");
}
SCOPED_TRACE(msg);
EXPECT_EQ(0UL, typeUuidSet.size());
diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
index 436f2a3..3011a5e 100644
--- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
@@ -46,6 +46,7 @@
using aidl::android::hardware::audio::effect::IFactory;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::State;
+using aidl::android::hardware::audio::effect::Flags;
using aidl::android::media::audio::common::AudioDeviceDescription;
using aidl::android::media::audio::common::AudioDeviceType;
using aidl::android::media::audio::common::AudioMode;
@@ -85,6 +86,14 @@
}
};
+class AudioEffectDataPathTest : public AudioEffectTest {
+ public:
+ void SetUp() override {
+ AudioEffectTest::SetUp();
+ SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+ }
+};
+
TEST_P(AudioEffectTest, SetupAndTearDown) {
// Intentionally empty test body.
}
@@ -577,7 +586,8 @@
/// Data processing test
// Send data to effects and expect it to be consumed by checking statusMQ.
-TEST_P(AudioEffectTest, ConsumeDataInProcessingState) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, ConsumeDataInProcessingState) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -610,7 +620,8 @@
}
// Send data to effects and expect it to be consumed after effect restart.
-TEST_P(AudioEffectTest, ConsumeDataAfterRestart) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, ConsumeDataAfterRestart) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -649,7 +660,8 @@
}
// Send data to IDLE effects and expect it to be consumed after effect start.
-TEST_P(AudioEffectTest, SendDataAtIdleAndConsumeDataInProcessing) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, SendDataAtIdleAndConsumeDataInProcessing) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -682,7 +694,8 @@
}
// Send data multiple times.
-TEST_P(AudioEffectTest, ProcessDataMultipleTimes) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, ProcessDataMultipleTimes) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -721,7 +734,8 @@
}
// Send data to processing state effects, stop, and restart.
-TEST_P(AudioEffectTest, ConsumeDataAndRestart) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, ConsumeDataAndRestart) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -762,7 +776,8 @@
}
// Send data to closed effects and expect it not be consumed.
-TEST_P(AudioEffectTest, NotConsumeDataByClosedEffect) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, NotConsumeDataByClosedEffect) {
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -788,7 +803,8 @@
}
// Send data to multiple effects.
-TEST_P(AudioEffectTest, ConsumeDataMultipleEffects) {
+// Effects exposing bypass flags or operating in offload mode will be skipped.
+TEST_P(AudioEffectDataPathTest, ConsumeDataMultipleEffects) {
std::shared_ptr<IEffect> effect1, effect2;
ASSERT_NO_FATAL_FAILURE(create(mFactory, effect1, mDescriptor));
ASSERT_NO_FATAL_FAILURE(create(mFactory, effect2, mDescriptor));
@@ -848,16 +864,27 @@
EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor))),
[](const testing::TestParamInfo<AudioEffectTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_TYPE_" +
- descriptor.common.id.type.toString() + "_UUID_" +
- descriptor.common.id.uuid.toString();
+ std::string name = getPrefix(descriptor);
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
});
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioEffectTest);
+INSTANTIATE_TEST_SUITE_P(
+ SingleEffectInstanceTest, AudioEffectDataPathTest,
+ ::testing::Combine(testing::ValuesIn(
+ EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor))),
+ [](const testing::TestParamInfo<AudioEffectDataPathTest::ParamType>& info) {
+ auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
+ std::string name = getPrefix(descriptor);
+ std::replace_if(
+ name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
+ return name;
+ });
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioEffectDataPathTest);
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
ABinderProcess_setThreadPoolMaxThreadCount(1);
diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
index 9cfdc50..afddb84 100644
--- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
@@ -145,9 +145,7 @@
[](const testing::TestParamInfo<BassBoostParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string strength = std::to_string(std::get<PARAM_STRENGTH>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_strength_" + strength;
+ std::string name = getPrefix(descriptor) + "_strength_" + strength;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
index 5aeebde..7a2f31b 100644
--- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
@@ -126,9 +126,7 @@
[](const testing::TestParamInfo<DownmixParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string type = std::to_string(static_cast<int>(std::get<PARAM_TYPE>(info.param)));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_type" + type;
+ std::string name = getPrefix(descriptor) + "_type" + type;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 033e3b5..5509c76 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -513,9 +513,7 @@
auto descriptor = std::get<ENGINE_TEST_INSTANCE_NAME>(info.param).second;
DynamicsProcessing::EngineArchitecture cfg;
fillEngineArchConfig(cfg, info.param);
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_Cfg_" + cfg.toString();
+ std::string name = getPrefix(descriptor) + "_Cfg_" + cfg.toString();
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index 05c2c5b..f2ef185 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -209,9 +209,7 @@
auto descriptor = std::get<0>(info.param).second;
std::string roomLevel = std::to_string(std::get<1>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_roomLevel" + roomLevel;
+ std::string name = getPrefix(descriptor) + "_roomLevel" + roomLevel;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
index 716a2c6..37e7c0a 100644
--- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
@@ -209,9 +209,7 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string bandLevel =
::android::internal::ToString(std::get<PARAM_BAND_LEVEL>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_preset_" +
+ std::string name = getPrefix(descriptor) + "_preset_" +
std::to_string(std::get<PARAM_PRESET>(info.param)) + "_bandLevel_" +
bandLevel;
std::replace_if(
diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
index 7c79d1b..54caed9 100644
--- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
@@ -195,12 +195,10 @@
std::to_string(std::get<PARAM_VIBRATION_INFORMATION_Q_FACTOR>(info.param));
std::string maxAmplitude =
std::to_string(std::get<PARAM_VIBRATION_INFORMATION_MAX_AMPLITUDE>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_hapticScaleId" +
- hapticScaleID + "_hapticScaleVibScale" + hapticScaleVibScale +
- "_resonantFrequency" + resonantFrequency + "_qFactor" + qFactor +
- "_maxAmplitude" + maxAmplitude;
+ std::string name = getPrefix(descriptor) + "_hapticScaleId" + hapticScaleID +
+ "_hapticScaleVibScale" + hapticScaleVibScale + "_resonantFrequency" +
+ resonantFrequency + "_qFactor" + qFactor + "_maxAmplitude" +
+ maxAmplitude;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
index 96b048e..cbb80a9 100644
--- a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
@@ -131,9 +131,7 @@
[](const testing::TestParamInfo<LoudnessEnhancerParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string gainMb = std::to_string(std::get<PARAM_GAIN_MB>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_gainMb_" + gainMb;
+ std::string name = getPrefix(descriptor) + "_gainMb_" + gainMb;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp
index 5525c80..bbb11fc 100644
--- a/audio/aidl/vts/VtsHalNSTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp
@@ -155,10 +155,7 @@
std::get<PARAM_LEVEL>(info.param));
std::string type = aidl::android::hardware::audio::effect::toString(
std::get<PARAM_TYPE>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_level_" + level + "_type_" +
- type;
+ std::string name = getPrefix(descriptor) + "_level_" + level + "_type_" + type;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
index 8fb4ebf..3056c6c 100644
--- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
@@ -137,9 +137,7 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string preset =
std::to_string(static_cast<int>(std::get<PARAM_PRESETS>(info.param)));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_preset" + preset;
+ std::string name = getPrefix(descriptor) + "_preset" + preset;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
index 6b1da63..07a9fa4 100644
--- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
@@ -141,9 +141,7 @@
[](const testing::TestParamInfo<VirtualizerParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string strength = std::to_string(std::get<PARAM_STRENGTH>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_strength" + strength;
+ std::string name = getPrefix(descriptor) + "_strength" + strength;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
index f41ba30..903ba69 100644
--- a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
@@ -195,9 +195,7 @@
std::get<PARAM_MEASUREMENT_MODE>(info.param));
std::string latency = std::to_string(std::get<PARAM_LATENCY>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_captureSize" + captureSize +
+ std::string name = getPrefix(descriptor) + "_captureSize" + captureSize +
"_scalingMode" + scalingMode + "_measurementMode" + measurementMode +
"_latency" + latency;
std::replace_if(
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 90b7f37..0b5b9fc 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -149,10 +149,7 @@
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string level = std::to_string(std::get<PARAM_LEVEL>(info.param));
std::string mute = std::to_string(std::get<PARAM_MUTE>(info.param));
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_level" + level + "_mute" +
- mute;
+ std::string name = getPrefix(descriptor) + "_level" + level + "_mute" + mute;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/common/all-versions/test/utility/Android.bp b/audio/common/all-versions/test/utility/Android.bp
index 757f8a8..c6a3963 100644
--- a/audio/common/all-versions/test/utility/Android.bp
+++ b/audio/common/all-versions/test/utility/Android.bp
@@ -62,6 +62,5 @@
"libxml2",
"liblog",
],
- static_libs: ["libgtest"],
test_suites: ["general-tests"],
}
diff --git a/audio/policy/1.0/xml/pfw_schemas/Android.bp b/audio/policy/1.0/xml/pfw_schemas/Android.bp
index 5d669c2..225c065 100644
--- a/audio/policy/1.0/xml/pfw_schemas/Android.bp
+++ b/audio/policy/1.0/xml/pfw_schemas/Android.bp
@@ -11,6 +11,7 @@
name: "audio_policy_engine_configurable_configuration_V1_0",
srcs: ["AllSchemas.xsd"],
package_name: "audio.policy.configurable.V1_0",
+ root_elements: ["ParameterFrameworkConfiguration"],
}
// Unfortunately, all rules only have a single output, thus
diff --git a/audio/policy/1.0/xml/pfw_schemas/api/current.txt b/audio/policy/1.0/xml/pfw_schemas/api/current.txt
index c2fb6fc..2b83e60 100644
--- a/audio/policy/1.0/xml/pfw_schemas/api/current.txt
+++ b/audio/policy/1.0/xml/pfw_schemas/api/current.txt
@@ -470,23 +470,7 @@
public class XmlParser {
ctor public XmlParser();
- method public static audio.policy.configurable.V1_0.BitParameterBlock readBitParameterBlock(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.BooleanParameter readBooleanParameter(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.ComponentTypeSetType readComponentTypeSetType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.ComponentTypeSetType readComponentTypeSetType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.ConfigurableDomainType readConfigurableDomainType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.ConfigurableDomains readConfigurableDomains(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.EnumParameterType readEnumParameterType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.FixedPointParameterType readFixedPointParameterType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.FloatingPointParameterType readFloatingPointParameterType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.IntegerParameterType readIntegerParameterType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.LinearAdaptationType readLinearAdaptationType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.LogarithmicAdaptation readLogarithmicAdaptation(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static audio.policy.configurable.V1_0.ParameterFrameworkConfiguration readParameterFrameworkConfiguration(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.StringParameter readStringParameter(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.SubsystemPlugins readSubsystemPlugins(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.SubsystemType readSubsystemType(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static audio.policy.configurable.V1_0.SystemClass readSystemClass(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
}
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/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/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index 5503de2..0dfb123 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -3629,6 +3629,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/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h
index d2b701d..2378676 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/include/LinearFakeValueGenerator.h
@@ -57,7 +57,7 @@
float dispersion; // Defines minimum and maximum value based on initial value.
float increment; // Value that we will be added to currentValue with each timer tick.
int64_t interval;
- long lastEventTimestamp;
+ int64_t lastEventTimestamp;
};
GeneratorCfg mGenCfg;
diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp
index 9133144..fe08dcf 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/src/LinearFakeValueGenerator.cpp
@@ -86,7 +86,7 @@
if (mGenCfg.lastEventTimestamp == 0) {
mGenCfg.lastEventTimestamp = elapsedRealtimeNano();
} else {
- long nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval;
+ int64_t nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval;
// Prevent overflow.
assert(nextEventTime > mGenCfg.lastEventTimestamp);
mGenCfg.lastEventTimestamp = nextEventTime;
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 c3ebd3b..502d957 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -194,6 +194,8 @@
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,
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 3f5e4c4..4934771 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -337,6 +337,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();
@@ -762,6 +781,12 @@
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.
@@ -1808,6 +1833,7 @@
void FakeVehicleHardware::registerOnPropertySetErrorEvent(
std::unique_ptr<const PropertySetErrorCallback> callback) {
+ // In FakeVehicleHardware, we will never use mOnPropertySetErrorCallback.
if (mOnPropertySetErrorCallback != nullptr) {
ALOGE("registerOnPropertySetErrorEvent must only be called once");
return;
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..ae1c0f6 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -21,6 +21,8 @@
#include <PropertyUtils.h>
#include <TestPropertyUtils.h>
+#include <aidl/android/hardware/automotive/vehicle/VehicleApPowerStateShutdownParam.h>
+
#include <android-base/expected.h>
#include <android-base/file.h>
#include <android-base/stringprintf.h>
@@ -69,6 +71,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::VehicleApPowerStateShutdownParam;
using ::aidl::android::hardware::automotive::vehicle::VehicleAreaMirror;
using ::aidl::android::hardware::automotive::vehicle::VehicleHwKeyInputAction;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig;
@@ -1519,6 +1522,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),
+ },
+ },
+ },
+ },
};
}
diff --git a/automotive/vehicle/aidl/impl/utils/common/test/RecurrentTimerTest.cpp b/automotive/vehicle/aidl/impl/utils/common/test/RecurrentTimerTest.cpp
index 141efc1..62046f3 100644
--- a/automotive/vehicle/aidl/impl/utils/common/test/RecurrentTimerTest.cpp
+++ b/automotive/vehicle/aidl/impl/utils/common/test/RecurrentTimerTest.cpp
@@ -18,6 +18,7 @@
#include <android-base/thread_annotations.h>
#include <gtest/gtest.h>
+#include <condition_variable>
#include <chrono>
#include <memory>
@@ -28,6 +29,8 @@
namespace automotive {
namespace vehicle {
+using ::android::base::ScopedLockAssertion;
+
class RecurrentTimerTest : public testing::Test {
public:
std::shared_ptr<RecurrentTimer::Callback> getCallback(size_t token) {
@@ -35,6 +38,15 @@
std::scoped_lock<std::mutex> lockGuard(mLock);
mCallbacks.push_back(token);
+ mCond.notify_all();
+ });
+ }
+
+ bool waitForCalledCallbacks(size_t count, size_t timeoutInMs) {
+ std::unique_lock<std::mutex> uniqueLock(mLock);
+ return mCond.wait_for(uniqueLock, std::chrono::milliseconds(timeoutInMs), [this, count] {
+ ScopedLockAssertion lockAssertion(mLock);
+ return mCallbacks.size() >= count;
});
}
@@ -54,6 +66,7 @@
}
private:
+ std::condition_variable mCond;
std::mutex mLock;
std::vector<size_t> mCallbacks GUARDED_BY(mLock);
};
@@ -66,12 +79,11 @@
auto action = getCallback(0);
timer.registerTimerCallback(interval, action);
- std::this_thread::sleep_for(std::chrono::seconds(1));
+ // Should only takes 1s, use 5s as timeout to be safe.
+ ASSERT_TRUE(waitForCalledCallbacks(/* count= */ 10u, /* timeoutInMs= */ 5000))
+ << "Not enough callbacks called before timeout";
timer.unregisterTimerCallback(action);
-
- // Theoretically trigger 10 times, but check for at least 9 times to be stable.
- ASSERT_GE(getCalledCallbacks().size(), static_cast<size_t>(9));
}
TEST_F(RecurrentTimerTest, testRegisterUnregisterRegister) {
@@ -92,10 +104,11 @@
timer.registerTimerCallback(interval, action);
- std::this_thread::sleep_for(std::chrono::seconds(1));
+ // Should only takes 1s, use 5s as timeout to be safe.
+ ASSERT_TRUE(waitForCalledCallbacks(/* count= */ 10u, /* timeoutInMs= */ 5000))
+ << "Not enough callbacks called before timeout";
- // Theoretically trigger 10 times, but check for at least 9 times to be stable.
- ASSERT_GE(getCalledCallbacks().size(), static_cast<size_t>(9));
+ timer.unregisterTimerCallback(action);
}
TEST_F(RecurrentTimerTest, testDestroyTimerWithCallback) {
@@ -114,7 +127,9 @@
std::this_thread::sleep_for(std::chrono::milliseconds(200));
- ASSERT_TRUE(getCalledCallbacks().empty());
+ // Should be 0, but in rare cases there might be 1 events in the queue while the timer is
+ // being destroyed.
+ ASSERT_LE(getCalledCallbacks().size(), 1u);
}
TEST_F(RecurrentTimerTest, testRegisterMultipleCallbacks) {
@@ -132,7 +147,11 @@
auto action3 = getCallback(3);
timer.registerTimerCallback(interval3, action3);
- std::this_thread::sleep_for(std::chrono::seconds(1));
+ // In 1s, we should generate 10 + 20 + 33 = 63 events.
+ // Here we are waiting for more events to make sure we receive enough events for each actions.
+ // Use 5s as timeout to be safe.
+ ASSERT_TRUE(waitForCalledCallbacks(/* count= */ 70u, /* timeoutInMs= */ 5000))
+ << "Not enough callbacks called before timeout";
timer.unregisterTimerCallback(action1);
timer.unregisterTimerCallback(action2);
@@ -152,20 +171,18 @@
action3Count++;
}
}
- // Theoretically trigger 10 times, but check for at least 9 times to be stable.
- ASSERT_GE(action1Count, static_cast<size_t>(9));
- // Theoretically trigger 20 times, but check for at least 15 times to be stable.
- ASSERT_GE(action2Count, static_cast<size_t>(15));
- // Theoretically trigger 33 times, but check for at least 25 times to be stable.
- ASSERT_GE(action3Count, static_cast<size_t>(25));
+
+ ASSERT_GE(action1Count, static_cast<size_t>(10));
+ ASSERT_GE(action2Count, static_cast<size_t>(20));
+ ASSERT_GE(action3Count, static_cast<size_t>(33));
}
TEST_F(RecurrentTimerTest, testRegisterSameCallbackMultipleTimes) {
RecurrentTimer timer;
- // 0.02s
- int64_t interval1 = 20000000;
- // 0.01s
- int64_t interval2 = 10000000;
+ // 0.2s
+ int64_t interval1 = 200'000'000;
+ // 0.1s
+ int64_t interval2 = 100'000'000;
auto action = getCallback(0);
for (int i = 0; i < 10; i++) {
@@ -175,10 +192,9 @@
clearCalledCallbacks();
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
-
- // Theoretically trigger 10 times, but check for at least 9 times to be stable.
- ASSERT_GE(getCalledCallbacks().size(), static_cast<size_t>(9));
+ // Should only takes 1s, use 5s as timeout to be safe.
+ ASSERT_TRUE(waitForCalledCallbacks(/* count= */ 10u, /* timeoutInMs= */ 5000))
+ << "Not enough callbacks called before timeout";
timer.unregisterTimerCallback(action);
diff --git a/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h b/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
index 2e7298f..addc901 100644
--- a/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
+++ b/automotive/vehicle/aidl/impl/vhal/include/ConnectedClient.h
@@ -99,35 +99,23 @@
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);
+ using CallbackType =
+ std::shared_ptr<aidl::android::hardware::automotive::vehicle::IVehicleCallback>;
- // Gets the callback to be called when the request for this client has finished.
- std::shared_ptr<const IVehicleHardware::GetValuesCallback> getResultCallback();
-
- // Marshals the updated values into largeParcelable and sents it through {@code onPropertyEvent}
+ // Marshals the updated values into largeParcelable and sends it through {@code onPropertyEvent}
// callback.
static void sendUpdatedValues(
CallbackType callback,
std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropValue>&&
updatedValues);
-
- 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);
+ // Marshals the set property error events into largeParcelable and sends it through
+ // {@code onPropertySetError} callback.
+ static void sendPropertySetErrors(
+ CallbackType callback,
+ std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropError>&&
+ vehiclePropErrors);
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h b/automotive/vehicle/aidl/impl/vhal/include/DefaultVehicleHal.h
index 2c2cf1a..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(
@@ -249,10 +216,14 @@
const CallbackType& callback, std::shared_ptr<PendingRequestPool> pendingRequestPool);
static void onPropertyChangeEvent(
- std::weak_ptr<SubscriptionManager> subscriptionManager,
+ const std::weak_ptr<SubscriptionManager>& subscriptionManager,
const std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropValue>&
updatedValues);
+ static void onPropertySetErrorEvent(
+ const std::weak_ptr<SubscriptionManager>& subscriptionManager,
+ const std::vector<SetValueErrorEvent>& errorEvents);
+
static void checkHealth(IVehicleHardware* hardware,
std::weak_ptr<SubscriptionManager> subscriptionManager);
diff --git a/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h b/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
index 14799d9..512d906 100644
--- a/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
+++ b/automotive/vehicle/aidl/impl/vhal/include/SubscriptionManager.h
@@ -99,6 +99,15 @@
const std::vector<aidl::android::hardware::automotive::vehicle::VehiclePropValue>&
updatedValues);
+ // For a list of set property error events, returns a map that maps clients subscribing to the
+ // properties to a list of errors for each client.
+ std::unordered_map<CallbackType,
+ 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 81d231c..35b93d2 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/ConnectedClient.cpp
@@ -38,6 +38,8 @@
using ::aidl::android::hardware::automotive::vehicle::SetValueResult;
using ::aidl::android::hardware::automotive::vehicle::SetValueResults;
using ::aidl::android::hardware::automotive::vehicle::StatusCode;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropError;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValues;
using ::android::base::Result;
@@ -248,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()) {
@@ -300,48 +272,38 @@
if (ScopedAStatus callbackStatus =
callback->onPropertyEvent(vehiclePropValues, sharedMemoryFileCount);
!callbackStatus.isOk()) {
- ALOGE("subscribe: failed to call UpdateValues callback, client ID: %p, error: %s, "
+ ALOGE("subscribe: failed to call onPropertyEvent callback, client ID: %p, error: %s, "
"exception: %d, service specific error: %d",
callback->asBinder().get(), callbackStatus.getMessage(),
callbackStatus.getExceptionCode(), callbackStatus.getServiceSpecificError());
}
}
-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);
+void SubscriptionClient::sendPropertySetErrors(std::shared_ptr<IVehicleCallback> callback,
+ std::vector<VehiclePropError>&& vehiclePropErrors) {
+ if (vehiclePropErrors.empty()) {
+ return;
}
- 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()));
+ VehiclePropErrors vehiclePropErrorsLargeParcelable;
+ ScopedAStatus status = vectorToStableLargeParcelable(std::move(vehiclePropErrors),
+ &vehiclePropErrorsLargeParcelable);
+ if (!status.isOk()) {
+ int statusCode = status.getServiceSpecificError();
+ ALOGE("subscribe: failed to marshal result into large parcelable, error: "
+ "%s, code: %d",
+ status.getMessage(), statusCode);
+ return;
}
- sendUpdatedValues(callback, std::move(propValues));
+ if (ScopedAStatus callbackStatus =
+ callback->onPropertySetError(vehiclePropErrorsLargeParcelable);
+ !callbackStatus.isOk()) {
+ ALOGE("subscribe: failed to call onPropertySetError callback, client ID: %p, error: %s, "
+ "exception: %d, service specific error: %d",
+ callback->asBinder().get(), callbackStatus.getMessage(),
+ callbackStatus.getExceptionCode(), callbackStatus.getServiceSpecificError());
+ }
}
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp b/automotive/vehicle/aidl/impl/vhal/src/DefaultVehicleHal.cpp
index 98cfc39..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);
@@ -144,6 +108,11 @@
[subscriptionManagerCopy](std::vector<VehiclePropValue> updatedValues) {
onPropertyChangeEvent(subscriptionManagerCopy, updatedValues);
}));
+ mVehicleHardware->registerOnPropertySetErrorEvent(
+ std::make_unique<IVehicleHardware::PropertySetErrorCallback>(
+ [subscriptionManagerCopy](std::vector<SetValueErrorEvent> errorEvents) {
+ onPropertySetErrorEvent(subscriptionManagerCopy, errorEvents);
+ }));
// Register heartbeat event.
mRecurrentAction = std::make_shared<std::function<void()>>(
@@ -177,7 +146,7 @@
}
void DefaultVehicleHal::onPropertyChangeEvent(
- std::weak_ptr<SubscriptionManager> subscriptionManager,
+ const std::weak_ptr<SubscriptionManager>& subscriptionManager,
const std::vector<VehiclePropValue>& updatedValues) {
auto manager = subscriptionManager.lock();
if (manager == nullptr) {
@@ -194,6 +163,20 @@
}
}
+void DefaultVehicleHal::onPropertySetErrorEvent(
+ const std::weak_ptr<SubscriptionManager>& subscriptionManager,
+ const std::vector<SetValueErrorEvent>& errorEvents) {
+ auto manager = subscriptionManager.lock();
+ if (manager == nullptr) {
+ ALOGW("the SubscriptionManager is destroyed, DefaultVehicleHal is ending");
+ return;
+ }
+ auto vehiclePropErrorsByClient = manager->getSubscribedClientsForErrorEvents(errorEvents);
+ for (auto& [callback, vehiclePropErrors] : vehiclePropErrorsByClient) {
+ SubscriptionClient::sendPropertySetErrors(callback, std::move(vehiclePropErrors));
+ }
+}
+
template <class T>
std::shared_ptr<T> DefaultVehicleHal::getOrCreateClient(
std::unordered_map<const AIBinder*, std::shared_ptr<T>>* clients,
@@ -243,7 +226,6 @@
ALOGD("binder died, client ID: %p", clientId);
mSetValuesClients.erase(clientId);
mGetValuesClients.erase(clientId);
- mSubscriptionClients->removeClient(clientId);
mSubscriptionManager->unsubscribe(clientId);
}
@@ -282,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);
@@ -689,18 +667,19 @@
"client died");
}
- // Create a new SubscriptionClient if there isn't an existing one.
- mSubscriptionClients->maybeAddClient(callback);
-
- // Since we have already check the sample rates, the following functions must succeed.
if (!onChangeSubscriptions.empty()) {
- return toScopedAStatus(mSubscriptionManager->subscribe(callback, onChangeSubscriptions,
- /*isContinuousProperty=*/false));
+ auto result = mSubscriptionManager->subscribe(callback, onChangeSubscriptions,
+ /*isContinuousProperty=*/false);
+ if (!result.ok()) {
+ return toScopedAStatus(result);
+ }
}
if (!continuousSubscriptions.empty()) {
- return toScopedAStatus(mSubscriptionManager->subscribe(callback,
- continuousSubscriptions,
- /*isContinuousProperty=*/true));
+ auto result = mSubscriptionManager->subscribe(callback, continuousSubscriptions,
+ /*isContinuousProperty=*/true);
+ if (!result.ok()) {
+ return toScopedAStatus(result);
+ }
}
}
return ScopedAStatus::ok();
@@ -819,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 bba730f..17683ae 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/SubscriptionManager.cpp
@@ -36,6 +36,7 @@
using ::aidl::android::hardware::automotive::vehicle::IVehicleCallback;
using ::aidl::android::hardware::automotive::vehicle::StatusCode;
using ::aidl::android::hardware::automotive::vehicle::SubscribeOptions;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropError;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
using ::android::base::Error;
using ::android::base::Result;
@@ -269,11 +270,42 @@
return clients;
}
+std::unordered_map<std::shared_ptr<IVehicleCallback>, std::vector<VehiclePropError>>
+SubscriptionManager::getSubscribedClientsForErrorEvents(
+ const std::vector<SetValueErrorEvent>& errorEvents) {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ std::unordered_map<std::shared_ptr<IVehicleCallback>, std::vector<VehiclePropError>> clients;
+
+ for (const auto& errorEvent : errorEvents) {
+ PropIdAreaId propIdAreaId{
+ .propId = errorEvent.propId,
+ .areaId = errorEvent.areaId,
+ };
+ if (mClientsByPropIdArea.find(propIdAreaId) == mClientsByPropIdArea.end()) {
+ continue;
+ }
+
+ for (const auto& [_, client] : mClientsByPropIdArea[propIdAreaId]) {
+ clients[client].push_back({
+ .propId = errorEvent.propId,
+ .areaId = errorEvent.areaId,
+ .errorCode = errorEvent.errorCode,
+ });
+ }
+ }
+ return clients;
+}
+
bool SubscriptionManager::isEmpty() {
std::scoped_lock<std::mutex> lockGuard(mLock);
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 05e569a..fb14373 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
@@ -62,6 +62,7 @@
using ::aidl::android::hardware::automotive::vehicle::VehicleAreaWindow;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfig;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropConfigs;
+using ::aidl::android::hardware::automotive::vehicle::VehiclePropError;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropErrors;
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyAccess;
@@ -349,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; }
@@ -1653,6 +1654,63 @@
ASSERT_EQ(msg.find("Vehicle HAL State: "), std::string::npos);
}
+TEST_F(DefaultVehicleHalTest, testOnPropertySetErrorEvent) {
+ std::vector<SubscribeOptions> options = {
+ {
+ .propId = GLOBAL_ON_CHANGE_PROP,
+ .areaIds = {0},
+ },
+ {
+ .propId = GLOBAL_CONTINUOUS_PROP,
+ .areaIds = {0},
+ .sampleRate = 1,
+ },
+ };
+ auto status = getClient()->subscribe(getCallbackClient(), options, 0);
+ ASSERT_TRUE(status.isOk()) << "subscribe failed: " << status.getMessage();
+ std::vector<SetValueErrorEvent> errorEvents = {
+ {
+ .propId = GLOBAL_ON_CHANGE_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::INTERNAL_ERROR,
+ },
+ {
+ .propId = GLOBAL_ON_CHANGE_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::ACCESS_DENIED,
+ },
+ {
+ .propId = GLOBAL_CONTINUOUS_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::INVALID_ARG,
+ },
+ };
+ std::vector<VehiclePropError> expectedResults = {
+ {
+ .propId = GLOBAL_ON_CHANGE_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::INTERNAL_ERROR,
+ },
+ {
+ .propId = GLOBAL_ON_CHANGE_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::ACCESS_DENIED,
+ },
+ {
+ .propId = GLOBAL_CONTINUOUS_PROP,
+ .areaId = 0,
+ .errorCode = StatusCode::INVALID_ARG,
+ },
+ };
+ getHardware()->sendOnPropertySetErrorEvent(errorEvents);
+
+ ASSERT_EQ(getCallback()->countOnPropertySetErrorResults(), 1u);
+ auto maybeVehiclePropErrors = getCallback()->nextOnPropertySetErrorResults();
+ ASSERT_TRUE(maybeVehiclePropErrors.has_value());
+ const auto& vehiclePropErrors = maybeVehiclePropErrors.value();
+ ASSERT_THAT(vehiclePropErrors.payloads, UnorderedElementsAreArray(expectedResults));
+}
+
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
index f51ce5c..54fede1 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.cpp
@@ -81,8 +81,14 @@
return result;
}
-ScopedAStatus MockVehicleCallback::onPropertySetError(const VehiclePropErrors&) {
- return ScopedAStatus::ok();
+ScopedAStatus MockVehicleCallback::onPropertySetError(const VehiclePropErrors& results) {
+ ScopedAStatus result;
+ {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ result = storeResults(results, &mOnPropertySetErrorResults);
+ }
+ mCond.notify_all();
+ return result;
}
std::optional<GetValueResults> MockVehicleCallback::nextGetValueResults() {
@@ -105,6 +111,16 @@
return mOnPropertyEventResults.size();
}
+std::optional<VehiclePropErrors> MockVehicleCallback::nextOnPropertySetErrorResults() {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ return pop(mOnPropertySetErrorResults);
+}
+
+size_t MockVehicleCallback::countOnPropertySetErrorResults() {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ return mOnPropertySetErrorResults.size();
+}
+
bool MockVehicleCallback::waitForSetValueResults(size_t size, size_t timeoutInNano) {
std::unique_lock lk(mLock);
return mCond.wait_for(lk, std::chrono::nanoseconds(timeoutInNano), [this, size] {
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
index f17b273..1545eae 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleCallback.h
@@ -63,6 +63,9 @@
nextSetValueResults();
std::optional<aidl::android::hardware::automotive::vehicle::VehiclePropValues>
nextOnPropertyEventResults();
+ size_t countOnPropertySetErrorResults();
+ std::optional<aidl::android::hardware::automotive::vehicle::VehiclePropErrors>
+ nextOnPropertySetErrorResults();
size_t countOnPropertyEventResults();
bool waitForSetValueResults(size_t size, size_t timeoutInNano);
bool waitForGetValueResults(size_t size, size_t timeoutInNano);
@@ -77,6 +80,8 @@
std::list<aidl::android::hardware::automotive::vehicle::VehiclePropValues>
mOnPropertyEventResults GUARDED_BY(mLock);
int32_t mSharedMemoryFileCount GUARDED_BY(mLock);
+ std::list<aidl::android::hardware::automotive::vehicle::VehiclePropErrors>
+ mOnPropertySetErrorResults GUARDED_BY(mLock);
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.cpp b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.cpp
index 4df4e1a..ba0d33d 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.cpp
@@ -131,8 +131,9 @@
}
void MockVehicleHardware::registerOnPropertySetErrorEvent(
- std::unique_ptr<const PropertySetErrorCallback>) {
- // TODO(b/200737967): mock this.
+ std::unique_ptr<const PropertySetErrorCallback> callback) {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ mPropertySetErrorCallback = std::move(callback);
}
void MockVehicleHardware::setPropertyConfigs(const std::vector<VehiclePropConfig>& configs) {
@@ -254,6 +255,12 @@
std::list<std::vector<SetValueRequest>>* storedRequests,
std::list<std::vector<SetValueResult>>* storedResponses) const;
+void MockVehicleHardware::sendOnPropertySetErrorEvent(
+ const std::vector<SetValueErrorEvent>& errorEvents) {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
+ (*mPropertySetErrorCallback)(errorEvents);
+}
+
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.h b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.h
index 743841c..46b30b9 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/vhal/test/MockVehicleHardware.h
@@ -85,6 +85,7 @@
aidl::android::hardware::automotive::vehicle::StatusCode status);
void setSleepTime(int64_t timeInNano);
void setDumpResult(DumpResult result);
+ void sendOnPropertySetErrorEvent(const std::vector<SetValueErrorEvent>& errorEvents);
private:
mutable std::mutex mLock;
@@ -104,6 +105,7 @@
mStatusByFunctions GUARDED_BY(mLock);
int64_t mSleepTime GUARDED_BY(mLock) = 0;
std::unique_ptr<const PropertyChangeCallback> mPropertyChangeCallback GUARDED_BY(mLock);
+ std::unique_ptr<const PropertySetErrorCallback> mPropertySetErrorCallback GUARDED_BY(mLock);
std::function<aidl::android::hardware::automotive::vehicle::StatusCode(
std::shared_ptr<const GetValuesCallback>,
const std::vector<aidl::android::hardware::automotive::vehicle::GetValueRequest>&)>
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..28bacb0 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -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
@@ -476,6 +478,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 +563,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 +652,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum EvStoppingMode
*/
EV_STOPPING_MODE =
@@ -696,8 +701,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 +719,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 +731,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleHvacFanDirection
*/
HVAC_FAN_DIRECTION = 0x0501 + 0x10000000 + 0x05000000
@@ -763,6 +771,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @unit VehicleUnit:CELSIUS
*/
HVAC_TEMPERATURE_SET = 0x0503 + 0x10000000 + 0x05000000
@@ -775,6 +784,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 +796,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 +814,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 +837,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 +854,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 +893,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 +915,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 +937,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 +960,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 +983,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 +1008,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 +1063,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 +1098,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 +1123,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 +1135,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 +1199,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleUnit
*/
DISTANCE_DISPLAY_UNITS = 0x0600 + 0x10000000 + 0x01000000
@@ -1198,6 +1223,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 +1248,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 +1273,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 +1290,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 +1313,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 +1663,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 +1688,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 +1702,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 +1718,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 +1744,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 +1770,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 +1796,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 +1821,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 +1835,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 +1849,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 +1866,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_AUTO_FOLD_ENABLED =
@@ -1843,6 +1884,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
MIRROR_AUTO_TILT_ENABLED =
@@ -1891,6 +1933,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 +1958,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 +1986,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 +2011,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 +2038,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 +2065,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 +2092,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 +2121,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 +2148,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 +2171,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 +2196,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 +2224,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 +2250,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 +2277,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 +2304,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 +2329,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 +2357,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 +2382,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 +2410,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 +2430,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 +2457,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 +2486,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 +2509,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 +2537,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 +2560,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 +2588,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 +2633,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
SEAT_FOOTWELL_LIGHTS_SWITCH =
@@ -2581,6 +2650,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 +2670,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 +2695,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 +2723,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 +2746,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 +2772,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 +2798,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 +2846,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 +2888,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 +2902,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 +2968,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum WindshieldWipersSwitch
*/
WINDSHIELD_WIPERS_SWITCH =
@@ -2915,6 +2995,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 +3021,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 +3044,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 +3070,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 +3085,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 +3099,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 +3114,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 +3141,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 +3160,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 +3380,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
HEADLIGHTS_SWITCH = 0x0E10 + 0x10000000 + 0x01000000
@@ -3305,6 +3395,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 +3426,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
FOG_LIGHTS_SWITCH = 0x0E12 + 0x10000000 + 0x01000000
@@ -3349,6 +3441,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
HAZARD_LIGHTS_SWITCH = 0x0E13 + 0x10000000 + 0x01000000
@@ -3377,6 +3470,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
CABIN_LIGHTS_SWITCH = 0x0F02 + 0x10000000 + 0x01000000
@@ -3405,6 +3499,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
READING_LIGHTS_SWITCH = 0x0F04 + 0x10000000 + 0x05000000
@@ -3450,6 +3545,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum VehicleLightSwitch
*/
STEERING_WHEEL_LIGHTS_SWITCH =
@@ -4119,6 +4215,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 +4247,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 +4264,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 +4286,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 +4314,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
@@ -4377,6 +4478,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
VEHICLE_IN_USE =
0x0F4A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4403,6 +4505,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 +4548,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 +4588,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 +4629,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 +4674,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 +4723,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
*/
LANE_CENTERING_ASSIST_ENABLED =
0x100A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
@@ -4690,6 +4798,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 +4842,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 +4868,7 @@
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
+ * @access VehiclePropertyAccess.READ
* @data_enum CruiseControlType
* @data_enum ErrorState
*/
@@ -4855,6 +4966,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 +5018,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..7276fe6
--- 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
#
@@ -23,29 +23,33 @@
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')
+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_VALUE = re.compile('\s*(\w+)\s*=(.*)')
LICENSE = """/*
* Copyright (C) 2022 The Android Open Source Project
@@ -185,33 +189,34 @@
continue
if RE_COMMENT_BEGIN.match(line):
in_comment = True
+ annotation = None
if RE_COMMENT_END.match(line):
in_comment = False
if in_comment:
match = self.annotation_re.match(line)
- if match:
+ if match and not annotation:
annotation = 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)
+ raise Exception(
+ 'No @' + self.name + ' annotation for property: ' + prop_name)
if id != 0:
- content += "\n"
+ content += '\n'
if cpp:
- annotation = annotation.replace(".", "::")
- content += (TAB + TAB + "{VehicleProperty::" + prop_name + ", " +
- annotation + "},")
+ annotation = annotation.replace('.', '::')
+ content += (TAB + TAB + '{VehicleProperty::' + prop_name + ', ' +
+ annotation + '},')
else:
- content += (TAB + TAB + "Map.entry(VehicleProperty." + prop_name + ", " +
- annotation + "),")
+ content += (TAB + TAB + 'Map.entry(VehicleProperty.' + prop_name + ', ' +
+ annotation + '),')
id += 1
- # Remove the additional "," at the end for the Java file.
+ # Remove the additional ',' at the end for the Java file.
if not cpp:
content = content[:-1]
@@ -221,25 +226,88 @@
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')
+ 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 envorinmental 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);
- 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)
+ 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);
+ 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
+ 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)
+
+ try:
+ 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 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))):
+ 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/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
index 876a91f..82ad917 100644
--- a/biometrics/face/aidl/default/Android.bp
+++ b/biometrics/face/aidl/default/Android.bp
@@ -7,11 +7,21 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
+filegroup {
+ name: "face-default.rc",
+ srcs: ["face-default.rc"],
+}
+
+filegroup {
+ name: "face-default.xml",
+ srcs: ["face-default.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-default.rc"],
+ vintf_fragments: [":face-default.xml"],
vendor: true,
shared_libs: [
"libbase",
diff --git a/biometrics/face/aidl/default/apex/Android.bp b/biometrics/face/aidl/default/apex/Android.bp
new file mode 100644
index 0000000..2f39a08
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/Android.bp
@@ -0,0 +1,79 @@
+// 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 {
+ 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",
+ manifest: "manifest.json",
+ file_contexts: "file_contexts",
+ key: "com.android.hardware.biometrics.face.key",
+ certificate: ":com.android.hardware.biometrics.face.certificate",
+ updatable: false,
+
+ vendor: true,
+ use_vndk_as_stable: true,
+
+ binaries: [
+ // hal
+ "android.hardware.biometrics.face-service.example",
+ ],
+ prebuilts: [
+ // init_rc
+ "face-default-apex.rc",
+ // vintf_fragment
+ "face-default-apex.xml",
+ // permission
+ "android.hardware.biometrics.face.prebuilt.xml",
+ ],
+
+ overrides: [
+ "android.hardware.biometrics.face-service.example",
+ ],
+}
+
+prebuilt_etc {
+ name: "face-default-apex.rc",
+ src: ":gen-face-default-apex.rc",
+ vendor: true,
+ 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)",
+}
+
+prebuilt_etc {
+ name: "face-default-apex.xml",
+ src: ":face-default.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
new file mode 100644
index 0000000..9f358ff
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.avbpubkey
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
new file mode 100644
index 0000000..ad8f57d
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pem
@@ -0,0 +1,52 @@
+-----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
new file mode 100644
index 0000000..af0ff4e
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.pk8
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
new file mode 100644
index 0000000..3dc37ff
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/com.android.hardware.biometrics.face.x509.pem
@@ -0,0 +1,34 @@
+-----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/file_contexts b/biometrics/face/aidl/default/apex/file_contexts
new file mode 100644
index 0000000..4f935c1
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/file_contexts
@@ -0,0 +1,3 @@
+(/.*)? u:object_r:vendor_file:s0
+/etc(/.*)? u:object_r:vendor_configs_file:s0
+/bin/hw/android\.hardware\.biometrics\.face-service\.example u:object_r:hal_face_default_exec:s0
\ No newline at end of file
diff --git a/biometrics/face/aidl/default/apex/manifest.json b/biometrics/face/aidl/default/apex/manifest.json
new file mode 100644
index 0000000..4d46896
--- /dev/null
+++ b/biometrics/face/aidl/default/apex/manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.hardware.biometrics.face",
+ "version": 1
+}
diff --git a/biometrics/fingerprint/aidl/default/Android.bp b/biometrics/fingerprint/aidl/default/Android.bp
index 16302eb..3bb3f3a 100644
--- a/biometrics/fingerprint/aidl/default/Android.bp
+++ b/biometrics/fingerprint/aidl/default/Android.bp
@@ -11,8 +11,8 @@
name: "android.hardware.biometrics.fingerprint-service.example",
vendor: true,
relative_install_path: "hw",
- init_rc: ["fingerprint-example.rc"],
- vintf_fragments: ["fingerprint-example.xml"],
+ init_rc: [":fingerprint-example.rc"],
+ vintf_fragments: [":fingerprint-example.xml"],
local_include_dirs: ["include"],
srcs: [
"FakeLockoutTracker.cpp",
@@ -142,3 +142,13 @@
property_owner: "Vendor",
vendor: true,
}
+
+filegroup {
+ name: "fingerprint-example.rc",
+ srcs: ["fingerprint-example.rc"],
+}
+
+filegroup {
+ name: "fingerprint-example.xml",
+ srcs: ["fingerprint-example.xml"],
+}
diff --git a/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp b/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
index 90ec8f2..5f5455a 100644
--- a/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeFingerprintEngine.cpp
@@ -31,6 +31,9 @@
namespace aidl::android::hardware::biometrics::fingerprint {
+FakeFingerprintEngine::FakeFingerprintEngine()
+ : mRandom(std::mt19937::default_seed), mWorkMode(WorkMode::kIdle) {}
+
void FakeFingerprintEngine::generateChallengeImpl(ISessionCallback* cb) {
BEGIN_OP(0);
std::uniform_int_distribution<int64_t> dist;
@@ -48,6 +51,64 @@
void FakeFingerprintEngine::enrollImpl(ISessionCallback* cb,
const keymaster::HardwareAuthToken& hat,
const std::future<void>& cancel) {
+ BEGIN_OP(0);
+ updateContext(WorkMode::kEnroll, cb, const_cast<std::future<void>&>(cancel), 0, hat);
+}
+
+void FakeFingerprintEngine::authenticateImpl(ISessionCallback* cb, int64_t operationId,
+ const std::future<void>& cancel) {
+ BEGIN_OP(0);
+ updateContext(WorkMode::kAuthenticate, cb, const_cast<std::future<void>&>(cancel), operationId,
+ keymaster::HardwareAuthToken());
+}
+
+void FakeFingerprintEngine::detectInteractionImpl(ISessionCallback* cb,
+ const std::future<void>& cancel) {
+ BEGIN_OP(0);
+
+ auto detectInteractionSupported =
+ FingerprintHalProperties::detect_interaction().value_or(false);
+ if (!detectInteractionSupported) {
+ LOG(ERROR) << "Detect interaction is not supported";
+ cb->onError(Error::UNABLE_TO_PROCESS, 0 /* vendorError */);
+ return;
+ }
+
+ updateContext(WorkMode::kDetectInteract, cb, const_cast<std::future<void>&>(cancel), 0,
+ keymaster::HardwareAuthToken());
+}
+
+void FakeFingerprintEngine::updateContext(WorkMode mode, ISessionCallback* cb,
+ std::future<void>& cancel, int64_t operationId,
+ const keymaster::HardwareAuthToken& hat) {
+ mCancel = std::move(cancel);
+ mWorkMode = mode;
+ mCb = cb;
+ mOperationId = operationId;
+ mHat = hat;
+}
+
+void FakeFingerprintEngine::fingerDownAction() {
+ LOG(INFO) << __func__;
+ switch (mWorkMode) {
+ case WorkMode::kAuthenticate:
+ onAuthenticateFingerDown(mCb, mOperationId, mCancel);
+ break;
+ case WorkMode::kEnroll:
+ onEnrollFingerDown(mCb, mHat, mCancel);
+ break;
+ case WorkMode::kDetectInteract:
+ onDetectInteractFingerDown(mCb, mCancel);
+ break;
+ default:
+ LOG(WARNING) << "unexpected mode: on fingerDownAction(), " << (int)mWorkMode;
+ break;
+ }
+}
+
+void FakeFingerprintEngine::onEnrollFingerDown(ISessionCallback* cb,
+ const keymaster::HardwareAuthToken& hat,
+ const std::future<void>& cancel) {
BEGIN_OP(getLatency(FingerprintHalProperties::operation_enroll_latency()));
// Do proper HAT verification in the real implementation.
@@ -116,8 +177,9 @@
}
}
-void FakeFingerprintEngine::authenticateImpl(ISessionCallback* cb, int64_t /* operationId */,
- const std::future<void>& cancel) {
+void FakeFingerprintEngine::onAuthenticateFingerDown(ISessionCallback* cb,
+ int64_t /* operationId */,
+ const std::future<void>& cancel) {
BEGIN_OP(getLatency(FingerprintHalProperties::operation_authenticate_latency()));
int64_t now = Util::getSystemNanoTime();
@@ -133,16 +195,7 @@
}
// got lockout?
- FakeLockoutTracker::LockoutMode lockoutMode = mLockoutTracker.getMode();
- if (lockoutMode == FakeLockoutTracker::LockoutMode::kPermanent) {
- LOG(ERROR) << "Fail: lockout permanent";
- cb->onLockoutPermanent();
- return;
- } else if (lockoutMode == FakeLockoutTracker::LockoutMode::kTimed) {
- int64_t timeLeft = mLockoutTracker.getLockoutTimeLeft();
- LOG(ERROR) << "Fail: lockout timed " << timeLeft;
- cb->onLockoutTimed(timeLeft);
- }
+ if (checkSensorLockout(cb)) return;
int i = 0;
do {
@@ -194,24 +247,17 @@
LOG(ERROR) << "Fail: fingerprint not enrolled";
cb->onAuthenticationFailed();
mLockoutTracker.addFailedAttempt();
+ checkSensorLockout(cb);
}
}
-void FakeFingerprintEngine::detectInteractionImpl(ISessionCallback* cb,
- const std::future<void>& cancel) {
+void FakeFingerprintEngine::onDetectInteractFingerDown(ISessionCallback* cb,
+ const std::future<void>& cancel) {
BEGIN_OP(getLatency(FingerprintHalProperties::operation_detect_interaction_latency()));
int64_t duration =
FingerprintHalProperties::operation_detect_interaction_duration().value_or(10);
- auto detectInteractionSupported =
- FingerprintHalProperties::detect_interaction().value_or(false);
- if (!detectInteractionSupported) {
- LOG(ERROR) << "Detect interaction is not supported";
- cb->onError(Error::UNABLE_TO_PROCESS, 0 /* vendorError */);
- return;
- }
-
auto acquired = FingerprintHalProperties::operation_detect_interaction_acquired().value_or("1");
auto acquiredInfos = parseIntSequence(acquired);
int N = acquiredInfos.size();
@@ -263,11 +309,6 @@
BEGIN_OP(0);
std::vector<int32_t> ids;
- // There are some enrollment sync issue with framework, which results in
- // a single template removal during the very firt sync command after reboot.
- // This is a workaround for now. TODO(b/243129174)
- ids.push_back(-1);
-
for (auto& enrollment : FingerprintHalProperties::enrollments()) {
auto id = enrollment.value_or(0);
if (id > 0) {
@@ -339,6 +380,7 @@
int32_t /*y*/, float /*minor*/,
float /*major*/) {
BEGIN_OP(0);
+ fingerDownAction();
return ndk::ScopedAStatus::ok();
}
@@ -369,7 +411,8 @@
if (dim.size() >= 4) {
d = dim[3];
}
- if (isValidStr) out = {0, x, y, r, d};
+ if (isValidStr)
+ out = {.sensorLocationX = x, .sensorLocationY = y, .sensorRadius = r, .display = d};
return isValidStr;
}
@@ -385,8 +428,7 @@
}
SensorLocation FakeFingerprintEngine::defaultSensorLocation() {
- return {0 /* displayId (not used) */, 0 /* sensorLocationX */, 0 /* sensorLocationY */,
- 0 /* sensorRadius */, "" /* display */};
+ return SensorLocation();
}
std::vector<int32_t> FakeFingerprintEngine::parseIntSequence(const std::string& str,
@@ -513,4 +555,18 @@
return dist(mRandom);
}
+bool FakeFingerprintEngine::checkSensorLockout(ISessionCallback* cb) {
+ FakeLockoutTracker::LockoutMode lockoutMode = mLockoutTracker.getMode();
+ if (lockoutMode == FakeLockoutTracker::LockoutMode::kPermanent) {
+ LOG(ERROR) << "Fail: lockout permanent";
+ cb->onLockoutPermanent();
+ return true;
+ } else if (lockoutMode == FakeLockoutTracker::LockoutMode::kTimed) {
+ int64_t timeLeft = mLockoutTracker.getLockoutTimeLeft();
+ LOG(ERROR) << "Fail: lockout timed " << timeLeft;
+ cb->onLockoutTimed(timeLeft);
+ return true;
+ }
+ return false;
+}
} // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
index 9f736e7..6982072 100644
--- a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineSide.cpp
@@ -28,10 +28,8 @@
namespace aidl::android::hardware::biometrics::fingerprint {
SensorLocation FakeFingerprintEngineSide::defaultSensorLocation() {
- SensorLocation location;
-
- return {0 /* displayId (not used) */, defaultSensorLocationX /* sensorLocationX */,
- defaultSensorLocationY /* sensorLocationY */, defaultSensorRadius /* sensorRadius */,
- "" /* display */};
+ return SensorLocation{.sensorLocationX = defaultSensorLocationX,
+ .sensorLocationY = defaultSensorLocationY,
+ .sensorRadius = defaultSensorRadius};
}
} // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineUdfps.cpp b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineUdfps.cpp
index 3cdfc70..68b0f0d 100644
--- a/biometrics/fingerprint/aidl/default/FakeFingerprintEngineUdfps.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeFingerprintEngineUdfps.cpp
@@ -31,12 +31,12 @@
namespace aidl::android::hardware::biometrics::fingerprint {
FakeFingerprintEngineUdfps::FakeFingerprintEngineUdfps()
- : FakeFingerprintEngine(), mWorkMode(WorkMode::kIdle), mPointerDownTime(0), mUiReadyTime(0) {}
+ : FakeFingerprintEngine(), mPointerDownTime(0), mUiReadyTime(0) {}
SensorLocation FakeFingerprintEngineUdfps::defaultSensorLocation() {
- return {0 /* displayId (not used) */, defaultSensorLocationX /* sensorLocationX */,
- defaultSensorLocationY /* sensorLocationY */, defaultSensorRadius /* sensorRadius */,
- "" /* display */};
+ return SensorLocation{.sensorLocationX = defaultSensorLocationX,
+ .sensorLocationY = defaultSensorLocationY,
+ .sensorRadius = defaultSensorRadius};
}
ndk::ScopedAStatus FakeFingerprintEngineUdfps::onPointerDownImpl(int32_t /*pointerId*/,
@@ -70,68 +70,17 @@
}
void FakeFingerprintEngineUdfps::fingerDownAction() {
- switch (mWorkMode) {
- case WorkMode::kAuthenticate:
- onAuthenticateFingerDown();
- break;
- case WorkMode::kEnroll:
- onEnrollFingerDown();
- break;
- case WorkMode::kDetectInteract:
- onDetectInteractFingerDown();
- break;
- default:
- LOG(WARNING) << "unexpected call: onUiReady()";
- break;
- }
-
+ FakeFingerprintEngine::fingerDownAction();
mUiReadyTime = 0;
mPointerDownTime = 0;
}
-void FakeFingerprintEngineUdfps::onAuthenticateFingerDown() {
- FakeFingerprintEngine::authenticateImpl(mCb, mOperationId, mCancelVec[0]);
-}
-
-void FakeFingerprintEngineUdfps::onEnrollFingerDown() {
- // Any use case to emulate display touch for each capture during enrollment?
- FakeFingerprintEngine::enrollImpl(mCb, mHat, mCancelVec[0]);
-}
-
-void FakeFingerprintEngineUdfps::onDetectInteractFingerDown() {
- FakeFingerprintEngine::detectInteractionImpl(mCb, mCancelVec[0]);
-}
-
-void FakeFingerprintEngineUdfps::enrollImpl(ISessionCallback* cb,
- const keymaster::HardwareAuthToken& hat,
- const std::future<void>& cancel) {
- updateContext(WorkMode::kEnroll, cb, const_cast<std::future<void>&>(cancel), 0, hat);
-}
-
-void FakeFingerprintEngineUdfps::authenticateImpl(ISessionCallback* cb, int64_t operationId,
- const std::future<void>& cancel) {
- updateContext(WorkMode::kAuthenticate, cb, const_cast<std::future<void>&>(cancel), operationId,
- keymaster::HardwareAuthToken());
-}
-
-void FakeFingerprintEngineUdfps::detectInteractionImpl(ISessionCallback* cb,
- const std::future<void>& cancel) {
- updateContext(WorkMode::kDetectInteract, cb, const_cast<std::future<void>&>(cancel), 0,
- keymaster::HardwareAuthToken());
-}
-
void FakeFingerprintEngineUdfps::updateContext(WorkMode mode, ISessionCallback* cb,
std::future<void>& cancel, int64_t operationId,
const keymaster::HardwareAuthToken& hat) {
+ FakeFingerprintEngine::updateContext(mode, cb, cancel, operationId, hat);
mPointerDownTime = 0;
mUiReadyTime = 0;
- mCancelVec.clear();
-
- mCancelVec.push_back(std::move(cancel));
- mWorkMode = mode;
- mCb = cb;
- mOperationId = operationId;
- mHat = hat;
}
} // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/FakeLockoutTracker.cpp b/biometrics/fingerprint/aidl/default/FakeLockoutTracker.cpp
index 5996406..b0163ee 100644
--- a/biometrics/fingerprint/aidl/default/FakeLockoutTracker.cpp
+++ b/biometrics/fingerprint/aidl/default/FakeLockoutTracker.cpp
@@ -67,9 +67,13 @@
int64_t res = 0;
if (mLockoutTimedStart > 0) {
+ int32_t lockoutTimedDuration =
+ FingerprintHalProperties::lockout_timed_duration().value_or(10 * 100);
auto now = Util::getSystemNanoTime();
- auto left = now - mLockoutTimedStart;
- res = (left > 0) ? (left / 1000000LL) : 0;
+ auto elapsed = (now - mLockoutTimedStart) / 1000000LL;
+ res = lockoutTimedDuration - elapsed;
+ LOG(INFO) << "xxxxxx: elapsed=" << elapsed << " now = " << now
+ << " mLockoutTimedStart=" << mLockoutTimedStart << " res=" << res;
}
return res;
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index f00a49d..79b563e 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -17,6 +17,7 @@
#include "Fingerprint.h"
#include "Session.h"
+#include <android-base/properties.h>
#include <fingerprint.sysprop.h>
#include <android-base/file.h>
@@ -59,6 +60,7 @@
<< sensorTypeProp;
}
LOG(INFO) << "sensorTypeProp:" << sensorTypeProp;
+ LOG(INFO) << "ro.product.name=" << ::android::base::GetProperty("ro.product.name", "UNKNOWN");
}
ndk::ScopedAStatus Fingerprint::getSensorProps(std::vector<SensorProps>* out) {
@@ -105,16 +107,16 @@
mSession->linkToDeath(cb->asBinder().get());
- LOG(INFO) << "createSession: sensorId:" << sensorId << " userId:" << userId;
+ LOG(INFO) << __func__ << ": sensorId:" << sensorId << " userId:" << userId;
return ndk::ScopedAStatus::ok();
}
binder_status_t Fingerprint::dump(int fd, const char** /*args*/, uint32_t numArgs) {
if (fd < 0) {
- LOG(ERROR) << "Fingerprint::dump fd invalid: " << fd;
+ LOG(ERROR) << __func__ << "fd invalid: " << fd;
return STATUS_BAD_VALUE;
} else {
- LOG(INFO) << "Fingerprint::dump fd:" << fd << "numArgs:" << numArgs;
+ LOG(INFO) << __func__ << " fd:" << fd << "numArgs:" << numArgs;
}
dprintf(fd, "----- FingerprintVirtualHal::dump -----\n");
@@ -131,11 +133,11 @@
binder_status_t Fingerprint::handleShellCommand(int in, int out, int err, const char** args,
uint32_t numArgs) {
- LOG(INFO) << "Fingerprint::handleShellCommand in:" << in << " out:" << out << " err:" << err
+ LOG(INFO) << __func__ << " in:" << in << " out:" << out << " err:" << err
<< " numArgs:" << numArgs;
if (numArgs == 0) {
- LOG(INFO) << "Fingerprint::handleShellCommand: available commands";
+ LOG(INFO) << __func__ << ": available commands";
onHelp(out);
return STATUS_OK;
}
@@ -163,7 +165,7 @@
}
void Fingerprint::resetConfigToDefault() {
- LOG(INFO) << "reset virtual HAL configuration to default";
+ LOG(INFO) << __func__ << ": reset virtual HAL configuration to default";
#define RESET_CONFIG_O(__NAME__) \
if (FingerprintHalProperties::__NAME__()) FingerprintHalProperties::__NAME__(std::nullopt)
#define RESET_CONFIG_V(__NAME__) \
diff --git a/biometrics/fingerprint/aidl/default/README.md b/biometrics/fingerprint/aidl/default/README.md
index 49b6c9d..823cd18 100644
--- a/biometrics/fingerprint/aidl/default/README.md
+++ b/biometrics/fingerprint/aidl/default/README.md
@@ -14,6 +14,12 @@
PRODUCT_PACKAGES_DEBUG += android.hardware.biometrics.fingerprint-service.example
```
+or add the following to include it as an apex:
+
+```
+PRODUCT_PACKAGES_DEBUG += com.android.hardware.biometrics.fingerprint.virtual
+```
+
The virtual HAL will be ignored if a real HAL is also installed on the target
device. Set the `biometric_virtual_enabled` settings and reboot the device to
switch to the virtual HAL. Unset it and reboot again to switch back.
diff --git a/biometrics/fingerprint/aidl/default/apex/Android.bp b/biometrics/fingerprint/aidl/default/apex/Android.bp
new file mode 100644
index 0000000..ad36ae2
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/Android.bp
@@ -0,0 +1,73 @@
+// 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 {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+apex_key {
+ name: "com.android.hardware.biometrics.fingerprint.virtual.key",
+ public_key: "com.android.hardware.biometrics.fingerprint.virtual.avbpubkey",
+ private_key: "com.android.hardware.biometrics.fingerprint.virtual.pem",
+}
+
+android_app_certificate {
+ name: "com.android.hardware.biometrics.fingerprint.virtual.certificate",
+ certificate: "com.android.hardware.biometrics.fingerprint.virtual",
+}
+
+apex {
+ name: "com.android.hardware.biometrics.fingerprint.virtual",
+ manifest: "manifest.json",
+ file_contexts: "file_contexts",
+ key: "com.android.hardware.biometrics.fingerprint.virtual.key",
+ certificate: ":com.android.hardware.biometrics.fingerprint.virtual.certificate",
+ updatable: false,
+ use_vndk_as_stable: true,
+ vendor: true,
+
+ binaries: [
+ "android.hardware.biometrics.fingerprint-service.example",
+ ],
+ prebuilts: [
+ // init_rc
+ "fingerprint-example-apex.rc",
+ // vintf_fragment
+ "fingerprint-example-apex.xml",
+ ],
+
+ overrides: [
+ "android.hardware.biometrics.fingerprint-service.example",
+ ],
+}
+
+genrule {
+ name: "gen-fingerprint-example-apex.rc",
+ srcs: [":fingerprint-example.rc"],
+ out: ["fingerprint-example-apex.rc"],
+ cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.biometrics.fingerprint.virtual/bin/@' $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "fingerprint-example-apex.rc",
+ src: ":gen-fingerprint-example-apex.rc",
+ installable: false,
+}
+
+prebuilt_etc {
+ name: "fingerprint-example-apex.xml",
+ src: ":fingerprint-example.xml",
+ sub_dir: "vintf",
+ installable: false,
+}
diff --git a/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.avbpubkey b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.avbpubkey
new file mode 100644
index 0000000..9f2334a
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.avbpubkey
Binary files differ
diff --git a/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pem b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pem
new file mode 100644
index 0000000..14eb288
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDwo6CxzAwmX46C
+N1j8zr0qf6uy1rDkG5r1s4faDNX/ThYpd69DWbVGf22yFO3KY3B+TmqKU+B0SiqY
+MHQjXc+UcTa0BKtPtQNSYFLK13/1rW69QrlLtcGyAp/CwksXYuuJ8Uzs28nQ5A+z
+fh6Vfsla9tUWDeWtN4oehmOwZ0ZKPBAKKocB5W+YJoIkdVnzkiOnWawk8Wn7a1N0
+jN5wFDO/99De+rTzYgKvV3Xb68H2UrIei4TW4wEpMZuDRUfbPlrSkJpdf+hYKKLb
+AkotUrwA1znYR3U9t0GIHwZ5sp+OQTCkTfJMg2c+Bpmkp3TAL24LdvkYVA2LZERB
+p7xNeACH210Bb8QOAEaiLyVWuL6iapXI67TOkZ5yk7heb5zCxRcpOMA4FQ0hWYoX
+AWstem9ADWvZgKe0BFGx7lhp5YmdBCzdNv0za3Va9EATJ0wgy4qMpZu3yjDPE9bq
+gdb3BQL3kiDHdfR/LF9bCIP9QEHg+1mWOZDO1x8lXCuQrgp+gnh9bbfX5g6lA8IQ
+dTfozjLQC3mVbl0P7/PIf9rnHjcqUh3/1RJH51tkgqBO8xn7D6AIOv665hI+O319
+PU4j26vLSfEu624IjEDK/gcgacuoYl3H3LMI5a2JIWFLOtpKRo9P2qFF702o8B97
+5slGDYnxpAAnEQQADuRYgDalDlFDNQIDAQABAoICABe7k4wleydHslbeXYzlWNu5
+prXnHaAJpvFHiQT00iAxU9c4IhVq4gl3ZNq03LTitMQIONK2rgLaE7RZxwJ77I6P
+0dzUPw8H47F6pX+y3EBfH/ZTf9HbNaS4RIhhQCWo0GEU5sjPbmqHK5NAw4Rr8jDh
++icILNg2C42yJF/P96s3nD9cbV8/ARAI8DnnRv1SMuj825DzLEgrEBqFECUOoQH0
+T2nGYRVF28zuO8X6TPFdu4puqSXGUqV86oD6UrlpP2zX7Rl+lWwoadNeuPEaYUdV
+8rMFbScujSx/HtTezISroj/6HgT0yrhfz0RhbY7MvrYrwCppk8JlG6Q8BkK/rJGI
+lGw7nKIp43Tl8T2Rzw0I1dPwxCLMJuVErUclznN7lq25akG5XRwBAUQQE6nHO3GL
+jh7eFW7rEcpUBEKYTK1ZA8QrWGUW3WittDqZ6VQU/ZudVoTcgbW3YpUYq5z76O4u
+B6tqlmNtQfIi3LBh8CD19SIjV6KKVa0s++ArQEu/DWzmHWh/STZZk4b1DSdFYqm0
+zgylOVUfpcG10OxPOdvMEsA0VoXxxwl6Hx3DSEX6VxOQvBSkwhu+gw8u2keOsIYZ
+Ha2OxtG5FiEQqSa8YNN/0NDdOp1eEyqvdvT7o51cqHHPvlyhk7XL0AguErCtGggn
+TZ3rsUChlauG9GbJ4nOBAoIBAQD+ceJpOkMuw04dhIY5of3CcTTKGWdt2/9SP9PU
+ZORC6ywBhRORQBhyVZIERmxfJUGsmePHeIEQ5L8IniUDRTCKrL+J2bR8NdYZfvCJ
+9cYD2gjXmikFabKn6mkQz7JXjSr3Vamx2ueKuYqfo72aHVvhFv6Hi/ulbUPPZ15c
+gVo0iU5GRt/1XNyTksSiSKRyxXJYWqg5GD2JQ92Zbo5a5LhulC7wFF39jyfTe7K2
+mfrCI7dr+A0WtiTpbRH9EIU8CseIBgIEDTgMAxbBdUZpF8pecIAy0MLFefLA+8CK
+RN+8AI+HRHybjvuonOAfeEtQyyknzycxh20dyrd3FvBj40NBAoIBAQDyHCRuNwXA
+twETiysx1XStaoODLQkPxSqdFIBD+tfVR+E/3blVXkdrFfrTcr8NGdcgsJgQgYWr
+h9OENizcHg75gX6wdo3qYGQdZZxws/dQbNylObFYNkyFQrD1vkQzjZl5O4DaRJC7
+6YbJrrXZ44dgZoMo/M8nyNU5yaLvoOf4GV4bSiEfsx/MxWK7x6rCcpw9jpm+yQlB
+9NblSgWzfg0hmcRBn6haC3q45walBYGTVJfzTOMgn5bUmMxKqKlCXvp20BPLdclQ
+5Y14OqkqhnFeHpBSJ7iVI9BBy2nAsyk37NvYVg7mN8fGiWbCqurIrbPRGSCdohGr
+wY7zOVd1hmb1AoIBAGPhVJ0177VlmT5hDUeGXVR8l9pVipJHb7xbrc2MJUZXhpi6
+Imo8HNyU1pKzCkt3Foaoig99MDzvbkX1vlXATUPCeBWmzgCMKZUsjUO6pJZSenIX
+485qJWVg0Ql2Xm2bzqf0in50jbuZBd+QqRbcO3rqSdPvkULo11uNGi95320MERvp
+KnTolPWhAWsq1NLwyuf//lUbPNyrNUvLaDop2nQd2ycG97ZXAa00u3yOiS64UoIh
+hxHJQkgXNp5+Y66kFJtCsHvirIOams4qOQ979UaJJunLpQlby30R1gzw6FqmZbEV
+o0x1HjicDCaOVBJNDcTAvoPkw2KUdtxattafGYECggEBAPICm4/oREHdLKBCjszj
+mBv4yrkG/XXcGrql0YkiZzj0/v3+PtJMyYsLj4xpuPv5hodQvtBRCDLsNMyF8tWc
+3k8d2GvANh/AdpLEDVrDKkYka3Jldxa8QEU84vLiW/5EXtNGXYjQ3PRZfLiBgZnp
+zFraXeVMwC3+nNWE7vAloXrosJ8KvI2ZWgIwlH8sGU8BjZgiwSBqiGx7t4u/MG+5
+Yprhv8HxPDG2I9hMZuHx3RJOjw1PIAJuRDEDA8LlUTvdAPRfDkpk1PWeYIl76blu
+Zkg0uQLGXcYG5JfAI1fSPzN9+kwHyiDqRTH6CtQwUTyEFajAO1AWvx82/hO2j+wU
+izkCggEANyPfsBjEUIZjwBuaHajm/tkcQAo3F4EgIkb1XR/EnfaaJp4I9S6hJ0vv
+5/fQtASn+JHjuIRk5l7g9N7lU+W+SiPvSxm1zZv8zLkqJpbKpMh7VIxT9joZ3E3/
+rzRLL60zYJ42hdulSFLoO1qCMErifBiTIwIZu7p6qKRH4+vqappb9QTPPlyAFFT6
+3UJfs49HGqd6gTyN7TSNxaya+ZBaLgSXhmExY/OtZazQn/iJl/dYpyYvmJdzNpd+
+XELU0IUcKivJaueCqK8NfEqfHz28GHdAkwHd0CzGnciF4tn9K2Sg8+X9jISk/Usx
+qHAY4JU3ldxQzDUZCz5VCz372pgXkQ==
+-----END PRIVATE KEY-----
diff --git a/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pk8 b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pk8
new file mode 100644
index 0000000..ab59820
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.pk8
Binary files differ
diff --git a/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.x509.pem b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.x509.pem
new file mode 100644
index 0000000..6d10157
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/com.android.hardware.biometrics.fingerprint.virtual.x509.pem
@@ -0,0 +1,35 @@
+-----BEGIN CERTIFICATE-----
+MIIGCzCCA/MCFFuIt0T1K9U92QfzZI3RpCyRp1ruMA0GCSqGSIb3DQEBCwUAMIHA
+MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91
+bnRhaW4gVmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEi
+MCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTE8MDoGA1UEAwwzY29t
+LmFuZHJvaWQuaGFyZHdhcmUuYmlvbWV0cmljcy5maW5nZXJwcmludC52aXJ0dWFs
+MCAXDTIzMDUxMDA3MDkwMloYDzQ3NjEwNDA1MDcwOTAyWjCBwDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcx
+EDAOBgNVBAoMB0FuZHJvaWQxEDAOBgNVBAsMB0FuZHJvaWQxIjAgBgkqhkiG9w0B
+CQEWE2FuZHJvaWRAYW5kcm9pZC5jb20xPDA6BgNVBAMMM2NvbS5hbmRyb2lkLmhh
+cmR3YXJlLmJpb21ldHJpY3MuZmluZ2VycHJpbnQudmlydHVhbDCCAiIwDQYJKoZI
+hvcNAQEBBQADggIPADCCAgoCggIBAMKXBcAw2Cs68KUMt5Hw2LVwkgEDiwqaXkG9
+V0SBK9y/q+6JCoxs9+4NsDPAEzHB+UHpqJ2i07VW1YV9F+2V93KCy/0fUjXIWmu8
+P0ixb+t8wlHZM2zYXQe9PELUZ/ZlYjAxkVKJjDmsCM8yzpRk+g3KKswlYwzyBoat
+qukrtvAaNKlRGJmjeStEo2o4qgQQUq96NAvSt3d6PsrNdFbXxqX61JT1dT8Kgxhk
++oSAkV2/C2knQp/8ME1oJrK/D+glynXVqVkvYYplxp+GCIZUs/DOJcHyb+ZrNLJP
+f2zr4yDoB2pnV3G9VcjbdznWc661Wg+B2yZEvLVbOMiqaMRlpHzNczghowCy3xoq
+42IUmp3HLak0DUmrrUZDnJAAT/KEZxh/PwLeAcmUrQCbUiG5lN/njuZ5LjJ8gdcg
+v0RDPSIIszamrf2l+xlaI34iXS7xHf3OLTbgst2L7LhW5qmLsB1SZzAYGIUYnRWZ
+aqzaFIAWt28S0yhpOt+qS7b1l+fvMb09jiKfxzkYQh2bB0HrpbTl2x390q2GW6yE
+jmraC+nTiAVDCUnDjOVji7nXDloSmK+MDD/DaDQ47PoYE3hBqc0fsRr2aIlvMOvb
+m+4VhO85gCuJAK02XuixLPo6ZqBAEFNwQ4NDcuOHuODaaJ/amTxQBXRpNXUSnhXy
+ejpwspHrAgMBAAEwDQYJKoZIhvcNAQELBQADggIBAGl3KGKMAWpefnRSQWs0n8kD
+eKYbzbe6mG0O5lqx5FKpJZpIki4RH1Yh5ZDR/NIeF2RNhlb/dqo99TKbCEGAoMB9
+R7EXDhyMcEXr5ATCA6iurhMKgkcLfOz6HkTI6k3wlPNuvx4iZGHD2KEvZiZGmae1
+dnK9iVtNs6ccyC0+V3y3Yt1fvjzp9SWcPpBXiO5QNf0sHxtzc32xXsBH0aLwLjDZ
+BCytwfEvq2S25v0r9m0fKquDBoFnk68cqClpNQZ9Ky0k8fGgOiQ5/jnVmgPmTheG
+mBcdPeUrhxGNs1vax/i/ysT4AVmDzIVW0uXVouhVeMQzykuy1+Ywa/Rn0jLxeNF2
+X3ooOE+EF8u9Pxf8ILRnfqok3VRuYLH6neNknTSKTx1aQAh9XbBpTUa/eCq3LDCP
+L6hSXYWjk9e5txbn0cNw9WuKMUg+Z9Qms3aVRFcvBxZQySEvf8FhgSrQbqbCbzhf
+dI0/ouW5w9iHUOh/FDvfETeZCeeTS+EOvGOqknzO8Y7PiChlgFsoMvC1GpHZ1ADy
+3xKSh15G92JCiv89CK2VvM8QDFh8ErQmSLjhMl700CLYis+AAZhCKOhAo573zj2u
+dZf29S+o3SEBhsl5snVGJW13Bu7BjxQtscCwKOv0g1cCkrqgcm2bMuNhpTK7rhMP
+i4hGSvbdGC27BtXbsiVX
+-----END CERTIFICATE-----
diff --git a/biometrics/fingerprint/aidl/default/apex/file_contexts b/biometrics/fingerprint/aidl/default/apex/file_contexts
new file mode 100644
index 0000000..1c189fc
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/file_contexts
@@ -0,0 +1,3 @@
+(/.*)? u:object_r:vendor_file:s0
+/etc(/.*)? u:object_r:vendor_configs_file:s0
+/bin/hw/android\.hardware\.biometrics\.fingerprint-service\.example u:object_r:hal_fingerprint_default_exec:s0
\ No newline at end of file
diff --git a/biometrics/fingerprint/aidl/default/apex/manifest.json b/biometrics/fingerprint/aidl/default/apex/manifest.json
new file mode 100644
index 0000000..bbd2c69
--- /dev/null
+++ b/biometrics/fingerprint/aidl/default/apex/manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.hardware.biometrics.fingerprint.virtual",
+ "version": 1
+}
diff --git a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
index 1279cd9..8ac7a95 100644
--- a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
+++ b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h
@@ -38,7 +38,7 @@
// A fake engine that is backed by system properties instead of hardware.
class FakeFingerprintEngine {
public:
- FakeFingerprintEngine() : mRandom(std::mt19937::default_seed) {}
+ FakeFingerprintEngine();
virtual ~FakeFingerprintEngine() {}
void generateChallengeImpl(ISessionCallback* cb);
@@ -66,6 +66,8 @@
virtual SensorLocation defaultSensorLocation();
+ 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);
@@ -74,15 +76,35 @@
std::mt19937 mRandom;
+ enum class WorkMode : int8_t { kIdle = 0, kAuthenticate, kEnroll, kDetectInteract };
+
+ WorkMode getWorkMode() { return mWorkMode; }
+
virtual std::string toString() const {
std::ostringstream os;
os << "----- FakeFingerprintEngine:: -----" << std::endl;
+ os << "mWorkMode:" << (int)mWorkMode;
os << "acquiredVendorInfoBase:" << FINGERPRINT_ACQUIRED_VENDOR_BASE;
os << ", errorVendorBase:" << FINGERPRINT_ERROR_VENDOR_BASE << std::endl;
os << mLockoutTracker.toString();
return os.str();
}
+ protected:
+ virtual void updateContext(WorkMode mode, ISessionCallback* cb, std::future<void>& cancel,
+ int64_t operationId, const keymaster::HardwareAuthToken& hat);
+
+ void onEnrollFingerDown(ISessionCallback* cb, const keymaster::HardwareAuthToken& hat,
+ const std::future<void>& cancel);
+ void onAuthenticateFingerDown(ISessionCallback* cb, int64_t, const std::future<void>& cancel);
+ void onDetectInteractFingerDown(ISessionCallback* cb, const std::future<void>& cancel);
+
+ WorkMode mWorkMode;
+ ISessionCallback* mCb;
+ keymaster::HardwareAuthToken mHat;
+ std::future<void> mCancel;
+ int64_t mOperationId;
+
private:
static constexpr int32_t FINGERPRINT_ACQUIRED_VENDOR_BASE = 1000;
static constexpr int32_t FINGERPRINT_ERROR_VENDOR_BASE = 1000;
@@ -91,6 +113,7 @@
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*);
FakeLockoutTracker mLockoutTracker;
};
diff --git a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngineUdfps.h b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngineUdfps.h
index c5e93e7..2270eca 100644
--- a/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngineUdfps.h
+++ b/biometrics/fingerprint/aidl/default/include/FakeFingerprintEngineUdfps.h
@@ -42,39 +42,20 @@
SensorLocation defaultSensorLocation() override;
- void enrollImpl(ISessionCallback* cb, const keymaster::HardwareAuthToken& hat,
- const std::future<void>& cancel);
- void authenticateImpl(ISessionCallback* cb, int64_t operationId,
- const std::future<void>& cancel);
- void detectInteractionImpl(ISessionCallback* cb, const std::future<void>& cancel);
-
- enum class WorkMode : int8_t { kIdle = 0, kAuthenticate, kEnroll, kDetectInteract };
-
- WorkMode getWorkMode() { return mWorkMode; }
+ void updateContext(WorkMode mode, ISessionCallback* cb, std::future<void>& cancel,
+ int64_t operationId, const keymaster::HardwareAuthToken& hat);
+ void fingerDownAction();
std::string toString() const {
std::ostringstream os;
os << FakeFingerprintEngine::toString();
os << "----- FakeFingerprintEngineUdfps -----" << std::endl;
- os << "mWorkMode:" << (int)mWorkMode;
os << ", mUiReadyTime:" << mUiReadyTime;
os << ", mPointerDownTime:" << mPointerDownTime << std::endl;
return os.str();
}
private:
- void onAuthenticateFingerDown();
- void onEnrollFingerDown();
- void onDetectInteractFingerDown();
- void fingerDownAction();
- void updateContext(WorkMode mode, ISessionCallback* cb, std::future<void>& cancel,
- int64_t operationId, const keymaster::HardwareAuthToken& hat);
-
- WorkMode mWorkMode;
- ISessionCallback* mCb;
- keymaster::HardwareAuthToken mHat;
- std::vector<std::future<void>> mCancelVec;
- int64_t mOperationId;
int64_t mPointerDownTime;
int64_t mUiReadyTime;
};
diff --git a/biometrics/fingerprint/aidl/default/include/Fingerprint.h b/biometrics/fingerprint/aidl/default/include/Fingerprint.h
index fc4fb8d..2bd66d4 100644
--- a/biometrics/fingerprint/aidl/default/include/Fingerprint.h
+++ b/biometrics/fingerprint/aidl/default/include/Fingerprint.h
@@ -43,6 +43,7 @@
private:
void resetConfigToDefault();
void onHelp(int);
+ void onSimFingerDown();
std::unique_ptr<FakeFingerprintEngine> mEngine;
WorkerThread mWorker;
diff --git a/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp b/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
index a200b39..86207a5 100644
--- a/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/FakeFingerprintEngineTest.cpp
@@ -178,6 +178,8 @@
FingerprintHalProperties::next_enrollment("4:0,0:true");
keymaster::HardwareAuthToken hat{.mac = {2, 4}};
mEngine.enrollImpl(mCallback.get(), hat, mCancel.get_future());
+ ASSERT_EQ(mEngine.getWorkMode(), FakeFingerprintEngine::WorkMode::kEnroll);
+ mEngine.fingerDownAction();
ASSERT_FALSE(FingerprintHalProperties::next_enrollment().has_value());
ASSERT_EQ(1, FingerprintHalProperties::enrollments().size());
ASSERT_EQ(4, FingerprintHalProperties::enrollments()[0].value());
@@ -192,6 +194,7 @@
keymaster::HardwareAuthToken hat{.mac = {2, 4}};
mCancel.set_value();
mEngine.enrollImpl(mCallback.get(), hat, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(Error::CANCELED, mCallback->mError);
ASSERT_EQ(-1, mCallback->mLastEnrolled);
ASSERT_EQ(0, FingerprintHalProperties::enrollments().size());
@@ -204,6 +207,7 @@
FingerprintHalProperties::next_enrollment(next);
keymaster::HardwareAuthToken hat{.mac = {2, 4}};
mEngine.enrollImpl(mCallback.get(), hat, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(Error::UNABLE_TO_PROCESS, mCallback->mError);
ASSERT_EQ(-1, mCallback->mLastEnrolled);
ASSERT_EQ(0, FingerprintHalProperties::enrollments().size());
@@ -216,6 +220,7 @@
keymaster::HardwareAuthToken hat{.mac = {2, 4}};
int32_t prevCnt = mCallback->mLastAcquiredCount;
mEngine.enrollImpl(mCallback.get(), hat, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_FALSE(FingerprintHalProperties::next_enrollment().has_value());
ASSERT_EQ(1, FingerprintHalProperties::enrollments().size());
ASSERT_EQ(4, FingerprintHalProperties::enrollments()[0].value());
@@ -229,6 +234,8 @@
FingerprintHalProperties::enrollments({1, 2});
FingerprintHalProperties::enrollment_hit(2);
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ ASSERT_EQ(mEngine.getWorkMode(), FakeFingerprintEngine::WorkMode::kAuthenticate);
+ mEngine.fingerDownAction();
ASSERT_FALSE(mCallback->mAuthenticateFailed);
ASSERT_EQ(2, mCallback->mLastAuthenticated);
ASSERT_EQ(1, mCallback->mLastAcquiredInfo);
@@ -239,6 +246,7 @@
FingerprintHalProperties::enrollment_hit(2);
mCancel.set_value();
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(Error::CANCELED, mCallback->mError);
ASSERT_EQ(-1, mCallback->mLastAuthenticated);
}
@@ -247,6 +255,7 @@
FingerprintHalProperties::enrollments({1, 2});
FingerprintHalProperties::enrollment_hit({});
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_TRUE(mCallback->mAuthenticateFailed);
}
@@ -254,6 +263,7 @@
FingerprintHalProperties::enrollments({1, 2});
FingerprintHalProperties::enrollment_hit(3);
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_TRUE(mCallback->mAuthenticateFailed);
}
@@ -262,6 +272,7 @@
FingerprintHalProperties::enrollment_hit(2);
FingerprintHalProperties::lockout(true);
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_TRUE(mCallback->mLockoutPermanent);
ASSERT_NE(mCallback->mError, Error::UNKNOWN);
}
@@ -269,6 +280,7 @@
TEST_F(FakeFingerprintEngineTest, AuthenticateError8) {
FingerprintHalProperties::operation_authenticate_error(8);
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(mCallback->mError, (Error)8);
ASSERT_EQ(mCallback->mErrorVendorCode, 0);
}
@@ -276,6 +288,7 @@
TEST_F(FakeFingerprintEngineTest, AuthenticateError9) {
FingerprintHalProperties::operation_authenticate_error(1009);
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(mCallback->mError, (Error)7);
ASSERT_EQ(mCallback->mErrorVendorCode, 9);
}
@@ -287,6 +300,7 @@
FingerprintHalProperties::operation_authenticate_acquired("4,1009");
int32_t prevCount = mCallback->mLastAcquiredCount;
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_FALSE(mCallback->mAuthenticateFailed);
ASSERT_EQ(2, mCallback->mLastAuthenticated);
ASSERT_EQ(prevCount + 2, mCallback->mLastAcquiredCount);
@@ -300,6 +314,8 @@
FingerprintHalProperties::enrollment_hit(2);
FingerprintHalProperties::operation_detect_interaction_acquired("");
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ ASSERT_EQ(mEngine.getWorkMode(), FakeFingerprintEngine::WorkMode::kDetectInteract);
+ mEngine.fingerDownAction();
ASSERT_EQ(1, mCallback->mInteractionDetectedCount);
ASSERT_EQ(1, mCallback->mLastAcquiredInfo);
}
@@ -310,6 +326,7 @@
FingerprintHalProperties::enrollment_hit(2);
mCancel.set_value();
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(Error::CANCELED, mCallback->mError);
ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
}
@@ -319,6 +336,7 @@
FingerprintHalProperties::enrollments({1, 2});
FingerprintHalProperties::enrollment_hit({});
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
}
@@ -326,6 +344,7 @@
FingerprintHalProperties::enrollments({1, 2});
FingerprintHalProperties::enrollment_hit(25);
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
}
@@ -333,6 +352,7 @@
FingerprintHalProperties::detect_interaction(true);
FingerprintHalProperties::operation_detect_interaction_error(8);
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(0, mCallback->mInteractionDetectedCount);
ASSERT_EQ(mCallback->mError, (Error)8);
ASSERT_EQ(mCallback->mErrorVendorCode, 0);
@@ -345,6 +365,7 @@
FingerprintHalProperties::operation_detect_interaction_acquired("4,1013");
int32_t prevCount = mCallback->mLastAcquiredCount;
mEngine.detectInteractionImpl(mCallback.get(), mCancel.get_future());
+ mEngine.fingerDownAction();
ASSERT_EQ(1, mCallback->mInteractionDetectedCount);
ASSERT_EQ(prevCount + 2, mCallback->mLastAcquiredCount);
ASSERT_EQ(7, mCallback->mLastAcquiredInfo);
@@ -354,9 +375,7 @@
TEST_F(FakeFingerprintEngineTest, EnumerateEnrolled) {
FingerprintHalProperties::enrollments({2, 4, 8});
mEngine.enumerateEnrollmentsImpl(mCallback.get());
- ASSERT_EQ(
- 4,
- mCallback->mLastEnrollmentEnumerated.size()); // Due to workaround. TODO (b/243129174)
+ ASSERT_EQ(3, mCallback->mLastEnrollmentEnumerated.size());
for (auto id : FingerprintHalProperties::enrollments()) {
ASSERT_TRUE(std::find(mCallback->mLastEnrollmentEnumerated.begin(),
mCallback->mLastEnrollmentEnumerated.end(),
diff --git a/biometrics/fingerprint/aidl/default/tests/FakeLockoutTrackerTest.cpp b/biometrics/fingerprint/aidl/default/tests/FakeLockoutTrackerTest.cpp
index 1b071ee..93c6f84 100644
--- a/biometrics/fingerprint/aidl/default/tests/FakeLockoutTrackerTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/FakeLockoutTrackerTest.cpp
@@ -65,11 +65,11 @@
ASSERT_EQ(mLockoutTracker.getMode(), FakeLockoutTracker::LockoutMode::kTimed);
// time left
int N = 5;
- int64_t prevTimeLeft = INT_MIN;
+ int64_t prevTimeLeft = INT_MAX;
for (int i = 0; i < N; i++) {
SLEEP_MS(LOCKOUT_TIMED_DURATION / N + 1);
int64_t currTimeLeft = mLockoutTracker.getLockoutTimeLeft();
- ASSERT_TRUE(currTimeLeft > prevTimeLeft);
+ ASSERT_TRUE(currTimeLeft < prevTimeLeft);
prevTimeLeft = currTimeLeft;
}
ASSERT_EQ(mLockoutTracker.getMode(), FakeLockoutTracker::LockoutMode::kNone);
diff --git a/bluetooth/1.0/default/bluetooth_address.cc b/bluetooth/1.0/default/bluetooth_address.cc
index 93a5469..df3e84a 100644
--- a/bluetooth/1.0/default/bluetooth_address.cc
+++ b/bluetooth/1.0/default/bluetooth_address.cc
@@ -67,7 +67,7 @@
const uint8_t zero_bdaddr[kBytes] = {0, 0, 0, 0, 0, 0};
if ((string_to_bytes(address, local_addr)) &&
(memcmp(local_addr, zero_bdaddr, kBytes) != 0)) {
- ALOGD("%s: Got Factory BDA %s", __func__, address);
+ ALOGD("%s: Got Factory BDA", __func__);
return true;
} else {
ALOGE("%s: Got Invalid BDA '%s' from %s", __func__, address, property);
@@ -78,12 +78,14 @@
// No BDADDR found in the file. Look for BDA in a factory property.
if (property_get(FACTORY_BDADDR_PROPERTY, property, NULL) &&
string_to_bytes(property, local_addr)) {
+ ALOGD("%s: Using FACTORY_BDADDR_PROPERTY", __func__);
return true;
}
// No factory BDADDR found. Look for a previously stored BDA.
if (property_get(PERSIST_BDADDR_PROPERTY, property, NULL) &&
string_to_bytes(property, local_addr)) {
+ ALOGD("%s: Using PERSIST_BDADDR_PROPERTY", __func__);
return true;
}
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index 869c723..a2211f4 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -33,8 +33,7 @@
class BluetoothDeathRecipient : public hidl_death_recipient {
public:
- BluetoothDeathRecipient(const sp<IBluetoothHci> hci)
- : mHci(hci), has_died_(false) {}
+ BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {}
virtual void serviceDied(
uint64_t /*cookie*/,
@@ -52,7 +51,7 @@
};
BluetoothHci::BluetoothHci()
- : death_recipient_(new BluetoothDeathRecipient(this)) {bt_enabled = 0;}
+ : death_recipient_(new BluetoothDeathRecipient(this)) {}
Return<void> BluetoothHci::initialize(
const ::android::sp<IBluetoothHciCallbacks>& cb) {
@@ -62,19 +61,8 @@
return Void();
}
- if (bt_enabled == 1) {
- ALOGE("initialize was called!");
- return Void();
- }
- bt_enabled = 1;
death_recipient_->setHasDied(false);
cb->linkToDeath(death_recipient_, 0);
- unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) {
- if (death_recipient->getHasDied())
- ALOGI("Skipping unlink call, service died.");
- else
- cb->unlinkToDeath(death_recipient);
- };
bool rc = VendorInterface::Initialize(
[cb](bool status) {
@@ -124,12 +112,6 @@
Return<void> BluetoothHci::close() {
ALOGI("BluetoothHci::close()");
-
- if (bt_enabled != 1) {
- ALOGE("should initialize first!");
- return Void();
- }
- bt_enabled = 0;
unlink_cb_(death_recipient_);
VendorInterface::Shutdown();
return Void();
@@ -152,11 +134,6 @@
void BluetoothHci::sendDataToController(const uint8_t type,
const hidl_vec<uint8_t>& data) {
- if (bt_enabled != 1) {
- ALOGE("should initialize first!");
- return;
- }
-
VendorInterface::get()->Send(type, data.data(), data.size());
}
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index 5130c87..c966990 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -48,7 +48,6 @@
void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
::android::sp<BluetoothDeathRecipient> death_recipient_;
std::function<void(sp<BluetoothDeathRecipient>&)> unlink_cb_;
- int bt_enabled;
};
extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name);
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index c23d667..1d15dd6 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -36,8 +36,6 @@
"BLUETOOTH_VENDOR_LIB_INTERFACE";
static const int INVALID_FD = -1;
-std::mutex vendor_mutex_;
-std::mutex initcb_mutex_;
namespace {
@@ -49,25 +47,13 @@
uint16_t opcode;
} internal_command;
-enum {
- VENDOR_STATE_INIT = 1,
- VENDOR_STATE_OPENING, /* during opening */
- VENDOR_STATE_OPENED, /* open in fops_open */
- VENDOR_STATE_CLOSING, /* during closing */
- VENDOR_STATE_CLOSED, /* closed */
-
- VENDOR_STATE_MSG_NUM
-} ;
-
-uint8_t vstate = VENDOR_STATE_INIT;
-
// True when LPM is not enabled yet or wake is not asserted.
bool lpm_wake_deasserted;
uint32_t lpm_timeout_ms;
bool recent_activity_flag;
VendorInterface* g_vendor_interface = nullptr;
-static VendorInterface vendor_interface;
+std::mutex wakeup_mutex_;
HC_BT_HDR* WrapPacketAndCopy(uint16_t event, const hidl_vec<uint8_t>& data) {
size_t packet_size = data.size() + sizeof(HC_BT_HDR);
@@ -181,8 +167,11 @@
InitializeCompleteCallback initialize_complete_cb,
PacketReadCallback event_cb, PacketReadCallback acl_cb,
PacketReadCallback sco_cb, PacketReadCallback iso_cb) {
- ALOGI("%s: VendorInterface::Initialize", __func__);
- g_vendor_interface = &vendor_interface;
+ if (g_vendor_interface) {
+ ALOGE("%s: No previous Shutdown()?", __func__);
+ return false;
+ }
+ g_vendor_interface = new VendorInterface();
return g_vendor_interface->Open(initialize_complete_cb, event_cb, acl_cb,
sco_cb, iso_cb);
}
@@ -190,8 +179,9 @@
void VendorInterface::Shutdown() {
LOG_ALWAYS_FATAL_IF(!g_vendor_interface, "%s: No Vendor interface!",
__func__);
- ALOGI("%s: VendorInterface::Shutdown", __func__);
g_vendor_interface->Close();
+ delete g_vendor_interface;
+ g_vendor_interface = nullptr;
}
VendorInterface* VendorInterface::get() { return g_vendor_interface; }
@@ -201,189 +191,144 @@
PacketReadCallback acl_cb,
PacketReadCallback sco_cb,
PacketReadCallback iso_cb) {
- {
- std::unique_lock<std::mutex> guard(vendor_mutex_);
- if (vstate == VENDOR_STATE_OPENED) {
- ALOGW("VendorInterface opened!");
- return true;
- }
+ initialize_complete_cb_ = initialize_complete_cb;
- if ((vstate == VENDOR_STATE_CLOSING) ||
- (vstate == VENDOR_STATE_OPENING)) {
- ALOGW("VendorInterface open/close is on-going !");
- return true;
- }
+ // Initialize vendor interface
- vstate = VENDOR_STATE_OPENING;
- ALOGI("%s: VendorInterface::Open", __func__);
+ lib_handle_ = dlopen(VENDOR_LIBRARY_NAME, RTLD_NOW);
+ if (!lib_handle_) {
+ ALOGE("%s unable to open %s (%s)", __func__, VENDOR_LIBRARY_NAME,
+ dlerror());
+ return false;
+ }
- initialize_complete_cb_ = initialize_complete_cb;
- // Initialize vendor interface
-
- lib_handle_ = dlopen(VENDOR_LIBRARY_NAME, RTLD_NOW);
- if (!lib_handle_) {
- ALOGE("%s unable to open %s (%s)", __func__, VENDOR_LIBRARY_NAME,
- dlerror());
- return false;
- }
-
- lib_interface_ = reinterpret_cast<bt_vendor_interface_t*>(
- dlsym(lib_handle_, VENDOR_LIBRARY_SYMBOL_NAME));
- if (!lib_interface_) {
- ALOGE("%s unable to find symbol %s in %s (%s)", __func__,
- VENDOR_LIBRARY_SYMBOL_NAME, VENDOR_LIBRARY_NAME, dlerror());
- return false;
- }
+ lib_interface_ = reinterpret_cast<bt_vendor_interface_t*>(
+ dlsym(lib_handle_, VENDOR_LIBRARY_SYMBOL_NAME));
+ if (!lib_interface_) {
+ ALOGE("%s unable to find symbol %s in %s (%s)", __func__,
+ VENDOR_LIBRARY_SYMBOL_NAME, VENDOR_LIBRARY_NAME, dlerror());
+ return false;
+ }
// Get the local BD address
- uint8_t local_bda[BluetoothAddress::kBytes] = {0, 0, 0, 0, 0, 0};
- if (!BluetoothAddress::get_local_address(local_bda)) {
- // BT driver will get BD address from NVRAM for MTK solution
- ALOGW("%s: No pre-set Bluetooth Address!", __func__);
- }
- int status = lib_interface_->init(&lib_callbacks, (unsigned char*)local_bda);
- if (status) {
- ALOGE("%s unable to initialize vendor library: %d", __func__, status);
- return false;
- }
+ uint8_t local_bda[BluetoothAddress::kBytes];
+ if (!BluetoothAddress::get_local_address(local_bda)) {
+ LOG_ALWAYS_FATAL("%s: No Bluetooth Address!", __func__);
+ }
+ int status = lib_interface_->init(&lib_callbacks, (unsigned char*)local_bda);
+ if (status) {
+ ALOGE("%s unable to initialize vendor library: %d", __func__, status);
+ return false;
+ }
- ALOGD("%s vendor library loaded", __func__);
+ ALOGD("%s vendor library loaded", __func__);
// Power on the controller
- int power_state = BT_VND_PWR_ON;
- lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
+ int power_state = BT_VND_PWR_ON;
+ lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
// Get the UART socket(s)
- int fd_list[CH_MAX] = {0};
- int fd_count = lib_interface_->op(BT_VND_OP_USERIAL_OPEN, &fd_list);
+ int fd_list[CH_MAX] = {0};
+ int fd_count = lib_interface_->op(BT_VND_OP_USERIAL_OPEN, &fd_list);
- if (fd_count < 1 || fd_count > CH_MAX - 1) {
- ALOGE("%s: fd_count %d is invalid!", __func__, fd_count);
+ if (fd_count < 1 || fd_count > CH_MAX - 1) {
+ ALOGE("%s: fd_count %d is invalid!", __func__, fd_count);
+ return false;
+ }
+
+ for (int i = 0; i < fd_count; i++) {
+ if (fd_list[i] == INVALID_FD) {
+ ALOGE("%s: fd %d is invalid!", __func__, fd_list[i]);
return false;
}
+ }
- for (int i = 0; i < fd_count; i++) {
- if (fd_list[i] == INVALID_FD) {
- ALOGE("%s: fd %d is invalid!", __func__, fd_list[i]);
- return false;
- }
- }
+ event_cb_ = event_cb;
+ PacketReadCallback intercept_events = [this](const hidl_vec<uint8_t>& event) {
+ HandleIncomingEvent(event);
+ };
- event_cb_ = event_cb;
- PacketReadCallback intercept_events = [this](const hidl_vec<uint8_t>& event) {
- HandleIncomingEvent(event);
- };
-
- if (fd_count == 1) {
- hci::H4Protocol* h4_hci =
- new hci::H4Protocol(fd_list[0], intercept_events, acl_cb, sco_cb, iso_cb);
- fd_watcher_.WatchFdForNonBlockingReads(
- fd_list[0], [h4_hci](int fd) { h4_hci->OnDataReady(fd); });
- hci_ = h4_hci;
- } else {
- hci::MctProtocol* mct_hci =
- new hci::MctProtocol(fd_list, intercept_events, acl_cb);
- fd_watcher_.WatchFdForNonBlockingReads(
- fd_list[CH_EVT], [mct_hci](int fd) { mct_hci->OnEventDataReady(fd); });
- fd_watcher_.WatchFdForNonBlockingReads(
- fd_list[CH_ACL_IN],
- [mct_hci](int fd) { mct_hci->OnAclDataReady(fd); });
- hci_ = mct_hci;
- }
+ if (fd_count == 1) {
+ hci::H4Protocol* h4_hci =
+ new hci::H4Protocol(fd_list[0], intercept_events, acl_cb, sco_cb, iso_cb);
+ fd_watcher_.WatchFdForNonBlockingReads(
+ fd_list[0], [h4_hci](int fd) { h4_hci->OnDataReady(fd); });
+ hci_ = h4_hci;
+ } else {
+ hci::MctProtocol* mct_hci =
+ new hci::MctProtocol(fd_list, intercept_events, acl_cb);
+ fd_watcher_.WatchFdForNonBlockingReads(
+ fd_list[CH_EVT], [mct_hci](int fd) { mct_hci->OnEventDataReady(fd); });
+ fd_watcher_.WatchFdForNonBlockingReads(
+ fd_list[CH_ACL_IN], [mct_hci](int fd) { mct_hci->OnAclDataReady(fd); });
+ hci_ = mct_hci;
+ }
// Initially, the power management is off.
- lpm_wake_deasserted = true;
+ lpm_wake_deasserted = true;
// Start configuring the firmware
- firmware_startup_timer_ = new FirmwareStartupTimer();
- lib_interface_->op(BT_VND_OP_FW_CFG, nullptr);
+ firmware_startup_timer_ = new FirmwareStartupTimer();
+ lib_interface_->op(BT_VND_OP_FW_CFG, nullptr);
- vstate = VENDOR_STATE_OPENED;
- ALOGI("%s: VendorInterface::Open done!!!", __func__);
- } // vendor_mutex_ done
return true;
}
void VendorInterface::Close() {
// These callbacks may send HCI events (vendor-dependent), so make sure to
// StopWatching the file descriptor after this.
-
- if (vstate != VENDOR_STATE_OPENED) {
- ALOGW("VendorInterface is not allow close(%d)", vstate);
- return;
- }
- vstate = VENDOR_STATE_CLOSING;
- ALOGI("%s: VendorInterface::Close", __func__);
-
if (lib_interface_ != nullptr) {
- lib_interface_->cleanup();
bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
}
- {
- std::unique_lock<std::mutex> guard(vendor_mutex_);
+ fd_watcher_.StopWatchingFileDescriptors();
- fd_watcher_.StopWatchingFileDescriptors();
- if (hci_ != nullptr) {
- delete hci_;
- hci_ = nullptr;
- }
+ if (hci_ != nullptr) {
+ delete hci_;
+ hci_ = nullptr;
+ }
- if (lib_interface_ != nullptr) {
- lib_interface_->op(BT_VND_OP_USERIAL_CLOSE, nullptr);
+ if (lib_interface_ != nullptr) {
+ lib_interface_->op(BT_VND_OP_USERIAL_CLOSE, nullptr);
- int power_state = BT_VND_PWR_OFF;
- lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
+ int power_state = BT_VND_PWR_OFF;
+ lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
- lib_interface_ = nullptr;
- }
+ lib_interface_->cleanup();
+ lib_interface_ = nullptr;
+ }
- if (lib_handle_ != nullptr) {
- dlclose(lib_handle_);
- lib_handle_ = nullptr;
- }
+ if (lib_handle_ != nullptr) {
+ dlclose(lib_handle_);
+ lib_handle_ = nullptr;
+ }
- if (firmware_startup_timer_ != nullptr) {
- delete firmware_startup_timer_;
- firmware_startup_timer_ = nullptr;
- }
- vstate = VENDOR_STATE_CLOSED;
- } // vendor_mutex_ done
- ALOGI("%s: VendorInterface::Close done!!!", __func__);
+ if (firmware_startup_timer_ != nullptr) {
+ delete firmware_startup_timer_;
+ firmware_startup_timer_ = nullptr;
+ }
}
size_t VendorInterface::Send(uint8_t type, const uint8_t* data, size_t length) {
- {
- std::unique_lock<std::mutex> guard(vendor_mutex_);
+ std::unique_lock<std::mutex> lock(wakeup_mutex_);
+ recent_activity_flag = true;
- if (vstate != VENDOR_STATE_OPENED) {
- ALOGW("VendorInterface is not open yet(%d)!", vstate);
- return 0;
- }
- ALOGI("%s: VendorInterface::Send", __func__);
-
- if (lib_interface_ == nullptr) {
- ALOGE("lib_interface_ is null");
- return 0;
- }
- recent_activity_flag = true;
- if (lpm_wake_deasserted == true) {
- // Restart the timer.
- fd_watcher_.ConfigureTimeout(std::chrono::milliseconds(lpm_timeout_ms),
+ if (lpm_wake_deasserted == true) {
+ // Restart the timer.
+ fd_watcher_.ConfigureTimeout(std::chrono::milliseconds(lpm_timeout_ms),
[this]() { OnTimeout(); });
- // Assert wake.
- lpm_wake_deasserted = false;
- bt_vendor_lpm_wake_state_t wakeState = BT_VND_LPM_WAKE_ASSERT;
- lib_interface_->op(BT_VND_OP_LPM_WAKE_SET_STATE, &wakeState);
- ALOGV("%s: Sent wake before (%02x)", __func__, data[0] | (data[1] << 8));
- }
+ // Assert wake.
+ lpm_wake_deasserted = false;
+ bt_vendor_lpm_wake_state_t wakeState = BT_VND_LPM_WAKE_ASSERT;
+ lib_interface_->op(BT_VND_OP_LPM_WAKE_SET_STATE, &wakeState);
+ ALOGV("%s: Sent wake before (%02x)", __func__, data[0] | (data[1] << 8));
+ }
- return hci_ ? hci_->Send(type, data, length) : 0;
- } // vendor_mutex_ done
+ return hci_->Send(type, data, length);
}
void VendorInterface::OnFirmwareConfigured(uint8_t result) {
@@ -394,36 +339,25 @@
firmware_startup_timer_ = nullptr;
}
- {
- std::unique_lock<std::mutex> guard(initcb_mutex_);
- ALOGD("%s OnFirmwareConfigured get lock", __func__);
- if (initialize_complete_cb_ != nullptr) {
- LOG_ALWAYS_FATAL_IF((result != 0),
- "%s: Failed to init firmware!", __func__);
- initialize_complete_cb_(result == 0);
- }
- } // initcb_mutex_ done
-
- if (lib_interface_ != nullptr) {
- lib_interface_->op(BT_VND_OP_GET_LPM_IDLE_TIMEOUT, &lpm_timeout_ms);
- ALOGI("%s: lpm_timeout_ms %d", __func__, lpm_timeout_ms);
-
- bt_vendor_lpm_mode_t mode = BT_VND_LPM_ENABLE;
- lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
-
- ALOGD("%s Calling StartLowPowerWatchdog()", __func__);
- fd_watcher_.ConfigureTimeout(std::chrono::milliseconds(lpm_timeout_ms),
- [this]() { OnTimeout(); });
- }
- else {
- ALOGE("lib_interface_ is null");
+ if (initialize_complete_cb_ != nullptr) {
+ initialize_complete_cb_(result == 0);
+ initialize_complete_cb_ = nullptr;
}
- initialize_complete_cb_ = nullptr;
+ lib_interface_->op(BT_VND_OP_GET_LPM_IDLE_TIMEOUT, &lpm_timeout_ms);
+ ALOGI("%s: lpm_timeout_ms %d", __func__, lpm_timeout_ms);
+
+ bt_vendor_lpm_mode_t mode = BT_VND_LPM_ENABLE;
+ lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
+
+ ALOGD("%s Calling StartLowPowerWatchdog()", __func__);
+ fd_watcher_.ConfigureTimeout(std::chrono::milliseconds(lpm_timeout_ms),
+ [this]() { OnTimeout(); });
}
void VendorInterface::OnTimeout() {
ALOGV("%s", __func__);
+ std::unique_lock<std::mutex> lock(wakeup_mutex_);
if (recent_activity_flag == false) {
lpm_wake_deasserted = true;
bt_vendor_lpm_wake_state_t wakeState = BT_VND_LPM_WAKE_DEASSERT;
diff --git a/bluetooth/1.0/default/vendor_interface.h b/bluetooth/1.0/default/vendor_interface.h
index 2df3946..040f31a 100644
--- a/bluetooth/1.0/default/vendor_interface.h
+++ b/bluetooth/1.0/default/vendor_interface.h
@@ -22,8 +22,6 @@
#include "bt_vendor_lib.h"
#include "hci_protocol.h"
-extern std::mutex initcb_mutex_;
-
namespace android {
namespace hardware {
namespace bluetooth {
@@ -47,9 +45,10 @@
size_t Send(uint8_t type, const uint8_t* data, size_t length);
void OnFirmwareConfigured(uint8_t result);
- virtual ~VendorInterface() = default;
private:
+ virtual ~VendorInterface() = default;
+
bool Open(InitializeCompleteCallback initialize_complete_cb,
PacketReadCallback event_cb, PacketReadCallback acl_cb,
PacketReadCallback sco_cb, PacketReadCallback iso_cb);
diff --git a/bluetooth/aidl/TEST_MAPPING b/bluetooth/aidl/TEST_MAPPING
index 41a508e..18958d2 100644
--- a/bluetooth/aidl/TEST_MAPPING
+++ b/bluetooth/aidl/TEST_MAPPING
@@ -1,24 +1,12 @@
{
"presubmit" : [
{
- "name" : "VtsHalBluetoothTargetTest",
- "options": [
- {
- // TODO(b/275847929)
- "exclude-filter": "VtsHalBluetoothTargetTest.PerInstance/BluetoothAidlTest#Vsr_Bluetooth5Requirements/0_android_hardware_bluetooth_IBluetoothHci_default"
- }
- ]
+ "name" : "VtsHalBluetoothTargetTest"
}
],
"hwasan-presubmit" : [
{
- "name" : "VtsHalBluetoothTargetTest",
- "options": [
- {
- // TODO(b/275847929)
- "exclude-filter": "VtsHalBluetoothTargetTest.PerInstance/BluetoothAidlTest#Vsr_Bluetooth5Requirements/0_android_hardware_bluetooth_IBluetoothHci_default"
- }
- ]
+ "name" : "VtsHalBluetoothTargetTest"
}
]
}
diff --git a/bluetooth/aidl/default/BluetoothHci.cpp b/bluetooth/aidl/default/BluetoothHci.cpp
index ac2eabc..782122f 100644
--- a/bluetooth/aidl/default/BluetoothHci.cpp
+++ b/bluetooth/aidl/default/BluetoothHci.cpp
@@ -174,7 +174,10 @@
mFdWatcher.WatchFdForNonBlockingReads(mFd,
[this](int) { mH4->OnDataReady(); });
- send(PacketType::COMMAND, reset);
+ ndk::ScopedAStatus result = send(PacketType::COMMAND, reset);
+ if (!result.isOk()) {
+ ALOGE("Error sending reset command");
+ }
auto status = resetFuture.wait_for(std::chrono::seconds(1));
mFdWatcher.StopWatchingFileDescriptors();
if (status == std::future_status::ready) {
@@ -221,6 +224,7 @@
ALOGI("Unable to open Linux interface, trying default path.");
mFd = getFdFromDevPath();
if (mFd < 0) {
+ mState = HalState::READY;
cb->initializationComplete(Status::UNABLE_TO_OPEN_INTERFACE);
return ndk::ScopedAStatus::ok();
}
@@ -278,6 +282,7 @@
{
std::lock_guard<std::mutex> guard(mStateMutex);
if (mState != HalState::ONE_CLIENT) {
+ ASSERT(mState != HalState::INITIALIZING);
ALOGI("Already closed");
return ndk::ScopedAStatus::ok();
}
@@ -301,30 +306,35 @@
ndk::ScopedAStatus BluetoothHci::sendHciCommand(
const std::vector<uint8_t>& packet) {
- send(PacketType::COMMAND, packet);
- return ndk::ScopedAStatus::ok();
+ return send(PacketType::COMMAND, packet);
}
ndk::ScopedAStatus BluetoothHci::sendAclData(
const std::vector<uint8_t>& packet) {
- send(PacketType::ACL_DATA, packet);
- return ndk::ScopedAStatus::ok();
+ return send(PacketType::ACL_DATA, packet);
}
ndk::ScopedAStatus BluetoothHci::sendScoData(
const std::vector<uint8_t>& packet) {
- send(PacketType::SCO_DATA, packet);
- return ndk::ScopedAStatus::ok();
+ return send(PacketType::SCO_DATA, packet);
}
ndk::ScopedAStatus BluetoothHci::sendIsoData(
const std::vector<uint8_t>& packet) {
- send(PacketType::ISO_DATA, packet);
- return ndk::ScopedAStatus::ok();
+ return send(PacketType::ISO_DATA, packet);
}
-void BluetoothHci::send(PacketType type, const std::vector<uint8_t>& v) {
+ndk::ScopedAStatus BluetoothHci::send(PacketType type,
+ const std::vector<uint8_t>& v) {
+ if (mH4 == nullptr) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+ if (v.empty()) {
+ ALOGE("Packet is empty, no data was found to be sent");
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
mH4->Send(type, v);
+ return ndk::ScopedAStatus::ok();
}
} // namespace aidl::android::hardware::bluetooth::impl
diff --git a/bluetooth/aidl/default/BluetoothHci.h b/bluetooth/aidl/default/BluetoothHci.h
index 85aafc8..477cc5c 100644
--- a/bluetooth/aidl/default/BluetoothHci.h
+++ b/bluetooth/aidl/default/BluetoothHci.h
@@ -66,8 +66,9 @@
::android::hardware::bluetooth::async::AsyncFdWatcher mFdWatcher;
int getFdFromDevPath();
- void send(::android::hardware::bluetooth::hci::PacketType type,
- const std::vector<uint8_t>& packet);
+ [[nodiscard]] ndk::ScopedAStatus send(
+ ::android::hardware::bluetooth::hci::PacketType type,
+ const std::vector<uint8_t>& packet);
std::unique_ptr<NetBluetoothMgmt> management_{};
// Send a reset command and discard all packets until a reset is received.
diff --git a/bluetooth/audio/OWNERS b/bluetooth/audio/OWNERS
index a8e9bda..f3657ca 100644
--- a/bluetooth/audio/OWNERS
+++ b/bluetooth/audio/OWNERS
@@ -1,4 +1,6 @@
+# Bug component: 27441
+
include platform/packages/modules/Bluetooth:/OWNERS
-cheneyni@google.com
aliceypkuo@google.com
+quocbaodo@google.com
diff --git a/bluetooth/audio/aidl/TEST_MAPPING b/bluetooth/audio/aidl/TEST_MAPPING
new file mode 100644
index 0000000..0c853f8
--- /dev/null
+++ b/bluetooth/audio/aidl/TEST_MAPPING
@@ -0,0 +1,12 @@
+{
+ "presubmit": [
+ {
+ "name": "VtsHalBluetoothAudioTargetTest"
+ }
+ ],
+ "kernel-presubmit": [
+ {
+ "name": "VtsHalBluetoothAudioTargetTest"
+ }
+ ]
+}
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
index 2a88959..9c72e19 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
@@ -27,9 +27,31 @@
namespace bluetooth {
namespace audio {
+struct BluetoothAudioProviderContext {
+ SessionType session_type;
+};
+
+static void binderUnlinkedCallbackAidl(void* cookie) {
+ LOG(INFO) << __func__;
+ BluetoothAudioProviderContext* ctx =
+ static_cast<BluetoothAudioProviderContext*>(cookie);
+ delete ctx;
+}
+
+static void binderDiedCallbackAidl(void* cookie) {
+ LOG(INFO) << __func__;
+ BluetoothAudioProviderContext* ctx =
+ static_cast<BluetoothAudioProviderContext*>(cookie);
+ CHECK_NE(ctx, nullptr);
+
+ BluetoothAudioSessionReport::OnSessionEnded(ctx->session_type);
+}
+
BluetoothAudioProvider::BluetoothAudioProvider() {
death_recipient_ = ::ndk::ScopedAIBinder_DeathRecipient(
AIBinder_DeathRecipient_new(binderDiedCallbackAidl));
+ AIBinder_DeathRecipient_setOnUnlinked(death_recipient_.get(),
+ binderUnlinkedCallbackAidl);
}
ndk::ScopedAStatus BluetoothAudioProvider::startSession(
@@ -39,17 +61,21 @@
DataMQDesc* _aidl_return) {
if (host_if == nullptr) {
*_aidl_return = DataMQDesc();
+ LOG(ERROR) << __func__ << " - SessionType=" << toString(session_type_)
+ << " Illegal argument";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
latency_modes_ = latencyModes;
audio_config_ = std::make_unique<AudioConfiguration>(audio_config);
stack_iface_ = host_if;
- is_binder_died = false;
+ BluetoothAudioProviderContext* cookie =
+ new BluetoothAudioProviderContext{session_type_};
AIBinder_linkToDeath(stack_iface_->asBinder().get(), death_recipient_.get(),
- this);
+ cookie);
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
onSessionReady(_aidl_return);
return ndk::ScopedAStatus::ok();
}
@@ -60,10 +86,8 @@
if (stack_iface_ != nullptr) {
BluetoothAudioSessionReport::OnSessionEnded(session_type_);
- if (!is_binder_died) {
- AIBinder_unlinkToDeath(stack_iface_->asBinder().get(),
- death_recipient_.get(), this);
- }
+ AIBinder_unlinkToDeath(stack_iface_->asBinder().get(),
+ death_recipient_.get(), this);
} else {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
<< " has NO session";
@@ -77,10 +101,9 @@
ndk::ScopedAStatus BluetoothAudioProvider::streamStarted(
BluetoothAudioStatus status) {
- LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
- << ", status=" << toString(status);
-
if (stack_iface_ != nullptr) {
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+ << ", status=" << toString(status);
BluetoothAudioSessionReport::ReportControlStatus(session_type_, true,
status);
} else {
@@ -108,8 +131,6 @@
ndk::ScopedAStatus BluetoothAudioProvider::updateAudioConfiguration(
const AudioConfiguration& audio_config) {
- LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
-
if (stack_iface_ == nullptr || audio_config_ == nullptr) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
<< " has NO session";
@@ -125,13 +146,13 @@
audio_config_ = std::make_unique<AudioConfiguration>(audio_config);
BluetoothAudioSessionReport::ReportAudioConfigChanged(session_type_,
*audio_config_);
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
+ << " | audio_config=" << audio_config.toString();
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus BluetoothAudioProvider::setLowLatencyModeAllowed(
bool allowed) {
- LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
-
if (stack_iface_ == nullptr) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
<< " has NO session";
@@ -143,17 +164,6 @@
return ndk::ScopedAStatus::ok();
}
-void BluetoothAudioProvider::binderDiedCallbackAidl(void* ptr) {
- LOG(ERROR) << __func__ << " - BluetoothAudio Service died";
- auto provider = static_cast<BluetoothAudioProvider*>(ptr);
- if (provider == nullptr) {
- LOG(ERROR) << __func__ << ": Null AudioProvider HAL died";
- return;
- }
- provider->is_binder_died = true;
- provider->endSession();
-}
-
} // namespace audio
} // namespace bluetooth
} // namespace hardware
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
index dbfff7d..b6e07a1 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.h
@@ -54,7 +54,6 @@
protected:
virtual ndk::ScopedAStatus onSessionReady(DataMQDesc* _aidl_return) = 0;
- static void binderDiedCallbackAidl(void* cookie_ptr);
::ndk::ScopedAIBinder_DeathRecipient death_recipient_;
@@ -62,9 +61,7 @@
std::unique_ptr<AudioConfiguration> audio_config_ = nullptr;
SessionType session_type_;
std::vector<LatencyMode> latency_modes_;
- bool is_binder_died = false;
};
-
} // namespace audio
} // namespace bluetooth
} // namespace hardware
diff --git a/bluetooth/audio/aidl/vts/Android.bp b/bluetooth/audio/aidl/vts/Android.bp
index e03fb58..3e6953f 100644
--- a/bluetooth/audio/aidl/vts/Android.bp
+++ b/bluetooth/audio/aidl/vts/Android.bp
@@ -15,16 +15,20 @@
],
tidy_timeout_srcs: ["VtsHalBluetoothAudioTargetTest.cpp"],
srcs: ["VtsHalBluetoothAudioTargetTest.cpp"],
- shared_libs: [
+ static_libs: [
"android.hardware.audio.common-V1-ndk",
"android.hardware.bluetooth.audio-V3-ndk",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
+ "android.media.audio.common.types-V2-ndk",
+ ],
+ shared_libs: [
"libbase",
"libbinder_ndk",
"libcutils",
"libfmq",
],
+ test_config: "VtsHalBluetoothAudioTargetTest.xml",
test_suites: [
"general-tests",
"vts",
diff --git a/camera/provider/aidl/vts/AndroidTest.xml b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.xml
similarity index 65%
rename from camera/provider/aidl/vts/AndroidTest.xml
rename to bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.xml
index 226121d..7b02685 100644
--- a/camera/provider/aidl/vts/AndroidTest.xml
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
@@ -13,21 +13,24 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration description="Runs VtsAidlHalCameraProvider_TargetTest.">
+<configuration description="Runs VtsHalBluetoothAudioTargetTest.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
+ <object type="module_controller" class="com.android.tradefed.testtype.suite.module.ShippingApiLevelModuleController">
+ <!-- Skips test module if ro.product.first_api_level < 33. -->
+ <option name="min-api-level" value="33" />
+ </object>
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
- <option name="push" value="VtsAidlHalCameraProvider_TargetTest->/data/local/tmp/VtsAidlHalCameraProvider_TargetTest" />
+ <option name="push" value="VtsHalBluetoothAudioTargetTest->/data/local/tmp/VtsHalBluetoothAudioTargetTest" />
</target_preparer>
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
- <option name="module-name" value="VtsAidlHalCameraProvider_TargetTest" />
- <option name="native-test-timeout" value="1800000"/> <!-- 30 min -->
+ <option name="module-name" value="VtsHalBluetoothAudioTargetTest" />
</test>
-</configuration>
\ No newline at end of file
+</configuration>
diff --git a/bluetooth/audio/utils/Android.bp b/bluetooth/audio/utils/Android.bp
index 914d2b2..2cba61e 100644
--- a/bluetooth/audio/utils/Android.bp
+++ b/bluetooth/audio/utils/Android.bp
@@ -93,4 +93,5 @@
srcs: ["le_audio_codec_capabilities/le_audio_codec_capabilities.xsd"],
package_name: "aidl.android.hardware.bluetooth.audio.setting",
api_dir: "le_audio_codec_capabilities/schema",
+ root_elements: ["leAudioOffloadSetting"],
}
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
index 886350e..3cef417 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
@@ -96,15 +96,7 @@
public class XmlParser {
ctor public XmlParser();
- method public static aidl.android.hardware.bluetooth.audio.setting.CodecConfiguration readCodecConfiguration(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.CodecConfigurationList readCodecConfigurationList(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.Configuration readConfiguration(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.ConfigurationList readConfigurationList(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static aidl.android.hardware.bluetooth.audio.setting.LeAudioOffloadSetting readLeAudioOffloadSetting(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.Scenario readScenario(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.ScenarioList readScenarioList(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.StrategyConfiguration readStrategyConfiguration(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
- method public static aidl.android.hardware.bluetooth.audio.setting.StrategyConfigurationList readStrategyConfigurationList(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
}
diff --git a/bluetooth/hci/h4_protocol.cc b/bluetooth/hci/h4_protocol.cc
index 51a624f..5f6d86e 100644
--- a/bluetooth/hci/h4_protocol.cc
+++ b/bluetooth/hci/h4_protocol.cc
@@ -105,15 +105,12 @@
buffer_offset += 1;
} else {
bool packet_ready = hci_packetizer_.OnDataReady(
- hci_packet_type_, input_buffer, buffer_offset);
+ hci_packet_type_, input_buffer, &buffer_offset);
if (packet_ready) {
- // Call packet callback and move offset.
- buffer_offset += OnPacketReady(hci_packetizer_.GetPacket());
+ // Call packet callback.
+ OnPacketReady(hci_packetizer_.GetPacket());
// Get ready for the next type byte.
hci_packet_type_ = PacketType::UNKNOWN;
- } else {
- // The data was consumed, but there wasn't a packet.
- buffer_offset = input_buffer.size();
}
}
}
diff --git a/bluetooth/hci/hci_packetizer.cc b/bluetooth/hci/hci_packetizer.cc
index 5b6c443..4135920 100644
--- a/bluetooth/hci/hci_packetizer.cc
+++ b/bluetooth/hci/hci_packetizer.cc
@@ -51,9 +51,10 @@
bool HciPacketizer::OnDataReady(PacketType packet_type,
const std::vector<uint8_t>& buffer,
- size_t offset) {
+ size_t* offset) {
bool packet_completed = false;
- size_t bytes_available = buffer.size() - offset;
+ size_t bytes_available = buffer.size() - *offset;
+
switch (state_) {
case HCI_HEADER: {
size_t header_size =
@@ -62,18 +63,20 @@
bytes_remaining_ = header_size;
packet_.clear();
}
+
size_t bytes_to_copy = std::min(bytes_remaining_, bytes_available);
- packet_.insert(packet_.end(), buffer.begin() + offset,
- buffer.begin() + offset + bytes_to_copy);
+ packet_.insert(packet_.end(), buffer.begin() + *offset,
+ buffer.begin() + *offset + bytes_to_copy);
bytes_remaining_ -= bytes_to_copy;
bytes_available -= bytes_to_copy;
+ *offset += bytes_to_copy;
+
if (bytes_remaining_ == 0) {
bytes_remaining_ = HciGetPacketLengthForType(packet_type, packet_);
if (bytes_remaining_ > 0) {
state_ = HCI_PAYLOAD;
if (bytes_available > 0) {
- packet_completed =
- OnDataReady(packet_type, buffer, offset + bytes_to_copy);
+ packet_completed = OnDataReady(packet_type, buffer, offset);
}
} else {
packet_completed = true;
@@ -84,9 +87,10 @@
case HCI_PAYLOAD: {
size_t bytes_to_copy = std::min(bytes_remaining_, bytes_available);
- packet_.insert(packet_.end(), buffer.begin() + offset,
- buffer.begin() + offset + bytes_to_copy);
+ packet_.insert(packet_.end(), buffer.begin() + *offset,
+ buffer.begin() + *offset + bytes_to_copy);
bytes_remaining_ -= bytes_to_copy;
+ *offset += bytes_to_copy;
if (bytes_remaining_ == 0) {
state_ = HCI_HEADER;
packet_completed = true;
@@ -94,6 +98,7 @@
break;
}
}
+
return packet_completed;
}
diff --git a/bluetooth/hci/hci_packetizer.h b/bluetooth/hci/hci_packetizer.h
index ba3e841..0d9319f 100644
--- a/bluetooth/hci/hci_packetizer.h
+++ b/bluetooth/hci/hci_packetizer.h
@@ -28,7 +28,7 @@
public:
HciPacketizer() = default;
bool OnDataReady(PacketType packet_type, const std::vector<uint8_t>& data,
- size_t offset);
+ size_t* offset);
const std::vector<uint8_t>& GetPacket() const;
protected:
diff --git a/bluetooth/hci/test/h4_protocol_unittest.cc b/bluetooth/hci/test/h4_protocol_unittest.cc
index d3fab61..f0c49b5 100644
--- a/bluetooth/hci/test/h4_protocol_unittest.cc
+++ b/bluetooth/hci/test/h4_protocol_unittest.cc
@@ -31,7 +31,6 @@
#include <vector>
#include "async_fd_watcher.h"
-#include "log/log.h"
using android::hardware::bluetooth::async::AsyncFdWatcher;
using namespace android::hardware::bluetooth::hci;
@@ -49,6 +48,7 @@
static char event_data[100] = "The edges of a surface are lines.";
static char iso_data[100] =
"A plane angle is the inclination to one another of two lines in a ...";
+static char short_payload[10] = "12345";
// 5 seconds. Just don't hang.
static constexpr size_t kTimeoutMs = 5000;
@@ -225,6 +225,49 @@
CallDataReady();
}
+ void WriteAndExpectManyAclDataPacketsDifferentOffsetsShort() {
+ std::promise<void> last_packet_promise;
+ size_t kNumPackets = 30;
+ // h4 type[1] + handle[2] + size[2]
+ char preamble[5] = {static_cast<uint8_t>(PacketType::ACL_DATA), 19, 92, 0,
+ 0};
+ int length = strlen(short_payload);
+ preamble[3] = length & 0xFF;
+ preamble[4] = 0;
+
+ EXPECT_CALL(acl_cb_, Call(PacketMatches(preamble + 1, kAclHeaderSize,
+ short_payload)))
+ .Times(kNumPackets);
+ ExpectInboundEvent(event_data, &last_packet_promise);
+
+ char all_packets[kNumPackets * 10];
+ size_t total_bytes = 0;
+
+ for (size_t packet = 0; packet < kNumPackets; packet++) {
+ for (size_t i = 0; i < sizeof(preamble); i++) {
+ all_packets[total_bytes++] = preamble[i];
+ }
+ for (size_t i = 0; i < length; i++) {
+ all_packets[total_bytes++] = short_payload[i];
+ }
+ }
+
+ size_t written_bytes = 0;
+ size_t partial_size = 1;
+ while (written_bytes < total_bytes) {
+ size_t to_write = std::min(partial_size, total_bytes - written_bytes);
+ TEMP_FAILURE_RETRY(
+ write(chip_uart_fd_, all_packets + written_bytes, to_write));
+ written_bytes += to_write;
+ CallDataReady();
+ partial_size++;
+ partial_size = partial_size % 5 + 1;
+ }
+ WriteInboundEvent(event_data);
+ CallDataReady();
+ WaitForTimeout(&last_packet_promise);
+ }
+
testing::MockFunction<void(const std::vector<uint8_t>&)> cmd_cb_;
testing::MockFunction<void(const std::vector<uint8_t>&)> event_cb_;
testing::MockFunction<void(const std::vector<uint8_t>&)> acl_cb_;
@@ -276,6 +319,10 @@
WriteAndExpectManyInboundAclDataPackets(sco_data);
}
+TEST_F(H4ProtocolTest, TestMultipleWritesPacketsShortWrites) {
+ WriteAndExpectManyAclDataPacketsDifferentOffsetsShort();
+}
+
TEST_F(H4ProtocolTest, TestDisconnect) {
EXPECT_CALL(disconnect_cb_, Call());
close(chip_uart_fd_);
@@ -332,10 +379,8 @@
void TearDown() override { fd_watcher_.StopWatchingFileDescriptors(); }
- void CallDataReady() override {
- // The Async test can't call data ready.
- FAIL();
- }
+ // Calling CallDataReady() has no effect in the AsyncTest
+ void CallDataReady() override {}
void SendAndReadUartOutbound(PacketType type, char* data) {
ALOGD("%s sending", __func__);
@@ -434,6 +479,10 @@
WriteAndExpectManyInboundAclDataPackets(sco_data);
}
+TEST_F(H4ProtocolAsyncTest, TestMultipleWritesPacketsShortWrites) {
+ WriteAndExpectManyAclDataPacketsDifferentOffsetsShort();
+}
+
TEST_F(H4ProtocolAsyncTest, TestDisconnect) {
std::promise<void> promise;
EXPECT_CALL(disconnect_cb_, Call()).WillOnce(Notify(&promise));
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/Metadata.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/Metadata.aidl
index 3298cac..7769b8c 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/Metadata.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/Metadata.aidl
@@ -70,9 +70,9 @@
/**
* Station name.
*
- * This is a generic field to cover any radio technology.
+ * <p>This is a generic field to cover any radio technology.
*
- * If the PROGRAM_NAME has the same content as DAB_*_NAME or RDS_PS,
+ * <p>Note: If the program name has the same content as dab*Name or ({@link Metadata#rdsPs},
* it may not be present, to preserve space - framework must repopulate
* it on the client side.
*/
@@ -86,10 +86,10 @@
/**
* DAB ensemble name abbreviated (string).
*
- * The string must be up to 8 characters long.
+ * <p>Note: The string must be up to 8 characters long.
*
- * If the short variant is present, the long (DAB_ENSEMBLE_NAME) one must be
- * present as well.
+ * <p>Note: If the short variant is present, the long ({@link Metadata#dabEnsembleName})
+ * one must be present as well.
*/
String dabEnsembleNameShort;
@@ -99,7 +99,9 @@
String dabServiceName;
/**
- * DAB service name abbreviated (see DAB_ENSEMBLE_NAME_SHORT) (string)
+ * DAB service name abbreviated (string)
+ *
+ * <p>Note: The string must be up to 8 characters long.
*/
String dabServiceNameShort;
@@ -109,7 +111,9 @@
String dabComponentName;
/**
- * DAB component name abbreviated (see DAB_ENSEMBLE_NAME_SHORT) (string)
+ * DAB component name abbreviated (string)
+ *
+ * <p>Note: The string must be up to 8 characters long.
*/
String dabComponentNameShort;
}
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/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/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp b/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
index 356673f..8bee1b2 100644
--- a/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
+++ b/broadcastradio/aidl/vts/src/VtsHalBroadcastradioAidlTargetTest.cpp
@@ -32,11 +32,11 @@
#include <aidl/Gtest.h>
#include <aidl/Vintf.h>
#include <broadcastradio-utils-aidl/Utils.h>
-#include <broadcastradio-vts-utils/mock-timeout.h>
#include <cutils/bitops.h>
#include <gmock/gmock.h>
#include <chrono>
+#include <condition_variable>
#include <optional>
#include <regex>
@@ -61,11 +61,6 @@
namespace bcutils = ::aidl::android::hardware::broadcastradio::utils;
-inline constexpr std::chrono::seconds kTuneTimeoutSec =
- std::chrono::seconds(IBroadcastRadio::TUNER_TIMEOUT_MS * 1000);
-inline constexpr std::chrono::seconds kProgramListScanTimeoutSec =
- std::chrono::seconds(IBroadcastRadio::LIST_COMPLETE_TIMEOUT_MS * 1000);
-
const ConfigFlag kConfigFlagValues[] = {
ConfigFlag::FORCE_MONO,
ConfigFlag::FORCE_ANALOG,
@@ -108,20 +103,68 @@
} // namespace
-class TunerCallbackMock : public BnTunerCallback {
+class CallbackFlag final {
public:
- TunerCallbackMock();
+ CallbackFlag(int timeoutMs) { mTimeoutMs = timeoutMs; }
+ /**
+ * Notify that the callback is called.
+ */
+ void notify() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCalled = true;
+ lock.unlock();
+ mCv.notify_all();
+ };
+
+ /**
+ * Wait for the timeout passed into the constructor.
+ */
+ bool wait() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ return mCv.wait_for(lock, std::chrono::milliseconds(mTimeoutMs),
+ [this] { return mCalled; });
+ };
+
+ /**
+ * Reset the callback to not called.
+ */
+ void reset() {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCalled = false;
+ }
+
+ private:
+ std::mutex mMutex;
+ bool mCalled GUARDED_BY(mMutex) = false;
+ std::condition_variable mCv;
+ int mTimeoutMs;
+};
+
+class TunerCallbackImpl final : public BnTunerCallback {
+ public:
+ TunerCallbackImpl();
ScopedAStatus onTuneFailed(Result result, const ProgramSelector& selector) override;
- MOCK_TIMEOUT_METHOD1(onCurrentProgramInfoChangedMock, ScopedAStatus(const ProgramInfo&));
ScopedAStatus onCurrentProgramInfoChanged(const ProgramInfo& info) override;
ScopedAStatus onProgramListUpdated(const ProgramListChunk& chunk) override;
- MOCK_METHOD1(onAntennaStateChange, ScopedAStatus(bool connected));
- MOCK_METHOD1(onParametersUpdated, ScopedAStatus(const vector<VendorKeyValue>& parameters));
- MOCK_METHOD2(onConfigFlagUpdated, ScopedAStatus(ConfigFlag in_flag, bool in_value));
- MOCK_TIMEOUT_METHOD0(onProgramListReady, void());
+ ScopedAStatus onParametersUpdated(const vector<VendorKeyValue>& parameters) override;
+ ScopedAStatus onAntennaStateChange(bool connected) override;
+ ScopedAStatus onConfigFlagUpdated(ConfigFlag in_flag, bool in_value) override;
+ bool waitOnCurrentProgramInfoChangedCallback();
+ bool waitProgramReady();
+ void reset();
+
+ bool getAntennaConnectionState();
+ ProgramInfo getCurrentProgramInfo();
+ bcutils::ProgramInfoSet getProgramList();
+
+ private:
std::mutex mLock;
+ bool mAntennaConnectionState GUARDED_BY(mLock);
+ ProgramInfo mCurrentProgramInfo GUARDED_BY(mLock);
bcutils::ProgramInfoSet mProgramList GUARDED_BY(mLock);
+ CallbackFlag mOnCurrentProgramInfoChangedFlag = CallbackFlag(IBroadcastRadio::TUNER_TIMEOUT_MS);
+ CallbackFlag mOnProgramListReadyFlag = CallbackFlag(IBroadcastRadio::LIST_COMPLETE_TIMEOUT_MS);
};
struct AnnouncementListenerMock : public BnAnnouncementListener {
@@ -139,7 +182,7 @@
std::shared_ptr<IBroadcastRadio> mModule;
Properties mProperties;
- std::shared_ptr<TunerCallbackMock> mCallback = SharedRefBase::make<TunerCallbackMock>();
+ std::shared_ptr<TunerCallbackImpl> mCallback;
};
MATCHER_P(InfoHasId, id, string(negation ? "does not contain" : "contains") + " " + id.toString()) {
@@ -147,20 +190,18 @@
return ids.end() != find(ids.begin(), ids.end(), id.value);
}
-TunerCallbackMock::TunerCallbackMock() {
- EXPECT_TIMEOUT_CALL(*this, onCurrentProgramInfoChangedMock, _).Times(AnyNumber());
-
- // we expect the antenna is connected through the whole test
- EXPECT_CALL(*this, onAntennaStateChange(false)).Times(0);
+TunerCallbackImpl::TunerCallbackImpl() {
+ mAntennaConnectionState = true;
}
-ScopedAStatus TunerCallbackMock::onTuneFailed(Result result, const ProgramSelector& selector) {
+ScopedAStatus TunerCallbackImpl::onTuneFailed(Result result, const ProgramSelector& selector) {
LOG(DEBUG) << "Tune failed for selector" << selector.toString();
EXPECT_TRUE(result == Result::CANCELED);
return ndk::ScopedAStatus::ok();
}
-ScopedAStatus TunerCallbackMock::onCurrentProgramInfoChanged(const ProgramInfo& info) {
+ScopedAStatus TunerCallbackImpl::onCurrentProgramInfoChanged(const ProgramInfo& info) {
+ LOG(DEBUG) << "onCurrentProgramInfoChanged called";
for (const auto& id : info.selector) {
EXPECT_NE(id.type, IdentifierType::INVALID);
}
@@ -196,21 +237,75 @@
}
}
- return onCurrentProgramInfoChangedMock(info);
+ {
+ std::lock_guard<std::mutex> lk(mLock);
+ mCurrentProgramInfo = info;
+ }
+
+ mOnCurrentProgramInfoChangedFlag.notify();
+ return ndk::ScopedAStatus::ok();
}
-ScopedAStatus TunerCallbackMock::onProgramListUpdated(const ProgramListChunk& chunk) {
- std::lock_guard<std::mutex> lk(mLock);
-
- updateProgramList(chunk, &mProgramList);
+ScopedAStatus TunerCallbackImpl::onProgramListUpdated(const ProgramListChunk& chunk) {
+ LOG(DEBUG) << "onProgramListUpdated called";
+ {
+ std::lock_guard<std::mutex> lk(mLock);
+ updateProgramList(chunk, &mProgramList);
+ }
if (chunk.complete) {
- onProgramListReady();
+ mOnProgramListReadyFlag.notify();
}
return ndk::ScopedAStatus::ok();
}
+ScopedAStatus TunerCallbackImpl::onParametersUpdated(
+ [[maybe_unused]] const vector<VendorKeyValue>& parameters) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus TunerCallbackImpl::onAntennaStateChange(bool connected) {
+ if (!connected) {
+ std::lock_guard<std::mutex> lk(mLock);
+ mAntennaConnectionState = false;
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ScopedAStatus TunerCallbackImpl::onConfigFlagUpdated([[maybe_unused]] ConfigFlag in_flag,
+ [[maybe_unused]] bool in_value) {
+ return ndk::ScopedAStatus::ok();
+}
+
+bool TunerCallbackImpl::waitOnCurrentProgramInfoChangedCallback() {
+ return mOnCurrentProgramInfoChangedFlag.wait();
+}
+
+bool TunerCallbackImpl::waitProgramReady() {
+ return mOnProgramListReadyFlag.wait();
+}
+
+void TunerCallbackImpl::reset() {
+ mOnCurrentProgramInfoChangedFlag.reset();
+ mOnProgramListReadyFlag.reset();
+}
+
+bool TunerCallbackImpl::getAntennaConnectionState() {
+ std::lock_guard<std::mutex> lk(mLock);
+ return mAntennaConnectionState;
+}
+
+ProgramInfo TunerCallbackImpl::getCurrentProgramInfo() {
+ std::lock_guard<std::mutex> lk(mLock);
+ return mCurrentProgramInfo;
+}
+
+bcutils::ProgramInfoSet TunerCallbackImpl::getProgramList() {
+ std::lock_guard<std::mutex> lk(mLock);
+ return mProgramList;
+}
+
void BroadcastRadioHalTest::SetUp() {
EXPECT_EQ(mModule.get(), nullptr) << "Module is already open";
@@ -228,6 +323,8 @@
EXPECT_FALSE(mProperties.product.empty());
EXPECT_GT(mProperties.supportedIdentifierTypes.size(), 0u);
+ mCallback = SharedRefBase::make<TunerCallbackImpl>();
+
// set callback
EXPECT_TRUE(mModule->setTunerCallback(mCallback).isOk());
}
@@ -236,6 +333,11 @@
if (mModule) {
ASSERT_TRUE(mModule->unsetTunerCallback().isOk());
}
+ if (mCallback) {
+ // we expect the antenna is connected through the whole test
+ EXPECT_TRUE(mCallback->getAntennaConnectionState());
+ mCallback = nullptr;
+ }
}
bool BroadcastRadioHalTest::getAmFmRegionConfig(bool full, AmFmRegionConfig* config) {
@@ -256,7 +358,7 @@
std::optional<bcutils::ProgramInfoSet> BroadcastRadioHalTest::getProgramList(
const ProgramFilter& filter) {
- EXPECT_TIMEOUT_CALL(*mCallback, onProgramListReady).Times(AnyNumber());
+ mCallback->reset();
auto startResult = mModule->startProgramListUpdates(filter);
@@ -268,13 +370,13 @@
if (!startResult.isOk()) {
return std::nullopt;
}
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onProgramListReady, kProgramListScanTimeoutSec);
+ EXPECT_TRUE(mCallback->waitProgramReady());
auto stopResult = mModule->stopProgramListUpdates();
EXPECT_TRUE(stopResult.isOk());
- return mCallback->mProgramList;
+ return mCallback->getProgramList();
}
/**
@@ -456,7 +558,7 @@
* - if it is supported, the test is ignored;
*/
TEST_P(BroadcastRadioHalTest, TuneFailsWithNotSupported) {
- LOG(DEBUG) << "TuneFailsWithInvalid Test";
+ LOG(DEBUG) << "TuneFailsWithNotSupported Test";
vector<ProgramIdentifier> supportTestId = {
makeIdentifier(IdentifierType::AMFM_FREQUENCY_KHZ, 0), // invalid
@@ -477,9 +579,9 @@
for (const auto& id : supportTestId) {
ProgramSelector sel{id, {}};
- auto result = mModule->tune(sel);
-
if (!bcutils::isSupported(mProperties, sel)) {
+ auto result = mModule->tune(sel);
+
EXPECT_EQ(result.getServiceSpecificError(), notSupportedError);
}
}
@@ -508,9 +610,9 @@
for (const auto& id : invalidId) {
ProgramSelector sel{id, {}};
- auto result = mModule->tune(sel);
-
if (bcutils::isSupported(mProperties, sel)) {
+ auto result = mModule->tune(sel);
+
EXPECT_EQ(result.getServiceSpecificError(), invalidArgumentsError);
}
}
@@ -549,13 +651,7 @@
int64_t freq = 90900; // 90.9 FM
ProgramSelector sel = makeSelectorAmfm(freq);
// try tuning
- ProgramInfo infoCb = {};
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock,
- InfoHasId(makeIdentifier(IdentifierType::AMFM_FREQUENCY_KHZ, freq)))
- .Times(AnyNumber())
- .WillOnce(DoAll(SaveArg<0>(&infoCb), testing::Return(ByMove(ndk::ScopedAStatus::ok()))))
- .WillRepeatedly(testing::InvokeWithoutArgs([] { return ndk::ScopedAStatus::ok(); }));
-
+ mCallback->reset();
auto result = mModule->tune(sel);
// expect a failure if it's not supported
@@ -566,7 +662,8 @@
// expect a callback if it succeeds
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb = mCallback->getCurrentProgramInfo();
LOG(DEBUG) << "Current program info: " << infoCb.toString();
@@ -638,12 +735,6 @@
}
// try tuning
- ProgramInfo infoCb = {};
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock,
- InfoHasId(makeIdentifier(IdentifierType::DAB_FREQUENCY_KHZ, freq)))
- .Times(AnyNumber())
- .WillOnce(
- DoAll(SaveArg<0>(&infoCb), testing::Return(ByMove(ndk::ScopedAStatus::ok()))));
auto result = mModule->tune(sel);
@@ -655,7 +746,9 @@
// expect a callback if it succeeds
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
+ ProgramInfo infoCb = mCallback->getCurrentProgramInfo();
+
LOG(DEBUG) << "Current program info: " << infoCb.toString();
// it should tune exactly to what was requested
@@ -669,13 +762,13 @@
*
* Verifies that:
* - the method succeeds;
- * - the program info is changed within kTuneTimeoutSec;
+ * - the program info is changed within kTuneTimeoutMs;
* - works both directions and with or without skipping sub-channel.
*/
TEST_P(BroadcastRadioHalTest, Seek) {
LOG(DEBUG) << "Seek Test";
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock, _).Times(AnyNumber());
+ mCallback->reset();
auto result = mModule->seek(/* in_directionUp= */ true, /* in_skipSubChannel= */ true);
@@ -685,14 +778,14 @@
}
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock, _).Times(AnyNumber());
+ mCallback->reset();
result = mModule->seek(/* in_directionUp= */ false, /* in_skipSubChannel= */ false);
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
}
/**
@@ -720,13 +813,13 @@
*
* Verifies that:
* - the method succeeds or returns NOT_SUPPORTED;
- * - the program info is changed within kTuneTimeoutSec if the method succeeded;
+ * - the program info is changed within kTuneTimeoutMs if the method succeeded;
* - works both directions.
*/
TEST_P(BroadcastRadioHalTest, Step) {
LOG(DEBUG) << "Step Test";
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock, _).Times(AnyNumber());
+ mCallback->reset();
auto result = mModule->step(/* in_directionUp= */ true);
@@ -735,14 +828,14 @@
return;
}
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
- EXPECT_TIMEOUT_CALL(*mCallback, onCurrentProgramInfoChangedMock, _).Times(AnyNumber());
+ mCallback->reset();
result = mModule->step(/* in_directionUp= */ false);
EXPECT_TRUE(result.isOk());
- EXPECT_TIMEOUT_CALL_WAIT(*mCallback, onCurrentProgramInfoChangedMock, kTuneTimeoutSec);
+ EXPECT_TRUE(mCallback->waitOnCurrentProgramInfoChangedCallback());
}
/**
@@ -955,7 +1048,7 @@
*
* Verifies that:
* - startProgramListUpdates either succeeds or returns NOT_SUPPORTED;
- * - the complete list is fetched within kProgramListScanTimeoutSec;
+ * - the complete list is fetched within kProgramListScanTimeoutMs;
* - stopProgramListUpdates does not crash.
*/
TEST_P(BroadcastRadioHalTest, GetProgramListFromEmptyFilter) {
@@ -969,7 +1062,7 @@
*
* Verifies that:
* - startProgramListUpdates either succeeds or returns NOT_SUPPORTED;
- * - the complete list is fetched within kProgramListScanTimeoutSec;
+ * - the complete list is fetched within kProgramListScanTimeoutMs;
* - stopProgramListUpdates does not crash;
* - result for startProgramListUpdates using a filter with AMFM_FREQUENCY_KHZ value of the first
* AMFM program matches the expected result.
@@ -1017,7 +1110,7 @@
*
* Verifies that:
* - startProgramListUpdates either succeeds or returns NOT_SUPPORTED;
- * - the complete list is fetched within kProgramListScanTimeoutSec;
+ * - the complete list is fetched within kProgramListScanTimeoutMs;
* - stopProgramListUpdates does not crash;
* - result for startProgramListUpdates using a filter with DAB_ENSEMBLE value of the first DAB
* program matches the expected result.
diff --git a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
index 4fc7437..04db7f3 100644
--- a/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
+++ b/camera/provider/2.4/default/ExternalCameraProviderImpl_2_4.cpp
@@ -18,15 +18,16 @@
//#define LOG_NDEBUG 0
#include <log/log.h>
-#include <regex>
-#include <sys/inotify.h>
+#include <cutils/properties.h>
#include <errno.h>
#include <linux/videodev2.h>
-#include <cutils/properties.h>
-#include "ExternalCameraProviderImpl_2_4.h"
+#include <sys/inotify.h>
+#include <regex>
+#include <string>
#include "ExternalCameraDevice_3_4.h"
#include "ExternalCameraDevice_3_5.h"
#include "ExternalCameraDevice_3_6.h"
+#include "ExternalCameraProviderImpl_2_4.h"
namespace android {
namespace hardware {
@@ -41,10 +42,10 @@
// "device@<version>/external/<id>"
const std::regex kDeviceNameRE("device@([0-9]+\\.[0-9]+)/external/(.+)");
const int kMaxDevicePathLen = 256;
-const char* kDevicePath = "/dev/";
-constexpr char kPrefix[] = "video";
-constexpr int kPrefixLen = sizeof(kPrefix) - 1;
-constexpr int kDevicePrefixLen = sizeof(kDevicePath) + kPrefixLen + 1;
+constexpr const char* kDevicePath = "/dev/";
+constexpr const char* kPrefix = "video";
+constexpr int kPrefixLen = std::char_traits<char>::length(kPrefix);
+constexpr int kDevicePrefixLen = std::char_traits<char>::length(kDevicePath) + kPrefixLen;
bool matchDeviceName(int cameraIdOffset,
const hidl_string& deviceName, std::string* deviceVersion,
diff --git a/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp b/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
index b63e3bb..62ce074 100644
--- a/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
+++ b/camera/provider/2.7/default/ExternalCameraProviderImpl_2_7.cpp
@@ -23,6 +23,7 @@
#include <linux/videodev2.h>
#include <sys/inotify.h>
#include <regex>
+#include <string>
#include "ExternalCameraDevice_3_4.h"
#include "ExternalCameraDevice_3_5.h"
#include "ExternalCameraDevice_3_6.h"
@@ -39,10 +40,10 @@
// "device@<version>/external/<id>"
const std::regex kDeviceNameRE("device@([0-9]+\\.[0-9]+)/external/(.+)");
const int kMaxDevicePathLen = 256;
-const char* kDevicePath = "/dev/";
-constexpr char kPrefix[] = "video";
-constexpr int kPrefixLen = sizeof(kPrefix) - 1;
-constexpr int kDevicePrefixLen = sizeof(kDevicePath) + kPrefixLen + 1;
+constexpr const char* kDevicePath = "/dev/";
+constexpr const char* kPrefix = "video";
+constexpr int kPrefixLen = std::char_traits<char>::length(kPrefix);
+constexpr int kDevicePrefixLen = std::char_traits<char>::length(kDevicePath) + kPrefixLen;
bool matchDeviceName(int cameraIdOffset, const hidl_string& deviceName, std::string* deviceVersion,
std::string* cameraDevicePath) {
diff --git a/camera/provider/aidl/vts/Android.bp b/camera/provider/aidl/vts/Android.bp
index 8429b21..59f6c66 100644
--- a/camera/provider/aidl/vts/Android.bp
+++ b/camera/provider/aidl/vts/Android.bp
@@ -68,6 +68,16 @@
"libgralloctypes",
"libaidlcommonsupport",
],
+
+ require_root: true,
+ test_options: {
+ test_runner_options: [
+ {
+ name: "native-test-timeout",
+ value: "1800000",
+ },
+ ],
+ },
test_suites: [
"general-tests",
"vts",
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 93b5380..b3ca293 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -82,3 +82,15 @@
"kernel_config_u_6.1",
],
}
+
+vintf_compatibility_matrix {
+ name: "framework_compatibility_matrix.9.xml",
+ stem: "compatibility_matrix.9.xml",
+ srcs: [
+ "compatibility_matrix.9.xml",
+ ],
+ kernel_configs: [
+ "kernel_config_v_5.15",
+ "kernel_config_v_6.1",
+ ],
+}
diff --git a/compatibility_matrices/Android.mk b/compatibility_matrices/Android.mk
index 6e4c419..a82a421 100644
--- a/compatibility_matrices/Android.mk
+++ b/compatibility_matrices/Android.mk
@@ -103,6 +103,7 @@
framework_compatibility_matrix.6.xml \
framework_compatibility_matrix.7.xml \
framework_compatibility_matrix.8.xml \
+ framework_compatibility_matrix.9.xml \
framework_compatibility_matrix.device.xml \
my_framework_matrix_deps += \
diff --git a/compatibility_matrices/bump.py b/compatibility_matrices/bump.py
new file mode 100755
index 0000000..88b7a42
--- /dev/null
+++ b/compatibility_matrices/bump.py
@@ -0,0 +1,158 @@
+#!/usr/bin/env python3
+#
+# 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.
+#
+"""
+Creates the next compatibility matrix.
+
+Requires libvintf Level.h to be updated before executing this script.
+"""
+
+import argparse
+import os
+import pathlib
+import shutil
+import subprocess
+import textwrap
+
+
+def check_call(*args, **kwargs):
+ print(args)
+ subprocess.check_call(*args, **kwargs)
+
+
+def check_output(*args, **kwargs):
+ print(args)
+ return subprocess.check_output(*args, **kwargs)
+
+
+class Bump(object):
+
+ def __init__(self, cmdline_args):
+ self.top = pathlib.Path(os.environ["ANDROID_BUILD_TOP"])
+ self.interfaces_dir = self.top / "hardware/interfaces"
+
+ self.current_level = cmdline_args.current
+ self.current_module_name = f"framework_compatibility_matrix.{self.current_level}.xml"
+ self.current_xml = self.interfaces_dir / f"compatibility_matrices/compatibility_matrix.{self.current_level}.xml"
+
+ self.next_level = cmdline_args.next
+ self.next_module_name = f"framework_compatibility_matrix.{self.next_level}.xml"
+ self.next_xml = self.interfaces_dir / f"compatibility_matrices/compatibility_matrix.{self.next_level}.xml"
+
+ self.level_to_letter = self.get_level_to_letter_mapping()
+ print("Found level mapping in libvintf Level.h:", self.level_to_letter)
+
+ def run(self):
+ self.bump_kernel_configs()
+ self.copy_matrix()
+ self.edit_android_bp()
+ self.edit_android_mk()
+
+ def get_level_to_letter_mapping(self):
+ levels_file = self.top / "system/libvintf/include/vintf/Level.h"
+ with open(levels_file) as f:
+ lines = f.readlines()
+ pairs = [
+ line.split("=", maxsplit=2) for line in lines if "=" in line
+ ]
+ return {
+ level.strip().removesuffix(","): letter.strip()
+ for letter, level in pairs
+ }
+
+ def bump_kernel_configs(self):
+ check_call([
+ self.top / "kernel/configs/tools/bump.py",
+ self.level_to_letter[self.current_level].lower(),
+ self.level_to_letter[self.next_level].lower(),
+ ])
+
+ def copy_matrix(self):
+ shutil.copyfile(self.current_xml, self.next_xml)
+
+ def edit_android_bp(self):
+ android_bp = self.interfaces_dir / "compatibility_matrices/Android.bp"
+
+ with open(android_bp, "r+") as f:
+ if self.next_module_name not in f.read():
+ f.seek(0, 2) # end of file
+ f.write("\n")
+ f.write(
+ textwrap.dedent(f"""\
+ vintf_compatibility_matrix {{
+ name: "{self.next_module_name}",
+ }}
+ """))
+
+ next_kernel_configs = check_output(
+ """grep -rh name: | sed -E 's/^.*"(.*)".*/\\1/g'""",
+ cwd=self.top / "kernel/configs" /
+ self.level_to_letter[self.next_level].lower(),
+ text=True,
+ shell=True,
+ ).splitlines()
+ print(next_kernel_configs)
+
+ check_call([
+ "bpmodify", "-w", "-m", self.next_module_name, "-property", "stem",
+ "-str", self.next_xml.name, android_bp
+ ])
+
+ check_call([
+ "bpmodify", "-w", "-m", self.next_module_name, "-property", "srcs",
+ "-a",
+ self.next_xml.relative_to(android_bp.parent), android_bp
+ ])
+
+ check_call([
+ "bpmodify", "-w", "-m", self.next_module_name, "-property",
+ "kernel_configs", "-a", " ".join(next_kernel_configs), android_bp
+ ])
+
+ def edit_android_mk(self):
+ android_mk = self.interfaces_dir / "compatibility_matrices/Android.mk"
+ with open(android_mk) as f:
+ if self.next_module_name in f.read():
+ return
+ f.seek(0)
+ lines = f.readlines()
+ current_module_line_number = None
+ for line_number, line in enumerate(lines):
+ if self.current_module_name in line:
+ current_module_line_number = line_number
+ break
+ assert current_module_line_number is not None
+ lines.insert(current_module_line_number + 1,
+ f" {self.next_module_name} \\\n")
+ with open(android_mk, "w") as f:
+ f.write("".join(lines))
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("current",
+ type=str,
+ help="VINTF level of the current version (e.g. 9)")
+ parser.add_argument("next",
+ type=str,
+ help="VINTF level of the next version (e.g. 10)")
+ cmdline_args = parser.parse_args()
+
+ Bump(cmdline_args).run()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index c04a499..4aa832b 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -114,7 +114,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="true" updatable-via-apex="true">
<name>android.hardware.biometrics.face</name>
<version>3</version>
<interface>
diff --git a/compatibility_matrices/compatibility_matrix.9.xml b/compatibility_matrices/compatibility_matrix.9.xml
index 188746d..14b9210 100644
--- a/compatibility_matrices/compatibility_matrix.9.xml
+++ b/compatibility_matrices/compatibility_matrix.9.xml
@@ -1,4 +1,3 @@
-<!-- WARNING: This file is unused in the Android 14 branch. -->
<compatibility-matrix version="1.0" type="framework" level="9">
<hal format="hidl" optional="true">
<name>android.hardware.audio</name>
@@ -115,7 +114,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="true" updatable-via-apex="true">
<name>android.hardware.biometrics.face</name>
<version>3</version>
<interface>
@@ -123,7 +122,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="true" updatable-via-apex="true">
<name>android.hardware.biometrics.fingerprint</name>
<version>3</version>
<interface>
@@ -132,14 +131,6 @@
<instance>virtual</instance>
</interface>
</hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.bluetooth</name>
- <version>1.0-1</version>
- <interface>
- <name>IBluetoothHci</name>
- <instance>default</instance>
- </interface>
- </hal>
<hal format="aidl" optional="true">
<name>android.hardware.bluetooth</name>
<interface>
@@ -194,7 +185,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>
@@ -366,6 +357,15 @@
</interface>
</hal>
<hal format="aidl" optional="true">
+ <name>android.hardware.media.c2</name>
+ <version>1</version>
+ <interface>
+ <name>IComponentStore</name>
+ <regex-instance>default[0-9]*</regex-instance>
+ <regex-instance>vendor[0-9]*_software</regex-instance>
+ </interface>
+ </hal>
+ <hal format="aidl" optional="true">
<name>android.hardware.memtrack</name>
<version>1</version>
<interface>
@@ -406,7 +406,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>
@@ -414,7 +414,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>
@@ -424,7 +424,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>
@@ -434,7 +434,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>
@@ -444,7 +444,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>
@@ -454,7 +454,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>
@@ -474,7 +474,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>
@@ -484,7 +484,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>
@@ -504,20 +504,12 @@
</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>
</interface>
</hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.renderscript</name>
- <version>1.0</version>
- <interface>
- <name>IDevice</name>
- <instance>default</instance>
- </interface>
- </hal>
<hal format="aidl" optional="true">
<name>android.hardware.rebootescrow</name>
<version>1</version>
@@ -560,14 +552,6 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.soundtrigger</name>
- <version>2.3</version>
- <interface>
- <name>ISoundTriggerHw</name>
- <instance>default</instance>
- </interface>
- </hal>
<hal format="aidl" optional="true">
<name>android.hardware.soundtrigger3</name>
<version>1</version>
@@ -576,22 +560,6 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.tetheroffload.config</name>
- <version>1.0</version>
- <interface>
- <name>IOffloadConfig</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.tetheroffload.control</name>
- <version>1.1</version>
- <interface>
- <name>IOffloadControl</name>
- <instance>default</instance>
- </interface>
- </hal>
<hal format="aidl" optional="true">
<name>android.hardware.tetheroffload</name>
<version>1</version>
@@ -727,4 +695,12 @@
<regex-instance>.*</regex-instance>
</interface>
</hal>
+ <hal format="aidl" optional="true">
+ <name>android.hardware.threadnetwork</name>
+ <version>1</version>
+ <interface>
+ <name>IThreadChip</name>
+ <regex-instance>chip[0-9]+</regex-instance>
+ </interface>
+ </hal>
</compatibility-matrix>
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index 3bc1786..f3374c3 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -103,10 +103,6 @@
"android.hardware.thermal@1.0",
"android.hardware.thermal@1.1",
"android.hardware.wifi.offload@1.0",
-
- // Under hardware/interfaces/staging, still in development
- // AIDL
- "android.hardware.media.c2",
};
auto package_has_prefix = [&](const std::string& prefix) {
diff --git a/contexthub/aidl/Android.bp b/contexthub/aidl/Android.bp
index 814bf3b..cf10529 100644
--- a/contexthub/aidl/Android.bp
+++ b/contexthub/aidl/Android.bp
@@ -34,6 +34,9 @@
ndk: {
apps_enabled: false,
},
+ rust: {
+ enabled: true,
+ },
},
versions_with_info: [
{
@@ -46,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 6ee7407..74bac69 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/1.3/vts/OWNERS b/drm/1.3/vts/OWNERS
index 3a0672e..744827c 100644
--- a/drm/1.3/vts/OWNERS
+++ b/drm/1.3/vts/OWNERS
@@ -1,9 +1,11 @@
+# Bug component: 49079
conglin@google.com
-edwinwong@google.com
fredgc@google.com
-jtinker@google.com
juce@google.com
+kelzhan@google.com
kylealexander@google.com
+mattfedd@google.com
rfrias@google.com
robertshih@google.com
sigquit@google.com
+vickymin@google.com
\ No newline at end of file
diff --git a/gnss/aidl/OWNERS b/gnss/aidl/OWNERS
index b7b4a2e..e5b585e 100644
--- a/gnss/aidl/OWNERS
+++ b/gnss/aidl/OWNERS
@@ -1,3 +1,5 @@
+# Bug component: 393449
+
gomo@google.com
smalkos@google.com
wyattriley@google.com
diff --git a/gnss/aidl/vts/gnss_hal_test.cpp b/gnss/aidl/vts/gnss_hal_test.cpp
index 4f5e6a0..5e2cbe3 100644
--- a/gnss/aidl/vts/gnss_hal_test.cpp
+++ b/gnss/aidl/vts/gnss_hal_test.cpp
@@ -486,8 +486,6 @@
auto status = aidl_gnss_hal_->startSvStatus();
EXPECT_TRUE(status.isOk());
- ASSERT_TRUE(aidl_gnss_cb_->sv_info_list_timestamps_millis_cbq_.size() ==
- aidl_gnss_cb_->sv_info_list_cbq_.size());
long lastElapsedRealtimeMillis = 0;
for (int i = 0; i < numMeasurementEvents; i++) {
long timeStamp;
diff --git a/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl b/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl
index 50aa2b7..7194ebe 100644
--- a/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl
+++ b/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl
@@ -23,7 +23,14 @@
@VintfStability
parcelable BufferDescriptorInfo {
/**
- * The name of the buffer in ASCII. Useful for debugging/tracing.
+ * The name of the buffer in null-terminated ASCII. Useful for debugging/tracing.
+ *
+ * NOTE: While a well behaved client will ensure it passes a null-terminated string
+ * within the 128-byte limit, the IAllocator service implementation should be
+ * be defensive against malformed input. As such, it is recommended that
+ * IAllocator implementations proactively do `name[127] = 0` upon receiving
+ * an allocation request to enusre that the string is definitely
+ * null-terminated regardless of what the client sent.
*/
byte[128] name;
diff --git a/graphics/common/aidl/Android.bp b/graphics/common/aidl/Android.bp
index 02334e8..142c7c1 100644
--- a/graphics/common/aidl/Android.bp
+++ b/graphics/common/aidl/Android.bp
@@ -43,7 +43,7 @@
enabled: true,
},
},
- frozen: true,
+ frozen: false,
versions_with_info: [
{
version: "1",
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/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..d9ff5aa 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,65 @@
/* @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 */,
+ 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 */,
+ 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/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/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/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.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/vts/functional/TEST_MAPPING b/graphics/composer/2.4/vts/functional/TEST_MAPPING
new file mode 100644
index 0000000..aedac5b
--- /dev/null
+++ b/graphics/composer/2.4/vts/functional/TEST_MAPPING
@@ -0,0 +1,13 @@
+{
+ "presubmit": [
+ {
+ "name": "VtsHalGraphicsComposerV2_4TargetTest"
+ }
+ ],
+ "kernel-presubmit": [
+ {
+ "name": "VtsHalGraphicsComposerV2_4TargetTest"
+ }
+ ]
+}
+
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 18d36e4..bbcd36f 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -45,7 +45,6 @@
#define LOG_TAG "VtsHalGraphicsComposer3_TargetTest"
namespace aidl::android::hardware::graphics::composer3::vts {
-namespace {
using namespace std::chrono_literals;
@@ -891,39 +890,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 +1135,79 @@
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));
+ }
+ }
+}
+
// Tests for Command.
class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
protected:
@@ -1767,53 +1806,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 +2397,66 @@
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) {
+ ASSERT_FALSE(hasCapability(Capability::SKIP_VALIDATE))
+ << "Found Capability::SKIP_VALIDATE capability.";
+}
+
+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 +2472,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 +2500,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 +2557,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,67 +2626,27 @@
}
}
-/*
- * 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 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;
- }
- ASSERT_FALSE(hasCapability(Capability::SKIP_VALIDATE))
- << "Found Capability::SKIP_VALIDATE capability.";
-}
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandTest);
INSTANTIATE_TEST_SUITE_P(
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(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/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index e4a84e1..03d9041 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -677,7 +677,7 @@
const native_handle_t* clonedBufferHandle;
ASSERT_NO_FATAL_FAILURE(clonedBufferHandle = mGralloc->allocate(mDummyDescriptorInfo, false));
- error = mGralloc->getMapper()->freeBuffer(invalidHandle);
+ error = mGralloc->getMapper()->freeBuffer(const_cast<native_handle_t*>(clonedBufferHandle));
EXPECT_EQ(Error::BAD_BUFFER, error)
<< "freeBuffer with un-imported handle did not fail with BAD_BUFFER";
diff --git a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
index 2c06353..b329de2 100644
--- a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
+++ b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
@@ -1371,6 +1371,28 @@
EXPECT_EQ(buffer->info().usage, *value);
}
+TEST_P(GraphicsMapperStableCTests, GetUsage64) {
+ BufferDescriptorInfo info{
+ .name = {"VTS_TEMP"},
+ .width = 64,
+ .height = 64,
+ .layerCount = 1,
+ .format = PixelFormat::RGBA_8888,
+ .usage = BufferUsage::FRONT_BUFFER | BufferUsage::GPU_RENDER_TARGET |
+ BufferUsage::COMPOSER_OVERLAY | BufferUsage::GPU_TEXTURE,
+ .reservedSize = 0,
+ };
+ if (!isSupported(info)) {
+ GTEST_SKIP();
+ }
+ auto buffer = allocate(info);
+ auto bufferHandle = buffer->import();
+ auto value = getStandardMetadata<StandardMetadataType::USAGE>(*bufferHandle);
+ ASSERT_TRUE(value.has_value());
+ using T = std::underlying_type_t<BufferUsage>;
+ EXPECT_EQ(static_cast<T>(buffer->info().usage), static_cast<T>(*value));
+}
+
TEST_P(GraphicsMapperStableCTests, GetAllocationSize) {
auto buffer = allocateGeneric();
auto bufferHandle = buffer->import();
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp
index f401643..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;
@@ -272,7 +273,11 @@
{
std::lock_guard<decltype(callbacks_lock_)> lock(callbacks_lock_);
- callbacks_.emplace_back(LinkedCallback::Make(ref<Health>(), callback));
+ auto linked_callback_result = LinkedCallback::Make(ref<Health>(), callback);
+ if (!linked_callback_result.ok()) {
+ return ndk::ScopedAStatus::fromStatus(-linked_callback_result.error().code());
+ }
+ callbacks_.emplace_back(std::move(*linked_callback_result));
// unlock
}
diff --git a/health/aidl/default/LinkedCallback.cpp b/health/aidl/default/LinkedCallback.cpp
index 2985ffe..26e99f9 100644
--- a/health/aidl/default/LinkedCallback.cpp
+++ b/health/aidl/default/LinkedCallback.cpp
@@ -24,7 +24,7 @@
namespace aidl::android::hardware::health {
-std::unique_ptr<LinkedCallback> LinkedCallback::Make(
+::android::base::Result<std::unique_ptr<LinkedCallback>> LinkedCallback::Make(
std::shared_ptr<Health> service, std::shared_ptr<IHealthInfoCallback> callback) {
std::unique_ptr<LinkedCallback> ret(new LinkedCallback());
binder_status_t linkRet =
@@ -32,7 +32,7 @@
reinterpret_cast<void*>(ret.get()));
if (linkRet != ::STATUS_OK) {
LOG(WARNING) << __func__ << "Cannot link to death: " << linkRet;
- return nullptr;
+ return ::android::base::Error(-linkRet);
}
ret->service_ = service;
ret->callback_ = std::move(callback);
diff --git a/health/aidl/default/LinkedCallback.h b/health/aidl/default/LinkedCallback.h
index 82490a7..da494c9 100644
--- a/health/aidl/default/LinkedCallback.h
+++ b/health/aidl/default/LinkedCallback.h
@@ -20,6 +20,7 @@
#include <aidl/android/hardware/health/IHealthInfoCallback.h>
#include <android-base/macros.h>
+#include <android-base/result.h>
#include <android/binder_auto_utils.h>
#include <health-impl/Health.h>
@@ -34,8 +35,8 @@
// service->death_reciepient() should be from CreateDeathRecipient().
// Not using a strong reference to |service| to avoid circular reference. The lifetime
// of |service| must be longer than this LinkedCallback object.
- static std::unique_ptr<LinkedCallback> Make(std::shared_ptr<Health> service,
- std::shared_ptr<IHealthInfoCallback> callback);
+ static ::android::base::Result<std::unique_ptr<LinkedCallback>> Make(
+ std::shared_ptr<Health> service, std::shared_ptr<IHealthInfoCallback> callback);
// Automatically unlinkToDeath upon destruction. So, it is always safe to reinterpret_cast
// the cookie back to the LinkedCallback object.
diff --git a/health/storage/aidl/vts/functional/OWNERS b/health/storage/aidl/vts/functional/OWNERS
new file mode 100644
index 0000000..a15ed7c
--- /dev/null
+++ b/health/storage/aidl/vts/functional/OWNERS
@@ -0,0 +1,2 @@
+# Bug component: 30545
+file:platform/hardware/interfaces:/health/aidl/OWNERS
\ No newline at end of file
diff --git a/identity/support/Android.bp b/identity/support/Android.bp
index 3096fe5..d62d055 100644
--- a/identity/support/Android.bp
+++ b/identity/support/Android.bp
@@ -22,15 +22,8 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_library {
- name: "android.hardware.identity-support-lib",
- vendor_available: true,
- srcs: [
- "src/IdentityCredentialSupport.cpp",
- ],
- export_include_dirs: [
- "include",
- ],
+cc_defaults {
+ name: "android.hardware.identity-support-lib-deps",
shared_libs: [
"android.hardware.keymaster@4.0",
"libcrypto",
@@ -47,19 +40,36 @@
],
}
+cc_library {
+ name: "android.hardware.identity-support-lib",
+ vendor_available: true,
+ defaults: [
+ "android.hardware.identity-support-lib-deps",
+ ],
+ srcs: [
+ "src/IdentityCredentialSupport.cpp",
+ ],
+ export_include_dirs: [
+ "include",
+ ],
+}
+
cc_test {
name: "android.hardware.identity-support-lib-test",
srcs: [
"tests/IdentityCredentialSupportTest.cpp",
],
+ defaults: [
+ "android.hardware.identity-support-lib-deps",
+ ],
shared_libs: [
- "android.hardware.identity-support-lib",
"libcrypto",
"libbase",
"libhidlbase",
"libhardware",
],
static_libs: [
+ "android.hardware.identity-support-lib",
"libcppbor_external",
"libgmock",
],
diff --git a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
index 554afe7..65b3dfa 100644
--- a/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -2617,10 +2617,11 @@
EVP_PKEY_Ptr pkey(d2i_PUBKEY(nullptr /* alloc new */, &p, exported.size()));
RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get()));
- size_t modulus_len = BN_num_bytes(rsa->n);
+ const BIGNUM* n = RSA_get0_n(rsa.get());
+ size_t modulus_len = BN_num_bytes(n);
ASSERT_EQ(1024U / 8, modulus_len);
std::unique_ptr<uint8_t[]> modulus_buf(new uint8_t[modulus_len]);
- BN_bn2bin(rsa->n, modulus_buf.get());
+ BN_bn2bin(n, modulus_buf.get());
// The modulus is too big to encrypt.
string message(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
@@ -2632,10 +2633,12 @@
EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, Finish(message, &result));
// One smaller than the modulus is okay.
- BN_sub(rsa->n, rsa->n, BN_value_one());
- modulus_len = BN_num_bytes(rsa->n);
+ BIGNUM_Ptr n_minus_1(BN_new());
+ ASSERT_TRUE(n_minus_1);
+ ASSERT_TRUE(BN_sub(n_minus_1.get(), n, BN_value_one()));
+ modulus_len = BN_num_bytes(n_minus_1.get());
ASSERT_EQ(1024U / 8, modulus_len);
- BN_bn2bin(rsa->n, modulus_buf.get());
+ BN_bn2bin(n_minus_1.get(), modulus_buf.get());
message = string(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
EXPECT_EQ(ErrorCode::OK, Finish(message, &result));
diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
index b709904..96580c0 100644
--- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -2449,10 +2449,11 @@
EVP_PKEY_Ptr pkey(d2i_PUBKEY(nullptr /* alloc new */, &p, exported.size()));
RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get()));
- size_t modulus_len = BN_num_bytes(rsa->n);
+ const BIGNUM* n = RSA_get0_n(rsa.get());
+ size_t modulus_len = BN_num_bytes(n);
ASSERT_EQ(2048U / 8, modulus_len);
std::unique_ptr<uint8_t[]> modulus_buf(new uint8_t[modulus_len]);
- BN_bn2bin(rsa->n, modulus_buf.get());
+ BN_bn2bin(n, modulus_buf.get());
// The modulus is too big to encrypt.
string message(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
@@ -2464,10 +2465,12 @@
EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, Finish(message, &result));
// One smaller than the modulus is okay.
- BN_sub(rsa->n, rsa->n, BN_value_one());
- modulus_len = BN_num_bytes(rsa->n);
+ BIGNUM_Ptr n_minus_1(BN_new());
+ ASSERT_TRUE(n_minus_1);
+ ASSERT_TRUE(BN_sub(n_minus_1.get(), n, BN_value_one()));
+ modulus_len = BN_num_bytes(n_minus_1.get());
ASSERT_EQ(2048U / 8, modulus_len);
- BN_bn2bin(rsa->n, modulus_buf.get());
+ BN_bn2bin(n_minus_1.get(), modulus_buf.get());
message = string(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len);
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
EXPECT_EQ(ErrorCode::OK, Finish(message, &result));
diff --git a/keymaster/TEST_MAPPING b/keymaster/TEST_MAPPING
new file mode 100644
index 0000000..8cbf3e1
--- /dev/null
+++ b/keymaster/TEST_MAPPING
@@ -0,0 +1,13 @@
+{
+ "presubmit": [
+ {
+ "name": "VtsHalKeymasterV3_0TargetTest"
+ },
+ {
+ "name": "VtsHalKeymasterV4_0TargetTest"
+ },
+ {
+ "name": "VtsHalKeymasterV4_1TargetTest"
+ }
+ ]
+}
diff --git a/light/aidl/Android.bp b/light/aidl/Android.bp
index c11934f..c9fba95 100644
--- a/light/aidl/Android.bp
+++ b/light/aidl/Android.bp
@@ -18,6 +18,9 @@
java: {
sdk_version: "module_current",
},
+ rust: {
+ enabled: true,
+ },
},
versions_with_info: [
{
diff --git a/light/aidl/aidl_api/android.hardware.light/2/.hash b/light/aidl/aidl_api/android.hardware.light/2/.hash
index d27f4ad..2d4e7f0 100644
--- a/light/aidl/aidl_api/android.hardware.light/2/.hash
+++ b/light/aidl/aidl_api/android.hardware.light/2/.hash
@@ -1 +1,2 @@
c8b1e8ebb88c57dcb2c350a8d9b722e77dd864c8
+c7d3d941d303c70d1c22759a0b09e41930c1cddb
diff --git a/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLight.aidl b/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLight.aidl
index 25a2dce..5ac2a34 100644
--- a/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLight.aidl
+++ b/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLight.aidl
@@ -32,7 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.light;
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLight {
int id;
int ordinal;
diff --git a/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLightState.aidl b/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLightState.aidl
index 40e520b..2878ce2 100644
--- a/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLightState.aidl
+++ b/light/aidl/aidl_api/android.hardware.light/2/android/hardware/light/HwLightState.aidl
@@ -32,7 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.light;
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLightState {
int color;
android.hardware.light.FlashMode flashMode;
diff --git a/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLight.aidl b/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLight.aidl
index 25a2dce..5ac2a34 100644
--- a/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLight.aidl
+++ b/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLight.aidl
@@ -32,7 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.light;
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLight {
int id;
int ordinal;
diff --git a/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLightState.aidl b/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLightState.aidl
index 40e520b..2878ce2 100644
--- a/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLightState.aidl
+++ b/light/aidl/aidl_api/android.hardware.light/current/android/hardware/light/HwLightState.aidl
@@ -32,7 +32,7 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.light;
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLightState {
int color;
android.hardware.light.FlashMode flashMode;
diff --git a/light/aidl/android/hardware/light/HwLight.aidl b/light/aidl/android/hardware/light/HwLight.aidl
index 43fdb4b..8db32cc 100644
--- a/light/aidl/android/hardware/light/HwLight.aidl
+++ b/light/aidl/android/hardware/light/HwLight.aidl
@@ -22,7 +22,7 @@
* A description of a single light. Multiple lights can map to the same physical
* LED. Separate physical LEDs are always represented by separate instances.
*/
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLight {
/**
* Integer ID used for controlling this light
diff --git a/light/aidl/android/hardware/light/HwLightState.aidl b/light/aidl/android/hardware/light/HwLightState.aidl
index 24d3250..3ba6c78 100644
--- a/light/aidl/android/hardware/light/HwLightState.aidl
+++ b/light/aidl/android/hardware/light/HwLightState.aidl
@@ -25,7 +25,7 @@
* Not all lights must support all parameters. If you
* can do something backward-compatible, do it.
*/
-@VintfStability
+@RustDerive(Clone=true, Copy=true) @VintfStability
parcelable HwLightState {
/**
* The color of the LED in ARGB.
diff --git a/light/aidl/default/Android.bp b/light/aidl/default/Android.bp
index 7920503..285329e 100644
--- a/light/aidl/default/Android.bp
+++ b/light/aidl/default/Android.bp
@@ -7,19 +7,17 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_binary {
+rust_binary {
name: "android.hardware.lights-service.example",
relative_install_path: "hw",
init_rc: ["lights-default.rc"],
vintf_fragments: ["lights-default.xml"],
vendor: true,
- shared_libs: [
- "libbase",
- "libbinder_ndk",
- "android.hardware.light-V2-ndk",
+ rustlibs: [
+ "liblogger",
+ "liblog_rust",
+ "libbinder_rs",
+ "android.hardware.light-V2-rust",
],
- srcs: [
- "Lights.cpp",
- "main.cpp",
- ],
+ srcs: [ "main.rs" ],
}
diff --git a/light/aidl/default/Lights.cpp b/light/aidl/default/Lights.cpp
deleted file mode 100644
index 9bf3b20..0000000
--- a/light/aidl/default/Lights.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2019 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 "Lights.h"
-
-#include <android-base/logging.h>
-
-namespace aidl {
-namespace android {
-namespace hardware {
-namespace light {
-
-static constexpr int kNumDefaultLights = 3;
-
-ndk::ScopedAStatus Lights::setLightState(int id, const HwLightState& state) {
- LOG(INFO) << "Lights setting state for id=" << id << " to color " << std::hex << state.color;
- if (id <= 0 || id > kNumDefaultLights) {
- return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
- } else {
- return ndk::ScopedAStatus::ok();
- }
-}
-
-ndk::ScopedAStatus Lights::getLights(std::vector<HwLight>* lights) {
- for (int i = 1; i <= kNumDefaultLights; i++) {
- lights->push_back({i, i});
- }
- LOG(INFO) << "Lights reporting supported lights";
- return ndk::ScopedAStatus::ok();
-}
-
-} // namespace light
-} // namespace hardware
-} // namespace android
-} // namespace aidl
diff --git a/light/aidl/default/Lights.h b/light/aidl/default/Lights.h
deleted file mode 100644
index cba147f..0000000
--- a/light/aidl/default/Lights.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2020 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/light/BnLights.h>
-
-namespace aidl {
-namespace android {
-namespace hardware {
-namespace light {
-
-// Default implementation that reports a few placeholder lights.
-class Lights : public BnLights {
- ndk::ScopedAStatus setLightState(int id, const HwLightState& state) override;
- ndk::ScopedAStatus getLights(std::vector<HwLight>* lights) override;
-};
-
-} // namespace light
-} // namespace hardware
-} // namespace android
-} // namespace aidl
diff --git a/light/aidl/default/lights.rs b/light/aidl/default/lights.rs
new file mode 100644
index 0000000..6c8aa3f
--- /dev/null
+++ b/light/aidl/default/lights.rs
@@ -0,0 +1,80 @@
+/*
+ * 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 module implements the ILights AIDL interface.
+
+use std::collections::HashMap;
+use std::sync::Mutex;
+
+use log::info;
+
+use android_hardware_light::aidl::android::hardware::light::{
+ HwLight::HwLight, HwLightState::HwLightState, ILights::ILights, LightType::LightType,
+};
+
+use binder::{ExceptionCode, Interface, Status};
+
+struct Light {
+ hw_light: HwLight,
+ state: HwLightState,
+}
+
+const NUM_DEFAULT_LIGHTS: i32 = 3;
+
+/// Defined so we can implement the ILights AIDL interface.
+pub struct LightsService {
+ lights: Mutex<HashMap<i32, Light>>,
+}
+
+impl Interface for LightsService {}
+
+impl LightsService {
+ fn new(hw_lights: impl IntoIterator<Item = HwLight>) -> Self {
+ let mut lights_map = HashMap::new();
+
+ for hw_light in hw_lights {
+ lights_map.insert(hw_light.id, Light { hw_light, state: Default::default() });
+ }
+
+ Self { lights: Mutex::new(lights_map) }
+ }
+}
+
+impl Default for LightsService {
+ fn default() -> Self {
+ let id_mapping_closure =
+ |light_id| HwLight { id: light_id, ordinal: light_id, r#type: LightType::BACKLIGHT };
+
+ Self::new((1..=NUM_DEFAULT_LIGHTS).map(id_mapping_closure))
+ }
+}
+
+impl ILights for LightsService {
+ fn setLightState(&self, id: i32, state: &HwLightState) -> binder::Result<()> {
+ info!("Lights setting state for id={} to color {:x}", id, state.color);
+
+ if let Some(light) = self.lights.lock().unwrap().get_mut(&id) {
+ light.state = *state;
+ Ok(())
+ } else {
+ Err(Status::new_exception(ExceptionCode::UNSUPPORTED_OPERATION, None))
+ }
+ }
+
+ fn getLights(&self) -> binder::Result<Vec<HwLight>> {
+ info!("Lights reporting supported lights");
+ Ok(self.lights.lock().unwrap().values().map(|light| light.hw_light).collect())
+ }
+}
diff --git a/light/aidl/default/main.cpp b/light/aidl/default/main.cpp
deleted file mode 100644
index 54e1316..0000000
--- a/light/aidl/default/main.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2020 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 "Lights.h"
-
-#include <android-base/logging.h>
-#include <android/binder_manager.h>
-#include <android/binder_process.h>
-
-using ::aidl::android::hardware::light::Lights;
-
-int main() {
- ABinderProcess_setThreadPoolMaxThreadCount(0);
- std::shared_ptr<Lights> lights = ndk::SharedRefBase::make<Lights>();
-
- const std::string instance = std::string() + Lights::descriptor + "/default";
- binder_status_t status = AServiceManager_addService(lights->asBinder().get(), instance.c_str());
- CHECK_EQ(status, STATUS_OK);
-
- ABinderProcess_joinThreadPool();
- return EXIT_FAILURE; // should not reached
-}
diff --git a/light/aidl/default/main.rs b/light/aidl/default/main.rs
new file mode 100644
index 0000000..8f32470
--- /dev/null
+++ b/light/aidl/default/main.rs
@@ -0,0 +1,46 @@
+/*
+ * 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 implements the Lights Example Service.
+
+use android_hardware_light::aidl::android::hardware::light::ILights::{BnLights, ILights};
+use binder::BinderFeatures;
+
+mod lights;
+use lights::LightsService;
+
+const LOG_TAG: &str = "lights_service_example_rust";
+
+use log::Level;
+
+fn main() {
+ let logger_success = logger::init(
+ logger::Config::default().with_tag_on_device(LOG_TAG).with_min_level(Level::Trace),
+ );
+ if !logger_success {
+ panic!("{LOG_TAG}: Failed to start logger.");
+ }
+
+ binder::ProcessState::set_thread_pool_max_thread_count(0);
+
+ let lights_service = LightsService::default();
+ let lights_service_binder = BnLights::new_binder(lights_service, BinderFeatures::default());
+
+ let service_name = format!("{}/default", LightsService::get_descriptor());
+ binder::add_service(&service_name, lights_service_binder.as_binder())
+ .expect("Failed to register service");
+
+ binder::ProcessState::join_thread_pool()
+}
diff --git a/staging/c2/aidl/Android.bp b/media/c2/aidl/Android.bp
similarity index 93%
rename from staging/c2/aidl/Android.bp
rename to media/c2/aidl/Android.bp
index b9da7ad..75d74ac 100644
--- a/staging/c2/aidl/Android.bp
+++ b/media/c2/aidl/Android.bp
@@ -13,15 +13,15 @@
name: "android.hardware.media.c2",
vendor_available: true,
double_loadable: true,
- unstable: true,
srcs: ["android/hardware/media/c2/*.aidl"],
include_dirs: [
- "frameworks/native/aidl/gui",
+ "frameworks/base/core/java",
],
imports: [
"android.hardware.common-V2",
"android.hardware.media.bufferpool2-V1",
],
+ stability: "vintf",
backend: {
cpp: {
enabled: false,
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/BaseBlock.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/BaseBlock.aidl
new file mode 100644
index 0000000..460ff97
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/BaseBlock.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+union BaseBlock {
+ android.hardware.common.NativeHandle nativeBlock;
+ android.hardware.media.bufferpool2.BufferStatusMessage pooledBlock;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Block.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Block.aidl
new file mode 100644
index 0000000..7b3005e
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Block.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Block {
+ int index;
+ android.hardware.media.c2.Params meta;
+ android.hardware.common.NativeHandle fence;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Buffer.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Buffer.aidl
new file mode 100644
index 0000000..b632932
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Buffer.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Buffer {
+ android.hardware.media.c2.Params info;
+ android.hardware.media.c2.Block[] blocks;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldDescriptor.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldDescriptor.aidl
new file mode 100644
index 0000000..909476c
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldDescriptor.aidl
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable FieldDescriptor {
+ android.hardware.media.c2.FieldId fieldId;
+ android.hardware.media.c2.FieldDescriptor.Type type;
+ int structIndex;
+ int extent;
+ String name;
+ android.hardware.media.c2.FieldDescriptor.NamedValue[] namedValues;
+ @Backing(type="int") @VintfStability
+ enum Type {
+ NO_INIT = 0,
+ INT32,
+ UINT32,
+ CNTR32,
+ INT64,
+ UINT64,
+ CNTR64,
+ FLOAT,
+ STRING = 0x100,
+ BLOB,
+ STRUCT = 0x20000,
+ }
+ @VintfStability
+ parcelable NamedValue {
+ String name;
+ long value;
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldId.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldId.aidl
new file mode 100644
index 0000000..935b85d
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldId.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable FieldId {
+ int offset;
+ int sizeBytes;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValues.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValues.aidl
new file mode 100644
index 0000000..69060be
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValues.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+union FieldSupportedValues {
+ boolean empty;
+ android.hardware.media.c2.ValueRange range;
+ long[] values;
+ long[] flags;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQuery.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
new file mode 100644
index 0000000..6a5fbe2
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable FieldSupportedValuesQuery {
+ android.hardware.media.c2.ParamField field;
+ android.hardware.media.c2.FieldSupportedValuesQuery.Type type;
+ @Backing(type="int") @VintfStability
+ enum Type {
+ POSSIBLE = 0,
+ CURRENT,
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
new file mode 100644
index 0000000..187e3eb
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable FieldSupportedValuesQueryResult {
+ android.hardware.media.c2.Status status;
+ android.hardware.media.c2.FieldSupportedValues values;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FrameData.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FrameData.aidl
new file mode 100644
index 0000000..07bfb72
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/FrameData.aidl
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable FrameData {
+ int flags;
+ android.hardware.media.c2.WorkOrdinal ordinal;
+ android.hardware.media.c2.Buffer[] buffers;
+ android.hardware.media.c2.Params configUpdate;
+ android.hardware.media.c2.InfoBuffer[] infoBuffers;
+ const int DROP_FRAME = (1 << 0) /* 1 */;
+ const int END_OF_STREAM = (1 << 1) /* 2 */;
+ const int DISCARD_FRAME = (1 << 2) /* 4 */;
+ const int FLAG_INCOMPLETE = (1 << 3) /* 8 */;
+ const int CODEC_CONFIG = (1 << 31) /* -2147483648 */;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl
new file mode 100644
index 0000000..1af66d0
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponent.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+interface IComponent {
+ android.hardware.common.NativeHandle configureVideoTunnel(in int avSyncHwId);
+ android.hardware.media.c2.IComponent.BlockPool createBlockPool(in int allocatorId);
+ void destroyBlockPool(in long blockPoolId);
+ void drain(in boolean withEos);
+ android.hardware.media.c2.WorkBundle flush();
+ android.hardware.media.c2.IComponentInterface getInterface();
+ void queue(in android.hardware.media.c2.WorkBundle workBundle);
+ void release();
+ void reset();
+ void setDecoderOutputAllocator(in android.hardware.media.c2.IGraphicBufferAllocator allocator);
+ void start();
+ void stop();
+ parcelable BlockPool {
+ long blockPoolId;
+ android.hardware.media.c2.IConfigurable configurable;
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentInterface.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentInterface.aidl
new file mode 100644
index 0000000..2350dae
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentInterface.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+interface IComponentInterface {
+ android.hardware.media.c2.IConfigurable getConfigurable();
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentListener.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentListener.aidl
new file mode 100644
index 0000000..f6f2a63
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentListener.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+interface IComponentListener {
+ oneway void onError(in android.hardware.media.c2.Status status, in int errorCode);
+ oneway void onFramesRendered(in android.hardware.media.c2.IComponentListener.RenderedFrame[] renderedFrames);
+ oneway void onInputBuffersReleased(in android.hardware.media.c2.IComponentListener.InputBuffer[] inputBuffers);
+ oneway void onTripped(in android.hardware.media.c2.SettingResult[] settingResults);
+ oneway void onWorkDone(in android.hardware.media.c2.WorkBundle workBundle);
+ @VintfStability
+ parcelable InputBuffer {
+ long frameIndex;
+ int arrayIndex;
+ }
+ @VintfStability
+ parcelable RenderedFrame {
+ long bufferQueueId;
+ int slotId;
+ long timestampNs;
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentStore.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentStore.aidl
new file mode 100644
index 0000000..d1b5915
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IComponentStore.aidl
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+interface IComponentStore {
+ void copyBuffer(in android.hardware.media.c2.Buffer src, in android.hardware.media.c2.Buffer dst);
+ android.hardware.media.c2.IComponent createComponent(in String name, in android.hardware.media.c2.IComponentListener listener, in android.hardware.media.bufferpool2.IClientManager pool);
+ android.hardware.media.c2.IComponentInterface createInterface(in String name);
+ android.hardware.media.c2.IConfigurable getConfigurable();
+ android.hardware.media.bufferpool2.IClientManager getPoolClientManager();
+ android.hardware.media.c2.StructDescriptor[] getStructDescriptors(in int[] indices);
+ android.hardware.media.c2.IComponentStore.ComponentTraits[] listComponents();
+ @VintfStability
+ parcelable ComponentTraits {
+ String name;
+ android.hardware.media.c2.IComponentStore.ComponentTraits.Domain domain;
+ android.hardware.media.c2.IComponentStore.ComponentTraits.Kind kind;
+ int rank;
+ String mediaType;
+ String[] aliases;
+ @Backing(type="int") @VintfStability
+ enum Kind {
+ OTHER = 0,
+ DECODER,
+ ENCODER,
+ }
+ @Backing(type="int") @VintfStability
+ enum Domain {
+ OTHER = 0,
+ VIDEO,
+ AUDIO,
+ IMAGE,
+ }
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IConfigurable.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IConfigurable.aidl
new file mode 100644
index 0000000..32f5abd
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IConfigurable.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+interface IConfigurable {
+ android.hardware.media.c2.IConfigurable.ConfigResult config(in android.hardware.media.c2.Params inParams, in boolean mayBlock);
+ int getId();
+ String getName();
+ android.hardware.media.c2.Params query(in int[] indices, in boolean mayBlock);
+ android.hardware.media.c2.ParamDescriptor[] querySupportedParams(in int start, in int count);
+ android.hardware.media.c2.FieldSupportedValuesQueryResult[] querySupportedValues(in android.hardware.media.c2.FieldSupportedValuesQuery[] inFields, in boolean mayBlock);
+ @VintfStability
+ parcelable ConfigResult {
+ android.hardware.media.c2.Params params;
+ android.hardware.media.c2.SettingResult[] failures;
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IGraphicBufferAllocator.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IGraphicBufferAllocator.aidl
new file mode 100644
index 0000000..da3d5ff
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/IGraphicBufferAllocator.aidl
@@ -0,0 +1,54 @@
+/*
+ * 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.media.c2;
+@VintfStability
+interface IGraphicBufferAllocator {
+ android.hardware.media.c2.IGraphicBufferAllocator.Allocation allocate(in android.hardware.media.c2.IGraphicBufferAllocator.Description desc);
+ boolean deallocate(in long id);
+ android.hardware.media.c2.IGraphicBufferAllocator.WaitableFds getWaitableFds();
+ parcelable Allocation {
+ android.hardware.HardwareBuffer buffer;
+ ParcelFileDescriptor fence;
+ }
+ parcelable Description {
+ int width;
+ int height;
+ int format;
+ long usage;
+ }
+ parcelable WaitableFds {
+ ParcelFileDescriptor allocEvent;
+ ParcelFileDescriptor statusEvent;
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/InfoBuffer.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/InfoBuffer.aidl
new file mode 100644
index 0000000..94cd77d
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/InfoBuffer.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable InfoBuffer {
+ int index;
+ android.hardware.media.c2.Buffer buffer;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamDescriptor.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamDescriptor.aidl
new file mode 100644
index 0000000..6f0ac50
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamDescriptor.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable ParamDescriptor {
+ int index;
+ int attrib;
+ String name;
+ int[] dependencies;
+ const int ATTRIBUTE_REQUIRED = (1 << 0) /* 1 */;
+ const int ATTRIBUTE_PERSISTENT = (1 << 1) /* 2 */;
+ const int ATTRIBUTE_STRICT = (1 << 2) /* 4 */;
+ const int ATTRIBUTE_READ_ONLY = (1 << 3) /* 8 */;
+ const int ATTRIBUTE_HIDDEN = (1 << 4) /* 16 */;
+ const int ATTRIBUTE_INTERNAL = (1 << 5) /* 32 */;
+ const int ATTRIBUTE_CONST = (1 << 6) /* 64 */;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamField.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamField.aidl
new file mode 100644
index 0000000..13d2522
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamField.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable ParamField {
+ int index;
+ android.hardware.media.c2.FieldId fieldId;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamFieldValues.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamFieldValues.aidl
new file mode 100644
index 0000000..5a2821c
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ParamFieldValues.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable ParamFieldValues {
+ android.hardware.media.c2.ParamField paramOrField;
+ android.hardware.media.c2.FieldSupportedValues[] values;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Params.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Params.aidl
new file mode 100644
index 0000000..7d363c0
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Params.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Params {
+ byte[] params;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/SettingResult.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/SettingResult.aidl
new file mode 100644
index 0000000..07fc1f3
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/SettingResult.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable SettingResult {
+ android.hardware.media.c2.SettingResult.Failure failure;
+ android.hardware.media.c2.ParamFieldValues field;
+ android.hardware.media.c2.ParamFieldValues[] conflicts;
+ @Backing(type="int") @VintfStability
+ enum Failure {
+ BAD_TYPE,
+ BAD_PORT,
+ BAD_INDEX,
+ READ_ONLY,
+ MISMATCH,
+ BAD_VALUE,
+ CONFLICT,
+ UNSUPPORTED,
+ INFO_BAD_VALUE,
+ INFO_CONFLICT,
+ }
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Status.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Status.aidl
new file mode 100644
index 0000000..8b430d2
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Status.aidl
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Status {
+ int status;
+ const int OK = 0;
+ const int BAD_VALUE = (-22) /* -22 */;
+ const int BAD_INDEX = (-75) /* -75 */;
+ const int CANNOT_DO = (-2147483646) /* -2147483646 */;
+ const int DUPLICATE = (-17) /* -17 */;
+ const int NOT_FOUND = (-2) /* -2 */;
+ const int BAD_STATE = (-38) /* -38 */;
+ const int BLOCKING = (-9930) /* -9930 */;
+ const int NO_MEMORY = (-12) /* -12 */;
+ const int REFUSED = (-1) /* -1 */;
+ const int TIMED_OUT = (-110) /* -110 */;
+ const int OMITTED = (-74) /* -74 */;
+ const int CORRUPTED = (-2147483648) /* -2147483648 */;
+ const int NO_INIT = (-19) /* -19 */;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/StructDescriptor.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/StructDescriptor.aidl
new file mode 100644
index 0000000..58268e0
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/StructDescriptor.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable StructDescriptor {
+ int type;
+ android.hardware.media.c2.FieldDescriptor[] fields;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ValueRange.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ValueRange.aidl
new file mode 100644
index 0000000..db71ce0
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/ValueRange.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable ValueRange {
+ long min;
+ long max;
+ long step;
+ long num;
+ long denom;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Work.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Work.aidl
new file mode 100644
index 0000000..a534348
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Work.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Work {
+ byte[] chainInfo;
+ android.hardware.media.c2.FrameData input;
+ android.hardware.media.c2.Worklet[] worklets;
+ int workletsProcessed;
+ android.hardware.media.c2.Status result;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkBundle.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkBundle.aidl
new file mode 100644
index 0000000..84708a8
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkBundle.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable WorkBundle {
+ android.hardware.media.c2.Work[] works;
+ android.hardware.media.c2.BaseBlock[] baseBlocks;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkOrdinal.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkOrdinal.aidl
new file mode 100644
index 0000000..2833df3
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/WorkOrdinal.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable WorkOrdinal {
+ long timestampUs;
+ long frameIndex;
+ long customOrdinal;
+}
diff --git a/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Worklet.aidl b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Worklet.aidl
new file mode 100644
index 0000000..a79abf2
--- /dev/null
+++ b/media/c2/aidl/aidl_api/android.hardware.media.c2/current/android/hardware/media/c2/Worklet.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2022 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.media.c2;
+@VintfStability
+parcelable Worklet {
+ int componentId;
+ byte[] tunings;
+ android.hardware.media.c2.SettingResult[] failures;
+ android.hardware.media.c2.FrameData output;
+}
diff --git a/staging/c2/aidl/android/hardware/media/c2/BaseBlock.aidl b/media/c2/aidl/android/hardware/media/c2/BaseBlock.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/BaseBlock.aidl
rename to media/c2/aidl/android/hardware/media/c2/BaseBlock.aidl
index 16e7653..8b8b8e0 100644
--- a/staging/c2/aidl/android/hardware/media/c2/BaseBlock.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/BaseBlock.aidl
@@ -25,6 +25,7 @@
* decoded data, codec-specific data, and other codec-related data are all sent
* in the form of BaseBlocks.
*/
+@VintfStability
union BaseBlock {
/**
* #nativeBlock is the opaque representation of a buffer.
diff --git a/staging/c2/aidl/android/hardware/media/c2/Block.aidl b/media/c2/aidl/android/hardware/media/c2/Block.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/Block.aidl
rename to media/c2/aidl/android/hardware/media/c2/Block.aidl
index 4da8490..34aa7b1 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Block.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Block.aidl
@@ -26,6 +26,7 @@
* attributes may differ among `Block` objects that refer to the same
* `BaseBlock` in the same `WorkBundle`.
*/
+@VintfStability
parcelable Block {
/**
* Identity of a `BaseBlock` within a `WorkBundle`. This is an index into
diff --git a/staging/c2/aidl/android/hardware/media/c2/Buffer.aidl b/media/c2/aidl/android/hardware/media/c2/Buffer.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/Buffer.aidl
rename to media/c2/aidl/android/hardware/media/c2/Buffer.aidl
index fe01b64..d2dcf2d 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Buffer.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Buffer.aidl
@@ -24,6 +24,7 @@
*
* This is a part of @ref FrameData.
*/
+@VintfStability
parcelable Buffer {
/**
* Metadata associated with the buffer.
diff --git a/staging/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl b/media/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl
similarity index 97%
rename from staging/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl
rename to media/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl
index 3dd14cd..a2774ec 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FieldDescriptor.aidl
@@ -21,10 +21,12 @@
/**
* Description of a field inside a C2Param structure.
*/
+@VintfStability
parcelable FieldDescriptor {
/**
* Possible types of the field.
*/
+ @VintfStability
@Backing(type="int")
enum Type {
NO_INIT = 0,
@@ -53,6 +55,7 @@
* Named value type. This is used for defining an enum value for a numeric
* type.
*/
+ @VintfStability
parcelable NamedValue {
/**
* Name of the enum value. This must be unique for each enum value in
diff --git a/staging/c2/aidl/android/hardware/media/c2/FieldId.aidl b/media/c2/aidl/android/hardware/media/c2/FieldId.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/FieldId.aidl
rename to media/c2/aidl/android/hardware/media/c2/FieldId.aidl
index c53f7a5..68bf058 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FieldId.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FieldId.aidl
@@ -22,6 +22,7 @@
* Within a given C2Param structure, each field is uniquely identified by @ref
* FieldId.
*/
+@VintfStability
parcelable FieldId {
/**
* Offset of the field in bytes.
diff --git a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl
rename to media/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl
index 5f4ad2a..6c2033b 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValues.aidl
@@ -26,6 +26,7 @@
* The intended type of values must be made clear in the context where
* `FieldSupportedValues` is used.
*/
+@VintfStability
union FieldSupportedValues {
/**
* No supported values
diff --git a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
similarity index 97%
rename from staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
rename to media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
index 33a8170..bdaaef6 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQuery.aidl
@@ -22,7 +22,9 @@
* Query information for supported values of a field. This is used as input to
* IConfigurable::querySupportedValues().
*/
+@VintfStability
parcelable FieldSupportedValuesQuery {
+ @VintfStability
@Backing(type="int")
enum Type {
/**
diff --git a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
rename to media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
index 133712a..b5c28c6 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.aidl
@@ -23,6 +23,7 @@
* This structure is used to hold the result from
* IConfigurable::querySupportedValues().
*/
+@VintfStability
parcelable FieldSupportedValuesQueryResult {
/**
* Result of the query. Possible values are
diff --git a/staging/c2/aidl/android/hardware/media/c2/FrameData.aidl b/media/c2/aidl/android/hardware/media/c2/FrameData.aidl
similarity index 99%
rename from staging/c2/aidl/android/hardware/media/c2/FrameData.aidl
rename to media/c2/aidl/android/hardware/media/c2/FrameData.aidl
index 81c76be..15c1b6d 100644
--- a/staging/c2/aidl/android/hardware/media/c2/FrameData.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/FrameData.aidl
@@ -31,6 +31,7 @@
* @note `FrameData` is the HIDL counterpart of `C2FrameData` in the Codec 2.0
* standard.
*/
+@VintfStability
parcelable FrameData {
/** List of frame flags */
/**
diff --git a/staging/c2/aidl/android/hardware/media/c2/IComponent.aidl b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
similarity index 94%
rename from staging/c2/aidl/android/hardware/media/c2/IComponent.aidl
rename to media/c2/aidl/android/hardware/media/c2/IComponent.aidl
index bea4b70..c880305 100644
--- a/staging/c2/aidl/android/hardware/media/c2/IComponent.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponent.aidl
@@ -17,12 +17,11 @@
package android.hardware.media.c2;
import android.hardware.common.NativeHandle;
-import android.view.Surface;
import android.hardware.media.c2.IComponentInterface;
import android.hardware.media.c2.IConfigurable;
+import android.hardware.media.c2.IGraphicBufferAllocator;
import android.hardware.media.c2.WorkBundle;
-import android.hardware.media.c2.SurfaceSyncObj;
/**
* Interface for an AIDL Codec2 component.
@@ -32,6 +31,7 @@
* All methods in `IComponent` must not block. If a method call cannot be
* completed in a timely manner, it must throw `Status::TIMED_OUT`.
*/
+@VintfStability
interface IComponent {
/**
* The reference object from framwork to HAL C2BlockPool.
@@ -233,23 +233,15 @@
void reset();
/**
- * Starts using a surface for output with a synchronization object
+ * Specify an allocator for decoder output buffer from HAL.
*
- * This method must not block.
- *
- * @param blockPoolId Id of the `C2BlockPool` to be associated with the
- * output surface.
- * @param surface Output surface.
- * @param syncObject synchronization object for buffer allocation between
- * Framework and Component.
- * @throws ServiceSpecificException with one of the following values:
- * - `Status::CANNOT_DO` - The component does not support an output surface.
- * - `Status::REFUSED` - The output surface cannot be accessed.
- * - `Status::TIMED_OUT` - The operation cannot be finished in a timely manner.
+ * The method will be used once during the life-cycle of a codec instance.
+ * @param allocator Decoder output buffer allocator from the client
+ * @throws ServiceSpecificException with one of the following values
+ * - `Status::CANNOT_DO` - The component does not support allocating from the client.
* - `Status::CORRUPTED` - Some unknown error occurred.
*/
- void setOutputSurface(in long blockPoolId, in Surface surface,
- in SurfaceSyncObj syncObject);
+ void setDecoderOutputAllocator(in IGraphicBufferAllocator allocator);
/**
* Starts the component.
diff --git a/staging/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl b/media/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl
rename to media/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl
index 4589115..9db81e6 100644
--- a/staging/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponentInterface.aidl
@@ -26,6 +26,7 @@
*
* An actual component exposes this interface via IComponent::getInterface().
*/
+@VintfStability
interface IComponentInterface {
/**
* Returns the @ref IConfigurable instance associated to this component
diff --git a/staging/c2/aidl/android/hardware/media/c2/IComponentListener.aidl b/media/c2/aidl/android/hardware/media/c2/IComponentListener.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/IComponentListener.aidl
rename to media/c2/aidl/android/hardware/media/c2/IComponentListener.aidl
index 786c8f1..75500b7 100644
--- a/staging/c2/aidl/android/hardware/media/c2/IComponentListener.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponentListener.aidl
@@ -23,11 +23,13 @@
/**
* Callback interface for handling notifications from @ref IComponent.
*/
+@VintfStability
oneway interface IComponentListener {
/**
* Identifying information for an input buffer previously queued to the
* component via IComponent::queue().
*/
+ @VintfStability
parcelable InputBuffer {
/**
* This value comes from `Work::input.ordinal.frameIndex` in a `Work`
@@ -43,6 +45,7 @@
/**
* Information about rendering of a frame to a `Surface`.
*/
+ @VintfStability
parcelable RenderedFrame {
/**
* Id of the `BufferQueue` containing the rendered buffer.
diff --git a/staging/c2/aidl/android/hardware/media/c2/IComponentStore.aidl b/media/c2/aidl/android/hardware/media/c2/IComponentStore.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/IComponentStore.aidl
rename to media/c2/aidl/android/hardware/media/c2/IComponentStore.aidl
index d332bd3..1435a7e 100644
--- a/staging/c2/aidl/android/hardware/media/c2/IComponentStore.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IComponentStore.aidl
@@ -34,17 +34,21 @@
* @note This is an extension of version 1.1 of `IComponentStore`. The purpose
* of the extension is to add support for blocking output buffer allocator.
*/
+@VintfStability
interface IComponentStore {
/**
* Component traits.
*/
+ @VintfStability
parcelable ComponentTraits {
+ @VintfStability
@Backing(type="int")
enum Kind {
OTHER = 0,
DECODER,
ENCODER,
}
+ @VintfStability
@Backing(type="int")
enum Domain {
OTHER = 0,
diff --git a/staging/c2/aidl/android/hardware/media/c2/IConfigurable.aidl b/media/c2/aidl/android/hardware/media/c2/IConfigurable.aidl
similarity index 99%
rename from staging/c2/aidl/android/hardware/media/c2/IConfigurable.aidl
rename to media/c2/aidl/android/hardware/media/c2/IConfigurable.aidl
index 9f79576..7fdb825 100644
--- a/staging/c2/aidl/android/hardware/media/c2/IConfigurable.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/IConfigurable.aidl
@@ -28,6 +28,7 @@
* This interface must be supported in all states of the owning object, and must
* not change the state of the owning object.
*/
+@VintfStability
interface IConfigurable {
/**
* Return parcelable for config() interface.
@@ -35,6 +36,7 @@
* This includes the successful config settings along with the failure reasons of
* the specified setting.
*/
+ @VintfStability
parcelable ConfigResult {
Params params;
SettingResult[] failures;
diff --git a/media/c2/aidl/android/hardware/media/c2/IGraphicBufferAllocator.aidl b/media/c2/aidl/android/hardware/media/c2/IGraphicBufferAllocator.aidl
new file mode 100644
index 0000000..1c97214
--- /dev/null
+++ b/media/c2/aidl/android/hardware/media/c2/IGraphicBufferAllocator.aidl
@@ -0,0 +1,114 @@
+/*
+ * 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.media.c2;
+
+import android.hardware.HardwareBuffer;
+import android.os.ParcelFileDescriptor;
+
+/**
+ * Interface for decoder output buffer allocator for HAL process
+ *
+ * A graphic buffer for decoder output is allocated by the interface.
+ */
+@VintfStability
+interface IGraphicBufferAllocator {
+ /**
+ * A graphic buffer allocation.
+ *
+ * buffer is in android.hardware.HardwareBuffer.
+ * fence is provided in order to signal readiness of the buffer I/O inside
+ * underlying Graphics subsystem. This is called a sync fence throughout Android framework.
+ */
+ parcelable Allocation {
+ HardwareBuffer buffer;
+ ParcelFileDescriptor fence;
+ }
+
+ /**
+ * Parameters for a graphic buffer allocation.
+ *
+ * Refer to AHardwareBuffer_Desc(libnativewindow) for details.
+ */
+ parcelable Description {
+ int width;
+ int height;
+ int format;
+ long usage;
+ }
+
+ /**
+ * Allocate a graphic buffer.
+ *
+ * @param desc Allocation parameters.
+ * @return an android.hardware.HardwareBuffer which is basically same to
+ * AHardwareBuffer. If underlying grpahics system is blocked, c2::Status::Blocked
+ * will be returned. In this case getWaitableFds() will return file descriptors which
+ * can be used to construct a waitable object. The waitable object will be notified
+ * when underlying graphics system is unblocked
+ * @throws ServiceSpecificException with one of the following values:
+ * - `c2::Status::BAD_STATE` - The client is not in running states.
+ * - `c2::Status::BLOCKED` - Underlying graphics system is blocked.
+ * - `c2::Status::CORRUPTED` - Some unknown error occurred.
+ */
+ Allocation allocate(in Description desc);
+
+ /**
+ * De-allocate a graphic buffer by graphic buffer's unique id.
+ *
+ * @param id graphic buffer's unique id. See also AHardwareBuffer_getId().
+ * @return {@code true} when de-allocate happened, {@code false} otherwise.
+ */
+ boolean deallocate(in long id);
+
+ /**
+ * Fds for waitable object events.
+ *
+ * Fds are created by eventfd() with semaphore mode.
+ * For allocEvent, An integer counter regarding dequeuable buffer count is maintained
+ * by client using read()/write() to the fd. The fd can be checked whether it is
+ * readable via poll(). When in readable status, the specified counter is positive
+ * so allocate/dequeue can happen.
+ *
+ * For statusEvent, the client can notify further allocation is not feasible.
+ * e.g.) life-cycle of the underlying allocator is ended.
+ *
+ * C2Fence object should be implemented based on this Fds. Thus, C2Fence can return
+ * either by allocation being ready or allocation being infeasible by the client status
+ * change.
+ */
+ parcelable WaitableFds {
+ ParcelFileDescriptor allocEvent;
+ ParcelFileDescriptor statusEvent;
+ }
+
+ /**
+ * Gets waiable file descriptors.
+ *
+ * Use this method once and cache it in order not to create unnecessary duplicated fds.
+ * The returned array will have two fds.
+ *
+ * If many waitable objects based on the same fd are competing, all watiable objects will be
+ * notified. After being notified, they should invoke allocate(). At least one of them can
+ * successfully allocate. Others not having an Allocation will have c2::Status::BLOCKED
+ * as return value. They should wait again via waitable objects based on the fds which are
+ * already returned from this interface.
+ *
+ * @return an fd array which will be wrapped to C2Fence and will be waited for
+ * until allocating is unblocked.
+ */
+ WaitableFds getWaitableFds();
+}
diff --git a/staging/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl b/media/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl
rename to media/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl
index 7cfabcb..207c4d0 100644
--- a/staging/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/InfoBuffer.aidl
@@ -23,6 +23,7 @@
*
* This is a part of @ref FrameData.
*/
+@VintfStability
parcelable InfoBuffer {
/**
* A C2Param structure index.
diff --git a/staging/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl b/media/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl
rename to media/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl
index 716c07e..84c6acc 100644
--- a/staging/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/ParamDescriptor.aidl
@@ -21,6 +21,7 @@
*
* @ref ParamDescriptor is returned by IConfigurable::querySupportedParams().
*/
+@VintfStability
parcelable ParamDescriptor {
/** The list of bit flags for attrib */
/**
diff --git a/staging/c2/aidl/android/hardware/media/c2/ParamField.aidl b/media/c2/aidl/android/hardware/media/c2/ParamField.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/ParamField.aidl
rename to media/c2/aidl/android/hardware/media/c2/ParamField.aidl
index 94f737d..64a46bb 100644
--- a/staging/c2/aidl/android/hardware/media/c2/ParamField.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/ParamField.aidl
@@ -21,6 +21,7 @@
/**
* Reference to a field in a C2Param structure.
*/
+@VintfStability
parcelable ParamField {
/**
* Index of the C2Param structure.
diff --git a/staging/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl b/media/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl
rename to media/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl
index 4bb9a91..7b74c0e 100644
--- a/staging/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/ParamFieldValues.aidl
@@ -26,6 +26,7 @@
* values object. This structure is used when reporting parameter configuration
* failures and conflicts.
*/
+@VintfStability
parcelable ParamFieldValues {
/**
* Reference to a field or a C2Param structure.
diff --git a/staging/c2/aidl/android/hardware/media/c2/Params.aidl b/media/c2/aidl/android/hardware/media/c2/Params.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/Params.aidl
rename to media/c2/aidl/android/hardware/media/c2/Params.aidl
index 3c1a321..53b512c 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Params.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Params.aidl
@@ -30,6 +30,7 @@
* - 4 bytes: size of the C2Param object (unsigned 4-byte integer).
* - (size - 8) bytes: data of the C2Param object.
*/
+@VintfStability
parcelable Params {
byte[] params;
}
diff --git a/staging/c2/aidl/android/hardware/media/c2/SettingResult.aidl b/media/c2/aidl/android/hardware/media/c2/SettingResult.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/SettingResult.aidl
rename to media/c2/aidl/android/hardware/media/c2/SettingResult.aidl
index a270146..c2b9574 100644
--- a/staging/c2/aidl/android/hardware/media/c2/SettingResult.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/SettingResult.aidl
@@ -22,10 +22,12 @@
* Information describing the reason the parameter settings may fail, or may be
* overridden.
*/
+@VintfStability
parcelable SettingResult {
/**
* Failure code
*/
+ @VintfStability
@Backing(type="int")
enum Failure {
/**
diff --git a/staging/c2/aidl/android/hardware/media/c2/Status.aidl b/media/c2/aidl/android/hardware/media/c2/Status.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/Status.aidl
rename to media/c2/aidl/android/hardware/media/c2/Status.aidl
index 660db57..58a2404 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Status.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Status.aidl
@@ -19,6 +19,7 @@
/**
* Common return values for Codec2 operations.
*/
+@VintfStability
parcelable Status {
/**
* Operation completed successfully.
diff --git a/staging/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl b/media/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl
rename to media/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl
index 5d6d2eb..00359041 100644
--- a/staging/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/StructDescriptor.aidl
@@ -22,6 +22,7 @@
* Description of a C2Param structure. It consists of an index and a list of
* `FieldDescriptor`s.
*/
+@VintfStability
parcelable StructDescriptor {
/**
* Index of the structure.
diff --git a/staging/c2/aidl/android/hardware/media/c2/ValueRange.aidl b/media/c2/aidl/android/hardware/media/c2/ValueRange.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/ValueRange.aidl
rename to media/c2/aidl/android/hardware/media/c2/ValueRange.aidl
index 6707a25..9abcb7d 100644
--- a/staging/c2/aidl/android/hardware/media/c2/ValueRange.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/ValueRange.aidl
@@ -38,6 +38,7 @@
* The division in the formula may truncate the result if the data type of
* these values is an integral type.
*/
+@VintfStability
parcelable ValueRange {
/**
* Lower end of the range (inclusive).
diff --git a/staging/c2/aidl/android/hardware/media/c2/Work.aidl b/media/c2/aidl/android/hardware/media/c2/Work.aidl
similarity index 99%
rename from staging/c2/aidl/android/hardware/media/c2/Work.aidl
rename to media/c2/aidl/android/hardware/media/c2/Work.aidl
index 0732479..4b8d696 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Work.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Work.aidl
@@ -34,6 +34,7 @@
*
* `Work` is a part of @ref WorkBundle.
*/
+@VintfStability
parcelable Work {
/**
* Additional work chain info not part of this work.
diff --git a/staging/c2/aidl/android/hardware/media/c2/WorkBundle.aidl b/media/c2/aidl/android/hardware/media/c2/WorkBundle.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/WorkBundle.aidl
rename to media/c2/aidl/android/hardware/media/c2/WorkBundle.aidl
index 79b4cdb..2125fda 100644
--- a/staging/c2/aidl/android/hardware/media/c2/WorkBundle.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/WorkBundle.aidl
@@ -35,6 +35,7 @@
* Codec 2.0 standard. The presence of #baseBlocks helps with minimizing the
* data transferred over an IPC.
*/
+@VintfStability
parcelable WorkBundle {
/**
* A list of Work items.
diff --git a/staging/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl b/media/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl
rename to media/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl
index eb8b244..5708a90 100644
--- a/staging/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/WorkOrdinal.aidl
@@ -31,6 +31,7 @@
* @note `WorkOrdinal` is the HIDL counterpart of `C2WorkOrdinalStruct` in the
* Codec 2.0 standard.
*/
+@VintfStability
parcelable WorkOrdinal {
/**
* Timestamp in microseconds.
diff --git a/staging/c2/aidl/android/hardware/media/c2/Worklet.aidl b/media/c2/aidl/android/hardware/media/c2/Worklet.aidl
similarity index 98%
rename from staging/c2/aidl/android/hardware/media/c2/Worklet.aidl
rename to media/c2/aidl/android/hardware/media/c2/Worklet.aidl
index 04c59c1..6b3ceac 100644
--- a/staging/c2/aidl/android/hardware/media/c2/Worklet.aidl
+++ b/media/c2/aidl/android/hardware/media/c2/Worklet.aidl
@@ -28,6 +28,7 @@
* a @ref Work object for each expected output before calling
* IComponent::queue().
*/
+@VintfStability
parcelable Worklet {
/**
* Component id. (Input)
diff --git a/neuralnetworks/1.0/Android.bp b/neuralnetworks/1.0/Android.bp
index 7bc65ff..8b7af11 100644
--- a/neuralnetworks/1.0/Android.bp
+++ b/neuralnetworks/1.0/Android.bp
@@ -23,4 +23,8 @@
"android.hidl.base@1.0",
],
gen_java: false,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.neuralnetworks",
+ ],
}
diff --git a/neuralnetworks/1.1/Android.bp b/neuralnetworks/1.1/Android.bp
index 772e5e6..b93c80c 100644
--- a/neuralnetworks/1.1/Android.bp
+++ b/neuralnetworks/1.1/Android.bp
@@ -21,4 +21,8 @@
"android.hidl.base@1.0",
],
gen_java: false,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.neuralnetworks",
+ ],
}
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index 2b83d39..63e0f61 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -28,4 +28,8 @@
"android.hidl.safe_union@1.0",
],
gen_java: false,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.neuralnetworks",
+ ],
}
diff --git a/neuralnetworks/1.3/Android.bp b/neuralnetworks/1.3/Android.bp
index aa8fc39..c343802 100644
--- a/neuralnetworks/1.3/Android.bp
+++ b/neuralnetworks/1.3/Android.bp
@@ -29,4 +29,8 @@
"android.hidl.safe_union@1.0",
],
gen_java: false,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.neuralnetworks",
+ ],
}
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index 09f845b..72aaa0f 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,20 @@
imports: ["android.hardware.radio-V2"],
},
],
- frozen: true,
+}
+aidl_interface {
+ name: "android.hardware.radio.satellite",
+ vendor_available: true,
+ srcs: ["android/hardware/radio/satellite/*.aidl"],
+ stability: "vintf",
+ imports: ["android.hardware.radio-V3"],
+ backend: {
+ cpp: {
+ enabled: false,
+ },
+ java: {
+ sdk_version: "module_current",
+ },
+ },
}
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..362be3a 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,
@@ -378,4 +379,5 @@
SLICE_REJECTED = 0x8CC,
MATCH_ALL_RULE_NOT_ALLOWED = 0x8CD,
ALL_MATCHING_RULES_FAILED = 0x8CE,
+ SATELLITE_ENABLED = 0x8CF,
}
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.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl
new file mode 100644
index 0000000..0c7408a
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatellite.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@VintfStability
+interface IRadioSatellite {
+ oneway void addAllowedSatelliteContacts(in int serial, in String[] contacts);
+ oneway void getCapabilities(in int serial);
+ oneway void getMaxCharactersPerTextMessage(in int serial);
+ oneway void getPendingMessages(in int serial);
+ oneway void getPowerState(in int serial);
+ oneway void getSatelliteMode(in int serial);
+ oneway void getTimeForNextSatelliteVisibility(in int serial);
+ oneway void provisionService(in int serial, in String imei, in String msisdn, in String imsi, in android.hardware.radio.satellite.SatelliteFeature[] features);
+ oneway void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
+ oneway void responseAcknowledgement();
+ oneway void sendMessages(in int serial, in String[] messages, in String destination, in double latitude, in double longitude);
+ oneway void setIndicationFilter(in int serial, in int filterBitmask);
+ oneway void setPower(in int serial, in boolean on);
+ oneway void setResponseFunctions(in android.hardware.radio.satellite.IRadioSatelliteResponse satelliteResponse, in android.hardware.radio.satellite.IRadioSatelliteIndication satelliteIndication);
+ oneway void startSendingSatellitePointingInfo(in int serial);
+ oneway void stopSendingSatellitePointingInfo(in int serial);
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
new file mode 100644
index 0000000..36ec5f3
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@VintfStability
+interface IRadioSatelliteIndication {
+ oneway void onMessagesTransferComplete(in android.hardware.radio.RadioIndicationType type, in boolean complete);
+ oneway void onNewMessages(in android.hardware.radio.RadioIndicationType type, in String[] messages);
+ oneway void onPendingMessageCount(in android.hardware.radio.RadioIndicationType type, in int count);
+ oneway void onProvisionStateChanged(in android.hardware.radio.RadioIndicationType type, boolean provisioned, in android.hardware.radio.satellite.SatelliteFeature[] features);
+ oneway void onSatelliteModeChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.SatelliteMode mode);
+ oneway void onSatellitePointingInfoChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.PointingInfo pointingInfo);
+ oneway void onSatelliteRadioTechnologyChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.satellite.NTRadioTechnology technology);
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
new file mode 100644
index 0000000..bf9b9e6
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@VintfStability
+interface IRadioSatelliteResponse {
+ oneway void acknowledgeRequest(in int serial);
+ oneway void addAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void getCapabilitiesResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteCapabilities capabilities);
+ oneway void getMaxCharactersPerTextMessageResponse(in android.hardware.radio.RadioResponseInfo info, in int charLimit);
+ oneway void getPendingMessagesResponse(in android.hardware.radio.RadioResponseInfo info, in String[] messages);
+ oneway void getPowerStateResponse(in android.hardware.radio.RadioResponseInfo info, in boolean on);
+ oneway void getSatelliteModeResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.satellite.SatelliteMode mode, in android.hardware.radio.satellite.NTRadioTechnology technology);
+ oneway void getTimeForNextSatelliteVisibilityResponse(in android.hardware.radio.RadioResponseInfo info, in int timeInSeconds);
+ oneway void provisionServiceResponse(in android.hardware.radio.RadioResponseInfo info, in boolean provisioned);
+ oneway void removeAllowedSatelliteContactsResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void sendMessagesResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void setIndicationFilterResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void setPowerResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void startSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void stopSendingSatellitePointingInfoResponse(in android.hardware.radio.RadioResponseInfo info);
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl
new file mode 100644
index 0000000..b9df1f5
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/IndicationFilter.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum IndicationFilter {
+ NONE = 0,
+ SATELLITE_MODE = 1,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl
new file mode 100644
index 0000000..f05baaa
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/NTRadioTechnology.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum NTRadioTechnology {
+ NB_IOT_NTN = 0,
+ NR_NTN = 1,
+ EMTC_NTN = 2,
+ PROPRIETARY = 3,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl
new file mode 100644
index 0000000..1ada88a
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/PointingInfo.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
+parcelable PointingInfo {
+ float satelliteAzimuthDegrees;
+ float satelliteElevationDegrees;
+ float antennaAzimuthDegrees;
+ float antennaPitchDegrees;
+ float antennaRollDegrees;
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl
new file mode 100644
index 0000000..e0af71a
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteCapabilities.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
+parcelable SatelliteCapabilities {
+ android.hardware.radio.satellite.NTRadioTechnology[] supportedRadioTechnologies;
+ boolean isAlwaysOn;
+ boolean needsPointingToSatellite;
+ android.hardware.radio.satellite.SatelliteFeature[] supportedFeatures;
+ boolean needsSeparateSimProfile;
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl
new file mode 100644
index 0000000..e79e572
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteFeature.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum SatelliteFeature {
+ SOS_SMS = 0,
+ EMERGENCY_SMS = 1,
+ SMS = 2,
+ LOCATION_SHARING = 3,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl
new file mode 100644
index 0000000..a1ce566
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.satellite/current/android/hardware/radio/satellite/SatelliteMode.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum SatelliteMode {
+ POWERED_OFF = 0,
+ OUT_OF_SERVICE_NOT_SEARCHING = 1,
+ OUT_OF_SERVICE_SEARCHING = 2,
+ ACQUIRED = 3,
+ MESSAGE_TRANSFERRING = 4,
+}
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..781c9f6 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,
@@ -123,4 +124,15 @@
BLOCKED_DUE_TO_CALL = 69,
RF_HARDWARE_ISSUE = 70,
NO_RF_CALIBRATION_INFO = 71,
+ ENCODING_NOT_SUPPORTED = 72,
+ FEATURE_NOT_SUPPORTED = 73,
+ INVALID_CONTACT = 74,
+ MODEM_INCOMPATIBLE = 75,
+ NETWORK_TIMEOUT = 76,
+ NO_SATELLITE_SIGNAL = 77,
+ NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
+ RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
+ SUBSCRIBER_NOT_AUTHORIZED = 80,
+ SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
+ UNIDENTIFIED_SUBSCRIBER = 82,
}
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..e95d725 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)
@@ -301,4 +302,51 @@
* Unlike RF_HARDWARE_ISSUE, this is a SW problem and no HW repair is needed.
*/
NO_RF_CALIBRATION_INFO = 71,
+ /**
+ * The encoding scheme is not supported by either the network or the MS.
+ */
+ ENCODING_NOT_SUPPORTED = 72,
+ /**
+ * The requesting feature is not supported by the service provider/operator.
+ */
+ FEATURE_NOT_SUPPORTED = 73,
+ /**
+ * The contact to be added is either not existing or not valid.
+ */
+ INVALID_CONTACT = 74,
+ /**
+ * The modem of the MS is not compatible with the service provider/operator. This generic error
+ * should be used only when there are some mimatches in the capabilities between the MS and
+ * the operator and the error cannot be mapped properly to other specific network errors.
+ */
+ MODEM_INCOMPATIBLE = 75,
+ /**
+ * Modem timeout to receive ACK or response from network after sending a request to the network.
+ */
+ NETWORK_TIMEOUT = 76,
+ /**
+ * Modem fails to communicate with the satellite network since there is no satellite signal.
+ */
+ NO_SATELLITE_SIGNAL = 77,
+ /**
+ * The request cannot be performed since the subscriber's account balance is not sufficient.
+ */
+ NOT_SUFFICIENT_ACCOUNT_BALANCE = 78,
+ /**
+ * The radio technology is not supported by the service provider/operator.
+ */
+ RADIO_TECHNOLOGY_NOT_SUPPORTED = 79,
+ /**
+ * The subscription is not authorized to register with the service provider/operator.
+ */
+ SUBSCRIBER_NOT_AUTHORIZED = 80,
+ /**
+ * While processing a request from the Framework, the satellite modem detects terrestrial
+ * signal, aborts the request, and switches to the terrestrial network.
+ */
+ SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL = 81,
+ /**
+ * The subscriber is not registered in the service provider.
+ */
+ UNIDENTIFIED_SUBSCRIBER = 82
}
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..ef68c8c 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)
@@ -1305,4 +1306,8 @@
* If connection failed for all matching URSP rules.
*/
ALL_MATCHING_RULES_FAILED = 0x8CE,
+ /**
+ * Data call is not allowed as device is connected to satellite.
+ */
+ SATELLITE_ENABLED = 0x8CF,
}
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..e4c3856 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.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 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/satellite/IRadioSatellite.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatellite.aidl
new file mode 100644
index 0000000..749f49f
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/IRadioSatellite.aidl
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+import android.hardware.radio.satellite.IRadioSatelliteIndication;
+import android.hardware.radio.satellite.IRadioSatelliteResponse;
+import android.hardware.radio.satellite.IndicationFilter;
+import android.hardware.radio.satellite.SatelliteFeature;
+
+/**
+ * This interface is used by telephony to send commands to and query info from satellite modem.
+ * 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.
+ * @hide
+ */
+@VintfStability
+oneway interface IRadioSatellite {
+ /**
+ * Add contacts that are allowed to be used for satellite communication. This is applicable for
+ * incoming messages as well.
+ *
+ * @param serial Serial number of request.
+ * @param contacts List of allowed contacts to be added.
+ */
+ void addAllowedSatelliteContacts(in int serial, in String[] contacts);
+
+ /**
+ * Get feature capabilities supported by satellite.
+ *
+ * @param serial Serial number of request.
+ */
+ void getCapabilities(in int serial);
+
+ /**
+ * Get max number of characters per text message.
+ *
+ * @param serial Serial number of request.
+ */
+ void getMaxCharactersPerTextMessage(in int serial);
+
+ /**
+ * Get pending messages.
+ *
+ * @param serial Serial number of request.
+ */
+ void getPendingMessages(in int serial);
+
+ /**
+ * Get satellite modem state.
+ *
+ * @param serial Serial number of request.
+ */
+ void getPowerState(in int serial);
+
+ /**
+ * Get current satellite registration mode, which is defined in {@link #SatelliteMode}.
+ *
+ * @param serial Serial number of request.
+ */
+ void getSatelliteMode(in int serial);
+
+ /**
+ * Get time for next visibility of satellite.
+ *
+ * @param serial Serial number of request.
+ */
+ void getTimeForNextSatelliteVisibility(in int serial);
+
+ /**
+ * Provision the subscription with a satellite provider. This is needed to register the
+ * subscription if the provider allows dynamic registration.
+ *
+ * @param serial Serial number of request.
+ * @param imei IMEI of the SIM associated with the satellite modem.
+ * @param msisdn MSISDN of the SIM associated with the satellite modem.
+ * @param imsi IMSI of the SIM associated with the satellite modem.
+ * @param features List of features to be provisioned.
+ */
+ void provisionService(in int serial, in String imei, in String msisdn, in String imsi,
+ in SatelliteFeature[] features);
+
+ /**
+ * Remove contacts that are allowed to be used for satellite communication. This is applicable
+ * for incoming messages as well.
+ *
+ * @param serial Serial number of request.
+ * @param contacts List of allowed contacts to be removed.
+ */
+ void removeAllowedSatelliteContacts(in int serial, in String[] contacts);
+
+ /**
+ * When response type received from a radio indication or radio response is
+ * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
+ * acknowledge the receipt of those messages by sending responseAcknowledgement().
+ */
+ void responseAcknowledgement();
+
+ /**
+ * Send text messages.
+ *
+ * @param serial Serial number of request.
+ * @param messages List of messages in text format to be sent.
+ * @param destination The recipient of the message.
+ * @param latitude The current latitude of the device.
+ * @param longitude The current longitude of the device. The location (i.e., latitude and
+ * longitude) of the device will be filled for emergency messages.
+ */
+ void sendMessages(in int serial, in String[] messages, in String destination,
+ in double latitude, in double longitude);
+
+ /**
+ * Set the filter for what type of indication framework want to receive from modem.
+ *
+ * @param serial Serial number of request.
+ * @param filterBitmask The filter bitmask identifying what type of indication Telephony
+ * framework wants to receive from modem. This bitmask is the 'or'
+ * combination of the enum values defined in {@link #IndicationFilter}.
+ */
+ void setIndicationFilter(in int serial, in int filterBitmask);
+
+ /**
+ * Turn satellite modem on/off.
+ *
+ * @param serial Serial number of request.
+ * @param on True for turning on.
+ * False for turning off.
+ */
+ void setPower(in int serial, in boolean on);
+
+ /**
+ * Set response functions for Satellite requests and indications.
+ *
+ * @param satelliteResponse Object containing response functions
+ * @param satelliteIndication Object containing radio indications
+ */
+ void setResponseFunctions(in IRadioSatelliteResponse satelliteResponse,
+ in IRadioSatelliteIndication satelliteIndication);
+
+ /**
+ * User started pointing to the satellite. Modem should continue to update the pointing input
+ * as user device/satellite moves.
+ *
+ * @param serial Serial number of request.
+ */
+ void startSendingSatellitePointingInfo(in int serial);
+
+ /**
+ * Stop sending satellite pointing info to the framework.
+ *
+ * @param serial Serial number of request.
+ */
+ void stopSendingSatellitePointingInfo(in int serial);
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
new file mode 100644
index 0000000..2a2fb95
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.aidl
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+import android.hardware.radio.RadioIndicationType;
+import android.hardware.radio.satellite.NTRadioTechnology;
+import android.hardware.radio.satellite.PointingInfo;
+import android.hardware.radio.satellite.SatelliteFeature;
+import android.hardware.radio.satellite.SatelliteMode;
+
+/**
+ * Interface declaring unsolicited radio indications for satellite APIs.
+ * @hide
+ */
+@VintfStability
+oneway interface IRadioSatelliteIndication {
+ /**
+ * Confirms that ongoing message transfer is complete.
+ *
+ * @param type Type of radio indication
+ * @param complete True mean the transfer is complete.
+ * False means the transfer is not complete.
+ */
+ void onMessagesTransferComplete(in RadioIndicationType type, in boolean complete);
+
+ /**
+ * Indicates new message received on device.
+ *
+ * @param type Type of radio indication
+ * @param messages List of new messages received.
+ */
+ void onNewMessages(in RadioIndicationType type, in String[] messages);
+
+ /**
+ * Indicates that satellite has pending messages for the device to be pulled.
+ *
+ * @param type Type of radio indication
+ * @param count Number of pending messages.
+ */
+ void onPendingMessageCount(in RadioIndicationType type, in int count);
+
+ /**
+ * Indicate that satellite provision state has changed.
+ *
+ * @param type Type of radio indication
+ * @param provisioned True means the service is provisioned.
+ * False means the service is not provisioned.
+ * @param features List of Feature whose provision state has changed.
+ */
+ void onProvisionStateChanged(
+ in RadioIndicationType type, boolean provisioned, in SatelliteFeature[] features);
+
+ /**
+ * Indicate that satellite mode has changed.
+ *
+ * @param type Type of radio indication
+ * @param mode The current mode of the satellite modem.
+ */
+ void onSatelliteModeChanged(in RadioIndicationType type, in SatelliteMode mode);
+
+ /**
+ * Indicate that satellite Pointing input has changed.
+ *
+ * @param type Type of radio indication
+ * @param pointingInfo The current pointing info.
+ */
+ void onSatellitePointingInfoChanged(in RadioIndicationType type, in PointingInfo pointingInfo);
+
+ /**
+ * Indicate that satellite radio technology has changed.
+ *
+ * @param type Type of radio indication
+ * @param technology The current technology of the satellite modem.
+ */
+ void onSatelliteRadioTechnologyChanged(
+ in RadioIndicationType type, in NTRadioTechnology technology);
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
new file mode 100644
index 0000000..2bef3d2
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.aidl
@@ -0,0 +1,462 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+import android.hardware.radio.RadioResponseInfo;
+import android.hardware.radio.satellite.NTRadioTechnology;
+import android.hardware.radio.satellite.SatelliteCapabilities;
+import android.hardware.radio.satellite.SatelliteMode;
+
+/**
+ * Interface declaring response functions to solicited radio requests for satellite APIs.
+ * @hide
+ */
+@VintfStability
+oneway interface IRadioSatelliteResponse {
+ /**
+ * Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
+ * radio request which take long time to respond. For more details, refer
+ * https://source.android.com/devices/tech/connect/ril.html
+ *
+ * @param serial Serial no. of the request whose acknowledgement is sent.
+ */
+ void acknowledgeRequest(in int serial);
+
+ /**
+ * Response of the request addAllowedSatelliteContacts.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:ABORTED
+ * RadioError:ACCESS_BARRED
+ * RadioError:CANCELLED
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_CONTACT
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:NETWORK_REJECT
+ * RadioError:NETWORK_TIMEOUT
+ * RadioError:NO_MEMORY
+ * RadioError:NO_NETWORK_FOUND
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_SATELLITE_SIGNAL
+ * RadioError:NO_SUBSCRIPTION
+ * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIM_BUSY
+ * RadioError:SIM_ERR
+ * RadioError:SIM_FULL
+ * RadioError:SYSTEM_ERR
+ * RadioError:UNIDENTIFIED_SUBSCRIBER
+ */
+ void addAllowedSatelliteContactsResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request getCapabilities.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param capabilities List of capabilities that the satellite modem supports.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void getCapabilitiesResponse(in RadioResponseInfo info, in SatelliteCapabilities capabilities);
+
+ /**
+ * Response of the request getMaxCharactersPerTextMessage.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param charLimit Maximum number of characters in a text message that can be sent.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void getMaxCharactersPerTextMessageResponse(in RadioResponseInfo info, in int charLimit);
+
+ /**
+ * Response of the request getPendingMessages.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param messages List of pending messages received.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:ABORTED
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ * RadioError:CANCELLED
+ * RadioError:ENCODING_ERR
+ * RadioError:ENCODING_NOT_SUPPORTED
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:NETWORK_REJECT
+ * RadioError:NETWORK_TIMEOUT
+ * RadioError:NO_MEMORY
+ * RadioError:NO_NETWORK_FOUND
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_SMS_TO_ACK
+ * RadioError:NO_SATELLITE_SIGNAL
+ * RadioError:NO_SUBSCRIPTION
+ * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIM_BUSY
+ * RadioError:SIM_ERR
+ * RadioError:SIM_FULL
+ * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
+ * RadioError:SYSTEM_ERR
+ * RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
+ */
+ void getPendingMessagesResponse(in RadioResponseInfo info, in String[] messages);
+
+ /**
+ * Response of the request getPowerSate.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param on True means the modem is ON.
+ * False means the modem is OFF.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void getPowerStateResponse(in RadioResponseInfo info, in boolean on);
+
+ /**
+ * Response of the request getSatelliteMode.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param mode Current Mode of the satellite modem.
+ * @param technology The current technology of the satellite modem.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void getSatelliteModeResponse(
+ in RadioResponseInfo info, in SatelliteMode mode, in NTRadioTechnology technology);
+
+ /**
+ * Response of the request getTimeForNextSatelliteVisibility.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param timeInSeconds The duration in seconds after which the satellite will be visible.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void getTimeForNextSatelliteVisibilityResponse(in RadioResponseInfo info, in int timeInSeconds);
+
+ /**
+ * Response of the request provisionService.
+ *
+ * @param info Response info struct containing serial no. and error
+ * @param provisioned True means the service is provisioned.
+ * False means the service is not provisioned.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:ABORTED
+ * RadioError:ACCESS_BARRED
+ * RadioError:CANCELLED
+ * RadioError:FEATURE_NOT_SUPPORTED
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:MODEM_INCOMPATIBLE
+ * RadioError:NETWORK_ERR
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:NETWORK_REJECT
+ * RadioError:NETWORK_TIMEOUT
+ * RadioError:NO_MEMORY
+ * RadioError:NO_NETWORK_FOUND
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_SATELLITE_SIGNAL
+ * RadioError:NO_SUBSCRIPTION
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:RADIO_TECHNOLOGY_NOT_SUPPORTED
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIM_BUSY
+ * RadioError:SIM_ERR
+ * RadioError:SIM_FULL
+ * RadioError:SUBSCRIBER_NOT_AUTHORIZED
+ * RadioError:SYSTEM_ERR
+ */
+ void provisionServiceResponse(in RadioResponseInfo info, in boolean provisioned);
+
+ /**
+ * Response of the request removeAllowedSatelliteContacts.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:ABORTED
+ * RadioError:ACCESS_BARRED
+ * RadioError:CANCELLED
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_CONTACT
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:NETWORK_REJECT
+ * RadioError:NETWORK_TIMEOUT
+ * RadioError:NO_MEMORY
+ * RadioError:NO_NETWORK_FOUND
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_SATELLITE_SIGNAL
+ * RadioError:NO_SUBSCRIPTION
+ * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIM_BUSY
+ * RadioError:SIM_ERR
+ * RadioError:SIM_FULL
+ * RadioError:SYSTEM_ERR
+ * RadioError:UNIDENTIFIED_SUBSCRIBER
+ */
+ void removeAllowedSatelliteContactsResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request sendMessages.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:ABORTED
+ * RadioError:ACCESS_BARRED
+ * RadioError:BLOCKED_DUE_TO_CALL
+ * RadioError:CANCELLED
+ * RadioError:ENCODING_ERR
+ * RadioError:ENCODING_NOT_SUPPORTED
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_SMS_FORMAT
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NETWORK_ERR
+ * RadioError:NETWORK_NOT_READY
+ * RadioError:NETWORK_REJECT
+ * RadioError:NETWORK_TIMEOUT
+ * RadioError:NO_MEMORY
+ * RadioError:NO_NETWORK_FOUND
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_SMS_TO_ACK
+ * RadioError:NO_SATELLITE_SIGNAL
+ * RadioError:NO_SUBSCRIPTION
+ * RadioError:NOT_SUFFICIENT_ACCOUNT_BALANCE
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SIM_ABSENT
+ * RadioError:SIM_BUSY
+ * RadioError:SIM_ERR
+ * RadioError:SIM_FULL
+ * RadioError:SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
+ * RadioError:SMS_SEND_FAIL_RETRY
+ * RadioError:SYSTEM_ERR
+ * RadioError:SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL
+ * RadioError:UNIDENTIFIED_SUBSCRIBER
+ */
+ void sendMessagesResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request setIndicationFilter.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void setIndicationFilterResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request setPower.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:NO_RF_CALIBRATION_INFO
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:RF_HARDWARE_ISSUE
+ * RadioError:SYSTEM_ERR
+ */
+ void setPowerResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request startSendingSatellitePointingInfo.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void startSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
+
+ /**
+ * Response of the request stopSendingSatellitePointingInfo.
+ *
+ * @param info Response info struct containing serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:INTERNAL_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INVALID_MODEM_STATE
+ * RadioError:INVALID_SIM_STATE
+ * RadioError:INVALID_STATE
+ * RadioError:MODEM_ERR
+ * RadioError:NO_MEMORY
+ * RadioError:NO_RESOURCES
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:REQUEST_RATE_LIMITED
+ * RadioError:SYSTEM_ERR
+ */
+ void stopSendingSatellitePointingInfoResponse(in RadioResponseInfo info);
+}
diff --git a/staging/c2/aidl/android/hardware/media/c2/ParamField.aidl b/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
similarity index 65%
copy from staging/c2/aidl/android/hardware/media/c2/ParamField.aidl
copy to radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
index 94f737d..16bd10d 100644
--- a/staging/c2/aidl/android/hardware/media/c2/ParamField.aidl
+++ b/radio/aidl/android/hardware/radio/satellite/IndicationFilter.aidl
@@ -14,20 +14,13 @@
* limitations under the License.
*/
-package android.hardware.media.c2;
+package android.hardware.radio.satellite;
-import android.hardware.media.c2.FieldId;
-
-/**
- * Reference to a field in a C2Param structure.
- */
-parcelable ParamField {
- /**
- * Index of the C2Param structure.
- */
- int index;
- /**
- * Identifier of the field inside the C2Param structure.
- */
- FieldId fieldId;
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum IndicationFilter {
+ NONE = 0,
+ SATELLITE_MODE = 1
}
diff --git a/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl b/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl
new file mode 100644
index 0000000..f161895
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/NTRadioTechnology.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum NTRadioTechnology {
+ /* 3GPP NB-IoT (Narrowband Internet of Things) over Non-Terrestrial-Networks technology */
+ NB_IOT_NTN = 0,
+ /* 3GPP 5G NR over Non-Terrestrial-Networks technology */
+ NR_NTN = 1,
+ /* 3GPP eMTC (enhanced Machine-Type Communication) over Non-Terrestrial-Networks technology */
+ EMTC_NTN = 2,
+ /* Proprietary technology like Iridium or Bullitt */
+ PROPRIETARY = 3
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl b/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl
new file mode 100644
index 0000000..9f12d7a
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/PointingInfo.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+/** @hide */
+@VintfStability
+@JavaDerive(toString=true)
+parcelable PointingInfo {
+ /* Satellite azimuth in degrees */
+ float satelliteAzimuthDegrees;
+
+ /* Satellite elevation in degrees */
+ float satelliteElevationDegrees;
+
+ /* Antenna azimuth in degrees */
+ float antennaAzimuthDegrees;
+
+ /**
+ * Angle of rotation about the x axis. This value represents the angle between a plane
+ * parallel to the device's screen and a plane parallel to the ground.
+ */
+ float antennaPitchDegrees;
+
+ /**
+ * Angle of rotation about the y axis. This value represents the angle between a plane
+ * perpendicular to the device's screen and a plane parallel to the ground.
+ */
+ float antennaRollDegrees;
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl
new file mode 100644
index 0000000..29eb635
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/SatelliteCapabilities.aidl
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+import android.hardware.radio.satellite.NTRadioTechnology;
+import android.hardware.radio.satellite.SatelliteFeature;
+
+/** @hide */
+@VintfStability
+@JavaDerive(toString=true)
+parcelable SatelliteCapabilities {
+ /**
+ * List of technologies supported by the satellite modem.
+ */
+ NTRadioTechnology[] supportedRadioTechnologies;
+
+ /**
+ * Whether satellite mode is always on (this indicates the power impact of keeping it on is
+ * very minimal).
+ */
+ boolean isAlwaysOn;
+
+ /**
+ * Whether UE needs to point to a satellite to send and receive data.
+ */
+ boolean needsPointingToSatellite;
+
+ /**
+ * List of features supported by the satellite modem.
+ */
+ SatelliteFeature[] supportedFeatures;
+
+ /**
+ * Whether UE needs a separate SIM profile to communicate with satellite network.
+ */
+ boolean needsSeparateSimProfile;
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl
new file mode 100644
index 0000000..6284ec8
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/SatelliteFeature.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum SatelliteFeature {
+ /* Able to send and receive SMS messages to/from SOS numbers like call/service centers */
+ SOS_SMS = 0,
+ /* Able to send and receive SMS messages to/from emergency numbers like 911 */
+ EMERGENCY_SMS = 1,
+ /* Able to send and receive SMS messages to/from any allowed contacts */
+ SMS = 2,
+ /* Able to send device location to allowed contacts */
+ LOCATION_SHARING = 3
+}
diff --git a/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl b/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl
new file mode 100644
index 0000000..b764d0e
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/satellite/SatelliteMode.aidl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2022 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.radio.satellite;
+
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum SatelliteMode {
+ /* Satellite modem is powered off */
+ POWERED_OFF = 0,
+ /* Satellite modem is in out of service state and not searching for satellite signal */
+ OUT_OF_SERVICE_NOT_SEARCHING = 1,
+ /* Satellite modem is in out of service state and searching for satellite signal */
+ OUT_OF_SERVICE_SEARCHING = 2,
+ /* Satellite modem has found satellite signal and gets connected to the satellite network */
+ ACQUIRED = 3,
+ /* Satellite modem is sending and/or receiving messages */
+ MESSAGE_TRANSFERRING = 4
+}
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..f5000b9 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -31,20 +31,21 @@
"-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.satellite-V1-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",
@@ -93,6 +94,9 @@
"sap/Sap.cpp",
"sap/SapCallback.cpp",
"sap/structs.cpp",
+ "satellite/RadioIndication-satellite.cpp",
+ "satellite/RadioResponse-satellite.cpp",
+ "satellite/RadioSatellite.cpp",
"sim/RadioIndication-sim.cpp",
"sim/RadioResponse-sim.cpp",
"sim/RadioSim.cpp",
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
index f042456..ad9127e 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h
@@ -23,6 +23,7 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingIndication.h>
#include <aidl/android/hardware/radio/modem/IRadioModemIndication.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkIndication.h>
+#include <aidl/android/hardware/radio/satellite/IRadioSatelliteIndication.h>
#include <aidl/android/hardware/radio/sim/IRadioSimIndication.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceIndication.h>
#include <android/hardware/radio/1.6/IRadioIndication.h>
@@ -60,6 +61,10 @@
::aidl::android::hardware::radio::ims::IRadioImsIndication,
::aidl::android::hardware::radio::ims::IRadioImsIndicationDefault, true>
mImsCb;
+ GuaranteedCallback< //
+ ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication,
+ ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndicationDefault, true>
+ mSatelliteCb;
// IRadioIndication @ 1.0
Return<void> radioStateChanged(V1_0::RadioIndicationType type,
@@ -227,6 +232,9 @@
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voicCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb);
+ void setResponseFunction(
+ std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
+ satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataIndication> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingIndication>
@@ -236,6 +244,8 @@
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimIndication> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceIndication> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication> imsCb();
+ std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>
+ satelliteCb();
};
} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
index e20eed9..b976435 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioResponse.h
@@ -24,6 +24,7 @@
#include <aidl/android/hardware/radio/messaging/IRadioMessagingResponse.h>
#include <aidl/android/hardware/radio/modem/IRadioModemResponse.h>
#include <aidl/android/hardware/radio/network/IRadioNetworkResponse.h>
+#include <aidl/android/hardware/radio/satellite/IRadioSatelliteResponse.h>
#include <aidl/android/hardware/radio/sim/IRadioSimResponse.h>
#include <aidl/android/hardware/radio/voice/IRadioVoiceResponse.h>
#include <android/hardware/radio/1.6/IRadioResponse.h>
@@ -54,6 +55,9 @@
GuaranteedCallback<::aidl::android::hardware::radio::ims::IRadioImsResponse,
::aidl::android::hardware::radio::ims::IRadioImsResponseDefault>
mImsCb;
+ GuaranteedCallback<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse,
+ ::aidl::android::hardware::radio::satellite::IRadioSatelliteResponseDefault>
+ mSatelliteCb;
// IRadioResponse @ 1.0
Return<void> getIccCardStatusResponse(const V1_0::RadioResponseInfo& info,
@@ -447,6 +451,9 @@
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb);
void setResponseFunction(
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb);
+ void setResponseFunction(
+ std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
+ satelliteCb);
std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse> dataCb();
std::shared_ptr<::aidl::android::hardware::radio::messaging::IRadioMessagingResponse>
@@ -456,6 +463,8 @@
std::shared_ptr<::aidl::android::hardware::radio::sim::IRadioSimResponse> simCb();
std::shared_ptr<::aidl::android::hardware::radio::voice::IRadioVoiceResponse> voiceCb();
std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> imsCb();
+ std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>
+ satelliteCb();
};
} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h
new file mode 100644
index 0000000..3ee6db2
--- /dev/null
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioSatellite.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2022 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 "RadioCompatBase.h"
+
+#include <aidl/android/hardware/radio/satellite/BnRadioSatellite.h>
+
+namespace android::hardware::radio::compat {
+
+class RadioSatellite : public RadioCompatBase,
+ public aidl::android::hardware::radio::satellite::BnRadioSatellite {
+ ::ndk::ScopedAStatus responseAcknowledgement() override;
+ ::ndk::ScopedAStatus getCapabilities(int32_t serial) override;
+ ::ndk::ScopedAStatus setPower(int32_t serial, bool on) override;
+ ::ndk::ScopedAStatus getPowerState(int32_t serial) override;
+ ::ndk::ScopedAStatus provisionService(
+ int32_t serial, const std::string& imei, const std::string& msisdn,
+ const std::string& imsi,
+ const std::vector<::aidl::android::hardware::radio::satellite::SatelliteFeature>&
+ features) override;
+ ::ndk::ScopedAStatus addAllowedSatelliteContacts(
+ int32_t serial, const std::vector<std::string>& contacts) override;
+ ::ndk::ScopedAStatus removeAllowedSatelliteContacts(
+ int32_t serial, const std::vector<std::string>& contacts) override;
+ ::ndk::ScopedAStatus sendMessages(int32_t serial, const std::vector<std::string>& messages,
+ const std::string& destination, double latitude,
+ double longitude) override;
+ ::ndk::ScopedAStatus getPendingMessages(int32_t serial) override;
+ ::ndk::ScopedAStatus getSatelliteMode(int32_t serial) override;
+ ::ndk::ScopedAStatus setIndicationFilter(int32_t serial, int32_t filterBitmask) override;
+ ::ndk::ScopedAStatus startSendingSatellitePointingInfo(int32_t serial) override;
+ ::ndk::ScopedAStatus stopSendingSatellitePointingInfo(int32_t serial) override;
+ ::ndk::ScopedAStatus getMaxCharactersPerTextMessage(int32_t serial) override;
+ ::ndk::ScopedAStatus getTimeForNextSatelliteVisibility(int32_t serial) override;
+
+ ::ndk::ScopedAStatus setResponseFunctions(
+ const std::shared_ptr<
+ ::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse>&
+ radioSatelliteResponse,
+ const std::shared_ptr<
+ ::aidl::android::hardware::radio::satellite::IRadioSatelliteIndication>&
+ radioSatelliteIndication) override;
+
+ protected:
+ std::shared_ptr<::aidl::android::hardware::radio::satellite::IRadioSatelliteResponse> respond();
+
+ public:
+ using RadioCompatBase::RadioCompatBase;
+};
+
+} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp
new file mode 100644
index 0000000..39da43d
--- /dev/null
+++ b/radio/aidl/compat/libradiocompat/satellite/RadioIndication-satellite.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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 <libradiocompat/RadioIndication.h>
+
+#include "commonStructs.h"
+#include "debug.h"
+
+#include "collections.h"
+
+#define RADIO_MODULE "RadioSatelliteIndication"
+
+namespace android::hardware::radio::compat {
+
+namespace aidl = ::aidl::android::hardware::radio::satellite;
+
+void RadioIndication::setResponseFunction(
+ std::shared_ptr<aidl::IRadioSatelliteIndication> satelliteCb) {
+ mSatelliteCb = satelliteCb;
+}
+
+std::shared_ptr<aidl::IRadioSatelliteIndication> RadioIndication::satelliteCb() {
+ return mSatelliteCb.get();
+}
+
+} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp
new file mode 100644
index 0000000..2209c93
--- /dev/null
+++ b/radio/aidl/compat/libradiocompat/satellite/RadioResponse-satellite.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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 <libradiocompat/RadioResponse.h>
+
+#include "commonStructs.h"
+#include "debug.h"
+
+#include "collections.h"
+
+#define RADIO_MODULE "RadioSatelliteResponse"
+
+namespace android::hardware::radio::compat {
+
+namespace aidl = ::aidl::android::hardware::radio::satellite;
+
+void RadioResponse::setResponseFunction(
+ std::shared_ptr<aidl::IRadioSatelliteResponse> satelliteCb) {
+ mSatelliteCb = satelliteCb;
+}
+
+std::shared_ptr<aidl::IRadioSatelliteResponse> RadioResponse::satelliteCb() {
+ return mSatelliteCb.get();
+}
+
+} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp b/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp
new file mode 100644
index 0000000..16a3167
--- /dev/null
+++ b/radio/aidl/compat/libradiocompat/satellite/RadioSatellite.cpp
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2022 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 <libradiocompat/RadioSatellite.h>
+
+#include "commonStructs.h"
+#include "debug.h"
+
+#include "collections.h"
+
+#define RADIO_MODULE "RadioSatellite"
+
+namespace android::hardware::radio::compat {
+
+using ::ndk::ScopedAStatus;
+namespace aidl = ::aidl::android::hardware::radio::satellite;
+constexpr auto ok = &ScopedAStatus::ok;
+
+std::shared_ptr<aidl::IRadioSatelliteResponse> RadioSatellite::respond() {
+ return mCallbackManager->response().satelliteCb();
+}
+
+ScopedAStatus RadioSatellite::responseAcknowledgement() {
+ LOG(ERROR) << " responseAcknowledgement is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getCapabilities(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getCapabilities is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::setPower(int32_t serial, bool /*on*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " setPower is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getPowerState(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getPowerSate is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::provisionService(
+ int32_t serial, const std::string& /*imei*/, const std::string& /*msisdn*/,
+ const std::string& /*imsi*/,
+ const std::vector<
+ ::aidl::android::hardware::radio::satellite::SatelliteFeature>& /*features*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " provisionService is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::addAllowedSatelliteContacts(
+ int32_t serial, const std::vector<std::string>& /*contacts*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " addAllowedSatelliteContacts is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::removeAllowedSatelliteContacts(
+ int32_t serial, const std::vector<std::string>& /*contacts*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " removeAllowedSatelliteContacts is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::sendMessages(int32_t serial,
+ const std::vector<std::string>& /*messages*/,
+ const std::string& /*destination*/, double /*latitude*/,
+ double /*longitude*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " sendMessage is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getPendingMessages(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getPendingMessages is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getSatelliteMode(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getSatelliteMode is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::setIndicationFilter(int32_t serial, int32_t /*filterBitmask*/) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " setIndicationFilter is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::startSendingSatellitePointingInfo(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " startSendingSatellitePointingInfo is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::stopSendingSatellitePointingInfo(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " stopSendingSatellitePointingInfo is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getMaxCharactersPerTextMessage(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getMaxCharactersPerTextMessage is unsupported by HIDL HALs";
+ return ok();
+}
+ScopedAStatus RadioSatellite::getTimeForNextSatelliteVisibility(int32_t serial) {
+ LOG_CALL << serial;
+ LOG(ERROR) << " getTimeForNextSatelliteVisibility is unsupported by HIDL HALs";
+ return ok();
+}
+
+ScopedAStatus RadioSatellite::setResponseFunctions(
+ const std::shared_ptr<aidl::IRadioSatelliteResponse>& response,
+ const std::shared_ptr<aidl::IRadioSatelliteIndication>& indication) {
+ LOG_CALL << response << ' ' << indication;
+ mCallbackManager->setResponseFunctions(response, indication);
+ return ok();
+}
+
+} // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/service/Android.bp b/radio/aidl/compat/service/Android.bp
index dff0182..1a6ea48 100644
--- a/radio/aidl/compat/service/Android.bp
+++ b/radio/aidl/compat/service/Android.bp
@@ -34,20 +34,21 @@
],
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.satellite-V1-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..8301f10 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -58,6 +58,9 @@
"radio_network_test.cpp",
"radio_sap_callback.cpp",
"radio_sap_test.cpp",
+ "radio_satellite_indication.cpp",
+ "radio_satellite_response.cpp",
+ "radio_satellite_test.cpp",
"radio_sim_indication.cpp",
"radio_sim_response.cpp",
"radio_sim_test.cpp",
@@ -71,17 +74,18 @@
"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.satellite-V1-ndk",
+ "android.hardware.radio.sim-V3-ndk",
+ "android.hardware.radio.voice-V3-ndk",
],
test_suites: [
"general-tests",
diff --git a/radio/aidl/vts/VtsHalRadioTargetTest.cpp b/radio/aidl/vts/VtsHalRadioTargetTest.cpp
index c04173b..86c1099 100644
--- a/radio/aidl/vts/VtsHalRadioTargetTest.cpp
+++ b/radio/aidl/vts/VtsHalRadioTargetTest.cpp
@@ -24,6 +24,7 @@
#include "radio_modem_utils.h"
#include "radio_network_utils.h"
#include "radio_sap_utils.h"
+#include "radio_satellite_utils.h"
#include "radio_sim_utils.h"
#include "radio_voice_utils.h"
@@ -79,6 +80,12 @@
testing::ValuesIn(android::getAidlHalInstanceNames(IRadioIms::descriptor)),
android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioSatelliteTest);
+INSTANTIATE_TEST_SUITE_P(
+ PerInstance, RadioSatelliteTest,
+ testing::ValuesIn(android::getAidlHalInstanceNames(IRadioSatellite::descriptor)),
+ android::PrintInstanceNameToString);
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(RadioImsMediaTest);
INSTANTIATE_TEST_SUITE_P(PerInstance, RadioImsMediaTest,
testing::ValuesIn(android::getAidlHalInstanceNames(IImsMedia::descriptor)),
diff --git a/radio/aidl/vts/radio_aidl_hal_utils.h b/radio/aidl/vts/radio_aidl_hal_utils.h
index d8aa024..1690e89 100644
--- a/radio/aidl/vts/radio_aidl_hal_utils.h
+++ b/radio/aidl/vts/radio_aidl_hal_utils.h
@@ -68,6 +68,8 @@
static constexpr const char* FEATURE_TELEPHONY_IMS = "android.hardware.telephony.ims";
+static constexpr const char* FEATURE_TELEPHONY_SATELLITE = "android.hardware.telephony.satellite";
+
#define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
#define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
#define MODEM_SET_SIM_POWER_DELAY_IN_SECONDS 2
diff --git a/radio/aidl/vts/radio_satellite_indication.cpp b/radio/aidl/vts/radio_satellite_indication.cpp
new file mode 100644
index 0000000..13e4453
--- /dev/null
+++ b/radio/aidl/vts/radio_satellite_indication.cpp
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2022 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 "radio_satellite_utils.h"
+
+RadioSatelliteIndication::RadioSatelliteIndication(RadioServiceTest& parent)
+ : parent_satellite(parent) {}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onPendingMessageCount(RadioIndicationType /*type*/,
+ int32_t /*count*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onNewMessages(
+ RadioIndicationType /*type*/, const std::vector<std::string>& /*messages*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onMessagesTransferComplete(
+ RadioIndicationType /*type*/, bool /*complete*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onSatellitePointingInfoChanged(
+ RadioIndicationType /*type*/, const PointingInfo& /*pointingInfo*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteModeChanged(RadioIndicationType /*type*/,
+ SatelliteMode /*mode*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onSatelliteRadioTechnologyChanged(
+ RadioIndicationType /*type*/, NTRadioTechnology /*technology*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteIndication::onProvisionStateChanged(
+ RadioIndicationType /*type*/, bool /*provisioned*/,
+ const std::vector<SatelliteFeature>& /*features*/) {
+ return ndk::ScopedAStatus::ok();
+}
diff --git a/radio/aidl/vts/radio_satellite_response.cpp b/radio/aidl/vts/radio_satellite_response.cpp
new file mode 100644
index 0000000..84d57b2
--- /dev/null
+++ b/radio/aidl/vts/radio_satellite_response.cpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2022 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 "radio_satellite_utils.h"
+
+RadioSatelliteResponse::RadioSatelliteResponse(RadioServiceTest& parent)
+ : parent_satellite(parent) {}
+
+ndk::ScopedAStatus RadioSatelliteResponse::acknowledgeRequest(int32_t /*serial*/) {
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getCapabilitiesResponse(
+ const RadioResponseInfo& info, const SatelliteCapabilities& /*capabilities*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::setPowerResponse(const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getPowerStateResponse(const RadioResponseInfo& info,
+ bool /*on*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::provisionServiceResponse(const RadioResponseInfo& info,
+ bool /*provisioned*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::addAllowedSatelliteContactsResponse(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::removeAllowedSatelliteContactsResponse(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::sendMessagesResponse(const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getPendingMessagesResponse(
+ const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getSatelliteModeResponse(
+ const RadioResponseInfo& info, SatelliteMode /*mode*/, NTRadioTechnology /*technology*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::setIndicationFilterResponse(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::startSendingSatellitePointingInfoResponse(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::stopSendingSatellitePointingInfoResponse(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getMaxCharactersPerTextMessageResponse(
+ const RadioResponseInfo& info, int32_t /*charLimit*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioSatelliteResponse::getTimeForNextSatelliteVisibilityResponse(
+ const RadioResponseInfo& info, int32_t /*timeInSeconds*/) {
+ rspInfo = info;
+ parent_satellite.notify(info.serial);
+ return ndk::ScopedAStatus::ok();
+}
\ No newline at end of file
diff --git a/radio/aidl/vts/radio_satellite_test.cpp b/radio/aidl/vts/radio_satellite_test.cpp
new file mode 100644
index 0000000..b646ef6
--- /dev/null
+++ b/radio/aidl/vts/radio_satellite_test.cpp
@@ -0,0 +1,519 @@
+/*
+ * Copyright (C) 2022 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 <aidl/android/hardware/radio/config/IRadioConfig.h>
+#include <android/binder_manager.h>
+
+#include "radio_satellite_utils.h"
+
+#define ASSERT_OK(ret) ASSERT_TRUE(((ret).isOk()))
+
+void RadioSatelliteTest::SetUp() {
+ RadioServiceTest::SetUp();
+ std::string serviceName = GetParam();
+
+ if (!isServiceValidForDeviceConfiguration(serviceName)) {
+ ALOGI("Skipped the radio satellite tests due to device configuration.");
+ GTEST_SKIP();
+ }
+
+ if (!deviceSupportsFeature(FEATURE_TELEPHONY_SATELLITE)) {
+ ALOGI("Skipping test because satellite is not supported in device.");
+ GTEST_SKIP();
+ }
+
+ satellite = IRadioSatellite::fromBinder(
+ ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
+ ASSERT_NE(nullptr, satellite.get());
+
+ rsp_satellite = ndk::SharedRefBase::make<RadioSatelliteResponse>(*this);
+ ASSERT_NE(nullptr, rsp_satellite.get());
+
+ ind_satellite = ndk::SharedRefBase::make<RadioSatelliteIndication>(*this);
+ ASSERT_NE(nullptr, ind_satellite.get());
+
+ satellite->setResponseFunctions(rsp_satellite, ind_satellite);
+
+ // Assert IRadioConfig exists before testing
+ radio_config = config::IRadioConfig::fromBinder(ndk::SpAIBinder(
+ AServiceManager_waitForService("android.hardware.radio.config.IRadioConfig/default")));
+ ASSERT_NE(nullptr, radio_config.get());
+}
+
+/*
+ * Test IRadioSatellite.getCapabilities() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getCapabilities) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getCapabilities(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getCapabilities, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.setPower() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, setPower) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->setPower(serial, true);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("setPower, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.getPowerSate() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getPowerSate) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getPowerState(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getPowerState, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.provisionService() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, provisionService) {
+ serial = GetRandomSerialNumber();
+ std::string imei = "imei";
+ std::string msisdn = "msisdn";
+ std::string imsi = "imsi";
+ const std::vector<SatelliteFeature> features{
+ SatelliteFeature::SOS_SMS, SatelliteFeature::EMERGENCY_SMS, SatelliteFeature::SMS};
+ ndk::ScopedAStatus res = satellite->provisionService(serial, imei, msisdn, imsi, features);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("provisionService, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
+ {RadioError::NONE,
+ RadioError::ABORTED,
+ RadioError::ACCESS_BARRED,
+ RadioError::CANCELLED,
+ RadioError::FEATURE_NOT_SUPPORTED,
+ RadioError::INTERNAL_ERR,
+ RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE,
+ RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE,
+ RadioError::MODEM_ERR,
+ RadioError::MODEM_INCOMPATIBLE,
+ RadioError::NETWORK_ERR,
+ RadioError::NETWORK_NOT_READY,
+ RadioError::NETWORK_REJECT,
+ RadioError::NETWORK_TIMEOUT,
+ RadioError::NO_MEMORY,
+ RadioError::NO_NETWORK_FOUND,
+ RadioError::NO_RESOURCES,
+ RadioError::NO_SATELLITE_SIGNAL,
+ RadioError::NO_SUBSCRIPTION,
+ RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::RADIO_TECHNOLOGY_NOT_SUPPORTED,
+ RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SIM_ABSENT,
+ RadioError::SIM_BUSY,
+ RadioError::SIM_ERR,
+ RadioError::SIM_FULL,
+ RadioError::SUBSCRIBER_NOT_AUTHORIZED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.addAllowedSatelliteContacts() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, addAllowedSatelliteContacts) {
+ serial = GetRandomSerialNumber();
+ const std::vector<std::string> contacts = {"contact 1", "contact 2"};
+ ndk::ScopedAStatus res = satellite->addAllowedSatelliteContacts(serial, contacts);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("addAllowedSatelliteContacts, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
+ {RadioError::NONE,
+ RadioError::ABORTED,
+ RadioError::ACCESS_BARRED,
+ RadioError::CANCELLED,
+ RadioError::INTERNAL_ERR,
+ RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_CONTACT,
+ RadioError::INVALID_MODEM_STATE,
+ RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE,
+ RadioError::MODEM_ERR,
+ RadioError::NETWORK_ERR,
+ RadioError::NETWORK_NOT_READY,
+ RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
+ RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SIM_ABSENT,
+ RadioError::SIM_BUSY,
+ RadioError::SIM_ERR,
+ RadioError::SIM_FULL,
+ RadioError::SYSTEM_ERR,
+ RadioError::UNIDENTIFIED_SUBSCRIBER}));
+}
+
+/*
+ * Test IRadioSatellite.removeAllowedSatelliteContacts() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, removeAllowedSatelliteContacts) {
+ serial = GetRandomSerialNumber();
+ const std::vector<std::string> contacts = {"contact 1", "contact 2"};
+ ndk::ScopedAStatus res = satellite->removeAllowedSatelliteContacts(serial, contacts);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("removeAllowedSatelliteContacts, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
+ {RadioError::NONE,
+ RadioError::ABORTED,
+ RadioError::ACCESS_BARRED,
+ RadioError::CANCELLED,
+ RadioError::INTERNAL_ERR,
+ RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_CONTACT,
+ RadioError::INVALID_MODEM_STATE,
+ RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE,
+ RadioError::MODEM_ERR,
+ RadioError::NETWORK_ERR,
+ RadioError::NETWORK_NOT_READY,
+ RadioError::NETWORK_REJECT,
+ RadioError::NETWORK_TIMEOUT,
+ RadioError::NO_MEMORY,
+ RadioError::NO_NETWORK_FOUND,
+ RadioError::NO_RESOURCES,
+ RadioError::NO_SATELLITE_SIGNAL,
+ RadioError::NO_SUBSCRIPTION,
+ RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
+ RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SIM_ABSENT,
+ RadioError::SIM_BUSY,
+ RadioError::SIM_ERR,
+ RadioError::SIM_FULL,
+ RadioError::SYSTEM_ERR,
+ RadioError::UNIDENTIFIED_SUBSCRIBER}));
+}
+
+/*
+ * Test IRadioSatellite.sendMessages() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, sendMessages) {
+ serial = GetRandomSerialNumber();
+ const std::vector<std::string> messages = {"message 1", "message 2"};
+ std::string destination = "0123456789";
+ ndk::ScopedAStatus res = satellite->sendMessages(serial, messages, destination, 1.0, 2.0);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("sendMessages, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
+ {RadioError::NONE,
+ RadioError::ABORTED,
+ RadioError::ACCESS_BARRED,
+ RadioError::BLOCKED_DUE_TO_CALL,
+ RadioError::CANCELLED,
+ RadioError::ENCODING_ERR,
+ RadioError::ENCODING_NOT_SUPPORTED,
+ RadioError::INTERNAL_ERR,
+ RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE,
+ RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_SMS_FORMAT,
+ RadioError::INVALID_STATE,
+ RadioError::MODEM_ERR,
+ RadioError::NETWORK_ERR,
+ RadioError::NETWORK_NOT_READY,
+ RadioError::NETWORK_REJECT,
+ RadioError::NETWORK_TIMEOUT,
+ RadioError::NO_MEMORY,
+ RadioError::NO_NETWORK_FOUND,
+ RadioError::NO_RESOURCES,
+ RadioError::NO_SMS_TO_ACK,
+ RadioError::NO_SATELLITE_SIGNAL,
+ RadioError::NO_SUBSCRIPTION,
+ RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
+ RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SIM_ABSENT,
+ RadioError::SIM_BUSY,
+ RadioError::SIM_ERR,
+ RadioError::SIM_FULL,
+ RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
+ RadioError::SMS_SEND_FAIL_RETRY,
+ RadioError::SYSTEM_ERR,
+ RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL,
+ RadioError::UNIDENTIFIED_SUBSCRIBER}));
+}
+
+/*
+ * Test IRadioSatellite.getPendingMessages() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getPendingMessages) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getPendingMessages(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getPendingMessages, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(rsp_satellite->rspInfo.error,
+ {RadioError::NONE,
+ RadioError::ABORTED,
+ RadioError::ACCESS_BARRED,
+ RadioError::BLOCKED_DUE_TO_CALL,
+ RadioError::CANCELLED,
+ RadioError::ENCODING_ERR,
+ RadioError::ENCODING_NOT_SUPPORTED,
+ RadioError::INTERNAL_ERR,
+ RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE,
+ RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_SMS_FORMAT,
+ RadioError::INVALID_STATE,
+ RadioError::MODEM_ERR,
+ RadioError::NETWORK_ERR,
+ RadioError::NETWORK_NOT_READY,
+ RadioError::NETWORK_REJECT,
+ RadioError::NETWORK_TIMEOUT,
+ RadioError::NO_MEMORY,
+ RadioError::NO_NETWORK_FOUND,
+ RadioError::NO_RESOURCES,
+ RadioError::NO_SMS_TO_ACK,
+ RadioError::NO_SATELLITE_SIGNAL,
+ RadioError::NO_SUBSCRIPTION,
+ RadioError::NOT_SUFFICIENT_ACCOUNT_BALANCE,
+ RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SIM_ABSENT,
+ RadioError::SIM_BUSY,
+ RadioError::SIM_ERR,
+ RadioError::SIM_FULL,
+ RadioError::SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED,
+ RadioError::SYSTEM_ERR,
+ RadioError::SWITCHED_FROM_SATELLITE_TO_TERRESTRIAL}));
+}
+
+/*
+ * Test IRadioSatellite.getSatelliteMode() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getSatelliteMode) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getSatelliteMode(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getSatelliteMode, rspInfo.error = %s\n", toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.setIndicationFilter() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, setIndicationFilter) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->setIndicationFilter(serial, 0);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("setIndicationFilter, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.startSendingSatellitePointingInfo() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, startSendingSatellitePointingInfo) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->startSendingSatellitePointingInfo(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("startSendingSatellitePointingInfo, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.stopSatelliteLocationUpdate() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, stopSatelliteLocationUpdate) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->stopSendingSatellitePointingInfo(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("stopSendingSatellitePointingInfo, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.getMaxCharactersPerTextMessage() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getMaxCharactersPerTextMessage) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getMaxCharactersPerTextMessage(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getMaxCharactersPerTextMessage, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
+
+/*
+ * Test IRadioSatellite.getTimeForNextSatelliteVisibility() for the response returned.
+ */
+TEST_P(RadioSatelliteTest, getTimeForNextSatelliteVisibility) {
+ serial = GetRandomSerialNumber();
+ ndk::ScopedAStatus res = satellite->getTimeForNextSatelliteVisibility(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, rsp_satellite->rspInfo.type);
+ EXPECT_EQ(serial, rsp_satellite->rspInfo.serial);
+
+ ALOGI("getTimeForNextSatelliteVisibility, rspInfo.error = %s\n",
+ toString(rsp_satellite->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ rsp_satellite->rspInfo.error,
+ {RadioError::NONE, RadioError::INTERNAL_ERR, RadioError::INVALID_ARGUMENTS,
+ RadioError::INVALID_MODEM_STATE, RadioError::INVALID_SIM_STATE,
+ RadioError::INVALID_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
+ RadioError::NO_RESOURCES, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::REQUEST_RATE_LIMITED,
+ RadioError::SYSTEM_ERR}));
+}
diff --git a/radio/aidl/vts/radio_satellite_utils.h b/radio/aidl/vts/radio_satellite_utils.h
new file mode 100644
index 0000000..a0fdc7e
--- /dev/null
+++ b/radio/aidl/vts/radio_satellite_utils.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2022 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/radio/satellite/BnRadioSatelliteIndication.h>
+#include <aidl/android/hardware/radio/satellite/BnRadioSatelliteResponse.h>
+#include <aidl/android/hardware/radio/satellite/IRadioSatellite.h>
+
+#include "radio_aidl_hal_utils.h"
+
+using namespace aidl::android::hardware::radio::satellite;
+
+class RadioSatelliteTest;
+
+/* Callback class for Satellite response */
+class RadioSatelliteResponse : public BnRadioSatelliteResponse {
+ protected:
+ RadioServiceTest& parent_satellite;
+
+ public:
+ RadioSatelliteResponse(RadioServiceTest& parent_satellite);
+ virtual ~RadioSatelliteResponse() = default;
+
+ RadioResponseInfo rspInfo;
+
+ virtual ndk::ScopedAStatus acknowledgeRequest(int32_t serial) override;
+
+ virtual ndk::ScopedAStatus getCapabilitiesResponse(
+ const RadioResponseInfo& info, const SatelliteCapabilities& capabilities) override;
+
+ virtual ndk::ScopedAStatus setPowerResponse(const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus getPowerStateResponse(const RadioResponseInfo& info,
+ bool on) override;
+
+ virtual ndk::ScopedAStatus provisionServiceResponse(const RadioResponseInfo& info,
+ bool provisioned) override;
+
+ virtual ndk::ScopedAStatus addAllowedSatelliteContactsResponse(
+ const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus removeAllowedSatelliteContactsResponse(
+ const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus sendMessagesResponse(const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus getPendingMessagesResponse(
+ const RadioResponseInfo& info, const std::vector<std::string>& /*messages*/) override;
+
+ virtual ndk::ScopedAStatus getSatelliteModeResponse(
+ const RadioResponseInfo& info, SatelliteMode mode,
+ satellite::NTRadioTechnology technology) override;
+
+ virtual ndk::ScopedAStatus setIndicationFilterResponse(const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus startSendingSatellitePointingInfoResponse(
+ const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus stopSendingSatellitePointingInfoResponse(
+ const RadioResponseInfo& info) override;
+
+ virtual ndk::ScopedAStatus getMaxCharactersPerTextMessageResponse(const RadioResponseInfo& info,
+ int32_t charLimit) override;
+
+ virtual ndk::ScopedAStatus getTimeForNextSatelliteVisibilityResponse(
+ const RadioResponseInfo& info, int32_t timeInSeconds) override;
+};
+
+/* Callback class for Satellite indication */
+class RadioSatelliteIndication : public BnRadioSatelliteIndication {
+ protected:
+ RadioServiceTest& parent_satellite;
+
+ public:
+ RadioSatelliteIndication(RadioServiceTest& parent_satellite);
+ virtual ~RadioSatelliteIndication() = default;
+
+ virtual ndk::ScopedAStatus onPendingMessageCount(RadioIndicationType type,
+ int32_t count) override;
+
+ virtual ndk::ScopedAStatus onNewMessages(RadioIndicationType type,
+ const std::vector<std::string>& messages) override;
+
+ virtual ndk::ScopedAStatus onMessagesTransferComplete(RadioIndicationType type,
+ bool complete) override;
+
+ virtual ndk::ScopedAStatus onSatellitePointingInfoChanged(
+ RadioIndicationType type, const PointingInfo& pointingInfo) override;
+
+ virtual ndk::ScopedAStatus onSatelliteModeChanged(RadioIndicationType type,
+ SatelliteMode mode) override;
+
+ virtual ndk::ScopedAStatus onSatelliteRadioTechnologyChanged(
+ RadioIndicationType type, satellite::NTRadioTechnology technology) override;
+
+ virtual ndk::ScopedAStatus onProvisionStateChanged(
+ RadioIndicationType type, bool provisioned,
+ const std::vector<SatelliteFeature>& features) override;
+};
+
+// The main test class for AIDL Satellite.
+class RadioSatelliteTest : public RadioServiceTest {
+ public:
+ void SetUp() override;
+
+ /* Radio Satellite service handle */
+ std::shared_ptr<IRadioSatellite> satellite;
+ /* Radio Satellite response handle */
+ std::shared_ptr<RadioSatelliteResponse> rsp_satellite;
+ /* Radio Satellite indication handle */
+ std::shared_ptr<RadioSatelliteIndication> ind_satellite;
+};
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl
index 82c8a0d..a4fab55 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintOperation.aidl
@@ -126,8 +126,8 @@
*
* o The HMAC field must validate correctly.
*
- * o The challenge field in the auth token must contain the challenge value contained in the
- * BeginResult returned from IKeyMintDevice::begin().
+ * o The challenge field in the timestamp token must contain the challenge value contained in
+ * the BeginResult returned from IKeyMintDevice::begin().
*
* The resulting secure time value is then used to authenticate the HardwareAuthToken. For the
* auth token to be valid, all of the following has to be true:
@@ -139,9 +139,6 @@
*
* o The key must have a Tag::USER_AUTH_TYPE that matches the auth type in the token.
*
- * o The challenge field in the auth token must contain the challenge value contained in the
- * BeginResult returned from IKeyMintDevice::begin().
- *
* o The timestamp in the auth token plus the value of the Tag::AUTH_TIMEOUT must be greater
* than the provided secure timestamp.
diff --git a/security/keymint/aidl/default/android.hardware.security.keymint-service.xml b/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
index a4d0302..0568ae6 100644
--- a/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
+++ b/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
@@ -1,12 +1,12 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.security.keymint</name>
- <version>2</version>
+ <version>3</version>
<fqname>IKeyMintDevice/default</fqname>
</hal>
<hal format="aidl">
<name>android.hardware.security.keymint</name>
- <version>2</version>
+ <version>3</version>
<fqname>IRemotelyProvisionedComponent/default</fqname>
</hal>
</manifest>
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index 6d289ec..0499079 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -82,7 +82,7 @@
string imei = ::android::base::Trim(out[0]);
if (imei.compare("null") == 0) {
- LOG(ERROR) << "Error in getting IMEI from Telephony service: value is null. Cmd: " << cmd;
+ LOG(WARNING) << "Failed to get IMEI from Telephony service: value is null. Cmd: " << cmd;
return "";
}
@@ -120,6 +120,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
ASSERT_GT(attest_key_cert_chain.size(), 0);
EXPECT_EQ(attest_key_cert_chain.size(), 1);
@@ -141,8 +142,7 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
-
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -174,8 +174,7 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
-
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter attested_deleter2(keymint_, attested_key_blob);
hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -207,6 +206,7 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
+ KeyBlobDeleter attested_deleter3(keymint_, attested_key_blob);
// The returned key characteristics will include CREATION_DATETIME (checked below)
// in SecurityLevel::KEYSTORE; this will be stripped out in the CheckCharacteristics()
@@ -214,9 +214,6 @@
// any SecurityLevel::KEYSTORE characteristics).
CheckCharacteristics(attested_key_blob, attested_key_characteristics);
- CheckedDeleteKey(&attested_key_blob);
- CheckedDeleteKey(&attest_key.keyBlob);
-
hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -308,6 +305,7 @@
if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return;
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
EXPECT_GT(attest_key_cert_chain.size(), 1);
verify_subject_and_serial(attest_key_cert_chain[0], serial_int, subject, false);
@@ -344,9 +342,7 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
-
- CheckedDeleteKey(&attested_key_blob);
- CheckedDeleteKey(&attest_key.keyBlob);
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
AuthorizationSet hw_enforced2 = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced2 = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -376,6 +372,7 @@
const int chain_size = 6;
vector<vector<uint8_t>> key_blob_list(chain_size);
vector<vector<Certificate>> cert_chain_list(chain_size);
+ vector<KeyBlobDeleter> deleters;
for (int i = 0; i < chain_size; i++) {
string sub = "attest key chaining ";
@@ -412,6 +409,7 @@
if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return;
}
ASSERT_EQ(ErrorCode::OK, result);
+ deleters.push_back(KeyBlobDeleter(keymint_, key_blob_list[i]));
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -437,10 +435,6 @@
EXPECT_GT(cert_chain_list[i].size(), i + 1);
verify_subject_and_serial(cert_chain_list[i][0], serial_int, subject, false);
}
-
- for (int i = 0; i < chain_size; i++) {
- CheckedDeleteKey(&key_blob_list[i]);
- }
}
/*
@@ -453,6 +447,7 @@
const int chain_size = 6;
vector<vector<uint8_t>> key_blob_list(chain_size);
vector<vector<Certificate>> cert_chain_list(chain_size);
+ vector<KeyBlobDeleter> deleters;
for (int i = 0; i < chain_size; i++) {
string sub = "Ec attest key chaining ";
@@ -489,6 +484,7 @@
if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return;
}
ASSERT_EQ(ErrorCode::OK, result);
+ deleters.push_back(KeyBlobDeleter(keymint_, key_blob_list[i]));
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -514,10 +510,6 @@
EXPECT_GT(cert_chain_list[i].size(), i + 1);
verify_subject_and_serial(cert_chain_list[i][0], serial_int, subject, false);
}
-
- for (int i = 0; i < chain_size; i++) {
- CheckedDeleteKey(&key_blob_list[i]);
- }
}
/*
@@ -557,6 +549,7 @@
const int chain_size = 6;
vector<vector<uint8_t>> key_blob_list(chain_size);
vector<vector<Certificate>> cert_chain_list(chain_size);
+ vector<KeyBlobDeleter> deleters;
for (int i = 0; i < chain_size; i++) {
string sub = "Alt attest key chaining ";
@@ -607,6 +600,7 @@
if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) return;
}
ASSERT_EQ(ErrorCode::OK, result);
+ deleters.push_back(KeyBlobDeleter(keymint_, key_blob_list[i]));
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -632,10 +626,6 @@
EXPECT_GT(cert_chain_list[i].size(), i + 1);
verify_subject_and_serial(cert_chain_list[i][0], serial_int, subject, false);
}
-
- for (int i = 0; i < chain_size; i++) {
- CheckedDeleteKey(&key_blob_list[i]);
- }
}
TEST_P(AttestKeyTest, MissingChallenge) {
@@ -653,6 +643,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
EXPECT_EQ(attest_key_cert_chain.size(), 1);
EXPECT_TRUE(IsSelfSigned(attest_key_cert_chain)) << "Failed on size " << size;
@@ -681,8 +672,6 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
-
- CheckedDeleteKey(&attest_key.keyBlob);
}
}
@@ -700,6 +689,7 @@
AuthorizationSetBuilder().EcdsaKey(curve).AttestKey().SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
ASSERT_GT(attest_key_cert_chain.size(), 0);
EXPECT_EQ(attest_key_cert_chain.size(), 1);
@@ -721,9 +711,9 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
ASSERT_GT(attested_key_cert_chain.size(), 0);
- CheckedDeleteKey(&attested_key_blob);
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -752,10 +742,9 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
+ KeyBlobDeleter attested_deleter2(keymint_, attested_key_blob);
ASSERT_GT(attested_key_cert_chain.size(), 0);
- CheckedDeleteKey(&attested_key_blob);
- CheckedDeleteKey(&attest_key.keyBlob);
hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -825,6 +814,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
attest_key.issuerSubjectName = make_name_from_str("Android Keystore Key");
ASSERT_GT(attest_key_cert_chain.size(), 0);
EXPECT_EQ(attest_key_cert_chain.size(), 1);
@@ -891,8 +881,7 @@
}
ASSERT_EQ(result, ErrorCode::OK);
-
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -906,7 +895,6 @@
hw_enforced, SecLevel(),
attested_key_cert_chain[0].encodedCertificate));
}
- CheckedDeleteKey(&attest_key.keyBlob);
}
TEST_P(AttestKeyTest, EcdsaAttestationMismatchID) {
@@ -921,6 +909,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
attest_key.issuerSubjectName = make_name_from_str("Android Keystore Key");
ASSERT_GT(attest_key_cert_chain.size(), 0);
EXPECT_EQ(attest_key_cert_chain.size(), 1);
@@ -963,7 +952,6 @@
&attested_key_characteristics, &attested_key_cert_chain);
device_id_attestation_check_acceptable_error(invalid_tag.tag, result);
}
- CheckedDeleteKey(&attest_key.keyBlob);
}
TEST_P(AttestKeyTest, SecondIMEIAttestationIDSuccess) {
@@ -994,6 +982,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
attest_key.issuerSubjectName = make_name_from_str("Android Keystore Key");
EXPECT_EQ(attest_key_cert_chain.size(), 1);
EXPECT_TRUE(IsSelfSigned(attest_key_cert_chain));
@@ -1022,8 +1011,7 @@
}
ASSERT_EQ(result, ErrorCode::OK);
-
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -1038,8 +1026,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), "challenge", "foo", sw_enforced,
hw_enforced, SecLevel(),
attested_key_cert_chain[0].encodedCertificate));
-
- CheckedDeleteKey(&attest_key.keyBlob);
}
TEST_P(AttestKeyTest, MultipleIMEIAttestationIDSuccess) {
@@ -1076,6 +1062,7 @@
.SetDefaultValidity(),
{} /* attestation signing key */, &attest_key.keyBlob,
&attest_key_characteristics, &attest_key_cert_chain));
+ KeyBlobDeleter attest_deleter(keymint_, attest_key.keyBlob);
attest_key.issuerSubjectName = make_name_from_str("Android Keystore Key");
EXPECT_EQ(attest_key_cert_chain.size(), 1);
EXPECT_TRUE(IsSelfSigned(attest_key_cert_chain));
@@ -1101,8 +1088,7 @@
}
ASSERT_EQ(result, ErrorCode::OK);
-
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter attested_deleter(keymint_, attested_key_blob);
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(attested_key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics);
@@ -1120,8 +1106,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), "challenge", "foo", sw_enforced,
hw_enforced, SecLevel(),
attested_key_cert_chain[0].encodedCertificate));
-
- CheckedDeleteKey(&attest_key.keyBlob);
}
INSTANTIATE_KEYMINT_AIDL_TEST(AttestKeyTest);
diff --git a/security/keymint/aidl/vts/functional/AuthTest.cpp b/security/keymint/aidl/vts/functional/AuthTest.cpp
index 78c88f4..290e8fc 100644
--- a/security/keymint/aidl/vts/functional/AuthTest.cpp
+++ b/security/keymint/aidl/vts/functional/AuthTest.cpp
@@ -93,17 +93,21 @@
void TearDown() {
if (gk_ == nullptr) return;
gk_->deleteUser(uid_);
+ if (alt_uid_ != 0) {
+ gk_->deleteUser(alt_uid_);
+ }
}
bool GatekeeperAvailable() { return (gk_ != nullptr) || (hidl_gk_ != nullptr); }
- std::optional<GatekeeperEnrollResponse> doEnroll(const std::vector<uint8_t>& newPwd,
+ std::optional<GatekeeperEnrollResponse> doEnroll(uint32_t uid,
+ const std::vector<uint8_t>& newPwd,
const std::vector<uint8_t>& curHandle = {},
const std::vector<uint8_t>& curPwd = {}) {
if (gk_ != nullptr) {
while (true) {
GatekeeperEnrollResponse rsp;
- Status status = gk_->enroll(uid_, curHandle, curPwd, newPwd, &rsp);
+ Status status = gk_->enroll(uid, curHandle, curPwd, newPwd, &rsp);
if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
status.getServiceSpecificError() == IGatekeeper::ERROR_RETRY_TIMEOUT) {
sleep(1);
@@ -120,7 +124,7 @@
while (true) {
HidlGatekeeperResponse rsp;
auto status = hidl_gk_->enroll(
- uid_, curHandle, curPwd, newPwd,
+ uid, curHandle, curPwd, newPwd,
[&rsp](const HidlGatekeeperResponse& cbRsp) { rsp = cbRsp; });
if (!status.isOk()) {
GTEST_LOG_(ERROR) << "doEnroll(HIDL) failed";
@@ -155,20 +159,23 @@
}
}
- std::optional<GatekeeperEnrollResponse> doEnroll(const string& newPwd,
+ std::optional<GatekeeperEnrollResponse> doEnroll(uint32_t uid, const string& newPwd,
const std::vector<uint8_t>& curHandle = {},
const string& curPwd = {}) {
- return doEnroll(std::vector<uint8_t>(newPwd.begin(), newPwd.end()), curHandle,
+ return doEnroll(uid, std::vector<uint8_t>(newPwd.begin(), newPwd.end()), curHandle,
std::vector<uint8_t>(curPwd.begin(), curPwd.end()));
}
+ std::optional<GatekeeperEnrollResponse> doEnroll(const string& newPwd) {
+ return doEnroll(uid_, newPwd);
+ }
- std::optional<HardwareAuthToken> doVerify(uint64_t challenge,
+ std::optional<HardwareAuthToken> doVerify(uint32_t uid, uint64_t challenge,
const std::vector<uint8_t>& handle,
const std::vector<uint8_t>& pwd) {
if (gk_ != nullptr) {
while (true) {
GatekeeperVerifyResponse rsp;
- Status status = gk_->verify(uid_, challenge, handle, pwd, &rsp);
+ Status status = gk_->verify(uid, challenge, handle, pwd, &rsp);
if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
status.getServiceSpecificError() == IGatekeeper::ERROR_RETRY_TIMEOUT) {
sleep(1);
@@ -185,7 +192,7 @@
while (true) {
HidlGatekeeperResponse rsp;
auto status = hidl_gk_->verify(
- uid_, challenge, handle, pwd,
+ uid, challenge, handle, pwd,
[&rsp](const HidlGatekeeperResponse& cbRsp) { rsp = cbRsp; });
if (!status.isOk()) {
GTEST_LOG_(ERROR) << "doVerify(HIDL) failed";
@@ -220,10 +227,15 @@
return std::nullopt;
}
}
+ std::optional<HardwareAuthToken> doVerify(uint32_t uid, uint64_t challenge,
+ const std::vector<uint8_t>& handle,
+ const string& pwd) {
+ return doVerify(uid, challenge, handle, std::vector<uint8_t>(pwd.begin(), pwd.end()));
+ }
std::optional<HardwareAuthToken> doVerify(uint64_t challenge,
const std::vector<uint8_t>& handle,
const string& pwd) {
- return doVerify(challenge, handle, std::vector<uint8_t>(pwd.begin(), pwd.end()));
+ return doVerify(uid_, challenge, handle, pwd);
}
// Variants of the base class methods but with authentication information included.
@@ -268,6 +280,13 @@
return plaintext;
}
+ string SignMessage(const vector<uint8_t>& key_blob, const string& message,
+ const AuthorizationSet& in_params, AuthorizationSet* out_params,
+ const HardwareAuthToken& hat) {
+ SCOPED_TRACE("SignMessage");
+ return ProcessMessage(key_blob, KeyPurpose::SIGN, message, in_params, out_params, hat);
+ }
+
protected:
std::shared_ptr<IGatekeeper> gk_;
sp<IHidlGatekeeper> hidl_gk_;
@@ -275,6 +294,8 @@
string password_;
uint32_t uid_;
int64_t sid_;
+ uint32_t alt_uid_;
+ int64_t alt_sid_;
std::vector<uint8_t> handle_;
};
@@ -347,6 +368,116 @@
}
}
+// Test use of a key that requires user-authentication within recent history, but where
+// the `TimestampToken` provided to the device is unrelated to the in-progress operation.
+TEST_P(AuthTest, TimeoutAuthenticationIncorrectTimestampToken) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+ if (!timestamp_token_required_) {
+ GTEST_SKIP() << "Test only applies to devices with no secure clock";
+ }
+ if (clock_ == nullptr) {
+ GTEST_SKIP() << "Device requires timestamps and no ISecureClock available";
+ }
+
+ // Create an AES key that requires authentication within the last 3 seconds.
+ const uint32_t timeout_secs = 3;
+ auto builder = AuthorizationSetBuilder()
+ .AesEncryptionKey(256)
+ .BlockMode(BlockMode::ECB)
+ .Padding(PaddingMode::PKCS7)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::PASSWORD)
+ .Authorization(TAG_AUTH_TIMEOUT, timeout_secs);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Verify to get a HAT, arbitrary challenge.
+ const uint64_t challenge = 42;
+ const std::optional<HardwareAuthToken> hat = doVerify(challenge, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+
+ // KeyMint implementation has no clock, so only detects timeout via timestamp token provided
+ // on update()/finish(). However, for this test we ensure that that the timestamp token has a
+ // *different* challenge value.
+ const string message = "Hello World!";
+ auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+ AuthorizationSet out_params;
+ ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params, hat));
+
+ secureclock::TimeStampToken time_token;
+ EXPECT_EQ(ErrorCode::OK,
+ GetReturnErrorCode(clock_->generateTimeStamp(challenge_ + 1, &time_token)));
+ string output;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Finish(message, {} /* signature */, &output, hat, time_token));
+}
+
+// Test use of a key with multiple USER_SECURE_ID values. For variety, use an EC signing key
+// generated with attestation.
+TEST_P(AuthTest, TimeoutAuthenticationMultiSid) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+ if (timestamp_token_required_ && clock_ == nullptr) {
+ GTEST_SKIP() << "Device requires timestamps and no ISecureClock available";
+ }
+
+ // Enroll a password for a second user.
+ alt_uid_ = 20001;
+ const string alt_password = "correcthorsebatterystaple2";
+ std::optional<GatekeeperEnrollResponse> rsp = doEnroll(alt_uid_, alt_password);
+ ASSERT_TRUE(rsp.has_value());
+ alt_sid_ = rsp->secureUserId;
+ const std::vector<uint8_t> alt_handle = rsp->data;
+
+ // Create an attested EC key that requires authentication within the last 3 seconds from either
+ // secure ID. Also allow any authenticator type.
+ const uint32_t timeout_secs = 3;
+ auto builder = AuthorizationSetBuilder()
+ .EcdsaSigningKey(EcCurve::P_256)
+ .Digest(Digest::NONE)
+ .Digest(Digest::SHA_2_256)
+ .SetDefaultValidity()
+ .AttestationChallenge("challenge")
+ .AttestationApplicationId("app_id")
+ .Authorization(TAG_USER_SECURE_ID, alt_sid_)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::ANY)
+ .Authorization(TAG_AUTH_TIMEOUT, timeout_secs);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Verify first user to get a HAT that should work.
+ const uint64_t challenge = 42;
+ const std::optional<HardwareAuthToken> hat = doVerify(uid_, challenge, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+
+ const string message = "Hello World!";
+ auto params = AuthorizationSetBuilder().Digest(Digest::SHA_2_256);
+ AuthorizationSet out_params;
+ const string signature = SignMessage(keyblob, message, params, &out_params, hat.value());
+
+ // Verify second user to get a HAT that should work.
+ const uint64_t alt_challenge = 43;
+ const std::optional<HardwareAuthToken> alt_hat =
+ doVerify(alt_uid_, alt_challenge, alt_handle, alt_password);
+ ASSERT_TRUE(alt_hat.has_value());
+ EXPECT_EQ(alt_hat->userId, alt_sid_);
+
+ const string alt_signature =
+ SignMessage(keyblob, message, params, &out_params, alt_hat.value());
+}
+
// Test use of a key that requires an auth token for each action on the operation, with
// a per-operation challenge value included.
TEST_P(AuthTest, AuthPerOperation) {
@@ -407,6 +538,93 @@
Finish(message, {} /* signature */, &ciphertext, hat.value()));
}
+// Test use of a key that requires an auth token for each action on the operation, with
+// a per-operation challenge value included, with multiple secure IDs allowed.
+TEST_P(AuthTest, AuthPerOperationMultiSid) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+
+ // Enroll a password for a second user.
+ alt_uid_ = 20001;
+ const string alt_password = "correcthorsebatterystaple2";
+ std::optional<GatekeeperEnrollResponse> rsp = doEnroll(alt_uid_, alt_password);
+ ASSERT_TRUE(rsp.has_value());
+ alt_sid_ = rsp->secureUserId;
+ const std::vector<uint8_t> alt_handle = rsp->data;
+
+ // Create an AES key that requires authentication per-action.
+ auto builder = AuthorizationSetBuilder()
+ .AesEncryptionKey(256)
+ .BlockMode(BlockMode::ECB)
+ .Padding(PaddingMode::PKCS7)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_SECURE_ID, alt_sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::ANY);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Get a HAT for first user with the challenge from an in-progress operation.
+ const string message = "Hello World!";
+ auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+ AuthorizationSet out_params;
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ const std::optional<HardwareAuthToken> hat = doVerify(uid_, challenge_, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+ string ciphertext;
+ EXPECT_EQ(ErrorCode::OK, Finish(message, {} /* signature */, &ciphertext, hat.value()));
+
+ // Get a HAT for second user with the challenge from an in-progress operation.
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ const std::optional<HardwareAuthToken> alt_hat =
+ doVerify(alt_uid_, challenge_, alt_handle, alt_password);
+ ASSERT_TRUE(alt_hat.has_value());
+ EXPECT_EQ(alt_hat->userId, alt_sid_);
+ string alt_ciphertext;
+ EXPECT_EQ(ErrorCode::OK, Finish(message, {} /* signature */, &ciphertext, alt_hat.value()));
+}
+
+// Test use of a key that requires an auth token for each action on the operation, but
+// which gets passed a HAT of the wrong type
+TEST_P(AuthTest, AuthPerOperationWrongAuthType) {
+ if (!GatekeeperAvailable()) {
+ GTEST_SKIP() << "No Gatekeeper available";
+ }
+
+ // Create an AES key that requires authentication per-action, but with no valid authenticator
+ // types.
+ auto builder =
+ AuthorizationSetBuilder()
+ .AesEncryptionKey(256)
+ .BlockMode(BlockMode::ECB)
+ .Padding(PaddingMode::PKCS7)
+ .Authorization(TAG_USER_SECURE_ID, sid_)
+ .Authorization(TAG_USER_AUTH_TYPE, HardwareAuthenticatorType::FINGERPRINT);
+ vector<uint8_t> keyblob;
+ vector<KeyCharacteristics> key_characteristics;
+ vector<Certificate> cert_chain;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
+
+ // Get a HAT with the challenge from an in-progress operation.
+ const string message = "Hello World!";
+ auto params = AuthorizationSetBuilder().BlockMode(BlockMode::ECB).Padding(PaddingMode::PKCS7);
+ AuthorizationSet out_params;
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, keyblob, params, &out_params));
+ const std::optional<HardwareAuthToken> hat = doVerify(challenge_, handle_, password_);
+ ASSERT_TRUE(hat.has_value());
+ EXPECT_EQ(hat->userId, sid_);
+
+ // Should fail because auth type doesn't (can't) match.
+ string ciphertext;
+ EXPECT_EQ(ErrorCode::KEY_USER_NOT_AUTHENTICATED,
+ Finish(message, {} /* signature */, &ciphertext, hat.value()));
+}
+
INSTANTIATE_KEYMINT_AIDL_TEST(AuthTest);
} // namespace aidl::android::hardware::security::keymint::test
diff --git a/security/keymint/aidl/vts/functional/KeyBlobUpgradeTest.cpp b/security/keymint/aidl/vts/functional/KeyBlobUpgradeTest.cpp
index 6892442..7ccd246 100644
--- a/security/keymint/aidl/vts/functional/KeyBlobUpgradeTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyBlobUpgradeTest.cpp
@@ -36,11 +36,14 @@
//
// adb push keymint-blobs /data/local/tmp/keymint-blobs
//
-// 5) Run the "*After*" subset of these tests with the `--keyblob_dir <dir>` command-line argument
-// pointing to the directory with the keyblobs:
+// 5) Run the "*After*" subset of these tests, with the following command-line arguments
+// `--keyblob_dir <dir>`: pointing to the directory with the keyblobs.
+// `--expect_upgrade {yes|no}` (Optional): To specify if users expect an upgrade on the keyBlobs,
+// will be "yes" by default.
//
// VtsAidlKeyMintTargetTest --gtest_filter="*KeyBlobUpgradeTest*After*" \
-// --keyblob_dir /data/local/tmp/keymint-blobs
+// --keyblob_dir /data/local/tmp/keymint-blobs \
+// --expect_upgrade {yes|no}
//
// (Note that this skips the `CreateKeyBlobs` test, which would otherwise replace the saved
// keyblobs with freshly generated ones.).
@@ -71,6 +74,9 @@
namespace {
+// Names for individual key types to create and use. Note that some the names
+// induce specific behaviour, as indicated by the functions below.
+
std::vector<std::string> keyblob_names_tee = {
"aes-key", "aes-key-rr", "des-key", "hmac-key",
"rsa-key", "p256-key", "ed25519-key", "x25519-key",
@@ -84,6 +90,11 @@
"hmac-key", "rsa-key", "p256-key",
"rsa-attest-key", "p256-attest-key"};
+// Helper functions to detect particular key types based on the name.
+bool requires_attest_key(const std::string& name) {
+ return name.find("-attest-key") != std::string::npos;
+}
+
bool requires_rr(const std::string& name) {
return name.find("-rr") != std::string::npos;
}
@@ -207,6 +218,11 @@
}
for (std::string name : keyblob_names()) {
+ if (requires_attest_key(name) && shouldSkipAttestKeyTest()) {
+ std::cerr << "Skipping variant '" << name
+ << "' which requires ATTEST_KEY support that has been waivered\n";
+ continue;
+ }
for (bool with_hidden : {false, true}) {
std::string app_id;
std::string app_data;
@@ -355,6 +371,11 @@
}};
for (std::string name : keyblob_names()) {
+ if (requires_attest_key(name) && shouldSkipAttestKeyTest()) {
+ std::cerr << "Skipping variant '" << name
+ << "' which requires ATTEST_KEY support that has been waivered\n";
+ continue;
+ }
auto entry = keys_info.find(name);
ASSERT_NE(entry, keys_info.end()) << "no builder for " << name;
auto builder = entry->second;
@@ -408,12 +429,18 @@
//
// VtsAidlKeyMintTargetTest --gtest_filter="*KeyBlobUpgradeTest.UpgradeKeyBlobsAfter*" \
// --keyblob_dir /data/local/tmp/keymint-blobs
+// --expect_upgrade {yes|no}
//
// - this replaces the keyblob contents in that directory; if needed, save the upgraded keyblobs
// with:
// adb pull /data/local/tmp/keymint-blobs/
TEST_P(KeyBlobUpgradeTest, UpgradeKeyBlobsAfter) {
- UpgradeKeyBlobs(/* expectUpgrade= */ true);
+ bool expectUpgrade = true; // this test expects upgrade to happen by default
+ if (expect_upgrade.has_value() && expect_upgrade == false) {
+ std::cout << "Not expecting key upgrade due to --expect_upgrade no\n";
+ expectUpgrade = false;
+ }
+ UpgradeKeyBlobs(expectUpgrade);
}
// To run this test:
@@ -432,6 +459,11 @@
}
for (std::string name : keyblob_names()) {
+ if (requires_attest_key(name) && shouldSkipAttestKeyTest()) {
+ std::cerr << "Skipping variant '" << name
+ << "' which requires ATTEST_KEY support that has been waivered\n";
+ continue;
+ }
for (bool with_hidden : {false, true}) {
auto builder = AuthorizationSetBuilder();
if (with_hidden) {
@@ -531,7 +563,7 @@
// Both ways round should agree.
EXPECT_EQ(keymint_data, local_data);
- } else if (name.find("-attest-key") != std::string::npos) {
+ } else if (requires_attest_key(name)) {
// Covers rsa-attest-key, p256-attest-key, ed25519-attest-key.
// Use attestation key to sign RSA signing key
@@ -551,7 +583,7 @@
.SetDefaultValidity(),
attest_key, &attested_key_blob, &attested_key_characteristics,
&attested_key_cert_chain));
- CheckedDeleteKey(&attested_key_blob);
+ KeyBlobDeleter(keymint_, attested_key_blob);
} else {
FAIL() << "Unexpected name: " << name;
}
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 284af94..9f8593c 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -71,6 +71,11 @@
// additional overhead, for the digest algorithmIdentifier required by PKCS#1.
const size_t kPkcs1UndigestedSignaturePaddingOverhead = 11;
+size_t count_tag_invalid_entries(const std::vector<KeyParameter>& authorizations) {
+ return std::count_if(authorizations.begin(), authorizations.end(),
+ [](const KeyParameter& e) -> bool { return e.tag == Tag::INVALID; });
+}
+
typedef KeyMintAidlTestBase::KeyData KeyData;
// Predicate for testing basic characteristics validity in generation or import.
bool KeyCharacteristicsBasicallyValid(SecurityLevel secLevel,
@@ -84,6 +89,8 @@
return false;
}
+ EXPECT_EQ(count_tag_invalid_entries(entry.authorizations), 0);
+
// Just ignore the SecurityLevel::KEYSTORE as the KM won't do any enforcement on this.
if (entry.securityLevel == SecurityLevel::KEYSTORE) continue;
@@ -174,6 +181,18 @@
bool KeyMintAidlTestBase::arm_deleteAllKeys = false;
bool KeyMintAidlTestBase::dump_Attestations = false;
std::string KeyMintAidlTestBase::keyblob_dir;
+std::optional<bool> KeyMintAidlTestBase::expect_upgrade = std::nullopt;
+
+KeyBlobDeleter::~KeyBlobDeleter() {
+ if (key_blob_.empty()) {
+ return;
+ }
+ Status result = keymint_->deleteKey(key_blob_);
+ key_blob_.clear();
+ EXPECT_TRUE(result.isOk()) << result.getServiceSpecificError() << "\n";
+ ErrorCode rc = GetReturnErrorCode(result);
+ EXPECT_TRUE(rc == ErrorCode::OK || rc == ErrorCode::UNIMPLEMENTED) << result << "\n";
+}
uint32_t KeyMintAidlTestBase::boot_patch_level(
const vector<KeyCharacteristics>& key_characteristics) {
@@ -228,16 +247,6 @@
return version >= 2;
}
-ErrorCode KeyMintAidlTestBase::GetReturnErrorCode(const Status& result) {
- if (result.isOk()) return ErrorCode::OK;
-
- if (result.getExceptionCode() == EX_SERVICE_SPECIFIC) {
- return static_cast<ErrorCode>(result.getServiceSpecificError());
- }
-
- return ErrorCode::UNKNOWN_ERROR;
-}
-
void KeyMintAidlTestBase::InitializeKeyMint(std::shared_ptr<IKeyMintDevice> keyMint) {
ASSERT_NE(keyMint, nullptr);
keymint_ = std::move(keyMint);
@@ -512,13 +521,9 @@
return GetReturnErrorCode(result);
}
-void KeyMintAidlTestBase::CheckedDeleteKey(vector<uint8_t>* key_blob, bool keep_key_blob) {
- ErrorCode result = DeleteKey(key_blob, keep_key_blob);
- EXPECT_TRUE(result == ErrorCode::OK || result == ErrorCode::UNIMPLEMENTED) << result << endl;
-}
-
void KeyMintAidlTestBase::CheckedDeleteKey() {
- CheckedDeleteKey(&key_blob_);
+ ErrorCode result = DeleteKey(&key_blob_, /* keep_key_blob = */ false);
+ EXPECT_TRUE(result == ErrorCode::OK || result == ErrorCode::UNIMPLEMENTED) << result << endl;
}
ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob,
@@ -1605,7 +1610,8 @@
auto res = property_get("ro.vendor.qti.soc_model", buffer.data(), nullptr);
if (res <= 0) return false;
- const string allowed_soc_models[] = {"SM8450", "SM8475", "SM8550", "SXR2230P"};
+ const string allowed_soc_models[] = {"SM8450", "SM8475", "SM8550", "SXR2230P",
+ "SM4450", "SM7450", "SM6450"};
for (const string model : allowed_soc_models) {
if (model.compare(buffer.data()) == 0) {
@@ -1617,17 +1623,39 @@
return false;
}
-// Skip the test if all the following conditions hold:
-// 1. ATTEST_KEY feature is disabled
-// 2. STRONGBOX is enabled
-// 3. The device is running one of the chipsets that have received a waiver
-// allowing it to be launched with Android S (or later) with Keymaster 4.0
+// Indicate whether a test that involves use of the ATTEST_KEY feature should be
+// skipped.
+//
+// In general, every KeyMint implementation should support ATTEST_KEY;
+// however, there is a waiver for some specific devices that ship with a
+// combination of Keymaster/StrongBox and KeyMint/TEE. On these devices, the
+// ATTEST_KEY feature is disabled in the KeyMint/TEE implementation so that
+// the device has consistent ATTEST_KEY behavior (ie. UNIMPLEMENTED) across both
+// HAL implementations.
+//
+// This means that a test involving ATTEST_KEY test should be skipped if all of
+// the following conditions hold:
+// 1. The device is running one of the chipsets that have received a waiver
+// allowing it to be launched with Android S or T with Keymaster 4.0
// in StrongBox
-void KeyMintAidlTestBase::skipAttestKeyTest(void) const {
+// 2. The device has a STRONGBOX implementation present.
+// 3. ATTEST_KEY feature is advertised as disabled.
+//
+// Note that in this scenario, ATTEST_KEY tests should be skipped for both
+// the StrongBox implementation (which is Keymaster, therefore not tested here)
+// and for the TEE implementation (which is adjusted to return UNIMPLEMENTED
+// specifically for this waiver).
+bool KeyMintAidlTestBase::shouldSkipAttestKeyTest(void) const {
// Check the chipset first as that doesn't require a round-trip to Package Manager.
- if (is_chipset_allowed_km4_strongbox() && is_strongbox_enabled() &&
- is_attest_key_feature_disabled()) {
- GTEST_SKIP() << "Test is not applicable";
+ return (is_chipset_allowed_km4_strongbox() && is_strongbox_enabled() &&
+ is_attest_key_feature_disabled());
+}
+
+// Skip a test that involves use of the ATTEST_KEY feature in specific configurations
+// where ATTEST_KEY is not supported (for either StrongBox or TEE).
+void KeyMintAidlTestBase::skipAttestKeyTest(void) const {
+ if (shouldSkipAttestKeyTest()) {
+ GTEST_SKIP() << "Test using ATTEST_KEY is not applicable on waivered device";
}
}
@@ -1984,6 +2012,16 @@
return AssertionSuccess();
}
+ErrorCode GetReturnErrorCode(const Status& result) {
+ if (result.isOk()) return ErrorCode::OK;
+
+ if (result.getExceptionCode() == EX_SERVICE_SPECIFIC) {
+ return static_cast<ErrorCode>(result.getServiceSpecificError());
+ }
+
+ return ErrorCode::UNKNOWN_ERROR;
+}
+
X509_Ptr parse_cert_blob(const vector<uint8_t>& blob) {
const uint8_t* p = blob.data();
return X509_Ptr(d2i_X509(nullptr /* allocate new */, &p, blob.size()));
@@ -2033,6 +2071,27 @@
return retval;
}
+void assert_mgf_digests_present_in_key_characteristics(
+ const vector<KeyCharacteristics>& key_characteristics,
+ std::vector<android::hardware::security::keymint::Digest>& expected_mgf_digests) {
+ AuthorizationSet auths;
+ for (auto& entry : key_characteristics) {
+ auths.push_back(AuthorizationSet(entry.authorizations));
+ }
+ for (auto digest : expected_mgf_digests) {
+ ASSERT_TRUE(auths.Contains(TAG_RSA_OAEP_MGF_DIGEST, digest));
+ }
+}
+
+bool is_mgf_digest_present(const vector<KeyCharacteristics>& key_characteristics,
+ android::hardware::security::keymint::Digest expected_mgf_digest) {
+ AuthorizationSet auths;
+ for (auto& entry : key_characteristics) {
+ auths.push_back(AuthorizationSet(entry.authorizations));
+ }
+ return auths.Contains(TAG_RSA_OAEP_MGF_DIGEST, expected_mgf_digest);
+}
+
namespace {
void check_cose_key(const vector<uint8_t>& data, bool testMode) {
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 6318514..8934a57 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -57,6 +57,18 @@
const string FEATURE_KEYSTORE_APP_ATTEST_KEY = "android.hardware.keystore.app_attest_key";
const string FEATURE_STRONGBOX_KEYSTORE = "android.hardware.strongbox_keystore";
+// RAII class to ensure that a keyblob is deleted regardless of how a test exits.
+class KeyBlobDeleter {
+ public:
+ KeyBlobDeleter(const shared_ptr<IKeyMintDevice>& keymint, const vector<uint8_t>& key_blob)
+ : keymint_(keymint), key_blob_(key_blob) {}
+ ~KeyBlobDeleter();
+
+ private:
+ shared_ptr<IKeyMintDevice> keymint_;
+ vector<uint8_t> key_blob_;
+};
+
class KeyMintAidlTestBase : public ::testing::TestWithParam<string> {
public:
struct KeyData {
@@ -70,6 +82,8 @@
// Directory to store/retrieve keyblobs, using subdirectories named for the
// KeyMint instance in question (e.g. "./default/", "./strongbox/").
static std::string keyblob_dir;
+ // To specify if users expect an upgrade on the keyBlobs.
+ static std::optional<bool> expect_upgrade;
void SetUp() override;
void TearDown() override {
@@ -92,8 +106,6 @@
bool Curve25519Supported();
- ErrorCode GetReturnErrorCode(const Status& result);
-
ErrorCode GenerateKey(const AuthorizationSet& key_desc, vector<uint8_t>* key_blob,
vector<KeyCharacteristics>* key_characteristics) {
return GenerateKey(key_desc, std::nullopt /* attest_key */, key_blob, key_characteristics,
@@ -157,7 +169,6 @@
ErrorCode DestroyAttestationIds();
- void CheckedDeleteKey(vector<uint8_t>* key_blob, bool keep_key_blob = false);
void CheckedDeleteKey();
ErrorCode Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob,
@@ -359,6 +370,7 @@
bool is_attest_key_feature_disabled(void) const;
bool is_strongbox_enabled(void) const;
bool is_chipset_allowed_km4_strongbox(void) const;
+ bool shouldSkipAttestKeyTest(void) const;
void skipAttestKeyTest(void) const;
protected:
@@ -418,6 +430,11 @@
X509_Ptr parse_cert_blob(const vector<uint8_t>& blob);
ASN1_OCTET_STRING* get_attestation_record(X509* certificate);
vector<uint8_t> make_name_from_str(const string& name);
+void assert_mgf_digests_present_in_key_characteristics(
+ const vector<KeyCharacteristics>& key_characteristics,
+ std::vector<android::hardware::security::keymint::Digest>& expected_mgf_digests);
+bool is_mgf_digest_present(const vector<KeyCharacteristics>& key_characteristics,
+ android::hardware::security::keymint::Digest expected_mgf_digest);
void check_maced_pubkey(const MacedPublicKey& macedPubKey, bool testMode,
vector<uint8_t>* payload_value);
void p256_pub_key(const vector<uint8_t>& coseKeyData, EVP_PKEY_Ptr* signingKey);
@@ -429,6 +446,8 @@
::testing::AssertionResult ChainSignaturesAreValid(const vector<Certificate>& chain,
bool strict_issuer_check = true);
+ErrorCode GetReturnErrorCode(const Status& result);
+
#define INSTANTIATE_KEYMINT_AIDL_TEST(name) \
INSTANTIATE_TEST_SUITE_P(PerInstance, name, \
testing::ValuesIn(KeyMintAidlTestBase::build_params()), \
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index bdec4d3..1e61a18 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -693,6 +693,7 @@
builder.Authorization(TAG_MIN_MAC_LENGTH, 128);
}
ASSERT_EQ(ErrorCode::OK, GenerateKey(builder, &key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
EXPECT_GT(key_blob.size(), 0U);
CheckSymmetricParams(key_characteristics);
@@ -703,8 +704,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::AES));
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
}
@@ -877,6 +876,7 @@
.Authorization(TAG_NO_AUTH_REQUIRED)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
EXPECT_GT(key_blob.size(), 0U);
CheckSymmetricParams(key_characteristics);
@@ -887,8 +887,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::TRIPLE_DES));
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
}
@@ -924,6 +922,7 @@
.AttestationApplicationId(app_id)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
EXPECT_GT(key_blob.size(), 0U);
CheckSymmetricParams(key_characteristics);
@@ -934,8 +933,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::TRIPLE_DES));
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
}
@@ -1003,6 +1000,7 @@
.Padding(PaddingMode::NONE)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1014,8 +1012,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
EXPECT_TRUE(crypto_params.Contains(TAG_RSA_PUBLIC_EXPONENT, 65537U));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1139,6 +1135,7 @@
}
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -1159,8 +1156,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1214,6 +1209,7 @@
.Authorization(TAG_NO_AUTH_REQUIRED)
.SetDefaultValidity(),
attestation_key, &key_blob, &key_characteristics, &cert_chain_));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1240,8 +1236,6 @@
ASSERT_TRUE(X509_verify(key_cert.get(), signing_pubkey.get()))
<< "Verification of attested certificate failed "
<< "OpenSSL error string: " << ERR_error_string(ERR_get_error(), NULL);
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1294,6 +1288,7 @@
.Authorization(TAG_NO_AUTH_REQUIRED)
.SetDefaultValidity(),
attestation_key, &key_blob, &key_characteristics, &cert_chain_));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1318,8 +1313,6 @@
ASSERT_TRUE(X509_verify(key_cert.get(), signing_pubkey.get()))
<< "Verification of attested certificate failed "
<< "OpenSSL error string: " << ERR_error_string(ERR_get_error(), NULL);
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1365,6 +1358,7 @@
}
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
AuthorizationSet auths;
@@ -1405,8 +1399,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
/*
@@ -1437,6 +1429,7 @@
.Authorization(TAG_CERTIFICATE_SUBJECT, subject_der)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1452,8 +1445,6 @@
ASSERT_EQ(cert_chain_.size(), 1);
verify_subject_and_serial(cert_chain_[0], serial_int, subject, false);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1518,6 +1509,7 @@
.Authorization(TAG_CERTIFICATE_SUBJECT, subject_der)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1534,8 +1526,6 @@
verify_subject_and_serial(cert_chain_[0], serial_int, subject, false);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
ASSERT_EQ(cert_chain_.size(), 1);
-
- CheckedDeleteKey(&key_blob);
}
/*
@@ -1556,6 +1546,7 @@
.Authorization(TAG_USAGE_COUNT_LIMIT, 1)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1575,8 +1566,6 @@
}
EXPECT_TRUE(auths.Contains(TAG_USAGE_COUNT_LIMIT, 1U))
<< "key usage count limit " << 1U << " missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1625,6 +1614,7 @@
}
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -1655,8 +1645,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1726,6 +1714,7 @@
.Digest(Digest::NONE)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -1734,8 +1723,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::EC));
EXPECT_TRUE(crypto_params.Contains(TAG_EC_CURVE, curve)) << "Curve " << curve << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1759,6 +1746,8 @@
.SetDefaultValidity(),
&key_blob, &key_characteristics);
ASSERT_EQ(result, ErrorCode::OK);
+ KeyBlobDeleter deleter(keymint_, key_blob);
+
ASSERT_GT(key_blob.size(), 0U);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
@@ -1771,8 +1760,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::EC));
EXPECT_TRUE(crypto_params.Contains(TAG_EC_CURVE, curve)) << "Curve " << curve << "missing";
-
- CheckedDeleteKey(&key_blob);
}
/*
@@ -1879,6 +1866,7 @@
}
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -1897,8 +1885,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -1936,6 +1922,7 @@
.SetDefaultValidity(),
&key_blob, &key_characteristics);
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -1954,8 +1941,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
/*
@@ -2024,6 +2009,7 @@
}
}
ASSERT_EQ(result, ErrorCode::OK);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
@@ -2043,8 +2029,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, sw_enforced,
hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
// Collection of invalid attestation ID tags.
@@ -2086,7 +2070,8 @@
builder, &key_blob, &key_characteristics);
}
}
- ASSERT_EQ(error, ErrorCode::CANNOT_ATTEST_IDS);
+
+ device_id_attestation_check_acceptable_error(tag.tag, error);
}
}
@@ -2170,6 +2155,7 @@
continue;
}
ASSERT_EQ(result, ErrorCode::OK);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
@@ -2189,8 +2175,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, sw_enforced,
hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2345,6 +2329,7 @@
}
}
ASSERT_EQ(result, ErrorCode::OK);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
EXPECT_TRUE(ChainSignaturesAreValid(cert_chain_));
@@ -2364,8 +2349,6 @@
ASSERT_EQ(std::search(cert_chain_[0].encodedCertificate.begin(),
cert_chain_[0].encodedCertificate.end(), needle.begin(), needle.end()),
cert_chain_[0].encodedCertificate.end());
-
- CheckedDeleteKey(&key_blob);
}
/*
@@ -2393,6 +2376,7 @@
.Authorization(TAG_CERTIFICATE_SUBJECT, subject_der)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -2408,8 +2392,6 @@
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(key_characteristics);
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2463,6 +2445,7 @@
.AttestationApplicationId(app_id)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -2478,8 +2461,6 @@
AuthorizationSet hw_enforced = HwEnforcedAuthorizations(key_characteristics);
AuthorizationSet sw_enforced = SwEnforcedAuthorizations(key_characteristics);
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2521,6 +2502,7 @@
}
}
ASSERT_EQ(ErrorCode::OK, result);
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
CheckCharacteristics(key_blob, key_characteristics);
@@ -2538,8 +2520,6 @@
EXPECT_TRUE(verify_attestation_record(AidlVersion(), challenge, app_id, //
sw_enforced, hw_enforced, SecLevel(),
cert_chain_[0].encodedCertificate));
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2560,6 +2540,7 @@
.Authorization(TAG_USAGE_COUNT_LIMIT, 1)
.SetDefaultValidity(),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -2577,8 +2558,6 @@
}
EXPECT_TRUE(auths.Contains(TAG_USAGE_COUNT_LIMIT, 1U))
<< "key usage count limit " << 1U << " missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2710,6 +2689,7 @@
AuthorizationSetBuilder().HmacKey(key_size).Digest(digest).Authorization(
TAG_MIN_MAC_LENGTH, 128),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -2719,8 +2699,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::HMAC));
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2746,6 +2724,7 @@
.AttestationApplicationId(app_id)
.Authorization(TAG_MIN_MAC_LENGTH, 128),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
ASSERT_EQ(cert_chain_.size(), 0);
@@ -2756,8 +2735,6 @@
EXPECT_TRUE(crypto_params.Contains(TAG_ALGORITHM, Algorithm::HMAC));
EXPECT_TRUE(crypto_params.Contains(TAG_KEY_SIZE, key_size))
<< "Key size " << key_size << "missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -2779,6 +2756,7 @@
.Authorization(TAG_MIN_MAC_LENGTH, 128)
.Authorization(TAG_USAGE_COUNT_LIMIT, 1),
&key_blob, &key_characteristics));
+ KeyBlobDeleter deleter(keymint_, key_blob);
ASSERT_GT(key_blob.size(), 0U);
CheckBaseParams(key_characteristics);
@@ -2796,8 +2774,6 @@
}
EXPECT_TRUE(auths.Contains(TAG_USAGE_COUNT_LIMIT, 1U))
<< "key usage count limit " << 1U << " missing";
-
- CheckedDeleteKey(&key_blob);
}
}
@@ -3455,7 +3431,6 @@
* Verifies ECDSA signature/verification for all digests and required curves.
*/
TEST_P(SigningOperationsTest, EcdsaAllDigestsAndCurves) {
-
string message = "1234567890";
string corrupt_message = "2234567890";
for (auto curve : ValidCurves()) {
@@ -3891,6 +3866,7 @@
.Digest(Digest::SHA_2_256)
.Authorization(TAG_MIN_MAC_LENGTH, 160),
KeyFormat::RAW, key_material, &signing_key, &signing_key_chars));
+ KeyBlobDeleter sign_deleter(keymint_, signing_key);
EXPECT_EQ(ErrorCode::OK,
ImportKey(AuthorizationSetBuilder()
.Authorization(TAG_NO_AUTH_REQUIRED)
@@ -3899,6 +3875,7 @@
.Digest(Digest::SHA_2_256)
.Authorization(TAG_MIN_MAC_LENGTH, 160),
KeyFormat::RAW, key_material, &verification_key, &verification_key_chars));
+ KeyBlobDeleter verify_deleter(keymint_, verification_key);
string message = "This is a message.";
string signature = SignMessage(
@@ -3914,9 +3891,6 @@
// Verification key should work.
VerifyMessage(verification_key, message, signature,
AuthorizationSetBuilder().Digest(Digest::SHA_2_256));
-
- CheckedDeleteKey(&signing_key);
- CheckedDeleteKey(&verification_key);
}
/*
@@ -3937,6 +3911,7 @@
.Digest(Digest::SHA_2_256)
.Authorization(TAG_MIN_MAC_LENGTH, 160),
KeyFormat::RAW, key_material, &signing_key, &signing_key_chars));
+ KeyBlobDeleter sign_deleter(keymint_, signing_key);
EXPECT_EQ(ErrorCode::OK,
ImportKey(AuthorizationSetBuilder()
.Authorization(TAG_NO_AUTH_REQUIRED)
@@ -3945,6 +3920,7 @@
.Digest(Digest::SHA_2_256)
.Authorization(TAG_MIN_MAC_LENGTH, 160),
KeyFormat::RAW, key_material, &verification_key, &verification_key_chars));
+ KeyBlobDeleter verify_deleter(keymint_, verification_key);
string message = "This is a message.";
string signature = SignMessage(
@@ -3966,9 +3942,6 @@
signature[0] += 1; // Corrupt a signature
EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(message, signature, &output));
-
- CheckedDeleteKey(&signing_key);
- CheckedDeleteKey(&verification_key);
}
INSTANTIATE_KEYMINT_AIDL_TEST(VerificationOperationsTest);
@@ -4754,6 +4727,102 @@
}
}
+/*
+ * ImportKeyTest.RsaOaepMGFDigestSuccess
+ *
+ * Include MGF-Digest explicitly in import key authorization list.
+ * Test should import RSA key with OAEP padding and mgf-digests and verify that imported key
+ * should have the correct characteristics.
+ */
+TEST_P(ImportKeyTest, RsaOaepMGFDigestSuccess) {
+ auto mgf_digests = ValidDigests(false /* withNone */, true /* withMD5 */);
+ size_t key_size = 2048;
+
+ ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+ .OaepMGFDigest(mgf_digests)
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaEncryptionKey(key_size, 65537)
+ .Digest(Digest::SHA_2_256)
+ .Padding(PaddingMode::RSA_OAEP)
+ .SetDefaultValidity(),
+ KeyFormat::PKCS8, rsa_2048_key));
+
+ CheckCryptoParam(TAG_ALGORITHM, Algorithm::RSA);
+ CheckCryptoParam(TAG_KEY_SIZE, key_size);
+ CheckCryptoParam(TAG_RSA_PUBLIC_EXPONENT, 65537U);
+ CheckCryptoParam(TAG_DIGEST, Digest::SHA_2_256);
+ CheckCryptoParam(TAG_PADDING, PaddingMode::RSA_OAEP);
+ CheckOrigin();
+
+ // Make sure explicitly specified mgf-digests exist in key characteristics.
+ assert_mgf_digests_present_in_key_characteristics(key_characteristics_, mgf_digests);
+
+ string message = "Hello";
+
+ for (auto digest : mgf_digests) {
+ SCOPED_TRACE(testing::Message() << "digest-" << digest);
+ auto params = AuthorizationSetBuilder()
+ .Authorization(TAG_RSA_OAEP_MGF_DIGEST, digest)
+ .Digest(Digest::SHA_2_256)
+ .Padding(PaddingMode::RSA_OAEP);
+ string ciphertext1 = LocalRsaEncryptMessage(message, params);
+ if (HasNonfatalFailure()) std::cout << "-->" << digest << std::endl;
+ EXPECT_EQ(key_size / 8, ciphertext1.size());
+
+ string ciphertext2 = LocalRsaEncryptMessage(message, params);
+ if (HasNonfatalFailure()) std::cout << "-->" << digest << std::endl;
+ EXPECT_EQ(key_size / 8, ciphertext2.size());
+
+ // OAEP randomizes padding so every result should be different (with astronomically high
+ // probability).
+ EXPECT_NE(ciphertext1, ciphertext2);
+
+ string plaintext1 = DecryptMessage(ciphertext1, params);
+ EXPECT_EQ(message, plaintext1) << "RSA-OAEP failed with digest " << digest;
+ string plaintext2 = DecryptMessage(ciphertext2, params);
+ EXPECT_EQ(message, plaintext2) << "RSA-OAEP failed with digest " << digest;
+
+ // Decrypting corrupted ciphertext should fail.
+ size_t offset_to_corrupt = ciphertext1.size() - 1;
+ char corrupt_byte = ~ciphertext1[offset_to_corrupt];
+ ciphertext1[offset_to_corrupt] = corrupt_byte;
+
+ EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
+ string result;
+ EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result));
+ EXPECT_EQ(0U, result.size());
+ }
+}
+
+/*
+ * ImportKeyTest.RsaOaepMGFDigestDefaultSuccess
+ *
+ * Don't specify MGF-Digest explicitly in import key authorization list.
+ * Test should import RSA key with OAEP padding and default mgf-digest (SHA1) and
+ * verify that imported key should have the correct characteristics. Default
+ * mgf-digest shouldn't be included in key charecteristics.
+ */
+TEST_P(ImportKeyTest, RsaOaepMGFDigestDefaultSuccess) {
+ size_t key_size = 2048;
+ ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaEncryptionKey(key_size, 65537)
+ .Digest(Digest::SHA_2_256)
+ .Padding(PaddingMode::RSA_OAEP)
+ .SetDefaultValidity(),
+ KeyFormat::PKCS8, rsa_2048_key));
+
+ CheckCryptoParam(TAG_ALGORITHM, Algorithm::RSA);
+ CheckCryptoParam(TAG_KEY_SIZE, key_size);
+ CheckCryptoParam(TAG_RSA_PUBLIC_EXPONENT, 65537U);
+ CheckCryptoParam(TAG_DIGEST, Digest::SHA_2_256);
+ CheckCryptoParam(TAG_PADDING, PaddingMode::RSA_OAEP);
+ CheckOrigin();
+
+ // Make sure default mgf-digest (SHA1) is not included in Key characteristics.
+ ASSERT_FALSE(is_mgf_digest_present(key_characteristics_, Digest::SHA1));
+}
+
INSTANTIATE_KEYMINT_AIDL_TEST(ImportKeyTest);
auto wrapped_key = hex2str(
@@ -5179,16 +5248,19 @@
*/
TEST_P(EncryptionOperationsTest, RsaOaepSuccess) {
auto digests = ValidDigests(false /* withNone */, true /* withMD5 */);
+ auto mgf_digest = Digest::SHA1;
size_t key_size = 2048; // Need largish key for SHA-512 test.
- ASSERT_EQ(ErrorCode::OK,
- GenerateKey(AuthorizationSetBuilder()
- .Authorization(TAG_NO_AUTH_REQUIRED)
- .RsaEncryptionKey(key_size, 65537)
- .Padding(PaddingMode::RSA_OAEP)
- .Digest(digests)
- .Authorization(TAG_RSA_OAEP_MGF_DIGEST, Digest::SHA1)
- .SetDefaultValidity()));
+ ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaEncryptionKey(key_size, 65537)
+ .Padding(PaddingMode::RSA_OAEP)
+ .Digest(digests)
+ .Authorization(TAG_RSA_OAEP_MGF_DIGEST, mgf_digest)
+ .SetDefaultValidity()));
+
+ // Make sure explicitly specified mgf-digest exist in key characteristics.
+ ASSERT_TRUE(is_mgf_digest_present(key_characteristics_, mgf_digest));
string message = "Hello";
@@ -5314,6 +5386,20 @@
.Digest(Digest::SHA_2_256)
.SetDefaultValidity()));
+ std::vector<Digest> mgf1DigestsInAuths;
+ mgf1DigestsInAuths.reserve(digests.size());
+ const auto& hw_auths = SecLevelAuthorizations(key_characteristics_);
+ std::for_each(hw_auths.begin(), hw_auths.end(), [&](auto& param) {
+ if (param.tag == Tag::RSA_OAEP_MGF_DIGEST) {
+ KeyParameterValue value = param.value;
+ mgf1DigestsInAuths.push_back(param.value.template get<KeyParameterValue::digest>());
+ }
+ });
+
+ std::sort(digests.begin(), digests.end());
+ std::sort(mgf1DigestsInAuths.begin(), mgf1DigestsInAuths.end());
+ EXPECT_EQ(digests, mgf1DigestsInAuths);
+
string message = "Hello";
for (auto digest : digests) {
@@ -5368,6 +5454,9 @@
.Digest(Digest::SHA_2_256)
.SetDefaultValidity()));
+ // Make sure default mgf-digest (SHA1) is not included in Key characteristics.
+ ASSERT_FALSE(is_mgf_digest_present(key_characteristics_, Digest::SHA1));
+
// Do local RSA encryption using the default MGF digest of SHA-1.
string message = "Hello";
auto params =
@@ -5402,14 +5491,19 @@
*/
TEST_P(EncryptionOperationsTest, RsaOaepMGFDigestDefaultFail) {
size_t key_size = 2048;
- ASSERT_EQ(ErrorCode::OK,
- GenerateKey(AuthorizationSetBuilder()
- .Authorization(TAG_NO_AUTH_REQUIRED)
- .Authorization(TAG_RSA_OAEP_MGF_DIGEST, Digest::SHA_2_256)
- .RsaEncryptionKey(key_size, 65537)
- .Padding(PaddingMode::RSA_OAEP)
- .Digest(Digest::SHA_2_256)
- .SetDefaultValidity()));
+ auto mgf_digest = Digest::SHA_2_256;
+ ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .Authorization(TAG_RSA_OAEP_MGF_DIGEST, mgf_digest)
+ .RsaEncryptionKey(key_size, 65537)
+ .Padding(PaddingMode::RSA_OAEP)
+ .Digest(Digest::SHA_2_256)
+ .SetDefaultValidity()));
+
+ // Make sure explicitly specified mgf-digest exist in key characteristics.
+ ASSERT_TRUE(is_mgf_digest_present(key_characteristics_, mgf_digest));
+ // Make sure default mgf-digest is not included in key characteristics.
+ ASSERT_FALSE(is_mgf_digest_present(key_characteristics_, Digest::SHA1));
// Do local RSA encryption using the default MGF digest of SHA-1.
string message = "Hello";
@@ -5433,14 +5527,17 @@
* with incompatible MGF digest.
*/
TEST_P(EncryptionOperationsTest, RsaOaepWithMGFIncompatibleDigest) {
- ASSERT_EQ(ErrorCode::OK,
- GenerateKey(AuthorizationSetBuilder()
- .Authorization(TAG_RSA_OAEP_MGF_DIGEST, Digest::SHA_2_256)
- .Authorization(TAG_NO_AUTH_REQUIRED)
- .RsaEncryptionKey(2048, 65537)
- .Padding(PaddingMode::RSA_OAEP)
- .Digest(Digest::SHA_2_256)
- .SetDefaultValidity()));
+ auto mgf_digest = Digest::SHA_2_256;
+ ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+ .Authorization(TAG_RSA_OAEP_MGF_DIGEST, mgf_digest)
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaEncryptionKey(2048, 65537)
+ .Padding(PaddingMode::RSA_OAEP)
+ .Digest(Digest::SHA_2_256)
+ .SetDefaultValidity()));
+ // Make sure explicitly specified mgf-digest exist in key characteristics.
+ ASSERT_TRUE(is_mgf_digest_present(key_characteristics_, mgf_digest));
+
string message = "Hello World!";
auto params = AuthorizationSetBuilder()
@@ -5457,14 +5554,17 @@
* with unsupported MGF digest.
*/
TEST_P(EncryptionOperationsTest, RsaOaepWithMGFUnsupportedDigest) {
- ASSERT_EQ(ErrorCode::OK,
- GenerateKey(AuthorizationSetBuilder()
- .Authorization(TAG_RSA_OAEP_MGF_DIGEST, Digest::SHA_2_256)
- .Authorization(TAG_NO_AUTH_REQUIRED)
- .RsaEncryptionKey(2048, 65537)
- .Padding(PaddingMode::RSA_OAEP)
- .Digest(Digest::SHA_2_256)
- .SetDefaultValidity()));
+ auto mgf_digest = Digest::SHA_2_256;
+ ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
+ .Authorization(TAG_RSA_OAEP_MGF_DIGEST, mgf_digest)
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaEncryptionKey(2048, 65537)
+ .Padding(PaddingMode::RSA_OAEP)
+ .Digest(Digest::SHA_2_256)
+ .SetDefaultValidity()));
+ // Make sure explicitly specified mgf-digest exist in key characteristics.
+ ASSERT_TRUE(is_mgf_digest_present(key_characteristics_, mgf_digest));
+
string message = "Hello World!";
auto params = AuthorizationSetBuilder()
@@ -8497,16 +8597,16 @@
// Early boot keys can be created after early boot.
auto [aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData] =
CreateTestKeys(TAG_EARLY_BOOT_ONLY, ErrorCode::OK);
+ KeyBlobDeleter aes_deleter(keymint_, aesKeyData.blob);
+ KeyBlobDeleter hmac_deleter(keymint_, hmacKeyData.blob);
+ KeyBlobDeleter rsa_deleter(keymint_, rsaKeyData.blob);
+ KeyBlobDeleter ecdsa_deleter(keymint_, ecdsaKeyData.blob);
for (const auto& keyData : {aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData}) {
ASSERT_GT(keyData.blob.size(), 0U);
AuthorizationSet crypto_params = SecLevelAuthorizations(keyData.characteristics);
EXPECT_TRUE(crypto_params.Contains(TAG_EARLY_BOOT_ONLY)) << crypto_params;
}
- CheckedDeleteKey(&aesKeyData.blob);
- CheckedDeleteKey(&hmacKeyData.blob);
- CheckedDeleteKey(&rsaKeyData.blob);
- CheckedDeleteKey(&ecdsaKeyData.blob);
}
/*
@@ -8520,6 +8620,10 @@
builder->AttestationChallenge("challenge");
builder->AttestationApplicationId("app_id");
});
+ KeyBlobDeleter aes_deleter(keymint_, aesKeyData.blob);
+ KeyBlobDeleter hmac_deleter(keymint_, hmacKeyData.blob);
+ KeyBlobDeleter rsa_deleter(keymint_, rsaKeyData.blob);
+ KeyBlobDeleter ecdsa_deleter(keymint_, ecdsaKeyData.blob);
for (const auto& keyData : {aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData}) {
// Strongbox may not support factory attestation. Key creation might fail with
@@ -8531,14 +8635,6 @@
AuthorizationSet crypto_params = SecLevelAuthorizations(keyData.characteristics);
EXPECT_TRUE(crypto_params.Contains(TAG_EARLY_BOOT_ONLY)) << crypto_params;
}
- CheckedDeleteKey(&aesKeyData.blob);
- CheckedDeleteKey(&hmacKeyData.blob);
- if (rsaKeyData.blob.size() != 0U) {
- CheckedDeleteKey(&rsaKeyData.blob);
- }
- if (ecdsaKeyData.blob.size() != 0U) {
- CheckedDeleteKey(&ecdsaKeyData.blob);
- }
}
/*
@@ -8583,6 +8679,11 @@
TEST_P(EarlyBootKeyTest, DISABLED_FullTest) {
auto [aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData] =
CreateTestKeys(TAG_EARLY_BOOT_ONLY, ErrorCode::OK);
+ KeyBlobDeleter aes_deleter(keymint_, aesKeyData.blob);
+ KeyBlobDeleter hmac_deleter(keymint_, hmacKeyData.blob);
+ KeyBlobDeleter rsa_deleter(keymint_, rsaKeyData.blob);
+ KeyBlobDeleter ecdsa_deleter(keymint_, ecdsaKeyData.blob);
+
// TAG_EARLY_BOOT_ONLY should be in hw-enforced.
EXPECT_TRUE(HwEnforcedAuthorizations(aesKeyData.characteristics).Contains(TAG_EARLY_BOOT_ONLY));
EXPECT_TRUE(
@@ -8607,19 +8708,13 @@
EXPECT_EQ(ErrorCode::EARLY_BOOT_ENDED, UseRsaKey(rsaKeyData.blob));
EXPECT_EQ(ErrorCode::EARLY_BOOT_ENDED, UseEcdsaKey(ecdsaKeyData.blob));
- CheckedDeleteKey(&aesKeyData.blob);
- CheckedDeleteKey(&hmacKeyData.blob);
- CheckedDeleteKey(&rsaKeyData.blob);
- CheckedDeleteKey(&ecdsaKeyData.blob);
-
// Should not be able to create new keys
- std::tie(aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData) =
+ auto [aesKeyData2, hmacKeyData2, rsaKeyData2, ecdsaKeyData2] =
CreateTestKeys(TAG_EARLY_BOOT_ONLY, ErrorCode::EARLY_BOOT_ENDED);
-
- CheckedDeleteKey(&aesKeyData.blob);
- CheckedDeleteKey(&hmacKeyData.blob);
- CheckedDeleteKey(&rsaKeyData.blob);
- CheckedDeleteKey(&ecdsaKeyData.blob);
+ KeyBlobDeleter aes_deleter2(keymint_, aesKeyData2.blob);
+ KeyBlobDeleter hmac_deleter2(keymint_, hmacKeyData2.blob);
+ KeyBlobDeleter rsa_deleter2(keymint_, rsaKeyData2.blob);
+ KeyBlobDeleter ecdsa_deleter2(keymint_, ecdsaKeyData2.blob);
}
INSTANTIATE_KEYMINT_AIDL_TEST(EarlyBootKeyTest);
@@ -8637,6 +8732,10 @@
TEST_P(UnlockedDeviceRequiredTest, DISABLED_KeysBecomeUnusable) {
auto [aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData] =
CreateTestKeys(TAG_UNLOCKED_DEVICE_REQUIRED, ErrorCode::OK);
+ KeyBlobDeleter aes_deleter(keymint_, aesKeyData.blob);
+ KeyBlobDeleter hmac_deleter(keymint_, hmacKeyData.blob);
+ KeyBlobDeleter rsa_deleter(keymint_, rsaKeyData.blob);
+ KeyBlobDeleter ecdsa_deleter(keymint_, ecdsaKeyData.blob);
EXPECT_EQ(ErrorCode::OK, UseAesKey(aesKeyData.blob));
EXPECT_EQ(ErrorCode::OK, UseHmacKey(hmacKeyData.blob));
@@ -8650,11 +8749,6 @@
EXPECT_EQ(ErrorCode::DEVICE_LOCKED, UseHmacKey(hmacKeyData.blob));
EXPECT_EQ(ErrorCode::DEVICE_LOCKED, UseRsaKey(rsaKeyData.blob));
EXPECT_EQ(ErrorCode::DEVICE_LOCKED, UseEcdsaKey(ecdsaKeyData.blob));
-
- CheckedDeleteKey(&aesKeyData.blob);
- CheckedDeleteKey(&hmacKeyData.blob);
- CheckedDeleteKey(&rsaKeyData.blob);
- CheckedDeleteKey(&ecdsaKeyData.blob);
}
INSTANTIATE_KEYMINT_AIDL_TEST(UnlockedDeviceRequiredTest);
@@ -8718,6 +8812,19 @@
std::string(argv[i + 1]);
++i;
}
+ if (std::string(argv[i]) == "--expect_upgrade") {
+ if (i + 1 >= argc) {
+ std::cerr << "Missing argument for --expect_upgrade\n";
+ return 1;
+ }
+ std::string arg = argv[i + 1];
+ aidl::android::hardware::security::keymint::test::KeyMintAidlTestBase::
+ expect_upgrade =
+ arg == "yes"
+ ? true
+ : (arg == "no" ? false : std::optional<bool>(std::nullopt));
+ ++i;
+ }
}
}
return RUN_ALL_TESTS();
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 3cb783c..c9c3e4d 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -115,6 +115,36 @@
return std::make_tuple(std::move(pubX), std::move(pubY));
}
+ErrMsgOr<bytevec> getRawPublicKey(const EVP_PKEY_Ptr& pubKey) {
+ if (pubKey.get() == nullptr) {
+ return "pkey is null.";
+ }
+ int keyType = EVP_PKEY_base_id(pubKey.get());
+ switch (keyType) {
+ case EVP_PKEY_EC: {
+ auto ecKey = EC_KEY_Ptr(EVP_PKEY_get1_EC_KEY(pubKey.get()));
+ if (ecKey.get() == nullptr) {
+ return "Failed to get ec key";
+ }
+ return ecKeyGetPublicKey(ecKey.get());
+ }
+ case EVP_PKEY_ED25519: {
+ bytevec rawPubKey;
+ size_t rawKeySize = 0;
+ if (!EVP_PKEY_get_raw_public_key(pubKey.get(), NULL, &rawKeySize)) {
+ return "Failed to get raw public key.";
+ }
+ rawPubKey.resize(rawKeySize);
+ if (!EVP_PKEY_get_raw_public_key(pubKey.get(), rawPubKey.data(), &rawKeySize)) {
+ return "Failed to get raw public key.";
+ }
+ return rawPubKey;
+ }
+ default:
+ return "Unknown key type.";
+ }
+}
+
ErrMsgOr<std::tuple<bytevec, bytevec>> generateEc256KeyPair() {
auto ec_key = EC_KEY_Ptr(EC_KEY_new());
if (ec_key.get() == nullptr) {
@@ -706,11 +736,10 @@
// Validates the certificate chain and returns the leaf public key.
ErrMsgOr<bytevec> validateCertChain(const cppbor::Array& chain) {
- uint8_t rawPubKey[64];
- size_t rawPubKeySize = sizeof(rawPubKey);
+ bytevec rawPubKey;
for (size_t i = 0; i < chain.size(); ++i) {
// Root must be self-signed.
- size_t signingCertIndex = (i > 1) ? i - 1 : i;
+ size_t signingCertIndex = (i > 0) ? i - 1 : i;
auto& keyCertItem = chain[i];
auto& signingCertItem = chain[signingCertIndex];
if (!keyCertItem || !keyCertItem->asBstr()) {
@@ -724,7 +753,7 @@
if (!keyCert) {
return keyCert.message();
}
- auto signingCert = parseX509Cert(keyCertItem->asBstr()->value());
+ auto signingCert = parseX509Cert(signingCertItem->asBstr()->value());
if (!signingCert) {
return signingCert.message();
}
@@ -749,17 +778,16 @@
return "Certificate " + std::to_string(i) + " has wrong issuer. Signer subject is " +
signerSubj + " Issuer subject is " + certIssuer;
}
-
- rawPubKeySize = sizeof(rawPubKey);
- if (!EVP_PKEY_get_raw_public_key(pubKey.get(), rawPubKey, &rawPubKeySize)) {
- return "Failed to get raw public key.";
+ if (i == chain.size() - 1) {
+ auto key = getRawPublicKey(pubKey);
+ if (!key) key.moveMessage();
+ rawPubKey = key.moveValue();
}
}
-
- return bytevec(rawPubKey, rawPubKey + rawPubKeySize);
+ return rawPubKey;
}
-std::string validateUdsCerts(const cppbor::Map& udsCerts, const bytevec& udsPub) {
+std::string validateUdsCerts(const cppbor::Map& udsCerts, const bytevec& udsCoseKeyBytes) {
for (const auto& [signerName, udsCertChain] : udsCerts) {
if (!signerName || !signerName->asTstr()) {
return "Signer Name must be a Tstr.";
@@ -775,8 +803,31 @@
if (!leafPubKey) {
return leafPubKey.message();
}
+ auto coseKey = CoseKey::parse(udsCoseKeyBytes);
+ if (!coseKey) return coseKey.moveMessage();
+
+ auto curve = coseKey->getIntValue(CoseKey::CURVE);
+ if (!curve) {
+ return "CoseKey must contain curve.";
+ }
+ bytevec udsPub;
+ if (curve == CoseKeyCurve::P256 || curve == CoseKeyCurve::P384) {
+ auto pubKey = coseKey->getEcPublicKey();
+ if (!pubKey) return pubKey.moveMessage();
+ // convert public key to uncompressed form by prepending 0x04 at begin.
+ pubKey->insert(pubKey->begin(), 0x04);
+ udsPub = pubKey.moveValue();
+ } else if (curve == CoseKeyCurve::ED25519) {
+ auto& pubkey = coseKey->getMap().get(cppcose::CoseKey::PUBKEY_X);
+ if (!pubkey || !pubkey->asBstr()) {
+ return "Invalid public key.";
+ }
+ udsPub = pubkey->asBstr()->value();
+ } else {
+ return "Unknown curve.";
+ }
if (*leafPubKey != udsPub) {
- return "Leaf public key in UDS certificat chain doesn't match UDS public key.";
+ return "Leaf public key in UDS certificate chain doesn't match UDS public key.";
}
}
return "";
diff --git a/security/rkp/README.md b/security/rkp/README.md
index 7477f80..f8e1d5e 100644
--- a/security/rkp/README.md
+++ b/security/rkp/README.md
@@ -3,7 +3,7 @@
## Objective
Design a HAL to support over-the-air provisioning of certificates for asymmetric
-keys. The HAL must interact effectively with Keystore (and other daemons) and
+keys. The HAL must interact effectively with Keystore (and other services) and
protect device privacy and security.
Note that this API was originally designed for KeyMint, with the intention that
@@ -20,125 +20,52 @@
To more securely and reliably get keys and certificates to Android devices, we
need to create a system where no party outside of the device's secure components
is responsible for managing private keys. The strategy we've chosen is to
-deliver certificates over the air, using an asymmetric key pair created
-on-device in the factory as a root of trust to create an authenticated, secure
-channel. In this document we refer to this device-unique asymmetric key pair as
-Device Key (DK), its public half DK\_pub, its private half DK\_priv and a Device
-Key Certificate containing DK\_pub is denoted DKC.
+deliver certificates over the air, using an asymmetric key pair derived from a
+unique device secret (UDS) as a root of trust for authenticated requests from
+the secure components. We refer to the public half of this asymmetric key pair
+as UDS\_pub.
-In order for the provisioning service to use DK (or a key authenticated by DK),
-it must know whether a given DK\_pub is known and trusted. To prove trust, we
-ask device OEMs to use one of two mechanisms:
+In order for the provisioning service to trust UDS\_pub we ask device OEMs to
+use one of two mechanisms:
-1. (Preferred, recommended) The device OEM extracts DK\_pub from each device it
- manufactures and uploads the public keys to a backend server.
+1. (Preferred, recommended) The device OEM extracts the UDS\_pub from each
+ device they manufacture and uploads the public keys to a backend server.
-1. The device OEM signs the DK\_pub to produce DKC and stores it on the device.
- This has the advantage that they don't need to upload a DK\_pub for every
- device immediately, but the disadvantage that they have to manage their
- private signing keys, which means they have to have HSMs, configure and
- secure them correctly, etc. Some backend providers may also require that the
- OEM passes a factory security audit, and additionally promises to upload the
- keys eventually as well.
+1. The device OEM signs the UDS\_pub and stores the certificates on the device
+ rather than uploading a UDS\_pub for every device immediately. However,
+ there are many disadvantages and costs associated with this option as the
+ OEM will need to pass a security audit of their factory's physical security,
+ CA and HSM configuration, and incident response processes before the OEM's
+ public key is registered with the provisioning server.
-Note that in the full elaboration of this plan, DK\_pub is not the key used to
-establish a secure channel. Instead, DK\_pub is just the first public key in a
-chain of public keys which ends with the KeyMint public key, KM\_pub. All keys
-in the chain are device-unique and are joined in a certificate chain called the
-_Boot Certificate Chain_ (BCC), because in phases 2 and 3 of the remote
-provisioning project it is a chain of certificates corresponding to boot phases.
-We speak of the BCC even for phase 1, though in phase 1 it contains only a
-single self-signed DKC. This is described in more depth in the Phases section
-below.
-
-The BCC is authenticated by DK\_pub. To authenticate DK\_pub, we may have
-additional DKCs, from the SoC vendor, the device OEM, or both. Those are not
-part of the BCC but included as optional fields in the certificate request
-structure.
-
-The format of the the DK and BCC is specified within [Open Profile for DICE]
-(https://pigweed.googlesource.com/open-dice/+/HEAD/docs/specification.md). To
-map phrases within this document to their equivalent terminology in the DICE
-specification, read the terms as follows: the DK corresponds to the UDS-derived
-key pair, DKC corresponds to the UDS certificate, and the BCC entries between
-DK\_pub and KM\_pub correspond to a chain of CDI certificates.
-
-Note: In addition to allowing 32 byte hash values for fields in the BCC payload,
-this spec additionally constrains some of the choices allowed in open-DICE.
-Specifically, these include which entries are required and which are optional in
-the BCC payload, and which algorithms are acceptable for use.
+Note that in the full elaboration of this plan, UDS\_pub is not the key used to
+sign certificate requests. Instead, UDS\_pub is just the first public key in a
+chain of public keys that end the KeyMint public key. All keys in the chain are
+transitively derived from the UDS and joined in a certificate chain following
+the specification of the [Android Profile for DICE](#android-profile-for-dice).
### Phases
-RKP will be deployed in three phases, in terms of managing the root of trust
+RKP will be deployed with phased management of the root of trust
binding between the device and the backend. To briefly describe them:
-* Phase 1: In phase 1 there is only one entry in the BCC; DK_pub and KM_pub are
- the same key and the certificate is self-signed.
-* Phase 2: This is identical to phase 1, except it leverages the hardware root
- of trust process described by DICE. Instead of trust being rooted in the TEE,
- it is now rooted in the ROM by key material blown into fuses which are only
- accessible to the ROM code.
-* Phase 3: This is identical to Phase 2, except the SoC vendor also does the
- public key extraction or certification in their facilities, along with the OEM
- doing it in the factory. This tightens up the "supply chain" and aims to make
- key upload management more secure.
+* Degenerate DICE (Phase 1): A TEE root of trust key pair is used to sign
+ certificate requests; a single self-signed certificate signifies this phase.
+* DICE (Phase 2): A hardware root of trust key pair is only accessible to ROM
+ code; the boot process follows the [Android Profile for
+ DICE](#android-profile-for-dice).
+* SoC vendor certified DICE (Phase 3): This is identical to Phase 2, except the
+ SoC vendor also does the UDS\_pub extraction or certification in their
+ facilities, along with the OEM doing it in the factory. This tightens up the
+ "supply chain" and aims to make key upload management more secure.
### Privacy considerations
-Because DK and the DKCs are unique, immutable, unspoofable hardware-bound
-identifiers for the device, we must limit access to them to the absolute minimum
-possible. We do this in two ways:
-
-1. We require KeyMint (which knows the BCC and either knows or at least has the
-ability to use KM\_priv) to refuse to ever divulge the BCC or additional
-signatures in plaintext. Instead, KeyMint requires the caller to provide an
-_Endpoint Encryption Key_ (EEK), with which it will encrypt the data before
-returning it. When provisioning production keys, the EEK must be signed by an
-approved authority whose public key is embedded in KeyMint. When certifying test
-keys, KeyMint will accept any EEK without checking the signature, but will
-encrypt and return a test BCC, rather than the real one. The result is that
-only an entity in possession of an Trusted EEK (TEEK) private key can discover
-the plaintext of the production BCC.
-1. Having thus limited access to the public keys to the trusted party only, we
-need to prevent the entity from abusing this unique device identifier. The
-approach and mechanisms for doing that are beyond the scope of this document
-(they must be addressed in the server design), but generally involve taking care
-to ensure that we do not create any links between user IDs, IP addresses or
-issued certificates and the device pubkey.
-
-Although the details of the mechanisms for preventing the entity from abusing
-the BCC are, as stated, beyond the scope of this document, there is a subtle
-design decision here made specifically to enable abuse prevention. Specifically
-the `CertificateRequest` message sent to the server is (in
-[CDDL](https://tools.ietf.org/html/rfc8610)):
-
-```
-cddl
-CertificateRequest = [
- DeviceInfo,
- challenge : bstr,
- ProtectedData,
- MacedKeysToSign
-]
-```
-
-The public keys to be attested by the server are in `MacedKeysToSign`, which is
-a COSE\_Mac0 structure, MACed with a key that is found in `ProtectedData`. The
-MAC key is signed by DK\_pub.
-
-This structure allows the backend component that has access to EEK\_priv to
-decrypt `ProtectedData`, validate that the request is from an authorized device,
-check that the request is fresh and verify and extract the MAC key. That backend
-component never sees any data related to the keys to be signed, but can provide
-the MAC key to another backend component that can verify `MacedKeysToSign` and
-proceed to generate the certificates.
-
-In this way, we can partition the provisioning server into one component that
-knows the device identity, as represented by DK\_pub, but never sees the keys to
-be certified or certificates generated, and another component that sees the keys
-to be certified and certificates generated but does not know the device
-identity.
+Because the UDS, CDIs and derived values are unique, immutable, unspoofable
+hardware-bound identifiers for the device, we must limit access to them. We
+require that the values are never exposed in public APIs and are only available
+to the minimum set of system components that require access to them to function
+correctly.
### Key and cryptographic message formatting
@@ -195,24 +122,6 @@
choice for algorithm implies the implementor should also choose the P256 public
key group further down in the COSE structure.
-### Testability
-
-It's critical that the remote provisioning implementation be testable, to
-minimize the probability that broken devices are sold to end users. To support
-testing, the remote provisioning HAL methods take a `testMode` argument. Keys
-created in test mode are tagged to indicate this. The provisioning server will
-check for the test mode tag and issue test certificates that do not chain back
-to a trusted public key. In test mode, any EEK will be accepted, enabling
-testing tools to use EEKs for which they have the private key so they can
-validate the content of certificate requests. The BCC included in the
-`CertificateRequest` must contain freshly-generated keys, not the real BCC keys.
-
-Keystore (or similar) will need to be able to handle both testMode keys and
-production keys and keep them distinct, generating test certificate requests
-when asked with a test EEK and production certificate requests when asked with a
-production EEK. Likewise, the interface used to instruct Keystore to create keys
-will need to be able to specify whether test or production keys are desired.
-
## Design
### Certificate provisioning flow
@@ -220,25 +129,20 @@
TODO(jbires): Replace this with a `.png` containing a sequence diagram. The
provisioning flow looks something like this:
-Provisioner -> Keystore: Prepare N keys
-Keystore -> KeyMint: generateKeyPair
-KeyMint -> KeyMint: Generate key pair
-KeyMint --> Keystore: key\_blob,pubkey
-Keystore -> Keystore: Store key\_blob,pubkey
-Provisioner -> Server: Get TEEK
-Server --> Provisioner: TEEK
-Provisioner -> Keystore: genCertReq(N, TEEK)
-Keystore -> KeyMint: genCertReq(pubkeys, TEEK)
-KeyMint -> KeyMint: Sign pubkeys & encrypt BCC
-KeyMint --> Keystore: signature, encrypted BCC
-Keystore -> Keystore: Construct cert\_request
-Keystore --> Provisioner: cert\_request
-Provisioner --> Server: cert\_request
-Server -> Server: Validate cert\_request
+rkpd -> KeyMint: generateKeyPair
+KeyMint -> KeyMint: Generate key pair
+KeyMint --> rkpd: key\_blob,pubkey
+rkpd -> rkpd: Store key\_blob,pubkey
+rkpd -> Server: Get challenge
+Server --> rkpd: challenge
+rkpd -> KeyMint: genCertReq(pubkeys, challenge)
+KeyMint -> KeyMint: Sign CSR
+KeyMint --> rkpd: signed CSR
+rkpd --> Server: CSR
+Server -> Server: Validate CSR
Server -> Server: Generate certificates
-Server --> Provisioner: certificates
-Provisioner -> Keystore: certificates
-Keystore -> Keystore: Store certificates
+Server --> rkpd: certificates
+rkpd -> rkpd: Store certificates
The actors in the above diagram are:
@@ -246,10 +150,12 @@
the uploaded device public keys and is responsible for providing encryption
keys, decrypting and validating requests, and generating certificates in
response to requests.
-* **Provisioner** is an application that is responsible for communicating with
- the server and all of the system components that require key certificates
- from the server. It also implements the policy that defines how many key
- pairs each client should keep in their pool.
+* **rkpd** is, optionally, a modular system component that is responsible for
+ communicating with the server and all of the system components that require
+ key certificates from the server. It also implements the policy that defines
+ how many key pairs each client should keep in their pool. When a system
+ ships with rkpd as a modular component, it may be updated independently from
+ the rest of the system.
* **Keystore** is the [Android keystore
daemon](https://developer.android.com/training/articles/keystore) (or, more
generally, whatever system component manages communications with a
@@ -257,63 +163,50 @@
* **KeyMint** is the secure area component that manages cryptographic keys and
performs attestations (or perhaps some other secure area component).
-### `BCC`
+### Android Profile for DICE
-The _Boot Certificate Chain_ (BCC) is the chain of certificates that contains
-DK\_pub as well as other often device-unique certificates. The BCC is
-represented as a COSE\_Key containing DK\_pub followed by an array of
-COSE\_Sign1 "certificates" containing public keys and optional additional
-information, ordered from root to leaf, with each certificate signing the next.
-The first certificate in the array is signed by DK\_pub, the last certificate
-has the KeyMint (or whatever) signing key's public key, KM\_pub. In phase 1
-there is only one entry; DK\_pub and KM\_pub are the same key and the
-certificate is self-signed.
+The Android Profile for DICE is based on the [Open Profile for
+DICE](https://pigweed.googlesource.com/open-dice/+/refs/heads/main/docs/specification.md),
+with additional constraints for details that the Open Profile for DICE leaves
+intentionally underspecified. This section describes the differences from the
+Open Profile for DICE.
-Each COSE\_Sign1 certificate is a CBOR Web Token (CWT) as described in [RFC
-8392](https://tools.ietf.org/html/rfc8392) with additional fields as described
-in the Open Profile for DICE. Of these additional fields, only the
-_subjectPublicKey_ and _keyUsage_ fields are expected to be present for the
-KM\_pub entry (that is, the last entry) in a BCC, but all fields required by the
-Open Profile for DICE are expected for other entries (each of which corresponds
-to a particular firmware component or boot stage). The CWT fields _iss_ and
-_sub_ identify the issuer and subject of the certificate and are consistent
-along the BCC entries; the issuer of a given entry matches the subject of the
-previous entry.
+#### Algorithms
-The BCC is designed to be constructed using the Open Profile for DICE. In this
-case the DK key pair is derived from the UDS as described by that profile and
-all BCC entries before the leaf are CBOR CDI certificates chained from DK\_pub.
-The KM key pair is not part of the derived DICE chain. It is generated (not
-derived) by the KeyMint module, certified by the last key in the DICE chain, and
-added as the leaf BCC entry. The key usage field in this leaf certificate must
-indicate the key is not used to sign certificates. If a UDS certificate is
-available on the device it should appear in the certificate request as the leaf
-of a DKCertChain in AdditionalDKSignatures (see
-[CertificateRequest](#certificaterequest)).
+The choice of algorithm must remain consistent with a given certificate e.g. if
+SHA-256 is used for the code hash then the authority hash, config hash, etc.
+must also use SHA-256.
+
+* UDS and CDI key pairs:
+ * Ed25519 / P-256 / P-384
+* Hash algorithms (digests can be encoded with their natural size and do not
+ need to be the 64-bytes specified by the Open Profile for DICE):
+ * SHA-256 / SHA-384 / SHA-512
+* HKDF with a supported message digest for all key derivation
#### Mode
-The Open Profile for DICE specifies four possible modes with the most important
-mode being `normal`. A certificate must only set the mode to `normal` when all
-of the following conditions are met when loading and verifying the software
-component that is being described by the certificate:
+A certificate must only set the mode to `normal` when all of the following
+conditions are met when loading and verifying the software component that is
+being described by the certificate:
-* verified boot with anti-rollback protection is enabled
-* only the verified boot authorities for production images are enabled
-* debug ports, fuses or other debug facilities are disabled
-* device booted software from the normal primary source e.g. internal flash
+* verified boot with anti-rollback protection is enabled
+* only the verified boot authorities for production images are enabled
+* debug ports, fuses, or other debug facilities are disabled
+* device booted software from the normal primary source e.g. internal flash
-If any of these conditions are not met then it is recommended to explicitly
-acknowledge this fact by using the `debug` mode. The mode should never be `not
-configured`.
+The mode should never be `not configured`.
+
+Every certificate in the DICE chain will need to be have the `normal` mode in
+order to be provisioned with production certificates by RKP.
#### Configuration descriptor
-The Open Profile for DICE allows for an arbitrary configuration descriptor. For
-BCC entries, this configuration descriptor is a CBOR map with the following
-optional fields. If no fields are relevant, an empty map should be encoded.
-Additional implementation-specific fields may be added using key values not in
-the range \[-70000, -70999\] (these are reserved for future additions here).
+The configuration descriptor is a CBOR map with the following optional fields.
+If no fields are relevant, an empty map should be encoded. The key value range
+\[-70000, -70999\] is reserved for the Android Profile for DICE.
+Implementation-specific fields may be added using key values outside of the
+reserved range.
```
| Name | Key | Value type | Meaning |
@@ -324,44 +217,13 @@
: : : : boot stage :
| Resettable | -70004 | null | If present, key changes on factory|
: : : : reset :
+| Security version | -70005 | uint | Machine-comparable, monotonically |
+: : : : increasing version of the firmware:
+: : : : component / boot stage where a :
+: : : : greater value indicates a newer :
+: : : : version :
```
-Please see
-[ProtectedData.aidl](https://cs.android.com/android/platform/superproject/+/master:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/ProtectedData.aidl)
-for a full CDDL definition of the BCC.
-
-### `CertificateRequest`
-
-The full CBOR message that will be sent to the server to request certificates
-is:
-
-```cddl
-CertificateRequest = [
- DeviceInfo,
- challenge : bstr, // Provided by the server
- ProtectedData, // See ProtectedData.aidl
- MacedKeysToSign // See IRemotelyProvisionedComponent.aidl
-]
-
-DeviceInfo = [
- VerifiedDeviceInfo, // See DeviceInfo.aidl
- UnverifiedDeviceInfo
-]
-
-// Unverified info is anything provided by the HLOS. Subject to change out of
-// step with the HAL.
-UnverifiedDeviceInfo = {
- ? "fingerprint" : tstr,
-}
-
-```
-
-It will be the responsibility of Keystore and the Provisioner to construct the
-`CertificateRequest`. The HAL provides a method to generate the elements that
-need to be constructed on the secure side, which are the tag field of
-`MacedKeysToSign`, `VerifiedDeviceInfo`, and the ciphertext field of
-`ProtectedData`.
-
### HAL
The remote provisioning HAL provides a simple interface that can be implemented
diff --git a/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl b/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
index 2a4cba1..b231dae 100644
--- a/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
+++ b/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
@@ -422,11 +422,12 @@
* ; described above.
* -4670545 : bstr, ; Code Hash
* ? -4670546 : bstr, ; Code Descriptor
- * ? -4670547 : bstr, ; Configuration Hash
+ * -4670547 : bstr, ; Configuration Hash
* -4670548 : bstr .cbor { ; Configuration Descriptor
* ? -70002 : tstr, ; Component name
* ? -70003 : int / tstr, ; Component version
* ? -70004 : null, ; Resettable
+ * ? -70005 : uint, ; Security version
* },
* -4670549 : bstr, ; Authority Hash
* ? -4670550 : bstr, ; Authority Descriptor
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/staging/c2/aidl/android/hardware/media/c2/SurfaceSyncObj.aidl b/staging/c2/aidl/android/hardware/media/c2/SurfaceSyncObj.aidl
deleted file mode 100644
index 2e7330e..0000000
--- a/staging/c2/aidl/android/hardware/media/c2/SurfaceSyncObj.aidl
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2022 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.media.c2;
-
-import android.hardware.common.NativeHandle;
-/**
- * Surface(BufferQueue/IGBP) synchronization object regarding # of dequeued
- * output buffers. This keeps # of dequeued buffers from Surface less than
- * configured max # of dequeued buffers all the time.
- */
-parcelable SurfaceSyncObj {
- /**
- * ASharedMemory for synchronization data. Layout is below
- *
- * |lock(futex) 4bytes|
- * |conditional_variable(futex) 4bytes|
- * |# of max dequeable buffer 4bytes|
- * |# of dequeued buffer 4bytes|
- * |Status of the surface 4bytes|
- * INIT = 0, Configuring surface is not finished.
- * ACTIVE = 1, Surface is ready to allocate(dequeue).
- * SWITCHING = 2, Switching to the new surface. It is blocked
- * to allocate(dequeue) a buffer until switching
- * completes.
- */
- NativeHandle syncMemory;
- /**
- * BufferQueue id.
- */
- long bqId;
- /**
- * Generation id.
- */
- int generationId;
- /**
- * Consumer usage flags. See +ndk
- * libnativewindow#AHardwareBuffer_UsageFlags for possible values.
- */
- long consumerUsage;
-}
diff --git a/staging/threadnetwork/OWNERS b/staging/threadnetwork/OWNERS
deleted file mode 100644
index 037215d..0000000
--- a/staging/threadnetwork/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-# Bug component: 1203089
-
-wgtdkp@google.com
-xyk@google.com
-zhanglongxia@google.com
diff --git a/staging/threadnetwork/README.md b/staging/threadnetwork/README.md
deleted file mode 100644
index 12104e5..0000000
--- a/staging/threadnetwork/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Staging threadnetwork HAL interface
-
-The directory includes the unstable/unreleased version of `hardware/interfaces/threadnetwork`
-code which should **NOT** be used in production. But vendors may start verifying their hardware
-with the HAL interface.
-
-This directory will be cleaned up when the stable Thread HAL interface is added in
-`hardware/interfaces/threadnetwork` by version `V` or later.
-
-More information about _Thread_:
-- https://www.threadgroup.org
-- https://openthread.io
diff --git a/staging/threadnetwork/aidl/Android.bp b/staging/threadnetwork/aidl/Android.bp
deleted file mode 100644
index b59d6da..0000000
--- a/staging/threadnetwork/aidl/Android.bp
+++ /dev/null
@@ -1,26 +0,0 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "hardware_interfaces_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
-aidl_interface {
- name: "android.hardware.threadnetwork",
- host_supported: true,
- vendor_available: true,
-
- srcs: [
- "android/hardware/threadnetwork/*.aidl",
- ],
-
- unstable: true,
-
- backend: {
- ndk: {
- enabled: true,
- },
- },
-}
diff --git a/staging/threadnetwork/aidl/default/Android.bp b/staging/threadnetwork/aidl/default/Android.bp
deleted file mode 100644
index 8fc22ad..0000000
--- a/staging/threadnetwork/aidl/default/Android.bp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2022 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "hardware_interfaces_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
-cc_defaults {
- name: "threadnetwork_service_default",
- vendor: true,
- relative_install_path: "hw",
-
- shared_libs: [
- "android.hardware.threadnetwork-ndk",
- "libbase",
- "libbinder_ndk",
- "libcutils",
- "liblog",
- "libutils",
- ],
-
- static_libs: [
- "openthread-common",
- "openthread-hdlc",
- "openthread-platform",
- "openthread-posix",
- "openthread-url",
- ],
-
- srcs: [
- "main.cpp",
- "service.cpp",
- "thread_chip.cpp",
- "utils.cpp",
- ],
-}
-
-cc_binary {
- name: "android.hardware.threadnetwork-service.sim",
- defaults: ["threadnetwork_service_default"],
- init_rc: ["android.hardware.threadnetwork-service.sim.rc"],
-}
-
-cc_binary {
- name: "android.hardware.threadnetwork-service",
- defaults: ["threadnetwork_service_default"],
-}
diff --git a/staging/threadnetwork/aidl/default/main.cpp b/staging/threadnetwork/aidl/default/main.cpp
deleted file mode 100644
index b6c8bbb..0000000
--- a/staging/threadnetwork/aidl/default/main.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2022 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 <android-base/logging.h>
-#include <utils/Log.h>
-
-#include "service.hpp"
-
-int main(int argc, char* argv[]) {
- CHECK_GT(argc, 1);
- aidl::android::hardware::threadnetwork::Service service(&argv[1], argc - 1);
-
- ALOGI("Thread Network HAL is running");
-
- service.startLoop();
- return EXIT_FAILURE; // should not reach
-}
diff --git a/staging/threadnetwork/aidl/default/utils.cpp b/staging/threadnetwork/aidl/default/utils.cpp
deleted file mode 100644
index d3b4062..0000000
--- a/staging/threadnetwork/aidl/default/utils.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2022 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 <openthread/logging.h>
-#include <utils/Log.h>
-
-void otLogCritPlat(const char* format, ...) {
- va_list args;
-
- va_start(args, format);
- __android_log_vprint(ANDROID_LOG_FATAL, LOG_TAG, format, args);
- va_end(args);
-}
-
-void otLogWarnPlat(const char* format, ...) {
- va_list args;
-
- va_start(args, format);
- __android_log_vprint(ANDROID_LOG_WARN, LOG_TAG, format, args);
- va_end(args);
-}
diff --git a/tetheroffload/control/1.1/Android.bp b/tetheroffload/control/1.1/Android.bp
index 7871c2c..0daa90e 100644
--- a/tetheroffload/control/1.1/Android.bp
+++ b/tetheroffload/control/1.1/Android.bp
@@ -22,7 +22,7 @@
"android.hidl.base@1.0",
],
apex_available: [
- "//apex_available:platform", // Used by InProcessTethering
+ "//apex_available:platform",
"com.android.tethering",
],
gen_java: true,
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/threadnetwork/aidl/Android.bp b/threadnetwork/aidl/Android.bp
new file mode 100644
index 0000000..480ac0f
--- /dev/null
+++ b/threadnetwork/aidl/Android.bp
@@ -0,0 +1,22 @@
+aidl_interface {
+ name: "android.hardware.threadnetwork",
+ vendor_available: true,
+ srcs: [
+ "android/hardware/threadnetwork/*.aidl",
+ ],
+
+ stability: "vintf",
+
+ backend: {
+ java: {
+ platform_apis: true,
+ },
+ ndk: {
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.threadnetwork",
+ ],
+ min_sdk_version: "33",
+ },
+ },
+}
diff --git a/threadnetwork/aidl/OWNERS b/threadnetwork/aidl/OWNERS
new file mode 100644
index 0000000..e3111c8
--- /dev/null
+++ b/threadnetwork/aidl/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 1288834
+zhanglongxia@google.com
+xyk@google.com
diff --git a/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChip.aidl b/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChip.aidl
new file mode 100644
index 0000000..607ceb3
--- /dev/null
+++ b/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChip.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2022 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.threadnetwork;
+@VintfStability
+interface IThreadChip {
+ void open(in android.hardware.threadnetwork.IThreadChipCallback callback);
+ void close();
+ void hardwareReset();
+ void sendSpinelFrame(in byte[] frame);
+ const int ERROR_FAILED = 1;
+ const int ERROR_NO_BUFS = 2;
+ const int ERROR_BUSY = 3;
+}
diff --git a/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChipCallback.aidl b/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChipCallback.aidl
new file mode 100644
index 0000000..e86b3ec
--- /dev/null
+++ b/threadnetwork/aidl/aidl_api/android.hardware.threadnetwork/current/android/hardware/threadnetwork/IThreadChipCallback.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 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.threadnetwork;
+@VintfStability
+interface IThreadChipCallback {
+ oneway void onReceiveSpinelFrame(in byte[] frame);
+}
diff --git a/staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl b/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl
similarity index 87%
rename from staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl
rename to threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl
index 3c57149..e695623 100644
--- a/staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl
+++ b/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChip.aidl
@@ -22,6 +22,7 @@
* Controls a Thread radio chip on the device.
*/
+@VintfStability
interface IThreadChip {
/**
* The operation failed for the internal error.
@@ -43,10 +44,10 @@
* successfully, then the Thread HAL instance is ready to accept spinel
* messages through sendSpinelFrame() API.
*
- * @param callback A IThreadChipCallback callback instance. If multiple
- * callbacks are passed in, the open() will return ERROR_BUSY.
+ * @param callback A IThreadChipCallback callback instance.
*
* @throws EX_ILLEGAL_ARGUMENT if the callback handle is invalid (for example, it is null).
+ *
* @throws ServiceSpecificException with one of the following values:
* - ERROR_FAILED The interface cannot be opened due to an internal error.
* - ERROR_BUSY This interface is in use.
@@ -55,18 +56,18 @@
/**
* Close the Thread HAL instance. Must free all resources.
- *
- * @throws EX_ILLEGAL_STATE if the Thread HAL instance is not opened.
- *
*/
void close();
/**
- * This method resets the Thread HAL internal state. The callback registered by
- * `open()` won’t be reset and the resource allocated by `open()` won’t be free.
+ * This method hardware resets the Thread radio chip via the physical reset pin.
+ * The callback registered by `open()` won’t be reset and the resource allocated
+ * by `open()` won’t be free.
+ *
+ * @throws EX_UNSUPPORTED_OPERATION if the Thread radio chip doesn't support the hardware reset.
*
*/
- void reset();
+ void hardwareReset();
/**
* This method sends a spinel frame to the Thread HAL.
diff --git a/staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl b/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl
similarity index 98%
rename from staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl
rename to threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl
index a0fe88c..046edc3 100644
--- a/staging/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl
+++ b/threadnetwork/aidl/android/hardware/threadnetwork/IThreadChipCallback.aidl
@@ -16,6 +16,7 @@
package android.hardware.threadnetwork;
+@VintfStability
interface IThreadChipCallback {
/**
* This method is called when a spinel frame is received. Thread network
diff --git a/threadnetwork/aidl/default/Android.bp b/threadnetwork/aidl/default/Android.bp
new file mode 100644
index 0000000..bcd5704
--- /dev/null
+++ b/threadnetwork/aidl/default/Android.bp
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2022 Google LLC.
+// All rights reserved.
+//
+// This document is the property of Google LLC, Inc. It is
+// considered proprietary and confidential information.
+//
+// This document may not be reproduced or transmitted in any form,
+// in whole or in part, without the express written permission of
+// Google LLC.
+
+cc_defaults {
+ name: "threadnetwork_service_default",
+ vintf_fragments: ["threadnetwork-default.xml"],
+ vendor: true,
+ relative_install_path: "hw",
+
+ shared_libs: [
+ "android.hardware.threadnetwork-V1-ndk",
+ "libbase",
+ "libbinder_ndk",
+ "libcutils",
+ "liblog",
+ "libutils",
+ ],
+
+ static_libs: [
+ "openthread-common",
+ "openthread-hdlc",
+ "openthread-platform",
+ "openthread-posix",
+ "openthread-spi",
+ "openthread-url",
+ ],
+
+ srcs: [
+ "main.cpp",
+ "service.cpp",
+ "thread_chip.cpp",
+ "utils.cpp",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.threadnetwork-service.sim",
+ defaults: ["threadnetwork_service_default"],
+ init_rc: ["android.hardware.threadnetwork-service.sim.rc"],
+ required: ["ot-rcp"],
+}
+
+cc_binary {
+ name: "android.hardware.threadnetwork-service",
+ defaults: ["threadnetwork_service_default"],
+}
+
+cc_fuzz {
+ name: "android.hardware.threadnetwork-service.fuzzer",
+
+ defaults:["service_fuzzer_defaults"],
+ shared_libs: [
+ "libbinder_ndk",
+ ],
+
+ static_libs: [
+ "android.hardware.threadnetwork-V1-ndk",
+ "libbase",
+ "liblog",
+ "openthread-common",
+ "openthread-hdlc",
+ "openthread-platform",
+ "openthread-posix",
+ "openthread-spi",
+ "openthread-url",
+ ],
+
+ srcs: [
+ "thread_chip.cpp",
+ "utils.cpp",
+ "fuzzer.cpp",
+ ],
+
+ fuzz_config: {
+ cc: [
+ "zhanglongxia@google.com",
+ ],
+ },
+}
diff --git a/staging/threadnetwork/aidl/default/android.hardware.threadnetwork-service.sim.rc b/threadnetwork/aidl/default/android.hardware.threadnetwork-service.sim.rc
similarity index 100%
rename from staging/threadnetwork/aidl/default/android.hardware.threadnetwork-service.sim.rc
rename to threadnetwork/aidl/default/android.hardware.threadnetwork-service.sim.rc
diff --git a/threadnetwork/aidl/default/fuzzer.cpp b/threadnetwork/aidl/default/fuzzer.cpp
new file mode 100644
index 0000000..fb6e548
--- /dev/null
+++ b/threadnetwork/aidl/default/fuzzer.cpp
@@ -0,0 +1,32 @@
+/*
+ * 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 "thread_chip.hpp"
+
+using aidl::android::hardware::threadnetwork::ThreadChip;
+using android::fuzzService;
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ char url[] = "spinel+hdlc+null:///dev/null";
+ auto service = ndk::SharedRefBase::make<ThreadChip>(url);
+
+ fuzzService(service->asBinder().get(), FuzzedDataProvider(data, size));
+
+ return 0;
+}
+
diff --git a/threadnetwork/aidl/default/main.cpp b/threadnetwork/aidl/default/main.cpp
new file mode 100644
index 0000000..8419041
--- /dev/null
+++ b/threadnetwork/aidl/default/main.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 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 <aidl/android/hardware/threadnetwork/IThreadChip.h>
+#include <android-base/logging.h>
+#include <android/binder_manager.h>
+#include <android/binder_process.h>
+#include <utils/Log.h>
+
+#include "service.hpp"
+#include "thread_chip.hpp"
+
+using aidl::android::hardware::threadnetwork::IThreadChip;
+using aidl::android::hardware::threadnetwork::ThreadChip;
+
+int main(int argc, char* argv[]) {
+ CHECK_GT(argc, 1);
+ std::vector<std::shared_ptr<ThreadChip>> threadChips;
+ aidl::android::hardware::threadnetwork::Service service;
+
+ for (int id = 0; id < argc - 1; id++) {
+ binder_status_t status;
+ const std::string serviceName(std::string() + IThreadChip::descriptor + "/chip" +
+ std::to_string(id));
+ auto threadChip = ndk::SharedRefBase::make<ThreadChip>(argv[id + 1]);
+
+ CHECK_NE(threadChip, nullptr);
+
+ status = AServiceManager_addService(threadChip->asBinder().get(), serviceName.c_str());
+ CHECK_EQ(status, STATUS_OK);
+
+ ALOGI("ServiceName: %s, Url: %s", serviceName.c_str(), argv[id + 1]);
+ threadChips.push_back(std::move(threadChip));
+ }
+
+ ALOGI("Thread Network HAL is running");
+
+ service.startLoop();
+ return EXIT_FAILURE; // should not reach
+}
diff --git a/staging/threadnetwork/aidl/default/service.cpp b/threadnetwork/aidl/default/service.cpp
similarity index 75%
rename from staging/threadnetwork/aidl/default/service.cpp
rename to threadnetwork/aidl/default/service.cpp
index 8047214..7f583f4 100644
--- a/staging/threadnetwork/aidl/default/service.cpp
+++ b/threadnetwork/aidl/default/service.cpp
@@ -20,38 +20,24 @@
#include <android/binder_process.h>
#include <utils/Log.h>
-#include "thread_chip.hpp"
-
namespace aidl {
namespace android {
namespace hardware {
namespace threadnetwork {
-Service::Service(char* urls[], int numUrls) : mBinderFd(-1) {
- int fd;
-
- CHECK_NE(urls, nullptr);
- CHECK_GT(numUrls, 0);
-
- for (int i = 0; i < numUrls; i++) {
- auto threadChip = ndk::SharedRefBase::make<ThreadChip>(i, urls[i]);
- CHECK_NE(threadChip, nullptr);
- mThreadChips.push_back(std::move(threadChip));
- }
-
- binder_status_t status = ABinderProcess_setupPolling(&fd);
+Service::Service(void) : mBinderFd(-1) {
+ binder_status_t status = ABinderProcess_setupPolling(&mBinderFd);
CHECK_EQ(status, ::STATUS_OK);
- CHECK_GE(fd, 0);
- mBinderFd.reset(fd);
+ CHECK_GE(mBinderFd, 0);
}
void Service::Update(otSysMainloopContext& context) {
- FD_SET(mBinderFd.get(), &context.mReadFdSet);
- context.mMaxFd = std::max(context.mMaxFd, mBinderFd.get());
+ FD_SET(mBinderFd, &context.mReadFdSet);
+ context.mMaxFd = std::max(context.mMaxFd, mBinderFd);
}
void Service::Process(const otSysMainloopContext& context) {
- if (FD_ISSET(mBinderFd.get(), &context.mReadFdSet)) {
+ if (FD_ISSET(mBinderFd, &context.mReadFdSet)) {
ABinderProcess_handlePolledCommands();
}
}
diff --git a/staging/threadnetwork/aidl/default/service.hpp b/threadnetwork/aidl/default/service.hpp
similarity index 83%
rename from staging/threadnetwork/aidl/default/service.hpp
rename to threadnetwork/aidl/default/service.hpp
index 6e6e868..6a94791 100644
--- a/staging/threadnetwork/aidl/default/service.hpp
+++ b/threadnetwork/aidl/default/service.hpp
@@ -14,10 +14,7 @@
* limitations under the License.
*/
-#include <android-base/unique_fd.h>
-
#include "mainloop.hpp"
-#include "thread_chip.hpp"
namespace aidl {
namespace android {
@@ -26,15 +23,14 @@
class Service : public ot::Posix::Mainloop::Source {
public:
- Service(char* urls[], int numUrls);
+ Service(void);
void Update(otSysMainloopContext& context) override;
void Process(const otSysMainloopContext& context) override;
void startLoop(void);
private:
- ::android::base::unique_fd mBinderFd;
- std::vector<std::shared_ptr<ThreadChip>> mThreadChips;
+ int mBinderFd;
};
} // namespace threadnetwork
} // namespace hardware
diff --git a/staging/threadnetwork/aidl/default/thread_chip.cpp b/threadnetwork/aidl/default/thread_chip.cpp
similarity index 66%
rename from staging/threadnetwork/aidl/default/thread_chip.cpp
rename to threadnetwork/aidl/default/thread_chip.cpp
index 38abad4..3d38cb8 100644
--- a/staging/threadnetwork/aidl/default/thread_chip.cpp
+++ b/threadnetwork/aidl/default/thread_chip.cpp
@@ -23,56 +23,65 @@
#include <android/binder_process.h>
#include <utils/Log.h>
+#include "hdlc_interface.hpp"
+#include "spi_interface.hpp"
+
namespace aidl {
namespace android {
namespace hardware {
namespace threadnetwork {
-static ndk::ScopedAStatus errorStatus(int32_t error, const char* message) {
- return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(error, message));
-}
+ThreadChip::ThreadChip(char* url) : mUrl(), mRxFrameBuffer(), mCallback(nullptr) {
+ static const char kHdlcProtocol[] = "spinel+hdlc";
+ static const char kSpiProtocol[] = "spinel+spi";
+ const char* protocol;
-ThreadChip::ThreadChip(uint8_t id, char* url)
- : mUrl(),
- mInterface(handleReceivedFrame, this, mRxFrameBuffer),
- mRxFrameBuffer(),
- mCallback(nullptr) {
- const std::string name(std::string() + IThreadChip::descriptor + "/chip" + std::to_string(id));
- binder_status_t status;
-
- ALOGI("ServiceName: %s, Url: %s", name.c_str(), url);
CHECK_EQ(mUrl.Init(url), 0);
- status = AServiceManager_addService(asBinder().get(), name.c_str());
- CHECK_EQ(status, STATUS_OK);
+
+ protocol = mUrl.GetProtocol();
+ CHECK_NE(protocol, nullptr);
+
+ if (memcmp(protocol, kSpiProtocol, strlen(kSpiProtocol)) == 0) {
+ mSpinelInterface = std::make_shared<ot::Posix::SpiInterface>(handleReceivedFrameJump, this,
+ mRxFrameBuffer);
+ } else if (memcmp(protocol, kHdlcProtocol, strlen(kHdlcProtocol)) == 0) {
+ mSpinelInterface = std::make_shared<ot::Posix::HdlcInterface>(handleReceivedFrameJump, this,
+ mRxFrameBuffer);
+ } else {
+ ALOGE("The protocol \"%s\" is not supported", protocol);
+ exit(EXIT_FAILURE);
+ }
+
+ CHECK_NE(mSpinelInterface, nullptr);
mDeathRecipient = ndk::ScopedAIBinder_DeathRecipient(
- AIBinder_DeathRecipient_new(ThreadChip::onBinderDied));
- AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), ThreadChip::onBinderUnlinked);
+ AIBinder_DeathRecipient_new(ThreadChip::onBinderDiedJump));
+ AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), ThreadChip::onBinderUnlinkedJump);
}
ThreadChip::~ThreadChip() {
AIBinder_DeathRecipient_delete(mDeathRecipient.get());
}
-void ThreadChip::onBinderDied(void* context) {
+void ThreadChip::onBinderDiedJump(void* context) {
reinterpret_cast<ThreadChip*>(context)->onBinderDied();
}
void ThreadChip::onBinderDied(void) {
- ALOGW("Thread Network HAL client is dead.");
+ ALOGW("Thread Network HAL client is dead");
}
-void ThreadChip::onBinderUnlinked(void* context) {
+void ThreadChip::onBinderUnlinkedJump(void* context) {
reinterpret_cast<ThreadChip*>(context)->onBinderUnlinked();
}
void ThreadChip::onBinderUnlinked(void) {
- ALOGW("ThreadChip binder is unlinked.");
+ ALOGW("ThreadChip binder is unlinked");
deinitChip();
}
-void ThreadChip::handleReceivedFrame(void* context) {
- reinterpret_cast<ThreadChip*>(context)->handleReceivedFrame();
+void ThreadChip::handleReceivedFrameJump(void* context) {
+ static_cast<ThreadChip*>(context)->handleReceivedFrame();
}
void ThreadChip::handleReceivedFrame(void) {
@@ -89,9 +98,9 @@
if (status.isOk()) {
AIBinder_linkToDeath(in_callback->asBinder().get(), mDeathRecipient.get(), this);
- ALOGI("Open IThreadChip successfully.");
+ ALOGI("Open IThreadChip successfully");
} else {
- ALOGW("Open IThreadChip failed, error: %s", status.getDescription().c_str());
+ ALOGW("Failed to open IThreadChip: %s", status.getDescription().c_str());
}
return status;
@@ -101,7 +110,7 @@
if (in_callback == nullptr) {
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
} else if (mCallback == nullptr) {
- if (mInterface.Init(mUrl) != OT_ERROR_NONE) {
+ if (mSpinelInterface->Init(mUrl) != OT_ERROR_NONE) {
return errorStatus(ERROR_FAILED, "Failed to initialize the interface");
}
@@ -109,7 +118,7 @@
ot::Posix::Mainloop::Manager::Get().Add(*this);
return ndk::ScopedAStatus::ok();
} else {
- return errorStatus(ERROR_BUSY, "Interface is already opened");
+ return errorStatus(ERROR_BUSY, "Interface has been opened");
}
}
@@ -125,7 +134,7 @@
ALOGI("Close IThreadChip successfully");
} else {
- ALOGW("Close IThreadChip failed, error: %s", status.getDescription().c_str());
+ ALOGW("Failed to close IThreadChip: %s", status.getDescription().c_str());
}
return status;
@@ -133,7 +142,7 @@
ndk::ScopedAStatus ThreadChip::deinitChip() {
if (mCallback != nullptr) {
- mInterface.Deinit();
+ mSpinelInterface->Deinit();
ot::Posix::Mainloop::Manager::Get().Remove(*this);
mCallback = nullptr;
return ndk::ScopedAStatus::ok();
@@ -149,8 +158,8 @@
if (mCallback == nullptr) {
status = errorStatus(ERROR_FAILED, "The interface is not open");
} else {
- error = mInterface.SendFrame(reinterpret_cast<const uint8_t*>(in_frame.data()),
- in_frame.size());
+ error = mSpinelInterface->SendFrame(reinterpret_cast<const uint8_t*>(in_frame.data()),
+ in_frame.size());
if (error == OT_ERROR_NONE) {
status = ndk::ScopedAStatus::ok();
} else if (error == OT_ERROR_NO_BUFS) {
@@ -169,28 +178,30 @@
return status;
}
-ndk::ScopedAStatus ThreadChip::reset() {
- mInterface.OnRcpReset();
+ndk::ScopedAStatus ThreadChip::hardwareReset() {
+ if (mSpinelInterface->HardwareReset() == OT_ERROR_NOT_IMPLEMENTED) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+
ALOGI("reset()");
return ndk::ScopedAStatus::ok();
}
void ThreadChip::Update(otSysMainloopContext& context) {
if (mCallback != nullptr) {
- mInterface.UpdateFdSet(context.mReadFdSet, context.mWriteFdSet, context.mMaxFd,
- context.mTimeout);
+ mSpinelInterface->UpdateFdSet(&context);
}
}
void ThreadChip::Process(const otSysMainloopContext& context) {
- struct RadioProcessContext radioContext;
-
if (mCallback != nullptr) {
- radioContext.mReadFdSet = &context.mReadFdSet;
- radioContext.mWriteFdSet = &context.mWriteFdSet;
- mInterface.Process(radioContext);
+ mSpinelInterface->Process(&context);
}
}
+
+ndk::ScopedAStatus ThreadChip::errorStatus(int32_t error, const char* message) {
+ return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(error, message));
+}
} // namespace threadnetwork
} // namespace hardware
} // namespace android
diff --git a/staging/threadnetwork/aidl/default/thread_chip.hpp b/threadnetwork/aidl/default/thread_chip.hpp
similarity index 84%
rename from staging/threadnetwork/aidl/default/thread_chip.hpp
rename to threadnetwork/aidl/default/thread_chip.hpp
index da5cba7..1ab6d54 100644
--- a/staging/threadnetwork/aidl/default/thread_chip.hpp
+++ b/threadnetwork/aidl/default/thread_chip.hpp
@@ -19,7 +19,6 @@
#include <aidl/android/hardware/threadnetwork/BnThreadChip.h>
#include <aidl/android/hardware/threadnetwork/IThreadChipCallback.h>
-#include "hdlc_interface.hpp"
#include "lib/spinel/spinel_interface.hpp"
#include "mainloop.hpp"
@@ -34,29 +33,29 @@
class ThreadChip : public BnThreadChip, ot::Posix::Mainloop::Source {
public:
- ThreadChip(uint8_t id, char* url);
+ ThreadChip(char* url);
~ThreadChip();
ndk::ScopedAStatus open(const std::shared_ptr<IThreadChipCallback>& in_callback) override;
ndk::ScopedAStatus close() override;
ndk::ScopedAStatus sendSpinelFrame(const std::vector<uint8_t>& in_frame) override;
- ndk::ScopedAStatus reset() override;
+ ndk::ScopedAStatus hardwareReset() override;
void Update(otSysMainloopContext& context) override;
void Process(const otSysMainloopContext& context) override;
private:
- static void onBinderDied(void* context);
+ static void onBinderDiedJump(void* context);
void onBinderDied(void);
- static void onBinderUnlinked(void* context);
+ static void onBinderUnlinkedJump(void* context);
void onBinderUnlinked(void);
- static void handleReceivedFrame(void* context);
+ static void handleReceivedFrameJump(void* context);
void handleReceivedFrame(void);
-
+ ndk::ScopedAStatus errorStatus(int32_t error, const char* message);
ndk::ScopedAStatus initChip(const std::shared_ptr<IThreadChipCallback>& in_callback);
ndk::ScopedAStatus deinitChip();
ot::Url::Url mUrl;
- ot::Posix::HdlcInterface mInterface;
+ std::shared_ptr<ot::Spinel::SpinelInterface> mSpinelInterface;
ot::Spinel::SpinelInterface::RxFrameBuffer mRxFrameBuffer;
std::shared_ptr<IThreadChipCallback> mCallback;
::ndk::ScopedAIBinder_DeathRecipient mDeathRecipient;
diff --git a/threadnetwork/aidl/default/threadnetwork-default.xml b/threadnetwork/aidl/default/threadnetwork-default.xml
new file mode 100644
index 0000000..d7dee1e
--- /dev/null
+++ b/threadnetwork/aidl/default/threadnetwork-default.xml
@@ -0,0 +1,6 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl">
+ <name>android.hardware.threadnetwork</name>
+ <fqname>IThreadChip/chip0</fqname>
+ </hal>
+</manifest>
diff --git a/threadnetwork/aidl/default/utils.cpp b/threadnetwork/aidl/default/utils.cpp
new file mode 100644
index 0000000..1cb42ec
--- /dev/null
+++ b/threadnetwork/aidl/default/utils.cpp
@@ -0,0 +1,80 @@
+
+/*
+ * Copyright (C) 2022 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 <openthread/instance.h>
+#include <openthread/logging.h>
+#include <openthread/platform/alarm-milli.h>
+#include <utils/Log.h>
+
+void otLogCritPlat(const char* format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ __android_log_vprint(ANDROID_LOG_FATAL, LOG_TAG, format, args);
+ va_end(args);
+}
+
+void otLogWarnPlat(const char* format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ __android_log_vprint(ANDROID_LOG_WARN, LOG_TAG, format, args);
+ va_end(args);
+}
+
+void otLogNotePlat(const char* format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ __android_log_vprint(ANDROID_LOG_INFO, LOG_TAG, format, args);
+ va_end(args);
+}
+
+void otLogInfoPlat(const char* format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ __android_log_vprint(ANDROID_LOG_INFO, LOG_TAG, format, args);
+ va_end(args);
+}
+
+void otLogDebgPlat(const char* format, ...) {
+ va_list args;
+
+ va_start(args, format);
+ __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, format, args);
+ va_end(args);
+}
+
+void otDumpDebgPlat(const char* aText, const void* aData, uint16_t aDataLength) {
+ constexpr uint16_t kBufSize = 512;
+ char buf[kBufSize];
+
+ if ((aText != nullptr) && (aData != nullptr)) {
+ const uint8_t* data = reinterpret_cast<const uint8_t*>(aData);
+
+ for (uint16_t i = 0; (i < aDataLength) && (i < (kBufSize - 1) / 3); i++) {
+ snprintf(buf + (i * 3), (kBufSize - 1) - (i * 3), "%02x ", data[i]);
+ }
+
+ __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, "%s: %s", aText, buf);
+ }
+}
+
+OT_TOOL_WEAK void otPlatAlarmMilliFired(otInstance* aInstance) {
+ OT_UNUSED_VARIABLE(aInstance);
+}
diff --git a/staging/threadnetwork/aidl/vts/Android.bp b/threadnetwork/aidl/vts/Android.bp
similarity index 71%
rename from staging/threadnetwork/aidl/vts/Android.bp
rename to threadnetwork/aidl/vts/Android.bp
index e2609ed..864e885 100644
--- a/staging/threadnetwork/aidl/vts/Android.bp
+++ b/threadnetwork/aidl/vts/Android.bp
@@ -14,15 +14,6 @@
// limitations under the License.
//
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "hardware_interfaces_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
cc_test {
name: "VtsHalThreadNetworkTargetTest",
defaults: [
@@ -38,7 +29,7 @@
"libbinder_ndk",
],
static_libs: [
- "android.hardware.threadnetwork-ndk",
+ "android.hardware.threadnetwork-V1-ndk",
],
test_suites: [
"general-tests",
diff --git a/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp b/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
similarity index 95%
rename from staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
rename to threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
index 3e43f9c..5925b54 100644
--- a/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
+++ b/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
@@ -76,7 +76,6 @@
ndk::SharedRefBase::make<ThreadChipCallback>([](auto /* data */) {});
EXPECT_TRUE(thread_chip->open(callback).isOk());
- EXPECT_EQ(thread_chip->open(callback).getServiceSpecificError(), IThreadChip::ERROR_BUSY);
}
TEST_P(ThreadNetworkAidl, Close) {
@@ -85,7 +84,6 @@
EXPECT_TRUE(thread_chip->open(callback).isOk());
EXPECT_TRUE(thread_chip->close().isOk());
- EXPECT_EQ(thread_chip->close().getExceptionCode(), EX_ILLEGAL_STATE);
}
TEST_P(ThreadNetworkAidl, Reset) {
@@ -93,7 +91,7 @@
ndk::SharedRefBase::make<ThreadChipCallback>([](auto /* data */) {});
EXPECT_TRUE(thread_chip->open(callback).isOk());
- EXPECT_TRUE(thread_chip->reset().isOk());
+ EXPECT_TRUE(thread_chip->hardwareReset().isOk());
}
TEST_P(ThreadNetworkAidl, SendSpinelFrame) {
diff --git a/usb/1.1/vts/functional/VtsHalUsbV1_1TargetTest.cpp b/usb/1.1/vts/functional/VtsHalUsbV1_1TargetTest.cpp
index 19830a6..0883de2 100644
--- a/usb/1.1/vts/functional/VtsHalUsbV1_1TargetTest.cpp
+++ b/usb/1.1/vts/functional/VtsHalUsbV1_1TargetTest.cpp
@@ -95,6 +95,7 @@
Status retval) override {
UsbClientCallbackArgs arg;
if (retval == Status::SUCCESS) {
+ arg.usb_last_port_status.status.portName = currentPortStatus[0].status.portName.c_str();
arg.usb_last_port_status.status.supportedModes =
currentPortStatus[0].status.supportedModes;
arg.usb_last_port_status.status.currentMode = currentPortStatus[0].status.currentMode;
@@ -165,9 +166,12 @@
auto res = usb_cb_2->WaitForCallback(kCallbackNameNotifyPortStatusChange_1_1);
EXPECT_TRUE(res.no_timeout);
EXPECT_EQ(2, res.args->last_usb_cookie);
- EXPECT_EQ(PortMode::NONE, res.args->usb_last_port_status.status.currentMode);
- EXPECT_EQ(PortMode::NONE, res.args->usb_last_port_status.status.supportedModes);
- EXPECT_EQ(Status::SUCCESS, res.args->usb_last_status);
+ // if there are no type-c ports, skip below checks
+ if (!res.args->usb_last_port_status.status.portName.empty()) {
+ EXPECT_EQ(PortMode::NONE, res.args->usb_last_port_status.status.currentMode);
+ EXPECT_EQ(PortMode::NONE, res.args->usb_last_port_status.status.supportedModes);
+ EXPECT_EQ(Status::SUCCESS, res.args->usb_last_status);
+ }
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(UsbHidlTest);
INSTANTIATE_TEST_SUITE_P(
diff --git a/usb/OWNERS b/usb/OWNERS
index 2b1d34d..3611b4d 100644
--- a/usb/OWNERS
+++ b/usb/OWNERS
@@ -1,4 +1,8 @@
# Bug component: 175220
+aprasath@google.com
+kumarashishg@google.com
+sarup@google.com
+anothermark@google.com
albertccwang@google.com
badhri@google.com
diff --git a/uwb/aidl/default/src/uwb_chip.rs b/uwb/aidl/default/src/uwb_chip.rs
index 7c2c300..cf32694 100644
--- a/uwb/aidl/default/src/uwb_chip.rs
+++ b/uwb/aidl/default/src/uwb_chip.rs
@@ -6,8 +6,8 @@
use async_trait::async_trait;
use binder::{Result, Strong};
-use tokio::fs::File;
-use tokio::io::{AsyncReadExt, AsyncWriteExt};
+use tokio::fs::{self, File};
+use tokio::io::AsyncReadExt;
use tokio::sync::Mutex;
use std::os::fd::AsRawFd;
@@ -22,7 +22,6 @@
callbacks: Strong<dyn IUwbClientCallback>,
#[allow(dead_code)]
tasks: tokio::task::JoinSet<()>,
- write: File,
},
}
@@ -65,17 +64,11 @@
async fn open(&self, callbacks: &Strong<dyn IUwbClientCallback>) -> Result<()> {
log::debug!("open: {:?}", &self.path);
- let serial = File::open(&self.path)
+ let mut serial = File::open(&self.path)
.await
.and_then(makeraw)
.map_err(|_| binder::StatusCode::UNKNOWN_ERROR)?;
- let mut read = serial
- .try_clone()
- .await
- .map_err(|_| binder::StatusCode::UNKNOWN_ERROR)?;
- let write = serial;
-
let mut state = self.state.lock().await;
if let State::Closed = *state {
@@ -88,14 +81,16 @@
const UWB_HEADER_SIZE: usize = 4;
let mut buffer = vec![0; UWB_HEADER_SIZE];
- read.read_exact(&mut buffer[0..UWB_HEADER_SIZE])
+ serial
+ .read_exact(&mut buffer[0..UWB_HEADER_SIZE])
.await
.unwrap();
let length = buffer[3] as usize + UWB_HEADER_SIZE;
buffer.resize(length, 0);
- read.read_exact(&mut buffer[UWB_HEADER_SIZE..length])
+ serial
+ .read_exact(&mut buffer[UWB_HEADER_SIZE..length])
.await
.unwrap();
@@ -108,7 +103,6 @@
*state = State::Opened {
callbacks: callbacks.clone(),
tasks,
- write,
};
Ok(())
@@ -155,11 +149,10 @@
async fn sendUciMessage(&self, data: &[u8]) -> Result<i32> {
log::debug!("sendUciMessage");
- if let State::Opened { write, .. } = &mut *self.state.lock().await {
- write
- .write(data)
+ if let State::Opened { .. } = &mut *self.state.lock().await {
+ fs::write(&self.path, data)
.await
- .map(|written| written as i32)
+ .map(|_| data.len() as i32)
.map_err(|_| binder::StatusCode::UNKNOWN_ERROR.into())
} else {
Err(binder::ExceptionCode::ILLEGAL_STATE.into())
diff --git a/weaver/aidl/android/hardware/weaver/IWeaver.aidl b/weaver/aidl/android/hardware/weaver/IWeaver.aidl
index f51034a..ae816ef 100644
--- a/weaver/aidl/android/hardware/weaver/IWeaver.aidl
+++ b/weaver/aidl/android/hardware/weaver/IWeaver.aidl
@@ -20,8 +20,8 @@
import android.hardware.weaver.WeaverReadResponse;
/**
- * Weaver provides secure storage of secret values that may only be read if the
- * corresponding key has been presented.
+ * Weaver provides secure persistent storage of secret values that may only be
+ * read if the corresponding key has been presented.
*
* The storage must be secure as the device's user authentication and encryption
* relies on the security of these values. The cardinality of the domains of the
@@ -76,7 +76,8 @@
WeaverReadResponse read(in int slotId, in byte[] key);
/**
- * Overwrites the identified slot with the provided key and value.
+ * Overwrites the identified slot with the provided key and value, rendering
+ * the previous contents of the slot permanently unrecoverable.
*
* The new values are written regardless of the current state of the slot in
* order to remain idempotent.
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/default/wifi_chip.cpp b/wifi/aidl/default/wifi_chip.cpp
index 6dd9156..8265e5b 100644
--- a/wifi/aidl/default/wifi_chip.cpp
+++ b/wifi/aidl/default/wifi_chip.cpp
@@ -1452,14 +1452,24 @@
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
LOG(ERROR) << "Failed to get SupportedRadioCombinations matrix from legacy HAL: "
<< legacyErrorToString(legacy_status);
+ if (legacy_matrix != nullptr) {
+ free(legacy_matrix);
+ }
return {aidl_combinations, createWifiStatusFromLegacyError(legacy_status)};
}
if (!aidl_struct_util::convertLegacyRadioCombinationsMatrixToAidl(legacy_matrix,
&aidl_combinations)) {
LOG(ERROR) << "Failed convertLegacyRadioCombinationsMatrixToAidl() ";
+ if (legacy_matrix != nullptr) {
+ free(legacy_matrix);
+ }
return {aidl_combinations, createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS)};
}
+
+ if (legacy_matrix != nullptr) {
+ free(legacy_matrix);
+ }
return {aidl_combinations, ndk::ScopedAStatus::ok()};
}