Merge "Health HAL: add hinge info" into main
diff --git a/audio/aidl/common/include/Utils.h b/audio/aidl/common/include/Utils.h
index ce29635..52ae936 100644
--- a/audio/aidl/common/include/Utils.h
+++ b/audio/aidl/common/include/Utils.h
@@ -29,7 +29,6 @@
#include <aidl/android/media/audio/common/AudioIoFlags.h>
#include <aidl/android/media/audio/common/AudioMode.h>
#include <aidl/android/media/audio/common/AudioOutputFlags.h>
-#include <aidl/android/media/audio/common/AudioPolicyForcedConfig.h>
#include <aidl/android/media/audio/common/PcmType.h>
#include <android/binder_auto_utils.h>
#include <utils/FastStrcmp.h>
@@ -63,31 +62,6 @@
::aidl::android::media::audio::common::AudioMode::CALL_SCREEN,
};
-constexpr std::array<::aidl::android::media::audio::common::AudioPolicyForcedConfig, 17>
- kValidAudioPolicyForcedConfig = {
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::NONE,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::SPEAKER,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::HEADPHONES,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::BT_SCO,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::BT_A2DP,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::WIRED_ACCESSORY,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::BT_CAR_DOCK,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::BT_DESK_DOCK,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::ANALOG_DOCK,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::DIGITAL_DOCK,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::NO_BT_A2DP,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::SYSTEM_ENFORCED,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::
- HDMI_SYSTEM_AUDIO_ENFORCED,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::
- ENCODED_SURROUND_NEVER,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::
- ENCODED_SURROUND_ALWAYS,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::
- ENCODED_SURROUND_MANUAL,
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig::BT_BLE,
-};
-
constexpr bool iequals(const std::string& str1, const std::string& str2) {
return str1.length() == str2.length() &&
!fasticmp<strncmp>(str1.c_str(), str2.c_str(), str1.length());
@@ -168,12 +142,6 @@
kValidAudioModes.end();
}
-constexpr bool isValidAudioPolicyForcedConfig(
- ::aidl::android::media::audio::common::AudioPolicyForcedConfig config) {
- return std::find(kValidAudioPolicyForcedConfig.begin(), kValidAudioPolicyForcedConfig.end(),
- config) != kValidAudioPolicyForcedConfig.end();
-}
-
static inline bool maybeVendorExtension(const std::string& s) {
// Only checks whether the string starts with the "vendor prefix".
static const std::string vendorPrefix = "VX_";
diff --git a/audio/aidl/default/CapEngineConfigXmlConverter.cpp b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
index a6e78b9..20fbca4 100644
--- a/audio/aidl/default/CapEngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
@@ -96,8 +96,8 @@
} else if (!fastcmp<strncmp>(criterionName.c_str(), kXsdcForceConfigForUse,
strlen(kXsdcForceConfigForUse))) {
AudioHalCapCriterionV2::ForceConfigForUse value;
- value.forceUse = VALUE_OR_RETURN(convertForceUseCriterionToAidl(criterionName));
- value.values.emplace_back(VALUE_OR_RETURN(convertForcedConfigToAidl(criterionValue)));
+ value.values.emplace_back(
+ VALUE_OR_RETURN(convertForceUseToAidl(criterionName, criterionValue)));
rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(value);
} else {
LOG(ERROR) << __func__ << " unrecognized criterion " << criterionName;
diff --git a/audio/aidl/default/XsdcConversion.cpp b/audio/aidl/default/XsdcConversion.cpp
index ba6110d..b42d7f5 100644
--- a/audio/aidl/default/XsdcConversion.cpp
+++ b/audio/aidl/default/XsdcConversion.cpp
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include <inttypes.h>
#include <unordered_set>
@@ -5,6 +21,7 @@
#define LOG_TAG "AHAL_Config"
#include <android-base/logging.h>
#include <android-base/strings.h>
+#include <android/binder_enums.h>
#include <aidl/android/media/audio/common/AudioPort.h>
#include <aidl/android/media/audio/common/AudioPortConfig.h>
@@ -20,9 +37,7 @@
using aidl::android::hardware::audio::common::iequals;
using aidl::android::hardware::audio::common::isValidAudioMode;
-using aidl::android::hardware::audio::common::isValidAudioPolicyForcedConfig;
using aidl::android::hardware::audio::common::kValidAudioModes;
-using aidl::android::hardware::audio::common::kValidAudioPolicyForcedConfig;
using aidl::android::media::audio::common::AudioChannelLayout;
using aidl::android::media::audio::common::AudioContentType;
using aidl::android::media::audio::common::AudioDevice;
@@ -38,7 +53,6 @@
using aidl::android::media::audio::common::AudioHalVolumeCurve;
using aidl::android::media::audio::common::AudioIoFlags;
using aidl::android::media::audio::common::AudioMode;
-using aidl::android::media::audio::common::AudioPolicyForcedConfig;
using aidl::android::media::audio::common::AudioPolicyForceUse;
using aidl::android::media::audio::common::AudioPort;
using aidl::android::media::audio::common::AudioPortConfig;
@@ -49,9 +63,10 @@
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioStreamType;
using aidl::android::media::audio::common::AudioUsage;
-using ::android::BAD_VALUE;
-using ::android::base::unexpected;
-using ::android::utilities::convertTo;
+using android::BAD_VALUE;
+using android::base::unexpected;
+using android::utilities::convertTo;
+using ndk::enum_range;
namespace ap_xsd = android::audio::policy::configuration;
namespace eng_xsd = android::audio::policy::engine::configuration;
@@ -531,18 +546,6 @@
return result;
}
-ConversionResult<AudioPolicyForcedConfig> convertForcedConfigToAidl(
- const std::string& xsdcForcedConfigCriterionType) {
- const auto it = std::find_if(
- kValidAudioPolicyForcedConfig.begin(), kValidAudioPolicyForcedConfig.end(),
- [&](const auto& config) { return toString(config) == xsdcForcedConfigCriterionType; });
- if (it == kValidAudioPolicyForcedConfig.end()) {
- LOG(ERROR) << __func__ << " invalid forced config " << xsdcForcedConfigCriterionType;
- return unexpected(BAD_VALUE);
- }
- return *it;
-}
-
ConversionResult<AudioMode> convertTelephonyModeToAidl(const std::string& xsdcModeCriterionType) {
const auto it = std::find_if(kValidAudioModes.begin(), kValidAudioModes.end(),
[&xsdcModeCriterionType](const auto& mode) {
@@ -637,6 +640,16 @@
return aidlDeviceAddresses;
}
+ConversionResult<AudioMode> convertAudioModeToAidl(const std::string& xsdcAudioModeType) {
+ const auto it = std::find_if(enum_range<AudioMode>().begin(), enum_range<AudioMode>().end(),
+ [&](const auto v) { return toString(v) == xsdcAudioModeType; });
+ if (it == enum_range<AudioMode>().end()) {
+ LOG(ERROR) << __func__ << " invalid audio mode " << xsdcAudioModeType;
+ return unexpected(BAD_VALUE);
+ }
+ return *it;
+}
+
ConversionResult<std::vector<AudioMode>> convertTelephonyModesToAidl(
const eng_xsd::CriterionTypeType& xsdcTelephonyModeCriterionType) {
if (xsdcTelephonyModeCriterionType.getValues().empty()) {
@@ -647,71 +660,97 @@
for (eng_xsd::ValuesType xsdcValues : xsdcTelephonyModeCriterionType.getValues()) {
aidlAudioModes.reserve(xsdcValues.getValue().size());
for (const eng_xsd::ValueType& xsdcValue : xsdcValues.getValue()) {
- int integerValue = xsdcValue.getNumerical();
- if (!isValidAudioMode(AudioMode(integerValue))) {
- LOG(ERROR) << __func__ << " invalid audio mode " << integerValue;
- return unexpected(BAD_VALUE);
- }
- aidlAudioModes.push_back(AudioMode(integerValue));
+ aidlAudioModes.push_back(
+ VALUE_OR_RETURN(convertAudioModeToAidl(xsdcValue.getLiteral())));
}
}
return aidlAudioModes;
}
-ConversionResult<std::vector<AudioPolicyForcedConfig>> convertForcedConfigsToAidl(
+ConversionResult<std::vector<AudioPolicyForceUse>> convertForceUseConfigsToAidl(
+ const std::string& criterionValue,
const eng_xsd::CriterionTypeType& xsdcForcedConfigCriterionType) {
if (xsdcForcedConfigCriterionType.getValues().empty()) {
LOG(ERROR) << __func__ << " no values provided";
return unexpected(BAD_VALUE);
}
- std::vector<AudioPolicyForcedConfig> aidlForcedConfigs;
+ std::vector<AudioPolicyForceUse> aidlForcedConfigs;
for (eng_xsd::ValuesType xsdcValues : xsdcForcedConfigCriterionType.getValues()) {
aidlForcedConfigs.reserve(xsdcValues.getValue().size());
for (const eng_xsd::ValueType& xsdcValue : xsdcValues.getValue()) {
- int integerValue = xsdcValue.getNumerical();
- if (!isValidAudioPolicyForcedConfig(AudioPolicyForcedConfig(integerValue))) {
- LOG(ERROR) << __func__ << " invalid forced config mode " << integerValue;
- return unexpected(BAD_VALUE);
- }
- aidlForcedConfigs.push_back(AudioPolicyForcedConfig(integerValue));
+ aidlForcedConfigs.push_back(
+ VALUE_OR_RETURN(convertForceUseToAidl(criterionValue, xsdcValue.getLiteral())));
}
}
return aidlForcedConfigs;
}
-ConversionResult<AudioPolicyForceUse> convertForceUseCriterionToAidl(
- const std::string& xsdcCriterionName) {
+template <typename T>
+ConversionResult<T> convertForceUseForcedConfigToAidl(
+ const std::string& xsdcForcedConfigCriterionType) {
+ const auto it = std::find_if(enum_range<T>().begin(), enum_range<T>().end(), [&](const auto v) {
+ return toString(v) == xsdcForcedConfigCriterionType;
+ });
+ if (it == enum_range<T>().end()) {
+ LOG(ERROR) << __func__ << " invalid forced config " << xsdcForcedConfigCriterionType;
+ return unexpected(BAD_VALUE);
+ }
+ return *it;
+}
+
+ConversionResult<AudioPolicyForceUse> convertForceUseToAidl(const std::string& xsdcCriterionName,
+ const std::string& xsdcCriterionValue) {
if (!fastcmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForCommunication,
- strlen(kXsdcForceConfigForCommunication))) {
- return AudioPolicyForceUse::COMMUNICATION;
+ strlen(kXsdcForceConfigForCommunication))) {
+ const auto deviceCategory = VALUE_OR_RETURN(
+ convertForceUseForcedConfigToAidl<AudioPolicyForceUse::CommunicationDeviceCategory>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::forCommunication>(deviceCategory);
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForMedia,
strlen(kXsdcForceConfigForMedia))) {
- return AudioPolicyForceUse::MEDIA;
+ const auto deviceCategory = VALUE_OR_RETURN(
+ convertForceUseForcedConfigToAidl<AudioPolicyForceUse::MediaDeviceCategory>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::forMedia>(deviceCategory);
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForRecord,
strlen(kXsdcForceConfigForRecord))) {
- return AudioPolicyForceUse::RECORD;
+ const auto deviceCategory = VALUE_OR_RETURN(
+ convertForceUseForcedConfigToAidl<AudioPolicyForceUse::CommunicationDeviceCategory>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::forRecord>(deviceCategory);
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForDock,
- strlen(kXsdcForceConfigForDock))) {
- return AudioPolicyForceUse::DOCK;
+ strlen(kXsdcForceConfigForDock))) {
+ const auto dockType =
+ VALUE_OR_RETURN(convertForceUseForcedConfigToAidl<AudioPolicyForceUse::DockType>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::dock>(dockType);
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForSystem,
strlen(kXsdcForceConfigForSystem))) {
- return AudioPolicyForceUse::SYSTEM;
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::systemSounds>(xsdcCriterionValue ==
+ "SYSTEM_ENFORCED");
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForHdmiSystemAudio,
strlen(kXsdcForceConfigForHdmiSystemAudio))) {
- return AudioPolicyForceUse::HDMI_SYSTEM_AUDIO;
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::hdmiSystemAudio>(
+ xsdcCriterionValue == "HDMI_SYSTEM_AUDIO_ENFORCED");
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForEncodedSurround,
strlen(kXsdcForceConfigForEncodedSurround))) {
- return AudioPolicyForceUse::ENCODED_SURROUND;
+ const auto encodedSurround = VALUE_OR_RETURN(
+ convertForceUseForcedConfigToAidl<AudioPolicyForceUse::EncodedSurroundConfig>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::encodedSurround>(encodedSurround);
}
if (!fasticmp<strncmp>(xsdcCriterionName.c_str(), kXsdcForceConfigForVibrateRinging,
strlen(kXsdcForceConfigForVibrateRinging))) {
- return AudioPolicyForceUse::VIBRATE_RINGING;
+ const auto deviceCategory = VALUE_OR_RETURN(
+ convertForceUseForcedConfigToAidl<AudioPolicyForceUse::CommunicationDeviceCategory>(
+ xsdcCriterionValue));
+ return AudioPolicyForceUse::make<AudioPolicyForceUse::forVibrateRinging>(deviceCategory);
}
LOG(ERROR) << __func__ << " unrecognized force use " << xsdcCriterionName;
return unexpected(BAD_VALUE);
@@ -747,9 +786,8 @@
}
if (!fastcmp<strncmp>(xsdcCriterion.getName().c_str(), kXsdcForceConfigForUse,
strlen(kXsdcForceConfigForUse))) {
- return AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(
- VALUE_OR_RETURN(convertForceUseCriterionToAidl(xsdcCriterion.getName())),
- VALUE_OR_RETURN(convertForcedConfigsToAidl(xsdcCriterionType)));
+ return AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(VALUE_OR_RETURN(
+ convertForceUseConfigsToAidl(xsdcCriterion.getName(), xsdcCriterionType)));
}
LOG(ERROR) << __func__ << " unrecognized criterion " << xsdcCriterion.getName();
return unexpected(BAD_VALUE);
diff --git a/audio/aidl/default/config/audioPolicy/engine/api/current.txt b/audio/aidl/default/config/audioPolicy/engine/api/current.txt
index 1ba91e6..41cfb44 100644
--- a/audio/aidl/default/config/audioPolicy/engine/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/engine/api/current.txt
@@ -148,6 +148,45 @@
method public void setValue(@Nullable java.util.List<android.audio.policy.engine.configuration.FlagType>);
}
+ public enum ForcedConfigCommunicationDeviceType {
+ method @NonNull public String getRawName();
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigCommunicationDeviceType BT_BLE;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigCommunicationDeviceType BT_SCO;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigCommunicationDeviceType NONE;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigCommunicationDeviceType SPEAKER;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigCommunicationDeviceType WIRED_ACCESSORY;
+ }
+
+ public enum ForcedConfigDockType {
+ method @NonNull public String getRawName();
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType ANALOG_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType BT_CAR_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType BT_DESK_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType DIGITAL_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType NONE;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigDockType WIRED_ACCESSORY;
+ }
+
+ public enum ForcedConfigMediaDeviceType {
+ method @NonNull public String getRawName();
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType ANALOG_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType BT_A2DP;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType DIGITAL_DOCK;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType HEADPHONES;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType NONE;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType NO_BT_A2DP;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType SPEAKER;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedConfigMediaDeviceType WIRED_ACCESSORY;
+ }
+
+ public enum ForcedEncodingSourroundConfigType {
+ method @NonNull public String getRawName();
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedEncodingSourroundConfigType ALWAYS;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedEncodingSourroundConfigType MANUAL;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedEncodingSourroundConfigType NEVER;
+ enum_constant public static final android.audio.policy.engine.configuration.ForcedEncodingSourroundConfigType UNSPECIFIED;
+ }
+
public enum PfwCriterionTypeEnum {
method @NonNull public String getRawName();
enum_constant public static final android.audio.policy.engine.configuration.PfwCriterionTypeEnum exclusive;
@@ -245,10 +284,8 @@
ctor public ValueType();
method @Nullable public String getAndroid_type();
method @Nullable public String getLiteral();
- method @Nullable public long getNumerical();
method public void setAndroid_type(@Nullable String);
method public void setLiteral(@Nullable String);
- method public void setNumerical(@Nullable long);
}
public class ValuesType {
diff --git a/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd b/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
index 6422277..7d9b06e 100644
--- a/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
@@ -191,10 +191,9 @@
<xs:complexType name="valueType">
<xs:annotation>
<xs:documentation xml:lang="en">
- Criterion type is provided as a tuple of 'human readable' string (referred as the
- literal part, that will allow to express 'human readable' rules, numerical value
- associated in order to improve performances of the parameter framework library used,
- and an optional android type.
+ Criterion type is provided as a pair of 'human readable' string (referred as the
+ literal part, that will allow to express 'human readable' rules and an optional
+ android type.
This android type is reserved for device type mapping with parameter framework
representation on a bitfield (Only one bit is expected to represent a device) and
android representation of a type that may use several bits.
@@ -203,7 +202,6 @@
</xs:documentation>
</xs:annotation>
<xs:attribute name="literal" type="xs:string" use="required"/>
- <xs:attribute name="numerical" type="xs:long" use="required"/>
<xs:attribute name="android_type" type="longDecimalOrHexType" use="optional"/>
</xs:complexType>
@@ -410,6 +408,49 @@
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="forcedConfigCommunicationDeviceType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="NONE"/>
+ <xs:enumeration value="SPEAKER"/>
+ <xs:enumeration value="BT_SCO"/>
+ <xs:enumeration value="BT_BLE"/>
+ <xs:enumeration value="WIRED_ACCESSORY"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="forcedConfigMediaDeviceType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="NONE"/>
+ <xs:enumeration value="SPEAKER"/>
+ <xs:enumeration value="HEADPHONES"/>
+ <xs:enumeration value="BT_A2DP"/>
+ <xs:enumeration value="ANALOG_DOCK"/>
+ <xs:enumeration value="DIGITAL_DOCK"/>
+ <xs:enumeration value="WIRED_ACCESSORY"/>
+ <xs:enumeration value="NO_BT_A2DP"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="forcedConfigDockType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="NONE"/>
+ <xs:enumeration value="BT_CAR_DOCK"/>
+ <xs:enumeration value="BT_DESK_DOCK"/>
+ <xs:enumeration value="ANALOG_DOCK"/>
+ <xs:enumeration value="DIGITAL_DOCK"/>
+ <xs:enumeration value="WIRED_ACCESSORY"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="forcedEncodingSourroundConfigType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="UNSPECIFIED"/>
+ <xs:enumeration value="NEVER"/>
+ <xs:enumeration value="ALWAYS"/>
+ <xs:enumeration value="MANUAL"/>
+ </xs:restriction>
+ </xs:simpleType>
+
<xs:simpleType name="sourceEnumType">
<xs:restriction base="xs:string">
<xs:enumeration value="AUDIO_SOURCE_DEFAULT"/>
diff --git a/audio/aidl/default/include/core-impl/XsdcConversion.h b/audio/aidl/default/include/core-impl/XsdcConversion.h
index e855a3e..f00206b 100644
--- a/audio/aidl/default/include/core-impl/XsdcConversion.h
+++ b/audio/aidl/default/include/core-impl/XsdcConversion.h
@@ -1,6 +1,20 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include <string>
-#include <unordered_map>
-#include <unordered_set>
#include <aidl/android/media/audio/common/AudioHalCapCriterion.h>
#include <aidl/android/media/audio/common/AudioHalCapCriterionType.h>
@@ -21,10 +35,8 @@
static constexpr const char kXsdcForceConfigForUse[] = "ForceUseFor";
-ConversionResult<aidlaudiocommon::AudioPolicyForceUse> convertForceUseCriterionToAidl(
- const std::string& xsdcCriterionName);
-ConversionResult<aidlaudiocommon::AudioPolicyForcedConfig> convertForcedConfigToAidl(
- const std::string& xsdcForcedConfigCriterionType);
+ConversionResult<aidlaudiocommon::AudioPolicyForceUse> convertForceUseToAidl(
+ const std::string& xsdcCriterionName, const std::string& xsdcCriterionValue);
ConversionResult<aidlaudiocommon::AudioDeviceAddress> convertDeviceAddressToAidl(
const std::string& xsdcAddress);
ConversionResult<aidlaudiocommon::AudioMode> convertTelephonyModeToAidl(
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index e2d4b79..14e70ef 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -117,6 +117,9 @@
defaults: ["VtsHalAudioEffectTargetTestDefaults"],
static_libs: ["libaudioaidlranges"],
srcs: ["VtsHalDynamicsProcessingTest.cpp"],
+ shared_libs: [
+ "libaudioutils",
+ ],
}
cc_test {
diff --git a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
index 583143c..eaec88b 100644
--- a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
@@ -55,7 +55,6 @@
using aidl::android::media::audio::common::AudioHalVolumeGroup;
using aidl::android::media::audio::common::AudioMode;
using aidl::android::media::audio::common::AudioPolicyForceUse;
-using aidl::android::media::audio::common::AudioPolicyForcedConfig;
using aidl::android::media::audio::common::AudioProductStrategyType;
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioStreamType;
@@ -577,7 +576,7 @@
void ValidateCapSpecificConfig(const AudioHalEngineConfig::CapSpecificConfig& capCfg) {
EXPECT_TRUE(capCfg.criteriaV2.has_value());
std::unordered_set<AudioHalCapCriterionV2::Tag> criterionTagSet;
- std::unordered_set<AudioPolicyForceUse> forceUseCriterionUseSet;
+ std::unordered_set<AudioPolicyForceUse::Tag> forceUseCriterionUseSet;
for (const auto& criterion : capCfg.criteriaV2.value()) {
EXPECT_TRUE(criterion.has_value());
if (criterion.value().getTag() != AudioHalCapCriterionV2::forceConfigForUse) {
@@ -585,7 +584,9 @@
} else {
auto forceUseCriterion =
criterion.value().get<AudioHalCapCriterionV2::forceConfigForUse>();
- EXPECT_TRUE(forceUseCriterionUseSet.insert(forceUseCriterion.forceUse).second);
+ ASSERT_FALSE(forceUseCriterion.values.empty());
+ EXPECT_TRUE(forceUseCriterionUseSet.insert(forceUseCriterion.values[0].getTag())
+ .second);
}
EXPECT_NO_FATAL_FAILURE(ValidateAudioHalCapCriterion(criterion.value()));
}
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 0c201cc..f106d83 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -20,6 +20,8 @@
#define LOG_TAG "VtsHalDynamicsProcessingTest"
#include <android-base/logging.h>
+#include <audio_utils/power.h>
+#include <audio_utils/primitives.h>
#include <Utils.h>
@@ -44,26 +46,25 @@
class DynamicsProcessingTestHelper : public EffectHelper {
public:
DynamicsProcessingTestHelper(std::pair<std::shared_ptr<IFactory>, Descriptor> pair,
- int32_t channelLayOut = AudioChannelLayout::LAYOUT_STEREO) {
+ int32_t channelLayOut = AudioChannelLayout::LAYOUT_STEREO)
+ : mChannelLayout(channelLayOut),
+ mChannelCount(::aidl::android::hardware::audio::common::getChannelCount(
+ AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout))) {
std::tie(mFactory, mDescriptor) = pair;
- mChannelLayout = channelLayOut;
- mChannelCount = ::aidl::android::hardware::audio::common::getChannelCount(
- AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout));
}
// setup
void SetUpDynamicsProcessingEffect() {
ASSERT_NE(nullptr, mFactory);
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
-
Parameter::Specific specific = getDefaultParamSpecific();
Parameter::Common common = createParamCommon(
- 0 /* session */, 1 /* ioHandle */, 44100 /* iSampleRate */, 44100 /* oSampleRate */,
- 0x100 /* iFrameCount */, 0x100 /* oFrameCount */,
+ 0 /* session */, 1 /* ioHandle */, kSamplingFrequency /* iSampleRate */,
+ kSamplingFrequency /* oSampleRate */, kFrameCount /* iFrameCount */,
+ kFrameCount /* oFrameCount */,
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout),
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(mChannelLayout));
- IEffect::OpenEffectReturn ret;
- ASSERT_NO_FATAL_FAILURE(open(mEffect, common, specific, &ret, EX_NONE));
+ ASSERT_NO_FATAL_FAILURE(open(mEffect, common, specific, &mOpenEffectReturn, EX_NONE));
ASSERT_NE(nullptr, mEffect);
mEngineConfigApplied = mEngineConfigPreset;
}
@@ -113,6 +114,8 @@
// get set params and validate
void SetAndGetDynamicsProcessingParameters();
+ bool isAllParamsValid();
+
// enqueue test parameters
void addEngineConfig(const DynamicsProcessing::EngineArchitecture& cfg);
void addPreEqChannelConfig(const std::vector<DynamicsProcessing::ChannelConfig>& cfg);
@@ -126,9 +129,12 @@
static constexpr float kPreferredProcessingDurationMs = 10.0f;
static constexpr int kBandCount = 5;
+ static constexpr int kSamplingFrequency = 44100;
+ static constexpr int kFrameCount = 2048;
std::shared_ptr<IFactory> mFactory;
std::shared_ptr<IEffect> mEffect;
Descriptor mDescriptor;
+ IEffect::OpenEffectReturn mOpenEffectReturn;
DynamicsProcessing::EngineArchitecture mEngineConfigApplied;
DynamicsProcessing::EngineArchitecture mEngineConfigPreset{
.resolutionPreference =
@@ -148,12 +154,12 @@
static const std::set<DynamicsProcessing::StageEnablement> kStageEnablementTestSet;
static const std::set<std::vector<DynamicsProcessing::InputGain>> kInputGainTestSet;
- protected:
- int mChannelCount;
-
private:
- int32_t mChannelLayout;
+ const int32_t mChannelLayout;
std::vector<std::pair<DynamicsProcessing::Tag, DynamicsProcessing>> mTags;
+
+ protected:
+ const int mChannelCount;
void CleanUp() {
mTags.clear();
mPreEqChannelEnable.clear();
@@ -329,10 +335,7 @@
}
void DynamicsProcessingTestHelper::SetAndGetDynamicsProcessingParameters() {
- for (auto& it : mTags) {
- auto& tag = it.first;
- auto& dp = it.second;
-
+ for (const auto& [tag, dp] : mTags) {
// validate parameter
Descriptor desc;
ASSERT_STATUS(EX_NONE, mEffect->getDescriptor(&desc));
@@ -371,6 +374,22 @@
}
}
+bool DynamicsProcessingTestHelper::isAllParamsValid() {
+ if (mTags.empty()) {
+ return false;
+ }
+ for (const auto& [tag, dp] : mTags) {
+ // validate parameter
+ if (!isParamInRange(dp, mDescriptor.capability.range.get<Range::dynamicsProcessing>())) {
+ return false;
+ }
+ if (!isParamValid(tag, dp)) {
+ return false;
+ }
+ }
+ return true;
+}
+
void DynamicsProcessingTestHelper::addEngineConfig(
const DynamicsProcessing::EngineArchitecture& cfg) {
DynamicsProcessing dp;
@@ -446,6 +465,21 @@
mTags.push_back({DynamicsProcessing::inputGain, dp});
}
+void fillLimiterConfig(std::vector<DynamicsProcessing::LimiterConfig>& limiterConfigList,
+ int channelIndex, bool enable, int linkGroup, float attackTime,
+ float releaseTime, float ratio, float threshold, float postGain) {
+ DynamicsProcessing::LimiterConfig cfg;
+ cfg.channel = channelIndex;
+ cfg.enable = enable;
+ cfg.linkGroup = linkGroup;
+ cfg.attackTimeMs = attackTime;
+ cfg.releaseTimeMs = releaseTime;
+ cfg.ratio = ratio;
+ cfg.thresholdDb = threshold;
+ cfg.postGainDb = postGain;
+ limiterConfigList.push_back(cfg);
+}
+
/**
* Test DynamicsProcessing Engine Configuration
*/
@@ -486,7 +520,7 @@
TEST_P(DynamicsProcessingTestEngineArchitecture, SetAndGetEngineArch) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -527,7 +561,7 @@
public:
DynamicsProcessingTestInputGain()
: DynamicsProcessingTestHelper(std::get<INPUT_GAIN_INSTANCE_NAME>(GetParam())),
- mInputGain(std::get<INPUT_GAIN_PARAM>(GetParam())){};
+ mInputGain(std::get<INPUT_GAIN_PARAM>(GetParam())) {};
void SetUp() override { SetUpDynamicsProcessingEffect(); }
@@ -538,7 +572,7 @@
TEST_P(DynamicsProcessingTestInputGain, SetAndGetInputGain) {
EXPECT_NO_FATAL_FAILURE(addInputGain(mInputGain));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -565,40 +599,23 @@
enum LimiterConfigTestParamName {
LIMITER_INSTANCE_NAME,
LIMITER_CHANNEL,
- LIMITER_ENABLE,
LIMITER_LINK_GROUP,
- LIMITER_ADDITIONAL,
-};
-enum LimiterConfigTestAdditionalParam {
LIMITER_ATTACK_TIME,
LIMITER_RELEASE_TIME,
LIMITER_RATIO,
LIMITER_THRESHOLD,
LIMITER_POST_GAIN,
- LIMITER_MAX_NUM,
};
-using LimiterConfigTestAdditional = std::array<float, LIMITER_MAX_NUM>;
-// attackTime, releaseTime, ratio, thresh, postGain
-static constexpr std::array<LimiterConfigTestAdditional, 4> kLimiterConfigTestAdditionalParam = {
- {{-1, -60, -2.5, -2, -3.14},
- {-1, 60, -2.5, 2, -3.14},
- {1, -60, 2.5, -2, 3.14},
- {1, 60, 2.5, -2, 3.14}}};
using LimiterConfigTestParams = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>,
- int32_t, bool, int32_t, LimiterConfigTestAdditional>;
+ int32_t, int32_t, float, float, float, float, float>;
-void fillLimiterConfig(DynamicsProcessing::LimiterConfig& cfg,
+void fillLimiterConfig(std::vector<DynamicsProcessing::LimiterConfig>& cfg,
const LimiterConfigTestParams& params) {
- const std::array<float, LIMITER_MAX_NUM> additional = std::get<LIMITER_ADDITIONAL>(params);
- cfg.channel = std::get<LIMITER_CHANNEL>(params);
- cfg.enable = std::get<LIMITER_ENABLE>(params);
- cfg.linkGroup = std::get<LIMITER_LINK_GROUP>(params);
- cfg.attackTimeMs = additional[LIMITER_ATTACK_TIME];
- cfg.releaseTimeMs = additional[LIMITER_RELEASE_TIME];
- cfg.ratio = additional[LIMITER_RATIO];
- cfg.thresholdDb = additional[LIMITER_THRESHOLD];
- cfg.postGainDb = additional[LIMITER_POST_GAIN];
+ fillLimiterConfig(cfg, std::get<LIMITER_CHANNEL>(params), true,
+ std::get<LIMITER_LINK_GROUP>(params), std::get<LIMITER_ATTACK_TIME>(params),
+ std::get<LIMITER_RELEASE_TIME>(params), std::get<LIMITER_RATIO>(params),
+ std::get<LIMITER_THRESHOLD>(params), std::get<LIMITER_POST_GAIN>(params));
}
class DynamicsProcessingTestLimiterConfig
@@ -607,7 +624,7 @@
public:
DynamicsProcessingTestLimiterConfig()
: DynamicsProcessingTestHelper(std::get<LIMITER_INSTANCE_NAME>(GetParam())) {
- fillLimiterConfig(mCfg, GetParam());
+ fillLimiterConfig(mLimiterConfigList, GetParam());
}
void SetUp() override { SetUpDynamicsProcessingEffect(); }
@@ -615,36 +632,193 @@
void TearDown() override { TearDownDynamicsProcessingEffect(); }
DynamicsProcessing::LimiterConfig mCfg;
+ std::vector<DynamicsProcessing::LimiterConfig> mLimiterConfigList;
};
TEST_P(DynamicsProcessingTestLimiterConfig, SetAndGetLimiterConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
- EXPECT_NO_FATAL_FAILURE(addLimiterConfig({mCfg}));
- SetAndGetDynamicsProcessingParameters();
+ EXPECT_NO_FATAL_FAILURE(addLimiterConfig(mLimiterConfigList));
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestLimiterConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 1, 2), // channel count
- testing::Bool(), // enable
- testing::Values(3), // link group
- testing::ValuesIn(kLimiterConfigTestAdditionalParam)), // Additional
+ testing::Values(-1, 0, 1, 2), // channel index
+ testing::Values(3), // link group
+ testing::Values(-1, 1), // attackTime
+ testing::Values(-60, 60), // releaseTime
+ testing::Values(-2.5, 2.5), // ratio
+ testing::Values(-2, 2), // thresh
+ testing::Values(-3.14, 3.14) // postGain
+ ),
[](const auto& info) {
auto descriptor = std::get<LIMITER_INSTANCE_NAME>(info.param).second;
- DynamicsProcessing::LimiterConfig cfg;
+ std::vector<DynamicsProcessing::LimiterConfig> cfg;
fillLimiterConfig(cfg, info.param);
- std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
- descriptor.common.name + "_UUID_" +
- toString(descriptor.common.id.uuid) + "_limiterConfig_" +
- cfg.toString();
+ std::string name =
+ "Implementer_" + getPrefix(descriptor) + "_limiterConfig_" + cfg[0].toString();
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
});
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingTestLimiterConfig);
+using LimiterConfigDataTestParams = std::pair<std::shared_ptr<IFactory>, Descriptor>;
+
+class DynamicsProcessingLimiterConfigDataTest
+ : public ::testing::TestWithParam<LimiterConfigDataTestParams>,
+ public DynamicsProcessingTestHelper {
+ public:
+ DynamicsProcessingLimiterConfigDataTest()
+ : DynamicsProcessingTestHelper(GetParam(), AudioChannelLayout::LAYOUT_MONO) {
+ mBufferSize = kFrameCount * mChannelCount;
+ mInput.resize(mBufferSize);
+ generateSineWave(1000 /*Input Frequency*/, mInput);
+ mInputDb = calculateDb(mInput);
+ }
+
+ void SetUp() override {
+ SetUpDynamicsProcessingEffect();
+ SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
+ }
+
+ void TearDown() override { TearDownDynamicsProcessingEffect(); }
+
+ float calculateDb(std::vector<float> input, size_t start = 0) {
+ return audio_utils_compute_power_mono(input.data() + start, AUDIO_FORMAT_PCM_FLOAT,
+ input.size() - start);
+ }
+
+ void computeThreshold(float ratio, float outputDb, float& threshold) {
+ EXPECT_NE(ratio, 0);
+ threshold = (mInputDb - (ratio * outputDb)) / (1 - ratio);
+ }
+
+ void computeRatio(float threshold, float outputDb, float& ratio) {
+ float inputOverThreshold = mInputDb - threshold;
+ float outputOverThreshold = outputDb - threshold;
+ EXPECT_NE(outputOverThreshold, 0);
+ ratio = inputOverThreshold / outputOverThreshold;
+ }
+
+ void setParamsAndProcess(std::vector<float>& output) {
+ EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
+ EXPECT_NO_FATAL_FAILURE(addLimiterConfig(mLimiterConfigList));
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
+ if (isAllParamsValid()) {
+ ASSERT_NO_FATAL_FAILURE(
+ processAndWriteToOutput(mInput, output, mEffect, &mOpenEffectReturn));
+ EXPECT_GT(output.size(), kStartIndex);
+ }
+ cleanUpLimiterConfig();
+ }
+
+ void cleanUpLimiterConfig() {
+ CleanUp();
+ mLimiterConfigList.clear();
+ }
+ static constexpr float kDefaultLinkerGroup = 3;
+ static constexpr float kDefaultAttackTime = 0;
+ static constexpr float kDefaultReleaseTime = 0;
+ static constexpr float kDefaultRatio = 4;
+ static constexpr float kDefaultThreshold = 0;
+ static constexpr float kDefaultPostGain = 0;
+ static constexpr int kInputFrequency = 1000;
+ static constexpr size_t kStartIndex = 15 * kSamplingFrequency / 1000; // skip 15ms
+ std::vector<DynamicsProcessing::LimiterConfig> mLimiterConfigList;
+ std::vector<float> mInput;
+ float mInputDb;
+ int mBufferSize;
+};
+
+TEST_P(DynamicsProcessingLimiterConfigDataTest, IncreasingThresholdDb) {
+ std::vector<float> thresholdValues = {-200, -150, -100, -50, -5, 0};
+ std::vector<float> output(mInput.size());
+ float previousThreshold = -FLT_MAX;
+ for (float threshold : thresholdValues) {
+ for (int i = 0; i < mChannelCount; i++) {
+ fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, kDefaultRatio, threshold, kDefaultPostGain);
+ }
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+ if (threshold >= mInputDb || kDefaultRatio == 1) {
+ EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ } else {
+ float calculatedThreshold = 0;
+ EXPECT_NO_FATAL_FAILURE(computeThreshold(kDefaultRatio, outputDb, calculatedThreshold));
+ ASSERT_GT(calculatedThreshold, previousThreshold);
+ previousThreshold = calculatedThreshold;
+ }
+ }
+}
+
+TEST_P(DynamicsProcessingLimiterConfigDataTest, IncreasingRatio) {
+ std::vector<float> ratioValues = {1, 10, 20, 30, 40, 50};
+ std::vector<float> output(mInput.size());
+ float threshold = -10;
+ float previousRatio = 0;
+ for (float ratio : ratioValues) {
+ for (int i = 0; i < mChannelCount; i++) {
+ fillLimiterConfig(mLimiterConfigList, i, true, kDefaultLinkerGroup, kDefaultAttackTime,
+ kDefaultReleaseTime, ratio, threshold, kDefaultPostGain);
+ }
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ float outputDb = calculateDb(output, kStartIndex);
+
+ if (threshold >= mInputDb) {
+ EXPECT_EQ(std::round(mInputDb), std::round(outputDb));
+ } else {
+ float calculatedRatio = 0;
+ EXPECT_NO_FATAL_FAILURE(computeRatio(threshold, outputDb, calculatedRatio));
+ ASSERT_GT(calculatedRatio, previousRatio);
+ previousRatio = calculatedRatio;
+ }
+ }
+}
+
+TEST_P(DynamicsProcessingLimiterConfigDataTest, LimiterEnableDisable) {
+ std::vector<bool> limiterEnableValues = {false, true};
+ std::vector<float> output(mInput.size());
+ for (bool isEnabled : limiterEnableValues) {
+ for (int i = 0; i < mChannelCount; i++) {
+ // Set non-default values
+ fillLimiterConfig(mLimiterConfigList, i, isEnabled, kDefaultLinkerGroup,
+ 5 /*attack time*/, 5 /*release time*/, 10 /*ratio*/,
+ -10 /*threshold*/, 5 /*postgain*/);
+ }
+ EXPECT_NO_FATAL_FAILURE(setParamsAndProcess(output));
+ if (!isAllParamsValid()) {
+ continue;
+ }
+ if (isEnabled) {
+ EXPECT_NE(mInputDb, calculateDb(output, kStartIndex));
+ } else {
+ EXPECT_NEAR(mInputDb, calculateDb(output, kStartIndex), 0.05);
+ }
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(DynamicsProcessingTest, DynamicsProcessingLimiterConfigDataTest,
+ testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
+ [](const auto& info) {
+ auto descriptor = info.param;
+ std::string name = getPrefix(descriptor.second);
+ std::replace_if(
+ name.begin(), name.end(),
+ [](const char c) { return !std::isalnum(c); }, '_');
+ return name;
+ });
+
/**
* Test DynamicsProcessing ChannelConfig
*/
@@ -673,19 +847,19 @@
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetPreEqChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetPostEqChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestChannelConfig, SetAndGetMbcChannelConfig) {
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(mCfg));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
@@ -715,12 +889,11 @@
enum EqBandConfigTestParamName {
EQ_BAND_INSTANCE_NAME,
EQ_BAND_CHANNEL,
- EQ_BAND_ENABLE,
EQ_BAND_CUT_OFF_FREQ,
EQ_BAND_GAIN
};
using EqBandConfigTestParams = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
- bool, std::vector<std::pair<int, float>>, float>;
+ std::vector<std::pair<int, float>>, float>;
void fillEqBandConfig(std::vector<DynamicsProcessing::EqBandConfig>& cfgs,
const EqBandConfigTestParams& params) {
@@ -730,7 +903,7 @@
for (int i = 0; i < bandCount; i++) {
cfgs[i].channel = std::get<EQ_BAND_CHANNEL>(params);
cfgs[i].band = cutOffFreqs[i].first;
- cfgs[i].enable = std::get<EQ_BAND_ENABLE>(params);
+ cfgs[i].enable = true /*Eqband Enable*/;
cfgs[i].cutoffFrequencyHz = cutOffFreqs[i].second;
cfgs[i].gainDb = std::get<EQ_BAND_GAIN>(params);
}
@@ -761,7 +934,7 @@
}
EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPreEqBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
TEST_P(DynamicsProcessingTestEqBandConfig, SetAndGetPostEqBandConfig) {
@@ -774,7 +947,7 @@
}
EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPostEqBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
std::vector<std::vector<std::pair<int, float>>> kBands{
@@ -825,9 +998,8 @@
DynamicsProcessingTest, DynamicsProcessingTestEqBandConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 10), // channel ID
- testing::Bool(), // band enable
- testing::ValuesIn(kBands), // cut off frequencies
+ testing::Values(-1, 0, 10), // channel index
+ testing::ValuesIn(kBands), // band index, cut off frequencies
testing::Values(-3.14f, 3.14f) // gain
),
[](const auto& info) {
@@ -851,7 +1023,6 @@
enum MbcBandConfigParamName {
MBC_BAND_INSTANCE_NAME,
MBC_BAND_CHANNEL,
- MBC_BAND_ENABLE,
MBC_BAND_CUTOFF_FREQ,
MBC_BAND_ADDITIONAL
};
@@ -877,7 +1048,7 @@
{3, 10, 2, -2, -5, 90, 2.5, 2, 2}}};
using TestParamsMbcBandConfig =
- std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t, bool,
+ std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
std::vector<std::pair<int, float>>, TestParamsMbcBandConfigAdditional>;
void fillMbcBandConfig(std::vector<DynamicsProcessing::MbcBandConfig>& cfgs,
@@ -890,7 +1061,7 @@
cfgs[i] = DynamicsProcessing::MbcBandConfig{
.channel = std::get<MBC_BAND_CHANNEL>(params),
.band = cutOffFreqs[i].first,
- .enable = std::get<MBC_BAND_ENABLE>(params),
+ .enable = true /*Mbc Band Enable*/,
.cutoffFrequencyHz = cutOffFreqs[i].second,
.attackTimeMs = additional[MBC_ADD_ATTACK_TIME],
.releaseTimeMs = additional[MBC_ADD_RELEASE_TIME],
@@ -930,16 +1101,15 @@
}
EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addMbcBandConfigs(mCfgs));
- SetAndGetDynamicsProcessingParameters();
+ ASSERT_NO_FATAL_FAILURE(SetAndGetDynamicsProcessingParameters());
}
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestMbcBandConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
- testing::Values(-1, 0, 10), // channel count
- testing::Bool(), // enable
- testing::ValuesIn(kBands), // cut off frequencies
+ testing::Values(-1, 0, 10), // channel index
+ testing::ValuesIn(kBands), // band index, cut off frequencies
testing::ValuesIn(kMbcBandConfigAdditionalParam)), // Additional
[](const auto& info) {
auto descriptor = std::get<MBC_BAND_INSTANCE_NAME>(info.param).second;
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
index a0ef4a9..c7bfdbc 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/AlertUrgency.aidl
@@ -46,7 +46,7 @@
PAST,
/**
- * Unknown rgency.
+ * Unknown urgency.
*/
UNKNOWN,
}
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/Coordinate.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/Coordinate.aidl
index b881534..9c9680b 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/Coordinate.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/Coordinate.aidl
@@ -34,7 +34,7 @@
/**
* Longitude of the cooridinate.
*
- * <p>Longitude is in the range of -90 to 90.
+ * <p>Longitude is in the range of -180 to 180.
*/
double longitude;
}
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/Geocode.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/Geocode.aidl
index f0162ca..ca98154 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/Geocode.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/Geocode.aidl
@@ -17,9 +17,10 @@
package android.hardware.broadcastradio;
/**
- * Geographic code reprensenting location in alert message
+ * Geographic code reprensenting location in alert message.
*
- * <p>(see ITU-T X.1303 bis for more info).
+ * <p>Geocode is mainly for information display instead of parsing on radio application side. See
+ * ITU-T X.1303 bis for more info.
*/
@VintfStability
@JavaDerive(equals=true, toString=true)
diff --git a/common/aidl/Android.bp b/common/aidl/Android.bp
index 904a3d9..0ce52e7 100644
--- a/common/aidl/Android.bp
+++ b/common/aidl/Android.bp
@@ -26,7 +26,7 @@
],
},
cpp: {
- enabled: false,
+ enabled: true,
},
ndk: {
apex_available: [
diff --git a/common/fmq/aidl/Android.bp b/common/fmq/aidl/Android.bp
index 4a3658e..7fb6368 100644
--- a/common/fmq/aidl/Android.bp
+++ b/common/fmq/aidl/Android.bp
@@ -28,9 +28,8 @@
sdk_version: "module_current",
},
cpp: {
- // FMQ will not be supported in the cpp backend because the parcelables
- // are not stable enough for use in shared memory
- enabled: false,
+ // FMQ is only supported for PODs with the cpp backend
+ enabled: true,
},
ndk: {
apex_available: [
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index eabb603..20fa105 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -167,6 +167,8 @@
"android.hardware.audio.core.sounddose@1",
"android.hardware.audio.core.sounddose@2",
"android.hardware.audio.core.sounddose@3",
+ // This is only used by a trusty VM
+ "android.hardware.security.see.authmgr@1",
// Deprecated HALs.
"android.hardware.audio.sounddose@3",
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
index 24192a1..83f73c3 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
@@ -323,9 +323,6 @@
* (nullable). Null indicates a fully custom marshalling scheme. The value should match
* a published descriptor for both destination and initiator.
*
- * @return An integer identifying the session, the integer can be used to present
- * the tuple of (destination, initiator, serviceDescriptor).
- *
* @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
* arguments is invalid.
* @throws EX_SERVICE_SPECIFIC on other errors
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
deleted file mode 100644
index ffe2c3f..0000000
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable GalileoAlmanac {
- long issueDate;
- int weekNumber;
- int toa;
- int iod;
- android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GalileoSatelliteAlmanac {
- int svId;
- android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoAlmanacSvHealth svHealth;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- int weekNumber;
- int toa;
- int iod;
- }
- @VintfStability
- parcelable GalileoAlmanacSvHealth {
- int fNavE5a;
- int iNavE5b;
- int iNavE1b;
- }
-}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
similarity index 90%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
rename to gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
index 6c645a6..b986be4 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -34,13 +34,15 @@
package android.hardware.gnss.gnss_assistance;
/* @hide */
@VintfStability
-parcelable QzssAlmanac {
- int qzssWeekNumber;
- int secondsOfQzssWeek;
- android.hardware.gnss.gnss_assistance.QzssAlmanac.QzssSatelliteAlmanac[] satelliteAlmanac;
+parcelable GnssAlmanac {
+ long issueDateMs;
+ int iod;
+ int weekNumber;
+ int toaSeconds;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac.GnssSatelliteAlmanac[] satelliteAlmanac;
@VintfStability
- parcelable QzssSatelliteAlmanac {
- int prn;
+ parcelable GnssSatelliteAlmanac {
+ int svid;
int svHealth;
double eccentricity;
double inclination;
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index 98383ac..5f8fee7 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -36,10 +36,10 @@
@VintfStability
parcelable GnssAssistance {
android.hardware.gnss.gnss_assistance.GnssAssistance.GpsAssistance gpsAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.GlonassAssistance gloAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.GalileoAssistance galAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.BeidouAssistance bdsAssistance;
- android.hardware.gnss.gnss_assistance.GnssAssistance.QzssAssistance qzsAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.GlonassAssistance glonassAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.GalileoAssistance galileoAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.BeidouAssistance beidouAssistance;
+ android.hardware.gnss.gnss_assistance.GnssAssistance.QzssAssistance qzssAssistance;
@VintfStability
parcelable GnssSatelliteCorrections {
int svid;
@@ -47,7 +47,7 @@
}
@VintfStability
parcelable GpsAssistance {
- android.hardware.gnss.gnss_assistance.GpsAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -58,7 +58,7 @@
}
@VintfStability
parcelable GalileoAssistance {
- android.hardware.gnss.gnss_assistance.GalileoAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.GalileoIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -77,7 +77,7 @@
}
@VintfStability
parcelable QzssAssistance {
- android.hardware.gnss.gnss_assistance.QzssAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
@@ -88,7 +88,7 @@
}
@VintfStability
parcelable BeidouAssistance {
- android.hardware.gnss.gnss_assistance.BeidouAlmanac almanac;
+ android.hardware.gnss.gnss_assistance.GnssAlmanac almanac;
android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel;
android.hardware.gnss.gnss_assistance.UtcModel utcModel;
android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel;
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
deleted file mode 100644
index 1df485e..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.gnss.gnss_assistance;
-
-/**
- * Contains Beidou almanac data.
- * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15.
- *
- * @hide
- */
-@VintfStability
-parcelable BeidouAlmanac {
- /**
- * Contains Beidou satellite almanac data.
- * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15.
- */
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- /** The PRN number of the Beidou satellite. */
- int prn;
-
- /** Satellite health (0=healthy, 1=unhealthy). */
- int svHealth;
-
- /** Almanac reference time in seconds. */
- int toaSeconds;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at reference time
- * in semi-circles.
- */
- double deltaI;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Beidou week number. */
- int beidouWeekNumber;
-
- /** Array of BeidouSatelliteAlmanac. */
- BeidouSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
index 025f402..48398ef 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl
@@ -67,7 +67,7 @@
*/
int aode;
- /** Beidou week number. */
+ /** Beidou week number without rollover. */
int weekNumber;
/**
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
deleted file mode 100644
index db5dd04..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.gnss.gnss_assistance;
-
-/**
- * Contains Galileo almanac data.
- * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10.
- *
- * @hide
- */
-@VintfStability
-parcelable GalileoAlmanac {
- /**
- * Contains Galileo satellite almanac data.
- * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10.
- */
- @VintfStability
- parcelable GalileoSatelliteAlmanac {
- /** Satellite ID. */
- int svId;
-
- /** Satellite health status. */
- GalileoAlmanacSvHealth svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Difference between the inclination angle at reference time and the
- * nominal inclination, in semi-circles.
- */
- double deltaI;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /**
- * Difference with respect to the square root of the nominal semi-major axis
- * in square root of meters.
- */
- double rootA;
-
- /** Satellite mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock correction bias in seconds. */
- double af0;
-
- /** Satellite clock correction linear in seconds per second. */
- double af1;
-
- /**
- * Almanac reference week number.
- * Modulo 4 representation of the Galileo system time week number.
- */
- int weekNumber;
-
- /** Almanac reference time in seconds. */
- int toa;
-
- /** Almanac issue of data. */
- int iod;
- }
-
- /**
- * Contains Galileo satellite health status.
- */
- @VintfStability
- parcelable GalileoAlmanacSvHealth {
- /** Satellite E5a signal health status. */
- int fNavE5a;
-
- /** Satellite E5b signal health status. */
- int iNavE5b;
-
- /** Satellite E1b signal health status. */
- int iNavE1b;
- }
-
- /** Almanac reference UTC time in milliseconds */
- long issueDate;
-
- /**
- * Almanac reference week number.
- * Modulo 4 representation of the Galileo system time week number.
- */
- int weekNumber;
-
- /** Almanac reference time in seconds. */
- int toa;
-
- /** Almanac issue of data. */
- int iod;
-
- /** Array of GalileoSatelliteAlmanac. */
- GalileoSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
new file mode 100644
index 0000000..e4f4bc8
--- /dev/null
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAlmanac.aidl
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss.gnss_assistance;
+
+/**
+ * Contains almanac parameters for GPS, QZSS, Galileo, Beidou.
+ *
+ * For Beidou, this is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.15.
+ * For GPS, this is defined in IS-GPS-200 section 20.3.3.5.1.2.
+ * For QZSS, this is defined in IS-QZSS-PNT section 4.1.2.6.
+ * For Galileo, this is defined in Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ *
+ * @hide
+ */
+@VintfStability
+parcelable GnssAlmanac {
+ /**
+ * Almanac issue date in milliseconds since the Unix epoch.
+ *
+ * This is unused for GPS/QZSS/Baidou.
+ */
+ long issueDateMs;
+
+ /**
+ * Almanac issue of data.
+ * This is defined Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ * This is unused for GPS/QZSS/Baidou.
+ */
+ int iod;
+
+ /**
+ * Almanac reference week number.
+ *
+ * For GPS and QZSS, this is GPS week number (modulo 1024).
+ * For Beidou, this is Baidou week number (modulo 8192).
+ * For Galileo, this is modulo 4 representation of the Galileo week number.
+ */
+ int weekNumber;
+
+ /** Almanac reference time in seconds. */
+ int toaSeconds;
+
+ /**
+ * Contains almanac parameters for GPS, QZSS, Galileo, Beidou.
+ *
+ * For Beidou, this is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.15.
+ * For GPS, this is defined in IS-GPS-200 section 20.3.3.5.1.2.
+ * For QZSS, this is defined in IS-QZSS-PNT section 4.1.2.6.
+ * For Galileo, this is defined in Galileo-OS-SIS-ICD-v2.1 section 5.1.10.
+ */
+ @VintfStability
+ parcelable GnssSatelliteAlmanac {
+ /** The PRN number of the GNSS satellite. */
+ int svid;
+
+ /**
+ * Satellite health information.
+ *
+ * For GPS, this is satellite subframe 4 and 5, page 25 6-bit health code as defined in
+ * IS-GPS-200 Table 20-VIII expressed in integer form.
+ *
+ * For QZSS, this is the 5-bit health code as defined in IS-QZSS-PNT, Table 4.1.2-5-2
+ * expressed in integer form.
+ *
+ * For Beidou, this is 1-bit health information. (0=healthy, 1=unhealthy).
+ *
+ * For Galileo, this is 6-bit health, bit 0 and 1 is for E5a, bit 2 and 3 is for E5b, bit
+ * 4 and 5 is for E1b.
+ */
+ int svHealth;
+
+ /** Eccentricity. */
+ double eccentricity;
+
+ /**
+ * Inclination in semi-circles.
+ *
+ * For GPS and Galileo, this is the difference between the inclination angle at reference
+ * time and the nominal inclination in semi-circles.
+ *
+ * For Beidou and QZSS, this is the inclination angle at reference time in semi-circles.
+ */
+ double inclination;
+
+ /** Argument of perigee in semi-circles. */
+ double omega;
+
+ /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
+ double omega0;
+
+ /** Rate of right ascension in semi-circles per second. */
+ double omegaDot;
+
+ /**
+ * Square root of semi-major axis in square root of meters.
+ *
+ * For Galileo, this is the difference with respect to the square root of the nominal
+ * semi-major axis in square root of meters.
+ */
+ double rootA;
+
+ /** Mean anomaly at reference time in semi-circles. */
+ double m0;
+
+ /** Satellite clock time bias correction coefficient in seconds. */
+ double af0;
+
+ /** Satellite clock time drift correction coefficient in seconds per second. */
+ double af1;
+ }
+
+ /** Array of GnssSatelliteAlmanac. */
+ GnssSatelliteAlmanac[] satelliteAlmanac;
+}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
index dad0764..ddff848 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl
@@ -16,19 +16,16 @@
package android.hardware.gnss.gnss_assistance;
-import android.hardware.gnss.gnss_assistance.BeidouAlmanac;
import android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris;
-import android.hardware.gnss.gnss_assistance.GalileoAlmanac;
import android.hardware.gnss.gnss_assistance.GalileoIonosphericModel;
import android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.GlonassAlmanac;
import android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris;
-import android.hardware.gnss.gnss_assistance.GpsAlmanac;
+import android.hardware.gnss.gnss_assistance.GnssAlmanac;
import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.IonosphericCorrection;
import android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel;
import android.hardware.gnss.gnss_assistance.LeapSecondsModel;
-import android.hardware.gnss.gnss_assistance.QzssAlmanac;
import android.hardware.gnss.gnss_assistance.QzssSatelliteEphemeris;
import android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel;
import android.hardware.gnss.gnss_assistance.TimeModel;
@@ -65,7 +62,7 @@
@VintfStability
parcelable GpsAssistance {
/** The GPS almanac. */
- GpsAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -93,7 +90,7 @@
@VintfStability
parcelable GalileoAssistance {
/** The Galileo almanac. */
- GalileoAlmanac almanac;
+ GnssAlmanac almanac;
/** The Galileo ionospheric model. */
GalileoIonosphericModel ionosphericModel;
@@ -140,7 +137,7 @@
@VintfStability
parcelable QzssAssistance {
/** The QZSS almanac. */
- QzssAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -168,7 +165,7 @@
@VintfStability
parcelable BeidouAssistance {
/** The Beidou almanac. */
- BeidouAlmanac almanac;
+ GnssAlmanac almanac;
/** The Klobuchar ionospheric model. */
KlobucharIonosphericModel ionosphericModel;
@@ -196,14 +193,14 @@
GpsAssistance gpsAssistance;
/** Glonass assistance. */
- GlonassAssistance gloAssistance;
+ GlonassAssistance glonassAssistance;
/** Galileo assistance. */
- GalileoAssistance galAssistance;
+ GalileoAssistance galileoAssistance;
/** Beidou assistance. */
- BeidouAssistance bdsAssistance;
+ BeidouAssistance beidouAssistance;
/** QZSS assistance. */
- QzssAssistance qzsAssistance;
+ QzssAssistance qzssAssistance;
}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
deleted file mode 100644
index 9cc37f9..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.gnss.gnss_assistance;
-
-/**
- * Contains GPS almanac data.
- * This is defined in IS-GPS-200, section 20.3.3.5.1.2.
- *
- * @hide
- */
-@VintfStability
-parcelable GpsAlmanac {
- /** GPS week number. */
- int gpsWeekNumber;
-
- /** GPS time of week in seconds. */
- int secondsOfGpsWeek;
-
- /**
- * Contains GPS satellite almanac data.
- * This is defined in IS-GPS-200, section 20.3.3.5.1.2.
- */
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- /** The PRN number of the GPS satellite. */
- int prn;
-
- /**
- * Satellite health information.
- * The satellite subframe 4 and 5, page 25 six-bit health code as defined
- * in IS-GPS-200 Table 20-VIII expressed in integer form.
- */
- int svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at
- * reference time in semi-circles.
- */
- double inclination;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Array of GpsSatelliteAlmanac. */
- GpsSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
index 15003e7..441b61d 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl
@@ -33,25 +33,25 @@
/** Eccentricity. */
double eccentricity;
- /** Inclination angle at reference time in semi-circles. */
+ /** Inclination angle at reference time in radians. */
double i0;
- /** Rate of change of inclination angle in semi-circles per second. */
+ /** Rate of change of inclination angle in radians per second. */
double iDot;
- /** Argument of perigee in semi-circles. */
+ /** Argument of perigee in radians. */
double omega;
- /** Longitude of ascending node of orbit plane at beginning of week in semi-circles. */
+ /** Longitude of ascending node of orbit plane at beginning of week in radians. */
double omega0;
- /** Rate of right ascension in semi-circles per second. */
+ /** Rate of right ascension in radians per second. */
double omegaDot;
- /** Mean anomaly at reference time in semi-circles. */
+ /** Mean anomaly at reference time in radians. */
double m0;
- /** Mean motion difference from computed value in semi-circles per second. */
+ /** Mean motion difference from computed value in radians per second. */
double deltaN;
/**
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
deleted file mode 100644
index 80ace39..0000000
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.gnss.gnss_assistance;
-
-/**
- * Contains QZSS almanac data.
- * This is defined in IS-QZSS-PNT, section 4.1.2.6.
- *
- * @hide
- */
-@VintfStability
-parcelable QzssAlmanac {
- /** QZSS week number. */
- int qzssWeekNumber;
-
- /** QZSS time of week in seconds. */
- int secondsOfQzssWeek;
-
- /**
- * Contains QZSS satellite almanac data.
- * This is defined in IS-QZSS-PNT, section 4.1.2.6.
- */
- @VintfStability
- parcelable QzssSatelliteAlmanac {
- /** The PRN number of the QZSS satellite. */
- int prn;
-
- /**
- * Satellite health information.
- * This is the 5-bit health code as defined in IS-QZSS-PNT, Table 4.1.2-5-2
- * expressed in integer form.
- */
- int svHealth;
-
- /** Eccentricity. */
- double eccentricity;
-
- /**
- * Correction of inclination angle relative to reference value at
- * reference time in semi-circles.
- */
- double inclination;
-
- /** Argument of perigee in semi-circles. */
- double omega;
-
- /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */
- double omega0;
-
- /** Rate of right ascension in semi-circles per second. */
- double omegaDot;
-
- /** Square root of semi-major axis in square root of meters. */
- double rootA;
-
- /** Mean anomaly at reference time in semi-circles. */
- double m0;
-
- /** Satellite clock time bias correction coefficient in seconds. */
- double af0;
-
- /** Satellite clock time drift correction coefficient in seconds per second. */
- double af1;
- }
-
- /** Array of QzssSatelliteAlmanac. */
- QzssSatelliteAlmanac[] satelliteAlmanac;
-}
diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
index 2d9b3e6..8849401 100644
--- a/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
+++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl
@@ -28,7 +28,7 @@
/** The issue of ephemeris data. */
int iode;
- /** The satellite week number. */
+ /** The satellite week number without rollover. */
int weekNumber;
/** The broadcast time of ephemeris in GNSS time of week in seconds. */
diff --git a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index c807ffd..f779105 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -23,23 +23,23 @@
@Backing(type="int")
enum DisplayHotplugEvent {
/**
- * Display is successfully connected.
- * Connected may be called more than once and the behavior of subsequent
- * calls is that SurfaceFlinger queries the display properties again.
+ * Display was successfully connected.
+ * CONNECTED may be emitted more than once and the behavior of subsequent
+ * events is that SurfaceFlinger queries the display properties again.
*/
CONNECTED = 0,
- /** Display is successfully disconnected */
+ /** Display was successfully disconnected */
DISCONNECTED = 1,
- /** Display is plugged in, but an unknown error occurred */
+ /** Unknown error occurred */
ERROR_UNKNOWN = -1,
- /** Display is plugged in, but incompatible cable error detected */
+ /** Display was plugged in, but incompatible cable error detected */
ERROR_INCOMPATIBLE_CABLE = -2,
/**
- * Display is plugged in, but exceeds the max number of
+ * Display was plugged in, but exceeds the max number of
* displays that can be simultaneously connected
*/
ERROR_TOO_MANY_DISPLAYS = -3,
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl
index a0cc9b0..06f2dde 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl
@@ -36,4 +36,5 @@
parcelable DisplayIdentification {
byte port;
byte[] data;
+ android.hardware.graphics.composer3.ScreenPartStatus screenPartStatus = android.hardware.graphics.composer3.ScreenPartStatus.UNSUPPORTED;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index 55604a6..adbc344 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -88,6 +88,7 @@
android.hardware.graphics.composer3.DisplayConfiguration[] getDisplayConfigurations(long display, int maxFrameIntervalNs);
oneway void notifyExpectedPresent(long display, in android.hardware.graphics.composer3.ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
int getMaxLayerPictureProfiles(long display);
+ oneway void startHdcpNegotiation(long display, in android.hardware.drm.HdcpLevels levels);
const int EX_BAD_CONFIG = 1;
const int EX_BAD_DISPLAY = 2;
const int EX_BAD_LAYER = 3;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LutProperties.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LutProperties.aidl
index 6a4593a..9516351 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LutProperties.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LutProperties.aidl
@@ -46,5 +46,6 @@
enum SamplingKey {
RGB,
MAX_RGB,
+ CIE_Y,
}
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ScreenPartStatus.aidl
similarity index 72%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ScreenPartStatus.aidl
index 60e0b96..ff55370 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ScreenPartStatus.aidl
@@ -1,11 +1,11 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
+/**
+ * Copyright (c) 2024, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable GpsAlmanac {
- int gpsWeekNumber;
- int secondsOfGpsWeek;
- android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable GpsSatelliteAlmanac {
- int prn;
- int svHealth;
- double eccentricity;
- double inclination;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum ScreenPartStatus {
+ UNSUPPORTED = 0,
+ ORIGINAL = 1,
+ REPLACED = 2,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl
index 03ef8e6..a477eb6 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl
@@ -16,6 +16,7 @@
package android.hardware.graphics.composer3;
+import android.hardware.graphics.composer3.ScreenPartStatus;
/**
* Output parameters for IComposerClient.getDisplayIdentificationData
*/
@@ -29,4 +30,8 @@
* The EDID 1.3 blob identifying the display.
*/
byte[] data;
+ /**
+ * Indicator for part originality of the screen
+ */
+ ScreenPartStatus screenPartStatus = ScreenPartStatus.UNSUPPORTED;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index edbb988..b4d2e7f 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -16,6 +16,7 @@
package android.hardware.graphics.composer3;
+import android.hardware.drm.HdcpLevels;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.hardware.graphics.common.Hdr;
import android.hardware.graphics.common.HdrConversionCapability;
@@ -938,4 +939,21 @@
* pipeline, a value of zero should be returned here.
*/
int getMaxLayerPictureProfiles(long display);
+
+ /**
+ * Supports HDCP lazy activation.
+ *
+ * When SurfaceFlinger detects secure layers, this method is called to instruct HWC side that
+ * HDCP negotiation process can be started.
+ *
+ * When HDCP is successfully started or failed to start, HWC reports the HDCP levels via
+ * IComposerCallback.onHdcpLevelsChanged().
+ *
+ * @param display is the display whose HDCP negotiation can be started.
+ * @param levels is the desired HDCP levels.
+ *
+ * @see IComposerCallback.onHdcpLevelsChanged
+ *
+ */
+ oneway void startHdcpNegotiation(long display, in HdcpLevels levels);
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
index d3dd30e..5f436d9 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
@@ -42,7 +42,6 @@
* The implementations should use a sampling strategy
* at least as good as linear sampling.
*/
- // TODO(b/358422255): add sampling ways
- @VintfStability enum SamplingKey { RGB, MAX_RGB }
+ @VintfStability enum SamplingKey { RGB, MAX_RGB, CIE_Y }
SamplingKey[] samplingKeys;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
index 592ac50..393354e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
@@ -40,15 +40,16 @@
* For data precision, 32-bit float is used to specify a Lut by both the HWC and
* the platform.
*
- * For unflattening/flattening 3D Lut(s), the algorithm below should be observed
- * by both the HWC and the platform.
* Assuming that we have a 3D array `ORIGINAL[WIDTH, HEIGHT, DEPTH]`, we would turn it into
* `FLAT[WIDTH * HEIGHT * DEPTH]` by
*
* `FLAT[z + DEPTH * (y + HEIGHT * x)] = ORIGINAL[x, y, z]`
*
- * Noted that 1D Lut(s) should be gain curve ones
- * and 3D Lut(s) should be pure color lookup ones.
+ * Note that 1D Lut(s) should be gain curve ones and 3D Lut(s) should be pure color lookup
+ * ones. For 3D Luts buffer,the values of the lut buffer should be normalized, ranging from 0.0
+ * to 1.0, inclusively and the data is organized in the order of R, G, B channels.
+ * For 1D Luts, the lut's values should be also normalized for fixed point pixel formats,
+ * and we now ignore floating point pixel formats + extended range buffers.
*/
@nullable ParcelFileDescriptor pfd;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ScreenPartStatus.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ScreenPartStatus.aidl
new file mode 100644
index 0000000..48c1270
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ScreenPartStatus.aidl
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2024, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Information relating to internal screen panel part originality
+ */
+@VintfStability
+@Backing(type="int")
+enum ScreenPartStatus {
+ /**
+ * Device cannot differentiate an original screen from a replaced screen.
+ */
+ UNSUPPORTED = 0,
+ /**
+ * Device has the original screen it was manufactured with.
+ */
+ ORIGINAL = 1,
+ /**
+ * Device has a replaced screen.
+ */
+ REPLACED = 2,
+}
diff --git a/graphics/composer/aidl/vts/Android.bp b/graphics/composer/aidl/vts/Android.bp
index 894ca52..61c2593 100644
--- a/graphics/composer/aidl/vts/Android.bp
+++ b/graphics/composer/aidl/vts/Android.bp
@@ -71,6 +71,7 @@
"libarect",
"libbase",
"libfmq",
+ "libgmock",
"libgtest",
"libmath",
"librenderengine",
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 8006523..354e3e0 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -29,6 +29,7 @@
#include <android/hardware/graphics/composer3/ComposerClientWriter.h>
#include <binder/ProcessState.h>
#include <cutils/ashmem.h>
+#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <ui/Fence.h>
#include <ui/GraphicBuffer.h>
@@ -47,6 +48,8 @@
#undef LOG_TAG
#define LOG_TAG "VtsHalGraphicsComposer3_TargetTest"
+using testing::Ge;
+
namespace aidl::android::hardware::graphics::composer3::vts {
using namespace std::chrono_literals;
@@ -1265,6 +1268,16 @@
EXPECT_TRUE(status.isOk());
EXPECT_FALSE(displayConfigurations.empty());
+ const bool areAllModesARR =
+ std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
+ [](const auto& config) { return config.vrrConfig.has_value(); });
+
+ const bool areAllModesMRR =
+ std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
+ [](const auto& config) { return !config.vrrConfig.has_value(); });
+
+ EXPECT_TRUE(areAllModesARR || areAllModesMRR) << "Mixing MRR and ARR modes is not allowed";
+
for (const auto& displayConfig : displayConfigurations) {
EXPECT_NE(-1, displayConfig.width);
EXPECT_NE(-1, displayConfig.height);
@@ -1399,14 +1412,6 @@
}
}
-TEST_P(GraphicsComposerAidlV3Test, GetMaxLayerPictureProfiles) {
- for (const auto& display : mDisplays) {
- const auto& [status, maxPorfiles] =
- mComposerClient->getMaxLayerPictureProfiles(display.getDisplayId());
- EXPECT_TRUE(status.isOk());
- }
-}
-
// Tests for Command.
class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
protected:
@@ -3239,19 +3244,44 @@
});
}
-TEST_P(GraphicsComposerAidlCommandV3Test, getMaxLayerPictureProfiles_success) {
+class GraphicsComposerAidlCommandV4Test : public GraphicsComposerAidlCommandTest {
+ protected:
+ void SetUp() override {
+ GraphicsComposerAidlTest::SetUp();
+ if (getInterfaceVersion() <= 3) {
+ GTEST_SKIP() << "Device interface version is expected to be >= 4";
+ }
+ }
+};
+
+TEST_P(GraphicsComposerAidlCommandV4Test, getMaxLayerPictureProfiles_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
continue;
}
const auto& [status, maxProfiles] =
- mComposerClient->getMaxLayerPictureProfiles(getPrimaryDisplayId());
+ mComposerClient->getMaxLayerPictureProfiles(displayId);
EXPECT_TRUE(status.isOk());
+ EXPECT_THAT(maxProfiles, Ge(0));
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setDisplayPictureProfileId_success) {
+TEST_P(GraphicsComposerAidlCommandV4Test, getMaxLayerPictureProfiles_unsupported) {
+ for (auto& display : mDisplays) {
+ int64_t displayId = display.getDisplayId();
+ if (hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+ continue;
+ }
+ const auto& [status, maxProfiles] =
+ mComposerClient->getMaxLayerPictureProfiles(displayId);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_NO_FATAL_FAILURE(
+ assertServiceSpecificError(status, IComposerClient::EX_UNSUPPORTED));
+ }
+}
+
+TEST_P(GraphicsComposerAidlCommandV4Test, setDisplayPictureProfileId_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3262,7 +3292,7 @@
const auto layer = createOnScreenLayer(display);
const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
ASSERT_NE(nullptr, buffer->handle);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setDisplayPictureProfileId(displayId, PictureProfileId(1));
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
@@ -3271,7 +3301,7 @@
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_success) {
+TEST_P(GraphicsComposerAidlCommandV4Test, setLayerPictureProfileId_success) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3289,14 +3319,14 @@
ASSERT_NE(nullptr, buffer->handle);
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(1));
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
}
}
-TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_failsWithTooManyProfiles) {
+TEST_P(GraphicsComposerAidlCommandV4Test, setLayerPictureProfileId_failsWithTooManyProfiles) {
for (auto& display : mDisplays) {
int64_t displayId = display.getDisplayId();
if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
@@ -3315,7 +3345,7 @@
ASSERT_NE(nullptr, buffer->handle);
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
/*acquireFence*/ -1);
- // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+ // TODO(b/337330263): Lookup profile IDs from MediaQualityManager
writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(profileId));
}
execute();
@@ -3325,16 +3355,6 @@
}
}
-class GraphicsComposerAidlCommandV4Test : public GraphicsComposerAidlCommandTest {
- protected:
- void SetUp() override {
- GraphicsComposerAidlTest::SetUp();
- if (getInterfaceVersion() <= 3) {
- GTEST_SKIP() << "Device interface version is expected to be >= 4";
- }
- }
-};
-
TEST_P(GraphicsComposerAidlCommandV4Test, SetUnsupportedLayerLuts) {
auto& writer = getWriter(getPrimaryDisplayId());
const auto& [layerStatus, layer] =
diff --git a/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/NfcConfig.aidl b/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/NfcConfig.aidl
index 0261a0a..4fdfae8 100644
--- a/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/NfcConfig.aidl
+++ b/nfc/aidl/aidl_api/android.hardware.nfc/current/android/hardware/nfc/NfcConfig.aidl
@@ -50,4 +50,5 @@
byte[] offHostRouteEse;
byte defaultIsoDepRoute;
byte[] offHostSimPipeIds = {};
+ boolean t4tNfceeEnable;
}
diff --git a/nfc/aidl/android/hardware/nfc/NfcConfig.aidl b/nfc/aidl/android/hardware/nfc/NfcConfig.aidl
index 870cdbd..86eee8b 100644
--- a/nfc/aidl/android/hardware/nfc/NfcConfig.aidl
+++ b/nfc/aidl/android/hardware/nfc/NfcConfig.aidl
@@ -90,4 +90,8 @@
* Pipe IDs for UICC. Empty if not available
*/
byte[] offHostSimPipeIds = {};
+ /**
+ * T4T NFCEE feature configuration
+ */
+ boolean t4tNfceeEnable;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionData.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionData.aidl
index f42e1d0..9ab4818 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionData.aidl
@@ -31,25 +31,13 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.power;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable CompositionData {
+ long timestampNanos;
+ long[] scheduledPresentTimestampsNanos;
+ long latchTimestampNanos;
+ android.hardware.power.FrameProducer[] producers;
+ @nullable android.hardware.power.CompositionUpdate updateData;
+ long[] outputIds;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionUpdate.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionUpdate.aidl
index f42e1d0..a0c4b21 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CompositionUpdate.aidl
@@ -31,25 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.power;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable CompositionUpdate {
+ long timestampNanos;
+ android.hardware.power.FrameProducerUpdate[] producerUpdates;
+ long[] deadOutputIds;
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
index 09a2ace..de92105 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
@@ -34,9 +34,10 @@
package android.hardware.power;
@JavaDerive(equals=true, toString=true) @VintfStability
parcelable CpuHeadroomParams {
- android.hardware.power.CpuHeadroomParams.CalculationType calculationType;
- android.hardware.power.CpuHeadroomParams.SelectionType selectionType;
- int pid;
+ android.hardware.power.CpuHeadroomParams.CalculationType calculationType = android.hardware.power.CpuHeadroomParams.CalculationType.MIN;
+ int calculationWindowMillis = 1000;
+ android.hardware.power.CpuHeadroomParams.SelectionType selectionType = android.hardware.power.CpuHeadroomParams.SelectionType.ALL;
+ int[] tids;
enum CalculationType {
MIN,
AVERAGE,
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
index f42e1d0..9303906 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
@@ -31,25 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.power;
+@JavaDerive(equals=true, toString=true) @VintfStability
+union CpuHeadroomResult {
+ float globalHeadroom;
+ float[] perCoreHeadroom;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducer.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducer.aidl
index f42e1d0..0d9084b 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducer.aidl
@@ -31,25 +31,13 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.power;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable FrameProducer {
+ long producerId;
+ int uid;
+ double fps;
+ @nullable android.hardware.power.LatchedFrameData currentlyLatchedFrame;
+ boolean cpuDeadlineMissed;
+ boolean gpuDeadlineMissed;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducerUpdate.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducerUpdate.aidl
index f42e1d0..08ea3dc 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/FrameProducerUpdate.aidl
@@ -31,25 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.power;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable FrameProducerUpdate {
+ long producerId;
+ boolean isDead;
+ int[] sessions;
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomParams.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomParams.aidl
index 64bb4a4..6faa938 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomParams.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomParams.aidl
@@ -34,7 +34,8 @@
package android.hardware.power;
@JavaDerive(equals=true, toString=true) @VintfStability
parcelable GpuHeadroomParams {
- android.hardware.power.GpuHeadroomParams.CalculationType calculationType;
+ android.hardware.power.GpuHeadroomParams.CalculationType calculationType = android.hardware.power.GpuHeadroomParams.CalculationType.MIN;
+ int calculationWindowMillis = 1000;
enum CalculationType {
MIN,
AVERAGE,
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomResult.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomResult.aidl
index f42e1d0..bbd3d8b 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/GpuHeadroomResult.aidl
@@ -31,25 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.power;
+@JavaDerive(equals=true, toString=true) @VintfStability
+union GpuHeadroomResult {
+ float globalHeadroom;
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
index 10456cb..9d20ca1 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
@@ -44,8 +44,10 @@
android.hardware.power.ChannelConfig getSessionChannel(in int tgid, in int uid);
oneway void closeSessionChannel(in int tgid, in int uid);
android.hardware.power.SupportInfo getSupportInfo();
- float[] getCpuHeadroom(in android.hardware.power.CpuHeadroomParams params);
- float getGpuHeadroom(in android.hardware.power.GpuHeadroomParams params);
+ android.hardware.power.CpuHeadroomResult getCpuHeadroom(in android.hardware.power.CpuHeadroomParams params);
+ android.hardware.power.GpuHeadroomResult getGpuHeadroom(in android.hardware.power.GpuHeadroomParams params);
long getCpuHeadroomMinIntervalMillis();
long getGpuHeadroomMinIntervalMillis();
+ oneway void sendCompositionData(in android.hardware.power.CompositionData[] data);
+ oneway void sendCompositionUpdate(in android.hardware.power.CompositionUpdate update);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/LatchedFrameData.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/LatchedFrameData.aidl
index f42e1d0..01ce157 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/LatchedFrameData.aidl
@@ -31,25 +31,13 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.power;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable LatchedFrameData {
+ long frameStartTimestampNanos;
+ long intendedPresentTimestampNanos;
+ long bufferSubmissionTimestampNanos;
+ long gpuSignalTimestampNanos;
+ boolean usedGpu;
+ @nullable ParcelFileDescriptor gpuAcquireFence;
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
index ffa790d..448dbb3 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
@@ -36,4 +36,6 @@
enum SessionMode {
POWER_EFFICIENCY,
GRAPHICS_PIPELINE,
+ AUTO_CPU,
+ AUTO_GPU,
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
index 85da2fc..9609169 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
@@ -40,4 +40,12 @@
long sessionHints;
long sessionModes;
long sessionTags;
+ android.hardware.power.SupportInfo.CompositionDataSupportInfo compositionData;
+ @VintfStability
+ parcelable CompositionDataSupportInfo {
+ boolean isSupported;
+ boolean disableGpuFences;
+ int maxBatchSize;
+ boolean alwaysBatch;
+ }
}
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDuration.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDuration.aidl
index 45013dd..25a5350 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDuration.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/WorkDuration.aidl
@@ -39,4 +39,5 @@
long workPeriodStartTimestampNanos;
long cpuDurationNanos;
long gpuDurationNanos;
+ long intendedPresentTimestampNanos;
}
diff --git a/power/aidl/android/hardware/power/CompositionData.aidl b/power/aidl/android/hardware/power/CompositionData.aidl
new file mode 100644
index 0000000..43c636f
--- /dev/null
+++ b/power/aidl/android/hardware/power/CompositionData.aidl
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+import android.hardware.power.CompositionUpdate;
+import android.hardware.power.FrameProducer;
+
+/**
+ * Object sent to PowerHAL once per frame during commit that contains relevant
+ * timing data for a given set of frame producers, drawing to a given set of outputs.
+ *
+ * This will generally be layer objects drawing to displays, but could also represent
+ * things like arbitrary graphics buffers drawing into network sockets. All frame
+ * producers that participated in this composition and have associated
+ * sessions will be listed under "producers".
+ *
+ * All timestamps use SYSTEM_TIME_MONOTONIC clock, at nanosecond resolution.
+ */
+@VintfStability
+parcelable CompositionData {
+ /**
+ * Timestamp for when the message was sent, useful to combine and correlate
+ * composition data with any reported info from sessions.
+ *
+ * The latchTime can be used alongside this for chronologically
+ * ordering events that happened during latching, such as frame drop.
+ */
+ long timestampNanos;
+
+ /**
+ * Scheduled presentation times for each outputId, corresponding to the outputId
+ * with the same index.
+ */
+ long[] scheduledPresentTimestampsNanos;
+
+ /**
+ * The current frame's latch time for buffers targeting its vsync, this serves
+ * as the effective frame deadline unless the frame latches with GPU unsignaled.
+ */
+ long latchTimestampNanos;
+
+ /**
+ * The set of frame producers that tried to present this vsync on these outputs,
+ * ignoring the ones without associated sessions.
+ */
+ FrameProducer[] producers;
+
+ /**
+ * Optional parcel containing information not bound to a specific frame,
+ * such as lifecycle updates. These updates can be sent along with CompositionData
+ * to minimize additional calls, when appropriate.
+ */
+ @nullable CompositionUpdate updateData;
+
+ /**
+ * A list of IDs corresponding to one or more outputs, such as displays,
+ * that are the intended recipients of this frame composition. Each output
+ * ID is guaranteed to be unique for its lifetime.
+ */
+ long[] outputIds;
+}
diff --git a/power/aidl/android/hardware/power/CompositionUpdate.aidl b/power/aidl/android/hardware/power/CompositionUpdate.aidl
new file mode 100644
index 0000000..7cd451c
--- /dev/null
+++ b/power/aidl/android/hardware/power/CompositionUpdate.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+import android.hardware.power.FrameProducerUpdate;
+
+/**
+ * An update regarding composition objects that might be sent outside of a normal
+ * sendCompositionData call, such as for lifecycle updates. This object is either
+ * attached to CompositionData or sent separately, depending on current activity
+ * and urgency.
+ */
+@VintfStability
+parcelable CompositionUpdate {
+ /**
+ * Timestamp for when the message was sent.
+ */
+ long timestampNanos;
+
+ /**
+ * Update objects for all frame producers that have changed.
+ */
+ FrameProducerUpdate[] producerUpdates;
+
+ /**
+ * The IDs of any outputs that have disconnected in the framework.
+ */
+ long[] deadOutputIds;
+}
diff --git a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
index cf71b67..64c7b44 100644
--- a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
+++ b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
@@ -32,7 +32,14 @@
/**
* The calculation type.
*/
- CalculationType calculationType;
+ CalculationType calculationType = CalculationType.MIN;
+
+ /**
+ * The calculation rolling window size in milliseconds.
+ * The device should support a superset of [50, 10000] and try to use the closest feasible
+ * window size to the provided value param.
+ */
+ int calculationWindowMillis = 1000;
/**
* Defines how to select the CPU.
@@ -47,16 +54,17 @@
/**
* The CPU selection type.
*/
- SelectionType selectionType;
+ SelectionType selectionType = SelectionType.ALL;
/**
- * The caller thread's PID.
+ * The thread TIDs to track.
*
- * If pid is positive, return the headroom only for cores that are available
- * to the given pid, otherwise return the headroom(s) for all cores.
+ * If tids are not-empty, return the headrooms only for cores that are available
+ * to the given tids, otherwise return the headroom(s) for all cores.
*
- * This should handle all the cases including but not limited to thread core
- * affinity and app cpuset that change the available CPU cores for the caller.
+ * This should handle all the cases including but not limited to core affinity and app cpuset
+ * that change the available CPU cores for the caller. And the HAL should check that the TIDs
+ * have the same core affinity.
*/
- int pid;
+ int[] tids;
}
diff --git a/power/aidl/android/hardware/power/CpuHeadroomResult.aidl b/power/aidl/android/hardware/power/CpuHeadroomResult.aidl
new file mode 100644
index 0000000..316d5f6
--- /dev/null
+++ b/power/aidl/android/hardware/power/CpuHeadroomResult.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+/**
+ * Headroom value result depending on the request params.
+ *
+ * Each value is ranged from [0, 100], where 0 indicates no CPU resources were left
+ * during the calculation interval and the app may expect low resources to be granted.
+ */
+@VintfStability
+@JavaDerive(equals=true, toString=true)
+union CpuHeadroomResult {
+ /**
+ * If ALL selection type is requested.
+ */
+ float globalHeadroom;
+ /**
+ * If PER_CORE selection type is requested.
+ */
+ float[] perCoreHeadroom;
+}
diff --git a/power/aidl/android/hardware/power/FrameProducer.aidl b/power/aidl/android/hardware/power/FrameProducer.aidl
new file mode 100644
index 0000000..9ff77d3
--- /dev/null
+++ b/power/aidl/android/hardware/power/FrameProducer.aidl
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+import android.hardware.power.LatchedFrameData;
+
+/**
+ * Abstract unit of frame production. Frame production could be for outputs
+ * such as layers, sets of layers, serial devices, or a network connection.
+ * Frame producers are associated with one or more sessions that provide timing context
+ * and thread associations for the producer.
+ */
+@VintfStability
+parcelable FrameProducer {
+ /**
+ * ID of the producer, unique per-producer at a given time.
+ */
+ long producerId;
+
+ /**
+ * UID of the process that owns the producer.
+ */
+ int uid;
+
+ /**
+ * The framerate of the producer. This parameter will be set when SF is reasonably
+ * confident it knows what framerate of the frame producer is, and will
+ * be set to -1 in cases where SF is not sure, or it's rapidly changing.
+ */
+ double fps;
+
+ /**
+ * Info for the currently latching frame on this producer,
+ * this value will be null if the producer tried but failed to latch.
+ */
+ @nullable LatchedFrameData currentlyLatchedFrame;
+
+ /**
+ * True if SF thinks a frame tried to latch for this producer but failed because the
+ * CPU did not submit a buffer on time; currentlyLatchedFrame is null if this is true.
+ */
+ boolean cpuDeadlineMissed;
+
+ /**
+ * True if SF thinks a frame tried to latch for this producer, but failed because the
+ * GPU did not finish on time; currentlyLatchedFrame is null if this is true.
+ */
+ boolean gpuDeadlineMissed;
+}
diff --git a/power/aidl/android/hardware/power/FrameProducerUpdate.aidl b/power/aidl/android/hardware/power/FrameProducerUpdate.aidl
new file mode 100644
index 0000000..3075a8e
--- /dev/null
+++ b/power/aidl/android/hardware/power/FrameProducerUpdate.aidl
@@ -0,0 +1,45 @@
+
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+/**
+ * A single update for an individual producer object.
+ */
+@VintfStability
+parcelable FrameProducerUpdate {
+ /**
+ * The ID of the producer, guaranteed to be unique at a given time.
+ */
+ long producerId;
+
+ /**
+ * If true, this producer is no longer active and its data can be released.
+ * "sessions" will be blank in this case, as there are no more associations
+ * with this producer.
+ */
+ boolean isDead;
+
+ /**
+ * The IDs of all sessions associated with the producer, corresponding to the
+ * ID in SessionConfig returned to the framework during session creation.
+ *
+ * If an object was created without a Session ID by using an older creation
+ * method, it is not eligible to be associated to a FrameProducer.
+ */
+ int[] sessions;
+}
diff --git a/power/aidl/android/hardware/power/GpuHeadroomParams.aidl b/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
index 972adbc..68848d8 100644
--- a/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
+++ b/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
@@ -32,5 +32,11 @@
/**
* The calculation type.
*/
- CalculationType calculationType;
+ CalculationType calculationType = CalculationType.MIN;
+
+ /**
+ * The device should support a superset of [50, 10000] and try to use the closest feasible
+ * window size to the provided value param.
+ */
+ int calculationWindowMillis = 1000;
}
diff --git a/power/aidl/android/hardware/power/GpuHeadroomResult.aidl b/power/aidl/android/hardware/power/GpuHeadroomResult.aidl
new file mode 100644
index 0000000..ef3257d
--- /dev/null
+++ b/power/aidl/android/hardware/power/GpuHeadroomResult.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+/**
+ * Headroom value result depending on the request params.
+ *
+ * Each value is ranged from [0, 100], where 0 indicates no GPU resources were left
+ * during the calculation interval and the app may expect low resources to be granted.
+ */
+@VintfStability
+@JavaDerive(equals=true, toString=true)
+union GpuHeadroomResult {
+ float globalHeadroom;
+}
diff --git a/power/aidl/android/hardware/power/IPower.aidl b/power/aidl/android/hardware/power/IPower.aidl
index e2f121c..41a9379 100644
--- a/power/aidl/android/hardware/power/IPower.aidl
+++ b/power/aidl/android/hardware/power/IPower.aidl
@@ -18,8 +18,12 @@
import android.hardware.power.Boost;
import android.hardware.power.ChannelConfig;
+import android.hardware.power.CompositionData;
+import android.hardware.power.CompositionUpdate;
import android.hardware.power.CpuHeadroomParams;
+import android.hardware.power.CpuHeadroomResult;
import android.hardware.power.GpuHeadroomParams;
+import android.hardware.power.GpuHeadroomResult;
import android.hardware.power.IPowerHintSession;
import android.hardware.power.Mode;
import android.hardware.power.SessionConfig;
@@ -152,9 +156,7 @@
* Called to get detailed information on the support status of various PowerHAL
* features, such as hint sessions and specific boosts.
*
- * @return a SupportInfo giving detailed support information, or
- * EX_UNSUPPORTED_OPERATION if detailed support checking is itself
- * not supported.
+ * @return a SupportInfo giving detailed support information.
*/
SupportInfo getSupportInfo();
@@ -162,24 +164,21 @@
* Provides an estimate of available CPU headroom the device based on past history.
* <p>
* @param params params to customize the CPU headroom calculation
- * @return a single value or an array of values depending on selection type of params.
- * Each value is ranged from [0, 100], and 0 indicates no CPU resources were left
- * during the calculation interval and the app may expect low resources to be granted.
* @throws EX_UNSUPPORTED_OPERATION if the API is unsupported or the request params can't be
* served.
+ * @throws EX_SECURITY if the TIDs passed in do not belong to the same process.
+ * @throws EX_ILLEGAL_STATE if the TIDs passed in do not have the same core affinity setting.
*/
- float[] getCpuHeadroom(in CpuHeadroomParams params);
+ CpuHeadroomResult getCpuHeadroom(in CpuHeadroomParams params);
/**
* Provides an estimate of available GPU headroom the device based on past history.
* <p>
* @param params params to customize the GPU headroom calculation
- * @return Value is ranged from [0, 100], and 0 indicates no GPU resources were left
- * during the calculation interval and the app may expect low resources to be granted.
* @throws EX_UNSUPPORTED_OPERATION if the API is unsupported or the request params can't be
* served.
*/
- float getGpuHeadroom(in GpuHeadroomParams params);
+ GpuHeadroomResult getGpuHeadroom(in GpuHeadroomParams params);
/**
* Minimum polling interval for calling getCpuHeadroom in milliseconds.
@@ -200,4 +199,22 @@
* @throws EX_UNSUPPORTED_OPERATION if the API is unsupported.
*/
long getGpuHeadroomMinIntervalMillis();
+
+ /**
+ * Sent to PowerHAL when there are surface-attached sessions being composed,
+ * providing FPS and frame timing data that can be used to supplement
+ * and validate timing sent via reportActual. This call can be batched,
+ * especially in the case of a steady state or low-intensity workload.
+ *
+ * @param data The aggregated composition data object.
+ */
+ oneway void sendCompositionData(in CompositionData[] data);
+
+ /**
+ * Sent to inform the HAL about important updates outside of the normal
+ * reporting cycle, such as lifecycle updates for displays or FrameProducers.
+ *
+ * @param update The aggregated composition update object.
+ */
+ oneway void sendCompositionUpdate(in CompositionUpdate update);
}
diff --git a/power/aidl/android/hardware/power/LatchedFrameData.aidl b/power/aidl/android/hardware/power/LatchedFrameData.aidl
new file mode 100644
index 0000000..0642669
--- /dev/null
+++ b/power/aidl/android/hardware/power/LatchedFrameData.aidl
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.power;
+
+/**
+ * Frame information for a specific frame producer on a specific composition, used to
+ * provide timing information and adjust boosting or scheduling strategies for sessions
+ * associated with that producer to compensate for observed behavior.
+ *
+ * All timestamps use SYSTEM_TIME_MONOTONIC clock, at nanosecond resolution.
+ */
+@VintfStability
+parcelable LatchedFrameData {
+ /**
+ * Timestamp for the start of this frame, will be set to -1 if unknown.
+ */
+ long frameStartTimestampNanos;
+
+ /**
+ * Original, intended presentation time of the frame.
+ *
+ * This can be used along with the buffer submission timestamp to infer
+ * if the frame was supposed to present during a previous composition and got delayed.
+ *
+ * It can be compared with the "intendedPresentTimestampNanos" on WorkDurations to
+ * determine which reported duration sessions correspond with which LatchedFrameData,
+ * for sessions that use both manual reporting and have associated FrameProducers
+ */
+ long intendedPresentTimestampNanos;
+
+ /**
+ * Timestamp of buffer submission to SF from the CPU.
+ */
+ long bufferSubmissionTimestampNanos;
+
+ /**
+ * Timestamp where the GPU fence signaled, will be set to -1 if the buffer
+ * latched unsignaled or if the GPU was not used.
+ */
+ long gpuSignalTimestampNanos;
+
+ /**
+ * True if this frame used the GPU for rendering.
+ */
+ boolean usedGpu;
+
+ /**
+ * Optional GPU fence, sent only when the buffer latches unsignaled, and if
+ * sending fences is configured on the device in SupportInfo. If the updates
+ * are batched, a fence will only be sent for the most recent update.
+ *
+ * Can be used to get accurate gpu completion timestamps, and to boost if it
+ * looks like a frame might not signal before the deadline.
+ */
+ @nullable ParcelFileDescriptor gpuAcquireFence;
+}
diff --git a/power/aidl/android/hardware/power/SessionMode.aidl b/power/aidl/android/hardware/power/SessionMode.aidl
index 3d5a76f..5bd0e15 100644
--- a/power/aidl/android/hardware/power/SessionMode.aidl
+++ b/power/aidl/android/hardware/power/SessionMode.aidl
@@ -32,4 +32,20 @@
* which will be called of higher priority in terms of CPU resources and scheduling.
*/
GRAPHICS_PIPELINE,
+
+ /**
+ * This mode indicates that the session does not intend to report CPU timing
+ * information, and that it instead will rely entirely on information from
+ * SurfaceFlinger. This mode is only supported for sessions that have
+ * GRAPHICS_PIPELINE enabled.
+ */
+ AUTO_CPU,
+
+ /**
+ * This mode indicates that the session does not intend to report GPU timing
+ * information, and that it instead will rely entirely on information from
+ * SurfaceFlinger. This mode is only supported for sessions that have
+ * GRAPHICS_PIPELINE enabled.
+ */
+ AUTO_GPU,
}
diff --git a/power/aidl/android/hardware/power/SupportInfo.aidl b/power/aidl/android/hardware/power/SupportInfo.aidl
index 46bcdd3..4178b3a 100644
--- a/power/aidl/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/android/hardware/power/SupportInfo.aidl
@@ -37,37 +37,73 @@
@VintfStability
parcelable SupportInfo {
/**
- * Boolean representing whether hint sessions are supported on this device
+ * Boolean representing whether hint sessions are supported on this device.
*/
boolean usesSessions;
/**
- * The set of "Boost" enum values that are supported by this device
- * Each bit should correspond to a value of the "Boost.aidl" enum
+ * The set of "Boost" enum values that are supported by this device,
+ * each bit should correspond to a value of the "Boost.aidl" enum.
*/
long boosts;
/**
- * The set of "Mode" enum values that are supported by this device
- * Each bit should correspond to a value of the "Mode.aidl" enum
+ * The set of "Mode" enum values that are supported by this device,
+ * each bit should correspond to a value of the "Mode.aidl" enum.
*/
long modes;
/**
- * The set of "SessionHint" enum values that are supported by this device
- * Each bit should correspond to a value of the "SessionHint.aidl" enum
+ * The set of "SessionHint" enum values that are supported by this device,
+ * each bit should correspond to a value of the "SessionHint.aidl" enum.
*/
long sessionHints;
/**
- * The set of "SessionMode" enum values that are supported by this device
- * Each bit should correspond to a value of the "SessionMode.aidl" enum
+ * The set of "SessionMode" enum values that are supported by this device,
+ * each bit should correspond to a value of the "SessionMode.aidl" enum.
*/
long sessionModes;
/**
- * The set of "SessionTag" enum values that are supported by this device
- * Each bit should correspond to a value of the "SessionTag.aidl" enum
+ * The set of "SessionTag" enum values that are supported by this device,
+ * each bit should correspond to a value of the "SessionTag.aidl" enum.
*/
long sessionTags;
+
+ /**
+ * Parcel detailing support info for receiving additional frame composition
+ * data when sessions are associated with frame producers.
+ */
+ CompositionDataSupportInfo compositionData;
+
+ @VintfStability
+ parcelable CompositionDataSupportInfo {
+ /**
+ * Whether the sendCompositionData and sendCompositionUpdate APIs are
+ * supported on this device. The rest of the fields on this parcelable
+ * are ignored if this is false.
+ */
+ boolean isSupported;
+
+ /**
+ * Whether to disable sending relevant GPU fence file descriptors along with
+ * timing information when the frame callback happens.
+ */
+ boolean disableGpuFences;
+
+ /**
+ * The maximum number of updates to batch before sending. This can be ignored
+ * if "overrideIfUrgent" is set. Setting to a value less than or equal to 1
+ * disables batching entirely.
+ */
+ int maxBatchSize;
+
+ /**
+ * Whether to ignore important notifications such as FPS changes and frame
+ * deadline misses, and always send maximum size batches. By default, the
+ * framework will send batches early if these important events happen.
+ */
+ boolean alwaysBatch;
+ }
}
diff --git a/power/aidl/android/hardware/power/WorkDuration.aidl b/power/aidl/android/hardware/power/WorkDuration.aidl
index fcd638b..bcf279a 100644
--- a/power/aidl/android/hardware/power/WorkDuration.aidl
+++ b/power/aidl/android/hardware/power/WorkDuration.aidl
@@ -19,7 +19,7 @@
@VintfStability
parcelable WorkDuration {
/**
- * Time stamp in nanoseconds based on CLOCK_MONOTONIC when the duration
+ * Timestamp in nanoseconds based on CLOCK_MONOTONIC when the duration
* sample was measured.
*/
long timeStampNanos;
@@ -49,4 +49,21 @@
* SDK/NDK reportActualWorkDuration API.
*/
long gpuDurationNanos;
+
+ /**
+ * Timestamp indicating the approximate time when this frame is intended to
+ * present by the app, and will be required for all sessions associated with
+ * frame producers. This should always be provided if the session is associated
+ * with a pipeline, even if it is not using the GRAPHICS_PIPELINE mode.
+ *
+ * This timestamp is intended to be used for correlating CompositionData timing
+ * information with reported WorkDurations from apps. WorkDurations for
+ * sessions associated with a frame producers, without a reasonable value set
+ * for this field should be discarded.
+ *
+ * Intended vsync times can be inferred or retrieved from Choreographer callbacks.
+ * While this timestamp is not required to be perfectly accurate, it should
+ * roughly correspond with an expected vsync time, and should be discarded otherwise.
+ */
+ long intendedPresentTimestampNanos;
}
diff --git a/power/aidl/default/Power.cpp b/power/aidl/default/Power.cpp
index 1fc0a0a..8490b62 100644
--- a/power/aidl/default/Power.cpp
+++ b/power/aidl/default/Power.cpp
@@ -33,6 +33,8 @@
using ::aidl::android::hardware::common::fmq::MQDescriptor;
using ::aidl::android::hardware::common::fmq::SynchronizedReadWrite;
using ::aidl::android::hardware::power::ChannelMessage;
+using ::aidl::android::hardware::power::CompositionData;
+using ::aidl::android::hardware::power::CompositionUpdate;
using ::android::AidlMessageQueue;
using ndk::ScopedAStatus;
@@ -69,14 +71,22 @@
return ScopedAStatus::ok();
}
-ndk::ScopedAStatus Power::getCpuHeadroom(const CpuHeadroomParams& _,
- std::vector<float>* _aidl_return) {
- *_aidl_return = {0.5f};
- return ndk::ScopedAStatus::ok();
+ndk::ScopedAStatus Power::getCpuHeadroom(const CpuHeadroomParams& params,
+ CpuHeadroomResult* _aidl_return) {
+ if (params.selectionType == CpuHeadroomParams::SelectionType::ALL) {
+ _aidl_return->set<CpuHeadroomResult::globalHeadroom>(100.0f);
+ return ndk::ScopedAStatus::ok();
+ } else if (params.selectionType == CpuHeadroomParams::SelectionType::PER_CORE) {
+ std::vector<float> headroom = {50.0f, 100.0f};
+ _aidl_return->set<CpuHeadroomResult::perCoreHeadroom>(headroom);
+ return ndk::ScopedAStatus::ok();
+ }
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
-ndk::ScopedAStatus Power::getGpuHeadroom(const GpuHeadroomParams& _, float* _aidl_return) {
- *_aidl_return = 0.5f;
+ndk::ScopedAStatus Power::getGpuHeadroom(const GpuHeadroomParams& _,
+ GpuHeadroomResult* _aidl_return) {
+ _aidl_return->set<GpuHeadroomResult::globalHeadroom>(100.0f);
return ndk::ScopedAStatus::ok();
}
@@ -142,19 +152,33 @@
}
ndk::ScopedAStatus Power::getSupportInfo(SupportInfo* _aidl_return) {
- static SupportInfo supportInfo = {
- .usesSessions = false,
- .modes = bitsForEnum<Mode>(),
- .boosts = bitsForEnum<Boost>(),
- .sessionHints = 0,
- .sessionModes = 0,
- .sessionTags = 0,
- };
+ static SupportInfo supportInfo = {.usesSessions = false,
+ .modes = bitsForEnum<Mode>(),
+ .boosts = bitsForEnum<Boost>(),
+ .sessionHints = 0,
+ .sessionModes = 0,
+ .sessionTags = 0,
+ .compositionData = {
+ .isSupported = false,
+ .disableGpuFences = false,
+ .maxBatchSize = 1,
+ .alwaysBatch = false,
+ }};
// Copy the support object into the binder
*_aidl_return = supportInfo;
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Power::sendCompositionData(const std::vector<CompositionData>&) {
+ LOG(INFO) << "Composition data received!";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Power::sendCompositionUpdate(const CompositionUpdate&) {
+ LOG(INFO) << "Composition update received!";
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace example
} // namespace impl
} // namespace power
diff --git a/power/aidl/default/Power.h b/power/aidl/default/Power.h
index a77a514..c4aa7ab 100644
--- a/power/aidl/default/Power.h
+++ b/power/aidl/default/Power.h
@@ -46,11 +46,14 @@
ndk::ScopedAStatus closeSessionChannel(int32_t tgid, int32_t uid) override;
ndk::ScopedAStatus getSupportInfo(SupportInfo* _aidl_return) override;
ndk::ScopedAStatus getCpuHeadroom(const CpuHeadroomParams& params,
- std::vector<float>* _aidl_return) override;
+ CpuHeadroomResult* _aidl_return) override;
+
ndk::ScopedAStatus getGpuHeadroom(const GpuHeadroomParams& params,
- float* _aidl_return) override;
+ GpuHeadroomResult* _aidl_return) override;
ndk::ScopedAStatus getCpuHeadroomMinIntervalMillis(int64_t* _aidl_return) override;
ndk::ScopedAStatus getGpuHeadroomMinIntervalMillis(int64_t* _aidl_return) override;
+ ndk::ScopedAStatus sendCompositionData(const std::vector<CompositionData>& in_data) override;
+ ndk::ScopedAStatus sendCompositionUpdate(const CompositionUpdate& in_update) override;
private:
std::vector<std::shared_ptr<IPowerHintSession>> mPowerHintSessions;
diff --git a/power/aidl/vts/VtsHalPowerTargetTest.cpp b/power/aidl/vts/VtsHalPowerTargetTest.cpp
index 5e3ddd5..ffe20c6 100644
--- a/power/aidl/vts/VtsHalPowerTargetTest.cpp
+++ b/power/aidl/vts/VtsHalPowerTargetTest.cpp
@@ -36,6 +36,8 @@
namespace aidl::android::hardware::power {
namespace {
+using namespace std::chrono_literals;
+
using ::aidl::android::hardware::common::fmq::SynchronizedReadWrite;
using ::android::AidlMessageQueue;
using ::android::hardware::EventFlag;
@@ -43,7 +45,9 @@
using android::hardware::power::ChannelConfig;
using android::hardware::power::ChannelMessage;
using android::hardware::power::CpuHeadroomParams;
+using android::hardware::power::CpuHeadroomResult;
using android::hardware::power::GpuHeadroomParams;
+using android::hardware::power::GpuHeadroomResult;
using android::hardware::power::IPower;
using android::hardware::power::IPowerHintSession;
using android::hardware::power::Mode;
@@ -137,7 +141,11 @@
power = IPower::fromBinder(ndk::SpAIBinder(binder));
auto status = power->getInterfaceVersion(&mServiceVersion);
ASSERT_TRUE(status.isOk());
- if (mServiceVersion >= 2) {
+ if (mServiceVersion >= 6) {
+ mSupportInfo = std::make_optional<SupportInfo>();
+ ASSERT_TRUE(power->getSupportInfo(&(*mSupportInfo)).isOk());
+ mSessionSupport = mSupportInfo->usesSessions;
+ } else if (mServiceVersion >= 2) {
status = power->createHintSession(getpid(), getuid(), kSelfTids, 16666666L, &mSession);
mSessionSupport = status.isOk();
}
@@ -147,6 +155,7 @@
int32_t mServiceVersion;
std::shared_ptr<IPowerHintSession> mSession;
bool mSessionSupport = false;
+ std::optional<SupportInfo> mSupportInfo = std::nullopt;
};
class HintSessionAidl : public PowerAidl {
@@ -300,7 +309,7 @@
GTEST_SKIP() << "DEVICE not launching with Power V6 and beyond.";
}
CpuHeadroomParams params;
- std::vector<float> headroom;
+ CpuHeadroomResult headroom;
auto ret = power->getCpuHeadroom(params, &headroom);
if (ret.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "power->getCpuHeadroom is not supported";
@@ -309,9 +318,9 @@
int64_t minIntervalMillis;
ASSERT_TRUE(power->getCpuHeadroomMinIntervalMillis(&minIntervalMillis).isOk());
ASSERT_GE(minIntervalMillis, 0);
- ASSERT_GE(headroom.size(), 1);
- ASSERT_GE(headroom[0], 0.0f);
- ASSERT_LE(headroom[0], 100.00f);
+ ASSERT_EQ(headroom.getTag(), CpuHeadroomResult::globalHeadroom);
+ ASSERT_GE(headroom.get<CpuHeadroomResult::globalHeadroom>(), 0.0f);
+ ASSERT_LE(headroom.get<CpuHeadroomResult::globalHeadroom>(), 100.00f);
}
TEST_P(PowerAidl, getGpuHeadroom) {
@@ -319,7 +328,7 @@
GTEST_SKIP() << "DEVICE not launching with Power V6 and beyond.";
}
GpuHeadroomParams params;
- float headroom;
+ GpuHeadroomResult headroom;
auto ret = power->getGpuHeadroom(params, &headroom);
if (ret.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "power->getGpuHeadroom is not supported";
@@ -328,8 +337,9 @@
int64_t minIntervalMillis;
ASSERT_TRUE(power->getGpuHeadroomMinIntervalMillis(&minIntervalMillis).isOk());
ASSERT_GE(minIntervalMillis, 0);
- ASSERT_GE(headroom, 0.0f);
- ASSERT_LE(headroom, 100.00f);
+ ASSERT_EQ(headroom.getTag(), GpuHeadroomResult::globalHeadroom);
+ ASSERT_GE(headroom.get<GpuHeadroomResult::globalHeadroom>(), 0.0f);
+ ASSERT_LE(headroom.get<GpuHeadroomResult::globalHeadroom>(), 100.00f);
}
// FIXED_PERFORMANCE mode is required for all devices which ship on Android 11
@@ -341,20 +351,49 @@
}
TEST_P(PowerAidl, hasSupportInfo) {
- SupportInfo config;
- ASSERT_TRUE(power->getSupportInfo(&config).isOk());
+ if (mServiceVersion < 6) {
+ GTEST_SKIP() << "DEVICE not launching with Power V6 and beyond.";
+ }
+ ASSERT_TRUE(mSupportInfo.has_value());
for (Mode mode : kModes) {
bool supported;
power->isModeSupported(mode, &supported);
- ASSERT_EQ(supported, supportFromBitset(config.modes, mode));
+ ASSERT_EQ(supported, supportFromBitset(mSupportInfo->modes, mode));
}
for (Boost boost : kBoosts) {
bool supported;
power->isBoostSupported(boost, &supported);
- ASSERT_EQ(supported, supportFromBitset(config.boosts, boost));
+ ASSERT_EQ(supported, supportFromBitset(mSupportInfo->boosts, boost));
}
}
+TEST_P(PowerAidl, receivesCompositionData) {
+ if (mServiceVersion < 6) {
+ GTEST_SKIP() << "DEVICE not launching with Power V6 and beyond.";
+ }
+ if (mSupportInfo->compositionData.isSupported) {
+ GTEST_SKIP() << "Composition data marked as unsupported.";
+ }
+ // Sending an empty object is fine, we just want to confirm it accepts the tx
+ std::vector<CompositionData> out{};
+ out.emplace_back();
+ auto status = power->sendCompositionData(out);
+ ASSERT_TRUE(status.isOk());
+}
+
+TEST_P(PowerAidl, receivesCompositionUpdate) {
+ if (mServiceVersion < 6) {
+ GTEST_SKIP() << "DEVICE not launching with Power V6 and beyond.";
+ }
+ if (mSupportInfo->compositionData.isSupported) {
+ GTEST_SKIP() << "Composition data marked as unsupported.";
+ }
+
+ CompositionUpdate out{};
+ auto status = power->sendCompositionUpdate(out);
+ ASSERT_TRUE(status.isOk());
+}
+
TEST_P(HintSessionAidl, createAndCloseHintSession) {
if (!mSessionSupport) {
GTEST_SKIP() << "DEVICE not support Hint Session.";
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index eca9a27..01c09d8 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -14,6 +14,7 @@
host_supported: true,
srcs: ["android/hardware/radio/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -48,6 +49,7 @@
srcs: ["android/hardware/radio/config/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -82,6 +84,7 @@
srcs: ["android/hardware/radio/data/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -115,6 +118,7 @@
srcs: ["android/hardware/radio/messaging/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -148,6 +152,7 @@
srcs: ["android/hardware/radio/modem/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -181,6 +186,7 @@
srcs: ["android/hardware/radio/network/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -213,6 +219,7 @@
host_supported: true,
srcs: ["android/hardware/radio/sap/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -241,6 +248,7 @@
host_supported: true,
srcs: ["android/hardware/radio/sim/*.aidl"],
stability: "vintf",
+ flags: ["-Werror"],
imports: [
"android.hardware.radio-V4",
"android.hardware.radio.config-V4",
@@ -287,6 +295,7 @@
srcs: ["android/hardware/radio/voice/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: true,
@@ -322,6 +331,7 @@
"android.hardware.radio-V4",
"android.hardware.radio.data-V4",
],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: false,
@@ -356,6 +366,7 @@
srcs: ["android/hardware/radio/ims/*.aidl"],
stability: "vintf",
imports: ["android.hardware.radio-V4"],
+ flags: ["-Werror"],
backend: {
cpp: {
enabled: false,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
index bc1c292..bba6bdd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
@@ -17,9 +17,10 @@
* This interface is used by telephony and telecom to talk to cellular radio for the purpose of
* radio configuration, and it is not associated with any specific modem or slot.
* All the functions have minimum one parameter:
- * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
- * duration of a method call. If clients provide colliding serials (including passing the same
- * serial to different methods), multiple responses (one for each method call) must still be served.
+ * serial: which corresponds to the serial number of the request. Serial numbers must only be
+ * memorized for the duration of a method call. If clients provide colliding serials (including
+ * passing the same serial to different methods), multiple responses (one for each method call) must
+ * still be served.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
index b51205f..17d3fda 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum DataCallFailCause {
NONE = 0,
OPERATOR_BARRED = 0x08,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
index 7f3fdc7..d68a9d7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataProfileInfo.aidl
@@ -37,9 +37,9 @@
parcelable DataProfileInfo {
int profileId;
String apn;
- android.hardware.radio.data.PdpProtocolType protocol;
- android.hardware.radio.data.PdpProtocolType roamingProtocol;
- android.hardware.radio.data.ApnAuthType authType;
+ android.hardware.radio.data.PdpProtocolType protocol = android.hardware.radio.data.PdpProtocolType.IP;
+ android.hardware.radio.data.PdpProtocolType roamingProtocol = android.hardware.radio.data.PdpProtocolType.IP;
+ android.hardware.radio.data.ApnAuthType authType = android.hardware.radio.data.ApnAuthType.NO_PAP_NO_CHAP;
String user;
String password;
int type;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
index e1fedb8..f5fae50 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
+@Backing(type="byte") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum DataThrottlingAction {
NO_DATA_THROTTLING,
THROTTLE_SECONDARY_CARRIER,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
index bef4c73..67d679f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/LinkAddress.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable LinkAddress {
String address;
int addressProperties;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
index 45e2dc9..e428f1a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/PortRange.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable PortRange {
int start;
int end;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index 8864c24..80c055e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable RouteSelectionDescriptor {
byte precedence;
- android.hardware.radio.data.PdpProtocolType sessionType;
+ android.hardware.radio.data.PdpProtocolType sessionType = android.hardware.radio.data.PdpProtocolType.IP;
byte sscMode;
android.hardware.radio.data.SliceInfo[] sliceInfo;
String[] dnn;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
index 6ae626e..699cc4d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -33,13 +33,13 @@
package android.hardware.radio.data;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SetupDataCallResult {
- android.hardware.radio.data.DataCallFailCause cause;
+ android.hardware.radio.data.DataCallFailCause cause = android.hardware.radio.data.DataCallFailCause.NONE;
long suggestedRetryTime;
int cid;
int active;
- android.hardware.radio.data.PdpProtocolType type;
+ android.hardware.radio.data.PdpProtocolType type = android.hardware.radio.data.PdpProtocolType.IP;
String ifname;
android.hardware.radio.data.LinkAddress[] addresses;
String[] dnses;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
index 36a538c..3b38e19 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrMode.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum AmrMode {
+ INVALID = 0,
AMR_MODE_0 = (1 << 0) /* 1 */,
AMR_MODE_1 = (1 << 1) /* 2 */,
AMR_MODE_2 = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
index dcf0dd1..eb65eb1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/AmrParams.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable AmrParams {
- android.hardware.radio.ims.media.AmrMode amrMode;
+ android.hardware.radio.ims.media.AmrMode amrMode = android.hardware.radio.ims.media.AmrMode.INVALID;
boolean octetAligned;
int maxRedundancyMillis;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
index 6eefb34..1c80f7a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecParams.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable CodecParams {
- android.hardware.radio.ims.media.CodecType codecType;
+ android.hardware.radio.ims.media.CodecType codecType = android.hardware.radio.ims.media.CodecType.INVALID;
byte rxPayloadTypeNumber;
byte txPayloadTypeNumber;
byte samplingRateKHz;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
index 98463b1..e97a647 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/CodecType.aidl
@@ -35,6 +35,7 @@
/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum CodecType {
+ INVALID = 0,
AMR = (1 << 0) /* 1 */,
AMR_WB = (1 << 1) /* 2 */,
EVS = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
index 1a59389..ae0e1f7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsMode.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EvsMode {
+ INVALID = 0,
EVS_MODE_0 = (1 << 0) /* 1 */,
EVS_MODE_1 = (1 << 1) /* 2 */,
EVS_MODE_2 = (1 << 2) /* 4 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
index deb53af..90d2204 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/EvsParams.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EvsParams {
- android.hardware.radio.ims.media.EvsBandwidth bandwidth;
- android.hardware.radio.ims.media.EvsMode evsMode;
+ android.hardware.radio.ims.media.EvsBandwidth bandwidth = android.hardware.radio.ims.media.EvsBandwidth.NONE;
+ android.hardware.radio.ims.media.EvsMode evsMode = android.hardware.radio.ims.media.EvsMode.INVALID;
byte channelAwareMode;
boolean useHeaderFullOnly;
boolean useEvsModeSwitch;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 714442c..b9cc15c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.ims.media;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RtcpXrReportBlockType {
RTCPXR_NONE = 0,
RTCPXR_LOSS_RLE_REPORT_BLOCK = (1 << 0) /* 1 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
index 472ec35..6af5523 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims.media/current/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable RtpConfig {
int direction;
- android.hardware.radio.AccessNetwork accessNetwork;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
android.hardware.radio.ims.media.RtpAddress remoteAddress;
android.hardware.radio.ims.media.RtpSessionParams sessionParams;
android.hardware.radio.ims.media.RtcpConfig rtcpConfig;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index 421f752..ae3bbac 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -35,11 +35,12 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ConnectionFailureInfo {
- android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason failureReason;
+ android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason failureReason = android.hardware.radio.ims.ConnectionFailureInfo.ConnectionFailureReason.INVALID;
int causeCode;
int waitTimeMillis;
- @Backing(type="int") @VintfStability
+ @Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ConnectionFailureReason {
+ INVALID = 0,
REASON_ACCESS_DENIED = 1,
REASON_NAS_FAILURE = 2,
REASON_RACH_FAILURE = 3,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
index 3895d75..73d987a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsCall.aidl
@@ -36,10 +36,10 @@
@JavaDerive(toString=true) @VintfStability
parcelable ImsCall {
int index;
- android.hardware.radio.ims.ImsCall.CallType callType;
- android.hardware.radio.AccessNetwork accessNetwork;
- android.hardware.radio.ims.ImsCall.CallState callState;
- android.hardware.radio.ims.ImsCall.Direction direction;
+ android.hardware.radio.ims.ImsCall.CallType callType = android.hardware.radio.ims.ImsCall.CallType.NORMAL;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.ims.ImsCall.CallState callState = android.hardware.radio.ims.ImsCall.CallState.ACTIVE;
+ android.hardware.radio.ims.ImsCall.Direction direction = android.hardware.radio.ims.ImsCall.Direction.INCOMING;
boolean isHeldByRemote;
@Backing(type="int")
enum CallType {
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index 5b5bd40..62dc69b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.ims;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ImsDeregistrationReason {
REASON_SIM_REMOVED = 1,
REASON_SIM_REFRESH = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
index 66d8165..73cfd07 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
@@ -33,11 +33,11 @@
package android.hardware.radio.ims;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable ImsRegistration {
- android.hardware.radio.ims.ImsRegistrationState regState;
- android.hardware.radio.AccessNetwork accessNetworkType;
- android.hardware.radio.ims.SuggestedAction suggestedAction;
+ android.hardware.radio.ims.ImsRegistrationState regState = android.hardware.radio.ims.ImsRegistrationState.NOT_REGISTERED;
+ android.hardware.radio.AccessNetwork accessNetworkType = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.ims.SuggestedAction suggestedAction = android.hardware.radio.ims.SuggestedAction.NONE;
int capabilities;
const int IMS_MMTEL_CAPABILITY_NONE = 0;
const int IMS_MMTEL_CAPABILITY_VOICE = (1 << 0) /* 1 */;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
index 21645da..a2e2ae5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/SrvccCall.aidl
@@ -36,10 +36,10 @@
@JavaDerive(toString=true) @VintfStability
parcelable SrvccCall {
int index;
- android.hardware.radio.ims.SrvccCall.CallType callType;
+ android.hardware.radio.ims.SrvccCall.CallType callType = android.hardware.radio.ims.SrvccCall.CallType.NORMAL;
int callState;
- android.hardware.radio.ims.SrvccCall.CallSubState callSubstate;
- android.hardware.radio.ims.SrvccCall.ToneType ringbackToneType;
+ android.hardware.radio.ims.SrvccCall.CallSubState callSubstate = android.hardware.radio.ims.SrvccCall.CallSubState.NONE;
+ android.hardware.radio.ims.SrvccCall.ToneType ringbackToneType = android.hardware.radio.ims.SrvccCall.ToneType.NONE;
boolean isMpty;
boolean isMT;
String number;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index 50c3af5..95bfd4c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.messaging;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaSmsSubaddress {
/**
* @deprecated Legacy CDMA is unsupported.
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 e52b57a..3af0f8d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.messaging/current/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable ImsSmsMessage {
- android.hardware.radio.RadioTechnologyFamily tech;
+ android.hardware.radio.RadioTechnologyFamily tech = android.hardware.radio.RadioTechnologyFamily.THREE_GPP;
boolean retry;
int messageRef;
/**
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
index 67c9349..3c812c0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/BarringInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable BarringInfo {
int serviceType;
int barringType;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
index 6bb31b0..53d485a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellInfo.aidl
@@ -36,6 +36,6 @@
@JavaDerive(toString=true) @VintfStability
parcelable CellInfo {
boolean registered;
- android.hardware.radio.network.CellConnectionStatus connectionStatus;
+ android.hardware.radio.network.CellConnectionStatus connectionStatus = android.hardware.radio.network.CellConnectionStatus.NONE;
android.hardware.radio.network.CellInfoRatSpecificInfo ratSpecificInfo;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
index cb542e8..540dc1e 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable CellularIdentifierDisclosure {
String plmn;
- android.hardware.radio.network.CellularIdentifier identifier;
- android.hardware.radio.network.NasProtocolMessage protocolMessage;
+ android.hardware.radio.network.CellularIdentifier identifier = android.hardware.radio.network.CellularIdentifier.UNKNOWN;
+ android.hardware.radio.network.NasProtocolMessage protocolMessage = android.hardware.radio.network.NasProtocolMessage.UNKNOWN;
boolean isEmergency;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
index 0de7e20..81c286a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/Domain.aidl
@@ -35,6 +35,7 @@
/* @hide */
@Backing(type="int") @JavaDerive(toString=true) @VintfStability
enum Domain {
+ INVALID = 0,
CS = (1 << 0) /* 1 */,
PS = (1 << 1) /* 2 */,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
index c5b067e..93c32fb 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyMode.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EmergencyMode {
EMERGENCY_WWAN = 1,
EMERGENCY_WLAN = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index 471c7a0..7273a94 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -36,5 +36,5 @@
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyNetworkScanTrigger {
android.hardware.radio.AccessNetwork[] accessNetwork;
- android.hardware.radio.network.EmergencyScanType scanType;
+ android.hardware.radio.network.EmergencyScanType scanType = android.hardware.radio.network.EmergencyScanType.NO_PREFERENCE;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
index 3b8083d..47940f3 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -35,9 +35,9 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable EmergencyRegResult {
- android.hardware.radio.AccessNetwork accessNetwork;
- android.hardware.radio.network.RegState regState;
- android.hardware.radio.network.Domain emcDomain;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
+ android.hardware.radio.network.RegState regState = android.hardware.radio.network.RegState.NOT_REG_MT_NOT_SEARCHING_OP;
+ android.hardware.radio.network.Domain emcDomain = android.hardware.radio.network.Domain.INVALID;
boolean isVopsSupported;
boolean isEmcBearerSupported;
byte nwProvidedEmc;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
index bb34fe1..2ff454c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -37,7 +37,7 @@
parcelable EutranRegistrationInfo {
android.hardware.radio.network.LteVopsInfo lteVopsInfo;
android.hardware.radio.network.NrIndicators nrIndicators;
- android.hardware.radio.network.EutranRegistrationInfo.AttachResultType lteAttachResultType;
+ android.hardware.radio.network.EutranRegistrationInfo.AttachResultType lteAttachResultType = android.hardware.radio.network.EutranRegistrationInfo.AttachResultType.NONE;
int extraInfo;
const int EXTRA_CSFB_NOT_PREFERRED = (1 << 0) /* 1 */;
const int EXTRA_SMS_ONLY = (1 << 1) /* 2 */;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
index 60eaf77..cdac0be 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NetworkScanRequest {
int type;
int interval;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
index 695a194..518a378 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NetworkScanResult.aidl
@@ -33,10 +33,10 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NetworkScanResult {
int status;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
android.hardware.radio.network.CellInfo[] networkInfos;
const int SCAN_STATUS_PARTIAL = 1;
const int SCAN_STATUS_COMPLETE = 2;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
index 61146aa..1b5b669 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable NrVopsInfo {
byte vopsSupported;
byte emcSupported;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
index 7d64f7e..f58e5ed 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable PhysicalChannelConfig {
- android.hardware.radio.network.CellConnectionStatus status;
- android.hardware.radio.RadioTechnology rat;
+ android.hardware.radio.network.CellConnectionStatus status = android.hardware.radio.network.CellConnectionStatus.NONE;
+ android.hardware.radio.RadioTechnology rat = android.hardware.radio.RadioTechnology.UNKNOWN;
int downlinkChannelNumber;
int uplinkChannelNumber;
int cellBandwidthDownlinkKhz;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
index 8229207..9a018f7 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioAccessSpecifier {
- android.hardware.radio.AccessNetwork accessNetwork;
+ android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
android.hardware.radio.network.RadioAccessSpecifierBands bands;
int[] channels;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
index 6058e30..cbf37b2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RadioBandMode.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RadioBandMode {
BAND_MODE_UNSPECIFIED,
BAND_MODE_EURO,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
index f11b911..5e40813 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegState.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.network;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RegState {
NOT_REG_MT_NOT_SEARCHING_OP = 0,
REG_HOME = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
index 625d970..814cde8 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
@@ -35,9 +35,9 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RegStateResult {
- android.hardware.radio.network.RegState regState;
- android.hardware.radio.RadioTechnology rat;
- android.hardware.radio.network.RegistrationFailCause reasonForDenial;
+ android.hardware.radio.network.RegState regState = android.hardware.radio.network.RegState.NOT_REG_MT_NOT_SEARCHING_OP;
+ android.hardware.radio.RadioTechnology rat = android.hardware.radio.RadioTechnology.UNKNOWN;
+ android.hardware.radio.network.RegistrationFailCause reasonForDenial = android.hardware.radio.network.RegistrationFailCause.NONE;
android.hardware.radio.network.CellIdentity cellIdentity;
String registeredPlmn;
android.hardware.radio.network.AccessTechnologySpecificInfo accessTechnologySpecificInfo;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
index 73ad180..8613f19 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable SecurityAlgorithmUpdate {
- android.hardware.radio.network.ConnectionEvent connectionEvent;
- android.hardware.radio.network.SecurityAlgorithm encryption;
- android.hardware.radio.network.SecurityAlgorithm integrity;
+ android.hardware.radio.network.ConnectionEvent connectionEvent = android.hardware.radio.network.ConnectionEvent.CS_SIGNALLING_GSM;
+ android.hardware.radio.network.SecurityAlgorithm encryption = android.hardware.radio.network.SecurityAlgorithm.A50;
+ android.hardware.radio.network.SecurityAlgorithm integrity = android.hardware.radio.network.SecurityAlgorithm.A50;
boolean isUnprotectedEmergency;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
index 77b4831..2041bad 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -33,14 +33,14 @@
package android.hardware.radio.network;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SignalThresholdInfo {
int signalMeasurement;
int hysteresisMs;
int hysteresisDb;
int[] thresholds;
boolean isEnabled;
- android.hardware.radio.AccessNetwork ran;
+ android.hardware.radio.AccessNetwork ran = android.hardware.radio.AccessNetwork.UNKNOWN;
const int SIGNAL_MEASUREMENT_TYPE_RSSI = 1;
const int SIGNAL_MEASUREMENT_TYPE_RSCP = 2;
const int SIGNAL_MEASUREMENT_TYPE_RSRP = 3;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
index 898b616..a3e6d3a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/AppStatus.aidl
@@ -33,16 +33,16 @@
package android.hardware.radio.sim;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable AppStatus {
int appType;
int appState;
- android.hardware.radio.sim.PersoSubstate persoSubstate;
+ android.hardware.radio.sim.PersoSubstate persoSubstate = android.hardware.radio.sim.PersoSubstate.UNKNOWN;
String aidPtr;
String appLabelPtr;
boolean pin1Replaced;
- android.hardware.radio.sim.PinState pin1;
- android.hardware.radio.sim.PinState pin2;
+ android.hardware.radio.sim.PinState pin1 = android.hardware.radio.sim.PinState.UNKNOWN;
+ android.hardware.radio.sim.PinState pin2 = android.hardware.radio.sim.PinState.UNKNOWN;
const int APP_STATE_UNKNOWN = 0;
const int APP_STATE_DETECTED = 1;
const int APP_STATE_PIN = 2;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
index 066777a..6a908c4 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardPowerState.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum CardPowerState {
POWER_DOWN,
POWER_UP,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
index 4cdbf81..788a2dc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CardStatus.aidl
@@ -36,7 +36,7 @@
@JavaDerive(toString=true) @VintfStability
parcelable CardStatus {
int cardState;
- android.hardware.radio.sim.PinState universalPinState;
+ android.hardware.radio.sim.PinState universalPinState = android.hardware.radio.sim.PinState.UNKNOWN;
int gsmUmtsSubscriptionAppIndex;
/**
* @deprecated Legacy CDMA is unsupported.
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
index a5b8dc9..8f5672f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -44,7 +44,7 @@
*/
android.hardware.radio.sim.Carrier[] excludedCarriers;
boolean allowedCarriersPrioritized;
- android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus status;
+ android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus status = android.hardware.radio.sim.CarrierRestrictions.CarrierRestrictionStatus.UNKNOWN;
android.hardware.radio.sim.CarrierInfo[] allowedCarrierInfoList = {};
android.hardware.radio.sim.CarrierInfo[] excludedCarrierInfoList = {};
@Backing(type="int") @VintfStability
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
index aaf9f3e..5070ff2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="byte") @JavaDerive(toString=true) @VintfStability
+@Backing(type="byte") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum PbReceivedStatus {
PB_RECEIVED_OK = 1,
PB_RECEIVED_ERROR = 2,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index 8cfe417..75b8f6b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum SimLockMultiSimPolicy {
NO_MULTISIM_POLICY,
ONE_VALID_SIM_MUST_BE_PRESENT,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
index 81ba510..c546565 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.sim/current/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.sim;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SimRefreshResult {
int type;
int efId;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/Call.aidl
index 8bfd7ed..33af1fd 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
@@ -51,7 +51,7 @@
String name;
int namePresentation;
android.hardware.radio.voice.UusInfo[] uusInfo;
- android.hardware.radio.voice.AudioQuality audioQuality;
+ android.hardware.radio.voice.AudioQuality audioQuality = android.hardware.radio.voice.AudioQuality.UNSPECIFIED;
String forwardedNumber;
const int PRESENTATION_ALLOWED = 0;
const int PRESENTATION_RESTRICTED = 1;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index eb97488..a673c93 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaDisplayInfoRecord {
/**
* @deprecated Legacy CDMA is unsupported.
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 4f421b1..143409f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaInformationRecord {
/**
* @deprecated Legacy CDMA is unsupported.
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 d2c09d6..684b171 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaNumberInfoRecord {
/**
* @deprecated Legacy CDMA is unsupported.
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 4e40cc7..ce7c7c6 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable CdmaRedirectingNumberInfoRecord {
/**
* @deprecated Legacy CDMA is unsupported.
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
index c38c801..3153e0a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/ClipStatus.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum ClipStatus {
CLIP_PROVISIONED,
CLIP_UNPROVISIONED,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
index 3099a20..a45f388 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum EmergencyCallRouting {
UNKNOWN,
EMERGENCY,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
index d3d62c3..e6c223c 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -33,8 +33,9 @@
package android.hardware.radio.voice;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum LastCallFailCause {
+ INVALID = 0,
UNOBTAINABLE_NUMBER = 1,
NO_ROUTE_TO_DESTINATION = 3,
CHANNEL_UNACCEPTABLE = 6,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 151adf2..c36a934 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -35,6 +35,6 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable LastCallFailCauseInfo {
- android.hardware.radio.voice.LastCallFailCause causeCode;
+ android.hardware.radio.voice.LastCallFailCause causeCode = android.hardware.radio.voice.LastCallFailCause.INVALID;
String vendorCause;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
index 24365dc..2af38fe 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/SsInfoData.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable SsInfoData {
int[] ssInfo;
const int SS_INFO_MAX = 4;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 999f47c..d265374 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -39,7 +39,7 @@
int requestType;
int teleserviceType;
int serviceClass;
- android.hardware.radio.RadioError result;
+ android.hardware.radio.RadioError result = android.hardware.radio.RadioError.NONE;
android.hardware.radio.voice.SsInfoData[] ssInfo;
android.hardware.radio.voice.CfData[] cfData;
const int REQUEST_TYPE_ACTIVATION = 0;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
index 3c84c8d..79c77ee 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.voice/current/android/hardware/radio/voice/UusInfo.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio.voice;
/* @hide */
-@JavaDerive(toString=true) @VintfStability
+@JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
parcelable UusInfo {
int uusType;
int uusDcs;
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
index 02c5370..e782e73 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioError.aidl
@@ -33,7 +33,7 @@
package android.hardware.radio;
/* @hide */
-@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+@Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
enum RadioError {
NONE = 0,
RADIO_NOT_AVAILABLE = 1,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
index f03a73b..bfab0c5 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfo.aidl
@@ -35,7 +35,7 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfo {
- android.hardware.radio.RadioResponseType type;
+ android.hardware.radio.RadioResponseType type = android.hardware.radio.RadioResponseType.SOLICITED;
int serial;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
index 2e0c315..c445fec 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -35,8 +35,8 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioResponseInfoModem {
- android.hardware.radio.RadioResponseType type;
+ android.hardware.radio.RadioResponseType type = android.hardware.radio.RadioResponseType.SOLICITED;
int serial;
- android.hardware.radio.RadioError error;
+ android.hardware.radio.RadioError error = android.hardware.radio.RadioError.NONE;
boolean isEnabled;
}
diff --git a/radio/aidl/android/hardware/radio/RadioError.aidl b/radio/aidl/android/hardware/radio/RadioError.aidl
index 4640122..6a28893 100644
--- a/radio/aidl/android/hardware/radio/RadioError.aidl
+++ b/radio/aidl/android/hardware/radio/RadioError.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RadioError {
/**
* Success
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
index 25195aa..926ccf6 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfo.aidl
@@ -26,7 +26,7 @@
/**
* Response type
*/
- RadioResponseType type;
+ RadioResponseType type = RadioResponseType.SOLICITED;
/**
* Serial number of the request
*/
@@ -34,5 +34,5 @@
/**
* Response error
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
}
diff --git a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
index 286f397..3e76a93 100644
--- a/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
+++ b/radio/aidl/android/hardware/radio/RadioResponseInfoModem.aidl
@@ -26,7 +26,7 @@
/**
* Response type
*/
- RadioResponseType type;
+ RadioResponseType type = RadioResponseType.SOLICITED;
/**
* Serial number of the request
*/
@@ -34,7 +34,7 @@
/**
* Response error
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
/**
* Whether the modem is enabled or not
*/
diff --git a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
index c5eeeb3..5ae057a 100644
--- a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum DataCallFailCause {
/**
* An integer cause code defined in TS 24.008 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
diff --git a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
index d01f8ff..f067fb4 100644
--- a/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataProfileInfo.aidl
@@ -66,15 +66,15 @@
/**
* PDP_type values.
*/
- PdpProtocolType protocol;
+ PdpProtocolType protocol = PdpProtocolType.IP;
/**
* PDP_type values used on roaming network.
*/
- PdpProtocolType roamingProtocol;
+ PdpProtocolType roamingProtocol = PdpProtocolType.IP;
/**
* APN authentication type.
*/
- ApnAuthType authType;
+ ApnAuthType authType = ApnAuthType.NO_PAP_NO_CHAP;
/**
* The username for APN, or empty string.
*/
diff --git a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
index a762e34..03c3481 100644
--- a/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataThrottlingAction.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="byte")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum DataThrottlingAction {
/*
* Clear all existing data throttling.
diff --git a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
index 7ac560f..f5d6553 100644
--- a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
@@ -22,6 +22,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable LinkAddress {
const int ADDRESS_PROPERTY_NONE = 0;
/**
diff --git a/radio/aidl/android/hardware/radio/data/PortRange.aidl b/radio/aidl/android/hardware/radio/data/PortRange.aidl
index 7326966..1d436fa 100644
--- a/radio/aidl/android/hardware/radio/data/PortRange.aidl
+++ b/radio/aidl/android/hardware/radio/data/PortRange.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable PortRange {
const int PORT_RANGE_MIN = 20;
const int PORT_RANGE_MAX = 65535;
diff --git a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
index 4e9e954..4d4b6d5 100644
--- a/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
+++ b/radio/aidl/android/hardware/radio/data/RouteSelectionDescriptor.aidl
@@ -38,7 +38,7 @@
/**
* Valid values are IP, IPV6, IPV4V6, and UNKNOWN.
*/
- PdpProtocolType sessionType;
+ PdpProtocolType sessionType = PdpProtocolType.IP;
/**
* Session and service continuity mode as defined in 3GPP TS 23.501.
* Valid values are SSC_MODE_
diff --git a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
index 31fb14c..687982a 100644
--- a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -27,6 +27,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SetupDataCallResult {
/**
* Indicates the data connection is inactive.
@@ -64,7 +65,7 @@
/**
* Data call fail cause. DataCallFailCause.NONE if no error.
*/
- DataCallFailCause cause;
+ DataCallFailCause cause = DataCallFailCause.NONE;
/**
* If cause is not DataCallFailCause.NONE, this field indicates the network suggested data
* retry back-off time in milliseconds. Negative value indicates network does not give any
@@ -87,7 +88,7 @@
* PDP protocol type. If cause is DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this is the
* protocol type supported, such as "IP" or "IPV6".
*/
- PdpProtocolType type;
+ PdpProtocolType type = PdpProtocolType.IP;
/**
* The network interface name.
*/
diff --git a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
index c96f59f..92024ac 100644
--- a/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ConnectionFailureInfo.aidl
@@ -22,7 +22,10 @@
parcelable ConnectionFailureInfo {
@VintfStability
@Backing(type="int")
+ @SuppressWarnings(value={"redundant-name"})
enum ConnectionFailureReason {
+ /** Do not use. */
+ INVALID = 0,
/** Access class check failed */
REASON_ACCESS_DENIED = 1,
/** 3GPP Non-access stratum failure */
@@ -47,7 +50,7 @@
/**
* Values are REASON_* constants
*/
- ConnectionFailureReason failureReason;
+ ConnectionFailureReason failureReason = ConnectionFailureReason.INVALID;
/**
* Failure cause code from network or modem specific to the failure
diff --git a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
index 427c1f5..49fd62c 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsCall.aidl
@@ -50,16 +50,16 @@
int index;
/** The type of the call */
- CallType callType;
+ CallType callType = CallType.NORMAL;
/** The access network where the call is in progress */
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/** The state of the call */
- CallState callState;
+ CallState callState = CallState.ACTIVE;
/** The direction of the call */
- Direction direction;
+ Direction direction = Direction.INCOMING;
/** True if the call is put on HOLD by the other party */
boolean isHeldByRemote;
diff --git a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
index acfe51c..bee8276 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsDeregistrationReason.aidl
@@ -20,6 +20,7 @@
@VintfStability
@JavaDerive(toString=true)
@Backing(type="int")
+@SuppressWarnings(value={"redundant-name"})
enum ImsDeregistrationReason {
/**
* Radio shall send this reason to IMS stack to perform graceful de-registration
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
index 5158386..9018273 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
@@ -23,6 +23,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable ImsRegistration {
/** Default value */
const int IMS_MMTEL_CAPABILITY_NONE = 0;
@@ -36,15 +37,15 @@
const int IMS_RCS_CAPABILITIES = 1 << 3;
/** Indicates the current IMS registration state. */
- ImsRegistrationState regState;
+ ImsRegistrationState regState = ImsRegistrationState.NOT_REGISTERED;
/**
* Indicates the type of the radio access network where IMS is registered.
*/
- AccessNetwork accessNetworkType;
+ AccessNetwork accessNetworkType = AccessNetwork.UNKNOWN;
/** Indicates the expected action for the radio to do. */
- SuggestedAction suggestedAction;
+ SuggestedAction suggestedAction = SuggestedAction.NONE;
/**
* Values are bitwise ORs of IMS_MMTEL_CAPABILITY_* constants and IMS_RCS_CAPABILITIES.
diff --git a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
index 16858f9..4fdfed0 100644
--- a/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
+++ b/radio/aidl/android/hardware/radio/ims/SrvccCall.aidl
@@ -47,16 +47,16 @@
int index;
/** The type of the call */
- CallType callType;
+ CallType callType = CallType.NORMAL;
/** Values are android.hardware.radio.voice.Call.STATE_* constants */
int callState;
/** The substate of the call */
- CallSubState callSubstate;
+ CallSubState callSubstate = CallSubState.NONE;
/** The type of the ringback tone */
- ToneType ringbackToneType;
+ ToneType ringbackToneType = ToneType.NONE;
/** true if is mpty call */
boolean isMpty;
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
index dc2a162..94070db 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrMode.aidl
@@ -23,7 +23,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum AmrMode {
+ /** Do not use. */
+ INVALID = 0,
/** 4.75 kbps for AMR / 6.6 kbps for AMR-WB */
AMR_MODE_0 = 1 << 0,
/** 5.15 kbps for AMR / 8.855 kbps for AMR-WB */
diff --git a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
index 9d7ab05..dbf38c2 100644
--- a/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/AmrParams.aidl
@@ -23,7 +23,7 @@
@JavaDerive(toString=true)
parcelable AmrParams {
/** mode-set: AMR codec mode to represent the bit rate */
- AmrMode amrMode;
+ AmrMode amrMode = AmrMode.INVALID;
/**
* octet-align: If it's set to true then all fields in the AMR/AMR-WB header
* shall be aligned to octet boundaries by adding padding bits.
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
index 74de6ec..6da8087 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecParams.aidl
@@ -24,7 +24,7 @@
@JavaDerive(toString=true)
parcelable CodecParams {
/** Negotiated codec type */
- CodecType codecType;
+ CodecType codecType = CodecType.INVALID;
/**
* Static or dynamic payload type number negotiated through the SDP for
* the incoming RTP packets. This value shall be matched with the PT value
diff --git a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
index 99fbac4..cf9dba4 100644
--- a/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/CodecType.aidl
@@ -21,6 +21,8 @@
@Backing(type="int")
@JavaDerive(toString=true)
enum CodecType {
+ /** Do not use. */
+ INVALID = 0,
/** Adaptive Multi-Rate */
AMR = 1 << 0,
/** Adaptive Multi-Rate Wide Band */
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
index 12d981b..899f05a 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsMode.aidl
@@ -23,7 +23,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EvsMode {
+ /** Do not use. */
+ INVALID = 0,
/** 6.6 kbps for EVS AMR-WB IO */
EVS_MODE_0 = 1 << 0,
/** 8.855 kbps for AMR-WB IO */
diff --git a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
index 52c3bf9..37c7d4b 100644
--- a/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/EvsParams.aidl
@@ -24,10 +24,10 @@
@JavaDerive(toString=true)
parcelable EvsParams {
/** EVS codec bandwidth */
- EvsBandwidth bandwidth;
+ EvsBandwidth bandwidth = EvsBandwidth.NONE;
/** mode-set: EVS codec mode to represent the bit rate */
- EvsMode evsMode;
+ EvsMode evsMode = EvsMode.INVALID;
/**
* ch-aw-recv: Channel aware mode for the receive direction. Permissible values
* are -1, 0, 2, 3, 5, and 7. If -1, channel-aware mode is disabled in the
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
index 88180d7..c7ee147 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtcpXrReportBlockType.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RtcpXrReportBlockType {
/** Disable RTCP XR */
RTCPXR_NONE = 0,
diff --git a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
index 3c5c4dd..9aca292 100644
--- a/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
+++ b/radio/aidl/android/hardware/radio/ims/media/RtpConfig.aidl
@@ -29,7 +29,7 @@
/** Media flow direction. The bitfield of MediaDirection(s) */
int direction;
/** Radio Access Network */
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/** IP address and port number of the other party for RTP media */
RtpAddress remoteAddress;
/** Negotiated session parameters */
diff --git a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
index 0a894ff..132bbbb 100644
--- a/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/CdmaSmsSubaddress.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaSmsSubaddress {
/**
* CCITT X.213 or ISO 8348 AD2
diff --git a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
index 3efa523..c205323 100644
--- a/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
+++ b/radio/aidl/android/hardware/radio/messaging/ImsSmsMessage.aidl
@@ -24,7 +24,7 @@
@VintfStability
@JavaDerive(toString=true)
parcelable ImsSmsMessage {
- RadioTechnologyFamily tech;
+ RadioTechnologyFamily tech = RadioTechnologyFamily.THREE_GPP;
/**
* Retry if true
*/
diff --git a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
index f12e35c..7be3987 100644
--- a/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/BarringInfo.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable BarringInfo {
/**
* Device is not barred for the given service
diff --git a/radio/aidl/android/hardware/radio/network/CellInfo.aidl b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
index 4895326..808a407 100644
--- a/radio/aidl/android/hardware/radio/network/CellInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellInfo.aidl
@@ -30,6 +30,6 @@
/**
* Connection status for the cell.
*/
- CellConnectionStatus connectionStatus;
+ CellConnectionStatus connectionStatus = CellConnectionStatus.NONE;
CellInfoRatSpecificInfo ratSpecificInfo;
}
diff --git a/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl b/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
index 52b4116..c851b43 100644
--- a/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellularIdentifierDisclosure.aidl
@@ -31,9 +31,9 @@
// The PLMN-ID to which the UE transmitted the cellular identifier
String plmn;
// The type of cellular identifier that was disclosed
- CellularIdentifier identifier;
+ CellularIdentifier identifier = CellularIdentifier.UNKNOWN;
// The NAS protocol message within which the cellular identifier was transmitted.
- NasProtocolMessage protocolMessage;
+ NasProtocolMessage protocolMessage = NasProtocolMessage.UNKNOWN;
// Whether or not this cellular identifier disclosure is in service of an emergency call.
boolean isEmergency;
}
diff --git a/radio/aidl/android/hardware/radio/network/Domain.aidl b/radio/aidl/android/hardware/radio/network/Domain.aidl
index bb169bd..e420e7b 100644
--- a/radio/aidl/android/hardware/radio/network/Domain.aidl
+++ b/radio/aidl/android/hardware/radio/network/Domain.aidl
@@ -21,6 +21,8 @@
@Backing(type="int")
@JavaDerive(toString=true)
enum Domain {
+ /** Do not use. */
+ INVALID = 0,
/**
* Circuit-switched
*/
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
index 7a2ed9c..bd36494 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyMode.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EmergencyMode {
/**
* Mode Type Emergency WWAN, indicates that the current domain selected for the Emergency call
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
index ea4bfeb..572d1e2 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyNetworkScanTrigger.aidl
@@ -32,5 +32,5 @@
* Scan type indicates the type of scans to be performed i.e. limited scan, full service scan or
* any scan.
*/
- EmergencyScanType scanType;
+ EmergencyScanType scanType = EmergencyScanType.NO_PREFERENCE;
}
diff --git a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
index af2750e..7fc4d26 100644
--- a/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/EmergencyRegResult.aidl
@@ -26,17 +26,17 @@
/**
* Indicates the cellular access network of the current emergency capable system.
*/
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/**
* Registration state of the current emergency capable system.
*/
- RegState regState;
+ RegState regState = RegState.NOT_REG_MT_NOT_SEARCHING_OP;
/**
* EMC domain indicates the current domain of the acquired system.
*/
- Domain emcDomain;
+ Domain emcDomain = Domain.INVALID;
/**
* This indicates whether the network supports voice over PS network.
diff --git a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
index fb319c1..15fabf3 100644
--- a/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/EutranRegistrationInfo.aidl
@@ -54,7 +54,7 @@
* The type of network attachment. This info is valid only on LTE network and must be present
* when device has attached to the network.
*/
- AttachResultType lteAttachResultType;
+ AttachResultType lteAttachResultType = AttachResultType.NONE;
/** Values are bitwise ORs of EXTRA_* constants */
int extraInfo;
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 631901e..41bac17 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -507,7 +507,7 @@
*
* This is available when android.hardware.telephony is defined.
*/
- oneway void setUsageSetting(in int serial, in UsageSetting usageSetting);
+ void setUsageSetting(in int serial, in UsageSetting usageSetting);
/**
* Get the UE usage setting for data/voice centric usage.
@@ -518,7 +518,7 @@
*
* This is available when android.hardware.telephony is defined.
*/
- oneway void getUsageSetting(in int serial);
+ void getUsageSetting(in int serial);
/**
* Set the Emergency Mode
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
index f752f68..295061b 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
@@ -307,7 +307,7 @@
* operation, it becomes complicated when integrity is used to determine whether an
* emergency call is protected or not, hence its exclusion to simplify implementation.
* - 4G and 5G with multiple DRBs : emergency calls are protected under that RAT only if all
- * DRBs are protected (including IMS DRB).
+ * SRBs and DRBs are protected (including IMS DRB).
* - 4G and 5G DRB integrity: Since DRB integrity is not enabled in most networks, if both
* ciphering and integrity are taken into account to determine the value of
* isUnprotectedEmergency, the value will mostly be false, hence why it is excluded.
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 1d301a5..92be4b5 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -605,7 +605,7 @@
* RadioError:INTERNAL_ERR
* RadioError:SIM_ABSENT
*/
- oneway void setUsageSettingResponse(in RadioResponseInfo info);
+ void setUsageSettingResponse(in RadioResponseInfo info);
/**
* @param info Response info struct containing response type, serial no. and error.
@@ -619,7 +619,7 @@
* RadioError:INTERNAL_ERR
* RadioError:SIM_ABSENT
*/
- oneway void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
+ void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
/**
* Response of setEmergencyMode.
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
index 37f2cf1..30977f8 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanRequest.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NetworkScanRequest {
const int RADIO_ACCESS_SPECIFIER_MAX_SIZE = 8;
diff --git a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
index 4465046..700c5e2 100644
--- a/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/NetworkScanResult.aidl
@@ -22,6 +22,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NetworkScanResult {
/**
* The result contains a part of the scan results.
@@ -40,7 +41,7 @@
/**
* The error code of the incremental result.
*/
- RadioError error;
+ RadioError error = RadioError.NONE;
/**
* List of network information as CellInfo.
*/
diff --git a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
index 71961a3..6fe1d27 100644
--- a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
@@ -23,6 +23,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable NrVopsInfo {
/**
* Emergency services not supported
diff --git a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
index ecb9463..b648ef8 100644
--- a/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
+++ b/radio/aidl/android/hardware/radio/network/PhysicalChannelConfig.aidl
@@ -27,11 +27,11 @@
/**
* Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING
*/
- CellConnectionStatus status;
+ CellConnectionStatus status = CellConnectionStatus.NONE;
/**
* The radio technology for this physical channel
*/
- RadioTechnology rat;
+ RadioTechnology rat = RadioTechnology.UNKNOWN;
/**
* Downlink Absolute Radio Frequency Channel Number
*/
diff --git a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
index b3cee47..8bb4fe0 100644
--- a/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioAccessSpecifier.aidl
@@ -26,7 +26,7 @@
/**
* The type of network to scan.
*/
- AccessNetwork accessNetwork;
+ AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
/**
* The frequency bands to scan. Maximum length of the vector is 8.
*/
diff --git a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
index 364a562..bd83b7d 100644
--- a/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
+++ b/radio/aidl/android/hardware/radio/network/RadioBandMode.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RadioBandMode {
/**
* "Unspecified" (selected by baseband automatically)
diff --git a/radio/aidl/android/hardware/radio/network/RegState.aidl b/radio/aidl/android/hardware/radio/network/RegState.aidl
index de2d5f6..15e7160 100644
--- a/radio/aidl/android/hardware/radio/network/RegState.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegState.aidl
@@ -25,6 +25,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum RegState {
/**
* Not registered, MT is not currently searching for a new operator to register
diff --git a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
index aa4cdfc..a4cb647 100644
--- a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
@@ -32,7 +32,7 @@
* EUTRAN, NGRAN, or another technology that does not support circuit-switched services, this
* value reports registration in the Packet-switched domain.
*/
- RegState regState;
+ RegState regState = RegState.NOT_REG_MT_NOT_SEARCHING_OP;
/**
* Indicates the radio technology, which must not be UNKNOWN if regState is REG_HOME,
* REG_ROAMING, NOT_REG_MT_NOT_SEARCHING_OP_EM, NOT_REG_MT_SEARCHING_OP_EM, REG_DENIED_EM,
@@ -40,12 +40,12 @@
* When the device is on carrier aggregation, vendor RIL service must properly report multiple
* PhysicalChannelConfig elements through IRadioNetwork::currentPhysicalChannelConfigs.
*/
- RadioTechnology rat;
+ RadioTechnology rat = RadioTechnology.UNKNOWN;
/**
* Cause code reported by the network in case registration fails. This will be a mobility
* management cause code defined for MM, GMM, MME or equivalent as appropriate for the RAT.
*/
- RegistrationFailCause reasonForDenial;
+ RegistrationFailCause reasonForDenial = RegistrationFailCause.NONE;
/**
* CellIdentity
*/
diff --git a/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl b/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
index e945d3b..ab48148 100644
--- a/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
+++ b/radio/aidl/android/hardware/radio/network/SecurityAlgorithmUpdate.aidl
@@ -31,15 +31,15 @@
/**
* Type of connection event which is being reported on
*/
- ConnectionEvent connectionEvent;
+ ConnectionEvent connectionEvent = ConnectionEvent.CS_SIGNALLING_GSM;
/**
* Encryption algorithm which was used
*/
- SecurityAlgorithm encryption;
+ SecurityAlgorithm encryption = SecurityAlgorithm.A50;
/**
* Integrity algorithm which was used
*/
- SecurityAlgorithm integrity;
+ SecurityAlgorithm integrity = SecurityAlgorithm.A50;
/**
* Whether or not this connection event is associated with an
* unauthenticated / unencrypted emergency session
diff --git a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
index b7e5fa5..1305a2c 100644
--- a/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalThresholdInfo.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SignalThresholdInfo {
/**
* Received Signal Strength Indication.
@@ -121,5 +122,5 @@
/**
* The Radio Access Network for current threshold info.
*/
- AccessNetwork ran;
+ AccessNetwork ran = AccessNetwork.UNKNOWN;
}
diff --git a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
index 7fe8e40..602c8c5 100644
--- a/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/AppStatus.aidl
@@ -22,6 +22,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable AppStatus {
const int APP_STATE_UNKNOWN = 0;
const int APP_STATE_DETECTED = 1;
@@ -57,7 +58,7 @@
/**
* Applicable only if appState == SUBSCRIPTION_PERSO
*/
- PersoSubstate persoSubstate;
+ PersoSubstate persoSubstate = PersoSubstate.UNKNOWN;
/**
* e.g., from 0xA0, 0x00 -> 0x41, 0x30, 0x30, 0x30
*/
@@ -67,6 +68,6 @@
* Applicable to USIM, CSIM and ISIM
*/
boolean pin1Replaced;
- PinState pin1;
- PinState pin2;
+ PinState pin1 = PinState.UNKNOWN;
+ PinState pin2 = PinState.UNKNOWN;
}
diff --git a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
index 2598dcb..0d5db2a 100644
--- a/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardPowerState.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum CardPowerState {
POWER_DOWN,
POWER_UP,
diff --git a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
index 43e2467..7321b36 100644
--- a/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CardStatus.aidl
@@ -48,7 +48,7 @@
/**
* Applicable to USIM and CSIM
*/
- PinState universalPinState;
+ PinState universalPinState = PinState.UNKNOWN;
/**
* Value < RadioConst:CARD_MAX_APPS, -1 if none
*/
diff --git a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
index 0002d5a..69c618f 100644
--- a/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
+++ b/radio/aidl/android/hardware/radio/sim/CarrierRestrictions.aidl
@@ -61,7 +61,7 @@
*/
boolean allowedCarriersPrioritized;
/** Current restriction status as defined in CarrierRestrictionStatus enum */
- CarrierRestrictionStatus status;
+ CarrierRestrictionStatus status = CarrierRestrictionStatus.UNKNOWN;
/** Allowed carriers. */
CarrierInfo[] allowedCarrierInfoList = {};
@@ -71,5 +71,5 @@
* excludedCarriers has same mcc/mnc and gid1 is ABCD. It means except the carrier whose gid1
* is ABCD, all carriers with the same mcc/mnc are allowed.
*/
- CarrierInfo[] excludedCarrierInfoList = {};
-}
\ No newline at end of file
+ CarrierInfo[] excludedCarrierInfoList = {};
+}
diff --git a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
index f9414a8..c75a4ef 100644
--- a/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
+++ b/radio/aidl/android/hardware/radio/sim/PbReceivedStatus.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="byte")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum PbReceivedStatus {
/**
* Indicates that retrieval is fine.
diff --git a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
index 89d85a9..7ec5141 100644
--- a/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimLockMultiSimPolicy.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum SimLockMultiSimPolicy {
/**
diff --git a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
index 943f1d2..618ac32 100644
--- a/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
+++ b/radio/aidl/android/hardware/radio/sim/SimRefreshResult.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SimRefreshResult {
/**
* A file on SIM has been updated.
diff --git a/radio/aidl/android/hardware/radio/voice/Call.aidl b/radio/aidl/android/hardware/radio/voice/Call.aidl
index 27dab9c..5f62faa 100644
--- a/radio/aidl/android/hardware/radio/voice/Call.aidl
+++ b/radio/aidl/android/hardware/radio/voice/Call.aidl
@@ -100,7 +100,7 @@
* Vector of User-User Signaling Information
*/
UusInfo[] uusInfo;
- AudioQuality audioQuality;
+ AudioQuality audioQuality = AudioQuality.UNSPECIFIED;
/**
* Forwarded number. It can set only one forwarded number based on 3GPP rule of the CS.
* Reference: 3GPP TS 24.008 section 10.5.4.21b
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
index 506e407..bba6e4d 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaDisplayInfoRecord.aidl
@@ -26,6 +26,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaDisplayInfoRecord {
/** @deprecated Legacy CDMA is unsupported. */
const int CDMA_ALPHA_INFO_BUFFER_LENGTH = 64;
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
index 664ed5b..7232eba 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaInformationRecord.aidl
@@ -30,6 +30,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaInformationRecord {
/** @deprecated Legacy CDMA is unsupported. */
const int CDMA_MAX_NUMBER_OF_INFO_RECS = 10;
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
index 0864ce5..bc00acb 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaNumberInfoRecord.aidl
@@ -24,6 +24,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaNumberInfoRecord {
/** @deprecated Legacy CDMA is unsupported. */
const int CDMA_NUMBER_INFO_BUFFER_LENGTH = 81;
diff --git a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
index 4b93303..514b8e1 100644
--- a/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
+++ b/radio/aidl/android/hardware/radio/voice/CdmaRedirectingNumberInfoRecord.aidl
@@ -21,6 +21,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable CdmaRedirectingNumberInfoRecord {
/**
* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11
diff --git a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
index 0a2ea2c..070aff7 100644
--- a/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
+++ b/radio/aidl/android/hardware/radio/voice/ClipStatus.aidl
@@ -20,6 +20,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum ClipStatus {
/**
* CLIP provisioned
diff --git a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
index 9f8993d..36e0bc0 100644
--- a/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
+++ b/radio/aidl/android/hardware/radio/voice/EmergencyCallRouting.aidl
@@ -23,6 +23,7 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum EmergencyCallRouting {
/**
* Indicates Android does not require how to handle the corresponding emergency call; it is
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
index f37c10c..f6f4585 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCause.aidl
@@ -20,7 +20,10 @@
@VintfStability
@Backing(type="int")
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
enum LastCallFailCause {
+ /** Do not use. */
+ INVALID = 0,
UNOBTAINABLE_NUMBER = 1,
NO_ROUTE_TO_DESTINATION = 3,
CHANNEL_UNACCEPTABLE = 6,
diff --git a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
index 4ed17d2..6af38bb 100644
--- a/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/LastCallFailCauseInfo.aidl
@@ -22,6 +22,6 @@
@VintfStability
@JavaDerive(toString=true)
parcelable LastCallFailCauseInfo {
- LastCallFailCause causeCode;
+ LastCallFailCause causeCode = LastCallFailCause.INVALID;
String vendorCause;
}
diff --git a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
index c965a7d..9c9dcff 100644
--- a/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
+++ b/radio/aidl/android/hardware/radio/voice/SsInfoData.aidl
@@ -19,6 +19,7 @@
/** @hide */
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable SsInfoData {
const int SS_INFO_MAX = 4;
/**
diff --git a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
index 9fe4024..641994e 100644
--- a/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
+++ b/radio/aidl/android/hardware/radio/voice/StkCcUnsolSsResult.aidl
@@ -84,7 +84,7 @@
* Values are a bitfield of SUPP_SERVICE_CLASS_
*/
int serviceClass;
- RadioError result;
+ RadioError result = RadioError.NONE;
/**
* Valid only for all serviceType except SERVICE_TYPE_CF_* else empty.
* Only one of ssInfo and cfData may contain values and the other must be empty.
diff --git a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
index 5d499ca..3760ac6 100644
--- a/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
+++ b/radio/aidl/android/hardware/radio/voice/UusInfo.aidl
@@ -22,6 +22,7 @@
*/
@VintfStability
@JavaDerive(toString=true)
+@SuppressWarnings(value={"redundant-name"})
parcelable UusInfo {
/**
* User specified protocol
diff --git a/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl b/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
index 6ff66e7..4fe3bd9 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/KeyCreationResult.aidl
@@ -158,7 +158,7 @@
* Failed (3),
* }
*
- * # Modules contains version info about APEX modules that have been updated after the last OTA.
+ * # Modules contains version information for APEX modules.
* # Note that the Modules information is DER-encoded before being hashed, which requires a
* # specific ordering (lexicographic by encoded value) for the constituent Module entries. This
* # ensures that the ordering of Module entries is predictable and that the resulting SHA-256
diff --git a/security/see/Android.bp b/security/see/Android.bp
new file mode 100644
index 0000000..ba873e0
--- /dev/null
+++ b/security/see/Android.bp
@@ -0,0 +1,5 @@
+dirgroup {
+ name: "trusty_dirgroup_hardware_interfaces_security_see",
+ dirs: ["."],
+ visibility: ["//trusty/vendor/google/aosp/scripts"],
+}
diff --git a/security/see/OWNERS b/security/see/OWNERS
new file mode 100644
index 0000000..d1a606f
--- /dev/null
+++ b/security/see/OWNERS
@@ -0,0 +1,5 @@
+# include OWNERS from the top level trusty repo
+include trusty:main:/OWNERS
+
+paulcrowley@google.com
+swillden@google.com
diff --git a/security/see/authmgr/aidl/Android.bp b/security/see/authmgr/aidl/Android.bp
new file mode 100644
index 0000000..a32d4e9
--- /dev/null
+++ b/security/see/authmgr/aidl/Android.bp
@@ -0,0 +1,57 @@
+// Copyright (C) 2024 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+aidl_interface {
+ name: "android.hardware.security.see.authmgr",
+ vendor_available: true,
+ srcs: [
+ "android/hardware/security/see/authmgr/*.aidl",
+ ],
+ stability: "vintf",
+ frozen: false,
+ backend: {
+ java: {
+ platform_apis: true,
+ },
+ ndk: {
+ enabled: true,
+ },
+ rust: {
+ enabled: true,
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
+ ],
+ },
+ },
+}
+
+// A rust_defaults that includes the latest authmgr AIDL library.
+// Modules that depend on authmgr directly can include this rust_defaults to avoid
+// managing dependency versions explicitly.
+rust_defaults {
+ name: "authmgr_use_latest_hal_aidl_rust",
+ rustlibs: [
+ "android.hardware.security.see.authmgr-V1-rust",
+ ],
+}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
index f42e1d0..b775f95 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceChainEntry.aidl
@@ -31,25 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DiceChainEntry {
+ byte[] diceChainEntry;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
index f42e1d0..0f61900 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
@@ -31,25 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DiceLeafArtifacts {
+ android.hardware.security.see.authmgr.DiceChainEntry diceLeaf;
+ android.hardware.security.see.authmgr.DicePolicy diceLeafPolicy;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
index f42e1d0..f434c3c 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/DicePolicy.aidl
@@ -31,25 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable DicePolicy {
+ byte[] dicePolicy;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
similarity index 66%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
index f42e1d0..9e6a501 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/Error.aidl
@@ -31,25 +31,24 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@Backing(type="int") @VintfStability
+enum Error {
+ OK = 0,
+ AUTHENTICATION_ALREADY_STARTED = (-1) /* -1 */,
+ INSTANCE_ALREADY_AUTHENTICATED = (-2) /* -2 */,
+ INVALID_DICE_CERT_CHAIN = (-3) /* -3 */,
+ INVALID_DICE_LEAF = (-4) /* -4 */,
+ INVALID_DICE_POLICY = (-5) /* -5 */,
+ DICE_POLICY_MATCHING_FAILED = (-6) /* -6 */,
+ SIGNATURE_VERIFICATION_FAILED = (-7) /* -7 */,
+ CONNECTION_HANDOVER_FAILED = (-8) /* -8 */,
+ CONNECTION_NOT_AUTHENTICATED = (-9) /* -9 */,
+ NO_CONNECTION_TO_AUTHORIZE = (-10) /* -10 */,
+ INVALID_INSTANCE_IDENTIFIER = (-11) /* -11 */,
+ MEMORY_ALLOCATION_FAILED = (-12) /* -12 */,
+ INSTANCE_PENDING_DELETION = (-13) /* -13 */,
+ CLIENT_PENDING_DELETION = (-14) /* -14 */,
+ AUTHENTICATION_NOT_STARTED = (-15) /* -15 */,
+ INSTANCE_CONTEXT_CREATION_DENIED = (-16) /* -16 */,
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
index f42e1d0..18d90eb 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
@@ -31,25 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable ExplicitKeyDiceCertChain {
+ byte[] diceCertChain;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
similarity index 73%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
index f42e1d0..a120b49 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
@@ -31,25 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.security.see.authmgr;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+interface IAuthMgrAuthorization {
+ byte[32] initAuthentication(in android.hardware.security.see.authmgr.ExplicitKeyDiceCertChain diceCertChain, in @nullable byte[] instanceIdentifier);
+ void completeAuthentication(in android.hardware.security.see.authmgr.SignedConnectionRequest signedConnectionRequest, in android.hardware.security.see.authmgr.DicePolicy dicePolicy);
+ void authorizeAndConnectClientToTrustedService(in byte[] clientID, String serviceName, in byte[32] token, in android.hardware.security.see.authmgr.DiceLeafArtifacts clientDiceArtifacts);
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
similarity index 76%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
index f42e1d0..46d8373 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/security/see/authmgr/aidl/aidl_api/android.hardware.security.see.authmgr/current/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
@@ -31,25 +31,8 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
-@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+package android.hardware.security.see.authmgr;
+@RustDerive(Clone=true, Eq=true, PartialEq=true) @VintfStability
+parcelable SignedConnectionRequest {
+ byte[] signedConnectionRequest;
}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl
new file mode 100644
index 0000000..3b4a35b
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceChainEntry.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+/**
+ * A CBOR encoded DICE certificate.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DiceChainEntry {
+ /**
+ * Data is CBOR encoded according to the `DiceChainEntry` CDDL in
+ * hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/
+ * generateCertificateRequestV2.cddl
+ */
+ byte[] diceChainEntry;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
new file mode 100644
index 0000000..333096f
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DiceLeafArtifacts.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+import android.hardware.security.see.authmgr.DiceChainEntry;
+import android.hardware.security.see.authmgr.DicePolicy;
+
+/**
+ * This contains the DICE certificate and the DICE policy created for the client by the AuthMgr FE.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DiceLeafArtifacts {
+ DiceChainEntry diceLeaf;
+ DicePolicy diceLeafPolicy;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl
new file mode 100644
index 0000000..4b55330
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/DicePolicy.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+/**
+ * DICE policy - CBOR encoded according to DicePolicy.cddl.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable DicePolicy {
+ /**
+ * Data is CBOR encoded according to the `DicePolicy` CDDL in
+ * hardware/interfaces/security/authgraph/aidl/android/hardware/security/authgraph/
+ * DicePolicy.cddl
+ */
+ byte[] dicePolicy;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.aidl
new file mode 100644
index 0000000..f7c3592
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/Error.aidl
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+/**
+ * AuthMgr error codes. Aidl will return these error codes as service specific errors in
+ * EX_SERVICE_SPECIFIC.
+ */
+@VintfStability
+@Backing(type="int")
+enum Error {
+ /** Success */
+ OK = 0,
+
+ /** Duplicated attempt to start authentication from the same transport ID */
+ AUTHENTICATION_ALREADY_STARTED = -1,
+
+ /** Duplicated authenticated attempt with the same instance ID */
+ INSTANCE_ALREADY_AUTHENTICATED = -2,
+
+ /** Invalid DICE certificate chain of the AuthMgr FE */
+ INVALID_DICE_CERT_CHAIN = -3,
+
+ /** Invalid DICE leaf of the client */
+ INVALID_DICE_LEAF = -4,
+
+ /** Invalid DICE policy */
+ INVALID_DICE_POLICY = -5,
+
+ /** The DICE chain to policy matching failed */
+ DICE_POLICY_MATCHING_FAILED = -6,
+
+ /** Invalid signature */
+ SIGNATURE_VERIFICATION_FAILED = -7,
+
+ /** Failed to handover the connection to the trusted service */
+ CONNECTION_HANDOVER_FAILED = -8,
+
+ /**
+ * An authentication required request (e.g. phase 2) is invoked on a non-authenticated
+ * connection
+ */
+ CONNECTION_NOT_AUTHENTICATED = -9,
+
+ /** There is no pending connection with a matching token to authorize in phase 2 */
+ NO_CONNECTION_TO_AUTHORIZE = -10,
+
+ /** Invalid instance identifier */
+ INVALID_INSTANCE_IDENTIFIER = -11,
+
+ /** Failed to allocate memory */
+ MEMORY_ALLOCATION_FAILED = -12,
+
+ /** An instance which is pending deletion is trying to authenticate */
+ INSTANCE_PENDING_DELETION = -13,
+
+ /** A client which is pending deletion is trying to authorize */
+ CLIENT_PENDING_DELETION = -14,
+
+ /** Trying to complete authentication for an instance for which authentication is not started */
+ AUTHENTICATION_NOT_STARTED = -15,
+
+ /** Creation of the pVM instance's context in the secure storage is not allowed */
+ INSTANCE_CONTEXT_CREATION_DENIED = -16,
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
new file mode 100644
index 0000000..de23530
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/ExplicitKeyDiceCertChain.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+/**
+ * DICE certificate chain - CBOR encoded according to ExplicitKeyDiceCertChain.cddl.
+ */
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable ExplicitKeyDiceCertChain {
+ /**
+ * Data is CBOR encoded according to the `ExplicitKeyDiceCertChain` CDDL in
+ * hardware/interfaces/security/authgraph/aidl/android/hardware/security/authgraph/
+ * ExplicitKeyDiceCertChain.cddl
+ */
+ byte[] diceCertChain;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
new file mode 100644
index 0000000..43c3bde
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/IAuthMgrAuthorization.aidl
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+import android.hardware.security.see.authmgr.DiceLeafArtifacts;
+import android.hardware.security.see.authmgr.DicePolicy;
+import android.hardware.security.see.authmgr.ExplicitKeyDiceCertChain;
+import android.hardware.security.see.authmgr.SignedConnectionRequest;
+
+/**
+ * This is the interface to be implemented by an AuthMgr backend component (AuthMgr BE), in order to
+ * allow the AuthMgr frontend component (AuthMgr FE) in a pVM instance to authenticate itself and
+ * to authorize one or more clients in the pVM instance, in order to let the clients access
+ * trusted services in the Trusted Execution Environment (TEE).
+ *
+ * The following assumptions must be true for the underlying IPC mechanism and the transport layer:
+ * 1. Both parties should be able to retrieve a non-spoofable identifier of the other party from
+ * the transport layer (a.k.a transport ID or vM ID), which stays the same throughout a given
+ * boot cycle of a pVM instance. This is important to prevent person-in-the-middle (PITM)
+ * attacks and to authorize a new connection from a pVM instance based on an already
+ * authenicated connection from the same pVM instance.
+ *
+ * 2. Each of AuthMgr FE and the AuthMgr BE should be able to hand over a connection that is
+ * setup between them to another party so that such connection can be used for communication
+ * between the two new parties subsequently. This is important to be able to handover an
+ * authorized connection established between the AuthMgr FE and the AuthMgr BE to a client in
+ * in a pVM instance and a trusted service in TEE respectively.
+ *
+ * 3. This API should be exposed over an IPC mechanism that supports statefull connections. This
+ * is important for the AuthMgr FE to setup an authenicated connection once per boot cycle
+ * and reuse it to authorize multiple client connections afterwards, if needed.
+ *
+ * 4. AuthMgr FE has a mechanism for discovering and establishing a connection to the trusted
+ * AuthMgr BE. Based on this assumptionson, mutual authentication is not covered by this
+ * API.
+ *
+ * The AuthMgr authorization protocol consists of two phases:
+ * 1. Phase 1 authenticates the AuthMgr FE to the AuthMgr BE via the first two methods of this
+ * API: `initAuthentication` and `completeAuthentication`. At the end of the successful
+ * excecution of phase 1, the AuthMgr FE and the AuthMgr BE have an authenticated connection
+ * established between them. Phase 1 also enforces rollback protection on AuthMgr FE in
+ * addition to authentication.
+ *
+ * Authentication is performed by verifying the AuthMgr FE's signature on the challenge
+ * issued by the AuthMgr BE. The public signing key of the AuthMgr FE is obtained from the
+ * validated DICE certificate chain for verifying the signature. Rollback protection is
+ * enforced by matching the DICE certificate chain against the stored DICE policy.
+ * AuthMgr FE uses this authenticated connection throughout the boot cycle of the pVM to send
+ * phase 2 requests to the AuthMgr BE. Therefore, phase 1 needs to be executed only once per
+ * boot cycle of the pVM. AuthMgr BE should take measures to prevent any duplicate
+ * authentication attempts from the same instance or from any impersonating instances.
+ *
+ * 2. Phase 2 authorizes a client in the pVM to access trusted service(s) in the TEE and
+ * establishes a new connection between the client and the trusted service based on the trust
+ * in the authenticated connection established in phase 1. The client and the trusted service
+ * can communicate independently from the AuthMgr(s) after the successful execution of
+ * phase 2 of the authorization protocol.
+ *
+ * The AuthMgr FE first opens a new vsock connection to the AuthMgr BE and sends a one-time
+ * token over that connection. The AuthMgr FE then invokes the third method of this API
+ * (`authorizeAndConnectClientToTrustedService`) on the authenticated connection established
+ * with the AuthMgr BE in phase 1. Rollback protection is enforced on the client by matching
+ * the client's DICE certificate against the stored DICE policy. The new connection is
+ * authorized by matching the token sent over the new connection and the token sent over the
+ * authenicated connection.
+ *
+ * AuthMgr BE should make sure that "use-after-destroy" threats are prevented in the implementation
+ * of this authorization protocol. This means that even if a client/pVM instance is created with the
+ * same identifier(s) of a deleted client/pVM instance, the new client should not be able to access
+ * the deleted client's secrets/resources created in the trusted services. The following
+ * requirements should be addressed in order to ensure this:
+ * 1) Each client should be identified by a unique identifier at the AuthMgr BE. The uniqueness
+ * should be guaranteed across factory resets.
+ * 2) The client's unique identifier should be used when constructing the file path to store the
+ * client's context, including the client's DICE policy, in the AuthMgr BE's secure storage.
+ * 3) The client's unique identifier should be conveyed to the trusted service(s) that the client
+ * accesses, when an authorized connection is setup between the client and the trusted service in
+ * phase 2. The trusted service(s) should mix in this unique client identifier when providing the
+ * critical services to the clients (e.g. deriving HW-backed keys by the HWCrypto service,
+ * storing data by the SecureStorage service).
+ *
+ * An example approach to build a unique identifier for a client is as follows:
+ * The AuthMgr BE stores a `global sequence number` in the secure storage that does not get
+ * wiped upon factory reset. Everytime the AuthMgr BE sees a new instance or a client, it assigns
+ * the current `global sequence number` as the unique sequence number of the instance or the client
+ * and increments the `global sequence number`.
+ */
+@VintfStability
+interface IAuthMgrAuthorization {
+ /**
+ * AuthMgr FE initiates the challenge-response protocol with the AuthMgr BE in order to
+ * authenticate the AuthMgr FE to the AuthMgr BE. AuthMgr BE creates and returns a challenge
+ * (a cryptographic random of 32 bytes) to the AuthMgr FE.
+ *
+ * The AuthMgr BE extracts the instance identifier from the DICE certificate chain of the
+ * AuthMgr FE (given in the input: `diceCertChain`). If the instance identifier is not included
+ * in the DICE certificate chain, then it should be sent in the optional
+ * input: `instanceIdentifier`. The instance identifier is used by the AuthMgr BE in this step
+ * to detect and reject any duplicate authentication attempts.
+ * The instance identifier is used in step 2 to build the file path in the secure storage to
+ * store the instance's context.
+ *
+ * If authentication is already started (but not completed) from the same transport ID, return
+ * the error code `AUTHENTICATION_ALREADY_STARTED`.
+ *
+ * @param diceCertChain - DICE certificate chain of the AuthMgr FE.
+ *
+ * @param instanceIdentifier - optional parameter to send the instance identifier, if it is not
+ * included in the DICE certificate chain
+ *
+ * @return challenge to be included in the signed response sent by the AuthMgr FE in
+ * `completeAuthentication`
+ *
+ * @throws ServiceSpecificException:
+ * Error::INSTANCE_ALREADY_AUTHENTICATED - when a pVM instance with the same
+ * `instanceIdentifier` or the same transport id has already been authenticated.
+ * Error::AUTHENTICATION_ALREADY_STARTED - when a pVM instance with the same
+ * the same transport id has already started authentication
+ */
+ byte[32] initAuthentication(in ExplicitKeyDiceCertChain diceCertChain,
+ in @nullable byte[] instanceIdentifier);
+
+ /**
+ * AuthMgr FE invokes this method to complete phase 1 of the authorization protocol. The AuthMgr
+ * BE verifies the signature in `signedConnectionRequest` with the public signing key of the
+ * AuthMgr FE obtained from the DICE certificate chain.
+ *
+ * As per the CDDL for `SignedConnectionRequest` in SignedConnectionRequest.cddl, the AuthMgr FE
+ * includes the challenge sent by the AuthMgr BE and the unique transport IDs of the AuthMgr FE
+ * and AuthMgr BE in the signed response. This is to prevent replay attacks in the presence of
+ * more than one AuthMgr BE, where one AuthMgr BE may impersonate a pVM instance/AuthMgr FE to
+ * another AuthMgr BE. Both transport IDs are included for completeness, although it is
+ * sufficient to include either of them for the purpose of preventing such attacks.
+ *
+ * AuthMgr BE validates the DICE certificate chain by verifying all the signatures in the chain
+ * and by checking wither the root public key is trusted.
+ *
+ * The AuthMgr BE matches the DICE certificate chain of the AuthMgr FE to the DICE policy given
+ * in the input: `dicePolicy`. If this is the first invocation of this method during the
+ * lifetime of the AuthMgr FE, the AuthMgr BE stores the DICE policy in the secure storage as
+ * part of the pVM instance's context, upon successful matching of DICE chain to the policy.
+ * The file path for the storage of the pVM context is constructed using the instance
+ * identifier. Note that the creation of a pVM instance's context in the secure storage is
+ * allowed only during the factory, for the first version of this API. In the future, we expect
+ * to allow the creation of a pVM instance's context in the secure storage even after the device
+ * leaves the factory, based on hard-coded DICE policies and/or via a separate
+ * `IAuthMgrInstanceContextMaintenance` API.
+ *
+ * In the subsequent invocations of this method, the AuthMgr BE matches the given DICE chain
+ * to the stored DICE policy in order to enforce rollback protection. If that succeeds and if
+ * the given DICE poliy is different from the stored DICE policy, the AuthMgr BE replaces the
+ * stored DICE policy with the given DICE policy.
+ *
+ * Upon successful execution of this method, the AuthMgr BE should store some state associated
+ * with the connection, in order to distinguish authenicated connections from any
+ * non-authenticated connections. The state associated with the connection may cache certain
+ * artifacts such as instance identifier, instance sequence number, transport ID, DICE chain
+ * and DICE policy of the AuthMgr FE, so that they can be reused when serving phase 2 requests.
+ * The requests for phase 2 of the authorization protocol are allowed only on authenticated
+ * connections.
+ *
+ * @param signedConnectionRequest - signature from AuthMgr FE (CBOR encoded according to
+ * SignedConnectionRequest.cddl)
+ *
+ * @param dicePolicy - DICE policy of the AuthMgr FE
+ *
+ * @throws ServiceSpecificException:
+ * Error::AUTHENTICATION_NOT_STARTED - when the authentication process has not been
+ * started for the pVM instance.
+ * Error::INSTANCE_ALREADY_AUTHENTICATED - when a pVM instance with the same
+ * `instanceIdentifier` or the same transport id has already been authenticated.
+ * Error::SIGNATURE_VERIFICATION_FAILED - when the signature verification fails.
+ * Error::INVALID_DICE_CERT_CHAIN - when the DICE certificate chain validation fails.
+ * Error::DICE_POLICY_MATCHING_FAILED - when the DICE certificate chain to DICE policy
+ * matching fails for the pVM instance.
+ * Error::INSTANCE_CONTEXT_CREATION_DENIED - when the creation of the pVM instances's
+ * context in the AuthMgr BE is not allowed.
+ * Error::INSTANCE_PENDING_DELETION - when a pVM that is being deleted is trying to
+ * authenticate.
+ *
+ */
+ void completeAuthentication(
+ in SignedConnectionRequest signedConnectionRequest, in DicePolicy dicePolicy);
+
+ /**
+ * When the AuthMgr FE receives a request from a client to access a trusted service, the
+ * AuthMgr FE first creates a new (out-of-band) connection with the AuthMgr BE and sends a
+ * one-time cryptographic token of 32 bytes over that new connection.
+ *
+ * The AuthMgr FE then invokes this method on the authenticated connection established with the
+ * AuthMgr BE in phase 1. When this method is invoked, the AuthMgr BE checks whether the
+ * underlying connection of this method call is already authenticated.
+ *
+ * The AuthMgr FE acts as the DICE manager for all the clients in the pVM and generates the DICE
+ * leaf certificate and the DICE leaf policy for the client, which are sent in the input:
+ * `clientDiceArtifacts`.
+ *
+ * The AuthMgr BE matches the client's DICE leaf certificate to the client's DICE policy.
+ * If this is the first invocation of this method in the lifetime of the client, the AuthMgr BE
+ * stores the client's DICE policy in the secure storage as part of the client's context, upon
+ * successful matching of the DICE certificate to the policy. The file path for the storage of
+ * the client's context should be constructed using the unique id assigned to the pVM instance
+ * by the AuthMgr BE (e.g. instance sequence number) and the client ID. There is no use
+ * case for deleting a client context or a pVM context created in the secure storage, for the
+ * first version of this API, outside of the factory reset. In the future, we expect to
+ * expose APIs for those tasks.
+ *
+ * In the subsequent invocations of this method, the AuthMgr BE matches the given DICE leaf
+ * certificate to the stored DICE policy in order to enforce rollback protection. If that
+ * succeeds and if the given DICE policy is different from the stored DICE policy, the AuthMgr
+ * BE replaces the stored DICE policy with the given DICE policy.
+ *
+ * If the same client requests multiple trusted services or connects to the same trusted service
+ * multiple times during the same boot cycle of the pVM instance, it is recommended to validate
+ * the client's DICE artifacts only once for a given client as an optimization.
+ *
+ * The AuthMgr BE keeps track of the aforementioned new connections that are pending
+ * authorization along with the tokens sent over them and the transport ID of the pVM instance
+ * which created those connections.
+ *
+ * The AuthMgr FE sends the same token that was sent over an aforementioned new connection
+ * in the input: `token` of this method call, in order to authorize the new connection, based on
+ * the trust in the authenticated connection established in phase 1.
+ *
+ * Once the validation of the client's DICE artifacts is completed, the AuthMgr BE retrieves the
+ * pending new connection to be authorized, which is associated with a token that matches the
+ * token sent in this method call and a transport ID that matches the transport ID associated
+ * with the connection underlying this method call.
+ *
+ * Next the AuthMgr BE connects to the trusted service requested by the client in order to
+ * handover the new authorized connection to the trusted service. Once the connection
+ * handover is successful, the AuthMgr BE returns OK to the AuthMgr FE. Then the AuthMgr FE
+ * returns to the client a handle to the new connection (created at the beginning of phase 2).
+ * At this point, an authorized connection is setup between the client and the trusted service,
+ * which they can use to communicate independently of the AuthMgr FE and the AuthMgr BE.
+ *
+ * @param clientID - the identifier of the client in the pVM instance, which is unique in the
+ * context of the pVM instance
+ *
+ * @param service name - the name of the trusted service requested by the client
+ *
+ * @param token - the one-time token used to authorize the new connection created between the
+ * AuthMgr FE and the AuthMgr BE
+ *
+ * @param clientDiceArtifacts - DICE leaf certificate and the DICE leaf policy of the client
+ *
+ * @throws ServiceSpecificException:
+ * Error::CONNECTION_NOT_AUTHENTICATED - when the underlying connection of this method
+ * call is not authenticated.
+ * Error::DICE_POLICY_MATCHING_FAILED - when the DICE certificate chain to DICE policy
+ * matching fails for the client.
+ * Error::NO_CONNECTION_TO_AUTHORIZE - when there is no pending new connection that
+ * is associated with a token and a transport ID that matches those of this
+ * method call.
+ * Error::CONNECTION_HANDOVER_FAILED - when the hanover of the authorized connection to
+ * the trusted service fails.
+ * Error::CLIENT_PENDING_DELETION - when a client that is being deleted is trying to be
+ * authorized.
+ */
+ void authorizeAndConnectClientToTrustedService(in byte[] clientID, String serviceName,
+ in byte[32] token, in DiceLeafArtifacts clientDiceArtifacts);
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
new file mode 100644
index 0000000..f258603
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.security.see.authmgr;
+
+/**
+ * The response from the AuthMgr FE which includes the challenge sent by the AuthMgr BE and other
+ * information signed by the AuthMgr FE's signing key.
+ */
+
+@VintfStability
+@RustDerive(Clone=true, Eq=true, PartialEq=true)
+parcelable SignedConnectionRequest {
+ /* Data is CBOR encoded according the CDDL in ./SignedConnectionRequest.cddl */
+ byte[] signedConnectionRequest;
+}
diff --git a/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl
new file mode 100644
index 0000000..a74ccd7
--- /dev/null
+++ b/security/see/authmgr/aidl/android/hardware/security/see/authmgr/SignedConnectionRequest.cddl
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+SignedConnectionRequestProtected = {
+ 1 : AlgorithmEdDSA / AlgorithmES256,
+}
+
+SignedConnectionRequest = [ ; COSE_Sign1 (untagged) [RFC9052 s4.2]
+ protected: bstr .cbor SignedConnectionRequesProtected,
+ unprotected: {},
+ payload: bstr .cbor ConnectionRequest,
+ signature: bstr ; PureEd25519(privateKey, SignedResponseSigStruct) /
+ ; ECDSA(privateKey, SignedResponseSigStruct)
+]
+
+ConnectionRequestSigStruct = [ ; Sig_structure for SignedConnectionRequest [ RFC9052 s4.4]
+ context: "Signature1",
+ body_protected: bstr .cbor SignedConnectionRequesProtected,
+ external_aad: bstr .cbor ExternalAADForDICESignedConnectionRequest,
+ payload: bstr .cbor ConnectionRequest,
+]
+
+; The payload structure signed by the DICE signing key
+ConnectionRequest [
+ challenge: bstr .size 32,
+ transport_type: TransportType, ; this indicates what CBOR structure should be exected for the
+ ; next element (i.e. transport_id_info)
+ transport_id_info: TransportIdInfo, ; this information is used to detect person-in-the-middle
+ ; attacks
+]
+
+; The unique id assigned to the `ConnectionRequest` payload structure
+ConnectionRequestUuid = h'34c82916 9579 4d86 baef 592a066419e4' ; bstr .size 16 (UUID v4 - RFC 9562)
+
+; An integer that identifies the type of the transport used for communication between clients and
+; trusted services
+TransportType = &(
+ FFA: 1,
+ ; Any other transport type(s) also be defined here
+)
+
+; Identity information of the peers provided by the transport layer
+TransportIdInfo = &(
+ FFATransportId,
+ ; Any other type(s) containing transport layer identity information should also be defiend here
+)
+
+; Transport ids (a.k.a VM IDs) provided by the FFA transport
+FFATransportId = [
+ feID: uint .size 2, ; FF-A partition ID of the AuthMgr FE
+ beID: uint .size 2, ; FF-A partition ID of the AuthMgr BE
+]
+
+; External AAD to be added to any Sig_structure signed by the DICE signing key, with the mandatory
+; field of `uuid_of_payload_struct` of type UUID v4 (RFC 9562). This field is required to ensure
+; that both the signer and the verifier refer to the same payload structure, given that there are
+; various payload structures signed by the DICE signing key in different protocols in Android.
+ExternalAADForDICESigned = [
+ uuid_of_payload_struct: buuid,
+]
+
+; RFC8610 - Section 3.6
+buuid = #6.37(bstr .size 16)
+
+ExternalAADForDICESignedConnectionRequest = [ ; ExternalAADForDICESigned for ConnectionRequest
+ uuid_of_payload_struct: #6.37(ConnectionRequestUuid),
+]
+
+AlgorithmES256 = -7 ; [RFC9053 s2.1]
+AlgorithmEdDSA = -8 ; [RFC9053 s2.2]
diff --git a/security/see/authmgr/aidl/vts/Android.bp b/security/see/authmgr/aidl/vts/Android.bp
new file mode 100644
index 0000000..3d6fce2
--- /dev/null
+++ b/security/see/authmgr/aidl/vts/Android.bp
@@ -0,0 +1,36 @@
+// Copyright (C) 2024 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["Android-Apache-2.0"],
+ default_team: "trendy_team_trusty",
+}
+
+rust_test {
+ name: "VtsAidlAuthMgrNonExistentTest",
+ srcs: ["test.rs"],
+ require_root: true,
+ test_suites: [
+ "general-tests",
+ "vts",
+ ],
+ rustlibs: [
+ "libbinder_rs",
+ ],
+}
diff --git a/security/see/authmgr/aidl/vts/test.rs b/security/see/authmgr/aidl/vts/test.rs
new file mode 100644
index 0000000..45533a7
--- /dev/null
+++ b/security/see/authmgr/aidl/vts/test.rs
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//! Test for asserting the non-existence of an IAuthMgrAuthorization.aidl
+
+#![cfg(test)]
+
+use binder;
+
+const AUTHMGR_INTERFACE_NAME: &str = "android.hardware.security.see.authmgr.IAuthMgrAuthorization";
+
+#[test]
+fn test_authmgr_non_existence() {
+ let authmgr_instances = match binder::get_declared_instances(AUTHMGR_INTERFACE_NAME) {
+ Ok(vec) => vec,
+ Err(e) => {
+ panic!("failed to retrieve the declared interfaces for AuthMgr: {:?}", e);
+ }
+ };
+ assert!(authmgr_instances.is_empty());
+}
diff --git a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl b/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
index 1b70a0e..dc1e6a8 100644
--- a/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
+++ b/staging/security/see/storage/aidl/android/hardware/security/see/storage/IStorageSession.aidl
@@ -44,6 +44,21 @@
void commitChanges();
/**
+ * If an A/B update is in progress, stages any pending changes made through this session to be
+ * committed when the A/B update completes successfully. If the update fails, the changes will
+ * be discarded.
+ *
+ * If no A/B update is in progess, behaves identically to `commitChanges`.
+ *
+ * After this call returns successfully, the session will no longer have pending changes. Files
+ * may then still be modified through this session to create another commit.
+ *
+ * May return service-specific errors:
+ * - ERR_BAD_TRANSACTION
+ */
+ void stageChangesForCommitOnAbUpdateComplete();
+
+ /**
* Abandons any pending changes made through this session.
*
* The session can then be reused to make new changes.
diff --git a/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl b/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
index 904496c..3cff780 100644
--- a/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
+++ b/thermal/aidl/aidl_api/android.hardware.thermal/current/android/hardware/thermal/IThermal.aidl
@@ -46,4 +46,5 @@
void unregisterThermalChangedCallback(in android.hardware.thermal.IThermalChangedCallback callback);
void registerCoolingDeviceChangedCallbackWithType(in android.hardware.thermal.ICoolingDeviceChangedCallback callback, in android.hardware.thermal.CoolingType type);
void unregisterCoolingDeviceChangedCallback(in android.hardware.thermal.ICoolingDeviceChangedCallback callback);
+ float forecastSkinTemperature(in int forecastSeconds);
}
diff --git a/thermal/aidl/android/hardware/thermal/IThermal.aidl b/thermal/aidl/android/hardware/thermal/IThermal.aidl
index 4aa4090..87f7637 100644
--- a/thermal/aidl/android/hardware/thermal/IThermal.aidl
+++ b/thermal/aidl/android/hardware/thermal/IThermal.aidl
@@ -225,4 +225,20 @@
* getMessage() must be populated with human-readable error message.
*/
void unregisterCoolingDeviceChangedCallback(in ICoolingDeviceChangedCallback callback);
+
+ /**
+ * Retrieves the forecasted skin temperature in Celsius.
+ *
+ * @param forecastSeconds the number of seconds to forecast the skin temperature, it should
+ * at least support superset of [0, 60] seconds range.
+ *
+ * @return forecasted skin temperature in Celsius.
+ *
+ * @throws EX_ILLEGAL_STATE If the Thermal HAL is not initialized successfully
+ * @throws EX_ILLEGAL_ARGUMENT If the provided forecastSeconds is negative
+ * @throws EX_UNSUPPORTED_OPERATION if API is not supported or the forecastSeconds exceeds the
+ * supported range. And the getMessage() must be populated with human-readable
+ * error message.
+ */
+ float forecastSkinTemperature(in int forecastSeconds);
}
diff --git a/thermal/aidl/default/Thermal.cpp b/thermal/aidl/default/Thermal.cpp
index 41d0be8..339e9b8 100644
--- a/thermal/aidl/default/Thermal.cpp
+++ b/thermal/aidl/default/Thermal.cpp
@@ -191,4 +191,9 @@
}
return ScopedAStatus::ok();
}
+
+ndk::ScopedAStatus Thermal::forecastSkinTemperature(int32_t, float*) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
} // namespace aidl::android::hardware::thermal::impl::example
diff --git a/thermal/aidl/default/Thermal.h b/thermal/aidl/default/Thermal.h
index d3d8874..a4d8b00 100644
--- a/thermal/aidl/default/Thermal.h
+++ b/thermal/aidl/default/Thermal.h
@@ -60,6 +60,8 @@
ndk::ScopedAStatus unregisterCoolingDeviceChangedCallback(
const std::shared_ptr<ICoolingDeviceChangedCallback>& in_callback) override;
+ ndk::ScopedAStatus forecastSkinTemperature(int32_t forecastSeconds,
+ float* _aidl_return) override;
private:
std::mutex thermal_callback_mutex_;
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 066e773..17653b4 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -426,6 +426,23 @@
}
}
+// Test Thermal->forecastSkinTemperature.
+TEST_P(ThermalAidlTest, ForecastSkinTemperatureTest) {
+ auto apiLevel = ::android::base::GetIntProperty<int32_t>("ro.vendor.api_level", 0);
+ if (apiLevel < 202504) {
+ GTEST_SKIP() << "Skipping test as the vendor level is below 202504: " << apiLevel;
+ }
+ float temperature = 0.0f;
+ ::ndk::ScopedAStatus status = mThermal->forecastSkinTemperature(1, &temperature);
+ if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+ GTEST_SKIP() << "Skipping test as temperature forecast is not supported";
+ }
+ for (int i = 0; i <= 60; i++) {
+ status = mThermal->forecastSkinTemperature(i, &temperature);
+ ASSERT_NE(NAN, temperature);
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ThermalAidlTest);
INSTANTIATE_TEST_SUITE_P(
Thermal, ThermalAidlTest,
diff --git a/vibrator/aidl/android/hardware/vibrator/CompositePwleV2.aidl b/vibrator/aidl/android/hardware/vibrator/CompositePwleV2.aidl
index 9662ca0..f0d0970 100644
--- a/vibrator/aidl/android/hardware/vibrator/CompositePwleV2.aidl
+++ b/vibrator/aidl/android/hardware/vibrator/CompositePwleV2.aidl
@@ -21,7 +21,11 @@
@VintfStability
parcelable CompositePwleV2 {
/**
- * An array of primitives that represents the PWLE effect
+ * Represents a PWLE (Piecewise-Linear Envelope) effect as an array of primitives.
+ *
+ * A PWLE effect defines a vibration waveform using amplitude and frequency points.
+ * The envelope linearly interpolates both amplitude and frequency between consecutive points,
+ * creating smooth transitions in the vibration pattern.
*/
PwleV2Primitive[] pwlePrimitives;
}
diff --git a/vibrator/aidl/android/hardware/vibrator/FrequencyAccelerationMapEntry.aidl b/vibrator/aidl/android/hardware/vibrator/FrequencyAccelerationMapEntry.aidl
index 470dc80..013ae84 100644
--- a/vibrator/aidl/android/hardware/vibrator/FrequencyAccelerationMapEntry.aidl
+++ b/vibrator/aidl/android/hardware/vibrator/FrequencyAccelerationMapEntry.aidl
@@ -29,7 +29,7 @@
*
* This value represents the maximum safe output acceleration (in Gs) achievable at the
* specified frequency, typically determined during calibration. The actual output acceleration
- * is assumed to scale linearly with the input amplitude within the range of [0, 1].
+ * should scale linearly based on the 'amplitude' input value.
*/
float maxOutputAccelerationGs;
}
diff --git a/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl b/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
index a2f0017..81d7948 100644
--- a/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
+++ b/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
@@ -472,7 +472,11 @@
int getPwleV2PrimitiveDurationMinMillis();
/**
- * Play composed sequence of chirps with optional callback upon completion.
+ * Play composed sequence of PWLEs with optional callback upon completion.
+ *
+ * A PWLE (Piecewise-Linear Envelope) effect defines a vibration waveform using amplitude and
+ * frequency points. The envelope linearly interpolates both amplitude and frequency between
+ * consecutive points, creating smooth transitions in the vibration pattern.
*
* This may not be supported and this support is reflected in
* getCapabilities (CAP_COMPOSE_PWLE_EFFECTS_V2).
diff --git a/vibrator/aidl/default/VibrationSession.cpp b/vibrator/aidl/default/VibrationSession.cpp
index cfb6608..4eac831 100644
--- a/vibrator/aidl/default/VibrationSession.cpp
+++ b/vibrator/aidl/default/VibrationSession.cpp
@@ -24,7 +24,7 @@
namespace hardware {
namespace vibrator {
-static constexpr int32_t SESSION_END_DELAY_MS = 50;
+static constexpr int32_t SESSION_END_DELAY_MS = 20;
ndk::ScopedAStatus VibrationSession::close() {
LOG(VERBOSE) << "Vibration Session close";
diff --git a/wifi/aidl/default/aidl_callback_util.h b/wifi/aidl/default/aidl_callback_util.h
index 2419db9..d077683 100644
--- a/wifi/aidl/default/aidl_callback_util.h
+++ b/wifi/aidl/default/aidl_callback_util.h
@@ -26,6 +26,7 @@
namespace {
std::unordered_map<void* /* callback */, void* /* handler */> callback_handler_map_;
std::mutex callback_handler_lock_;
+int32_t min_callback_version_ = INT_MAX;
}
namespace aidl {
@@ -50,6 +51,13 @@
return false;
}
+ // Callback interface version indicates which methods are available
+ int callbackVersion = getCallbackInterfaceVersion(cb);
+ if (callbackVersion < min_callback_version_) {
+ LOG(INFO) << "Setting min callback version to " << callbackVersion;
+ min_callback_version_ = callbackVersion;
+ }
+
std::unique_lock<std::mutex> lk(callback_handler_lock_);
void* cbPtr = reinterpret_cast<void*>(cb->asBinder().get());
const auto& cbPosition = findCbInSet(cbPtr);
@@ -111,6 +119,8 @@
// unique_lock unlocked here
}
+ int32_t getMinCallbackVersion() { return min_callback_version_; }
+
private:
std::set<std::shared_ptr<CallbackType>> cb_set_;
AIBinder_DeathRecipient* death_handler_;
@@ -145,6 +155,15 @@
}
}
+ static int32_t getCallbackInterfaceVersion(std::shared_ptr<CallbackType> callback) {
+ int32_t callbackVersion;
+ if (!callback->getInterfaceVersion(&callbackVersion).isOk()) {
+ LOG(ERROR) << "Unable to check the callback version";
+ return INT_MAX;
+ }
+ return callbackVersion;
+ }
+
DISALLOW_COPY_AND_ASSIGN(AidlCallbackHandler);
};
diff --git a/wifi/aidl/default/wifi_nan_iface.cpp b/wifi/aidl/default/wifi_nan_iface.cpp
index cefe7f7..9d50798 100644
--- a/wifi/aidl/default/wifi_nan_iface.cpp
+++ b/wifi/aidl/default/wifi_nan_iface.cpp
@@ -672,6 +672,10 @@
return ifname_;
}
+int32_t WifiNanIface::getMinCallbackVersion() {
+ return event_cb_handler_.getMinCallbackVersion();
+}
+
std::set<std::shared_ptr<IWifiNanIfaceEventCallback>> WifiNanIface::getEventCallbacks() {
LOG(ERROR) << "Using original getEventCallbacks";
return event_cb_handler_.getCallbacks();
diff --git a/wifi/aidl/default/wifi_nan_iface.h b/wifi/aidl/default/wifi_nan_iface.h
index a49ae8c..d2d1d5c 100644
--- a/wifi/aidl/default/wifi_nan_iface.h
+++ b/wifi/aidl/default/wifi_nan_iface.h
@@ -134,6 +134,8 @@
ndk::ScopedAStatus suspendRequestInternal(char16_t in_cmdId, int8_t sessionId);
ndk::ScopedAStatus resumeRequestInternal(char16_t in_cmdId, int8_t sessionId);
+ int32_t getMinCallbackVersion();
+
// Overridden in the gTest suite.
virtual std::set<std::shared_ptr<IWifiNanIfaceEventCallback>> getEventCallbacks();
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index d54e44c..c584d57 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -79,6 +79,9 @@
*/
void provisionDiscovery(in byte[] peerAddress, in android.hardware.wifi.supplicant.WpsProvisionMethod provisionMethod);
void registerCallback(in android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback callback);
+ /**
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use reinvokePersistentGroup.
+ */
void reinvoke(in int persistentNetworkId, in byte[] peerAddress);
void reject(in byte[] peerAddress);
void removeBonjourService(in byte[] query);
@@ -132,6 +135,9 @@
int startUsdBasedServiceAdvertisement(in android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig serviceAdvertisementConfig);
void stopUsdBasedServiceAdvertisement(in int sessionId);
void provisionDiscoveryWithParams(in android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams params);
+ android.hardware.wifi.supplicant.P2pDirInfo getDirInfo();
+ int validateDirInfo(in android.hardware.wifi.supplicant.P2pDirInfo dirInfo);
+ void reinvokePersistentGroup(in android.hardware.wifi.supplicant.P2pReinvokePersistentGroupParams reinvokeGroupParams);
const long P2P_FEATURE_V2 = (1 << 0) /* 1 */;
const long P2P_FEATURE_PCC_MODE_WPA3_COMPATIBILITY = (1 << 1) /* 2 */;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index 88dd740..a88a829 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -43,4 +43,7 @@
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
int pairingBootstrappingMethod;
@nullable String password;
+ int frequencyMHz;
+ boolean authorizeConnectionFromPeer;
+ @nullable String groupInterfaceName;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index 68cde9e..184fbd0 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -46,4 +46,5 @@
byte[] vendorElemBytes;
@nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
int pairingBootstrappingMethods;
+ @nullable android.hardware.wifi.supplicant.P2pDirInfo dirInfo;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
similarity index 77%
copy from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
copy to wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
index f42e1d0..2c55410 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pDirInfo.aidl
@@ -31,25 +31,16 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.wifi.supplicant;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
+parcelable P2pDirInfo {
+ android.hardware.wifi.supplicant.P2pDirInfo.CipherVersion cipherVersion;
+ byte[6] deviceInterfaceMacAddress;
+ byte[] nonce;
+ byte[] dirTag;
+ @Backing(type="int") @VintfStability
+ enum CipherVersion {
+ NONE,
+ DIRA_CIPHER_VERSION_128_BIT,
}
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
index 6e83277..182c091 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -39,4 +39,5 @@
const int BOOTSTRAPPING_DISPLAY_PASSPHRASE = (1 << 2) /* 4 */;
const int BOOTSTRAPPING_KEYPAD_PINCODE = (1 << 3) /* 8 */;
const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = (1 << 4) /* 16 */;
+ const int BOOTSTRAPPING_OUT_OF_BAND = (1 << 5) /* 32 */;
}
diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
similarity index 77%
rename from gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
rename to wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
index f42e1d0..0743a64 100644
--- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
@@ -31,25 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.gnss.gnss_assistance;
-/* @hide */
+package android.hardware.wifi.supplicant;
@VintfStability
-parcelable BeidouAlmanac {
- int beidouWeekNumber;
- android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac;
- @VintfStability
- parcelable BeidouSatelliteAlmanac {
- int prn;
- int svHealth;
- int toaSeconds;
- double eccentricity;
- double deltaI;
- double omega;
- double omega0;
- double omegaDot;
- double rootA;
- double m0;
- double af0;
- double af1;
- }
+parcelable P2pReinvokePersistentGroupParams {
+ byte[6] peerMacAddress;
+ int persistentNetworkId;
+ int deviceIdentityEntryId;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
index d7ff798..8675ab3 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
@@ -46,4 +46,5 @@
FAILURE_NETWORK_UNKNOWN,
FAILURE_UNSUPPORTED,
FAILURE_ONGOING_REQUEST,
+ FAILURE_DATA_NOT_AVAILABLE,
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
index 62f9fc3..75e65ff 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/ISupplicantP2pIface.aidl
@@ -25,11 +25,13 @@
import android.hardware.wifi.supplicant.P2pAddGroupConfigurationParams;
import android.hardware.wifi.supplicant.P2pConnectInfo;
import android.hardware.wifi.supplicant.P2pCreateGroupOwnerInfo;
+import android.hardware.wifi.supplicant.P2pDirInfo;
import android.hardware.wifi.supplicant.P2pDiscoveryInfo;
import android.hardware.wifi.supplicant.P2pExtListenInfo;
import android.hardware.wifi.supplicant.P2pFrameTypeMask;
import android.hardware.wifi.supplicant.P2pGroupCapabilityMask;
import android.hardware.wifi.supplicant.P2pProvisionDiscoveryParams;
+import android.hardware.wifi.supplicant.P2pReinvokePersistentGroupParams;
import android.hardware.wifi.supplicant.P2pUsdBasedServiceAdvertisementConfig;
import android.hardware.wifi.supplicant.P2pUsdBasedServiceDiscoveryConfig;
import android.hardware.wifi.supplicant.WpsConfigMethods;
@@ -439,6 +441,9 @@
/**
* Reinvoke a device from a persistent group.
+ * <p>
+ * @deprecated This method is deprecated from AIDL v4, newer HALs should use
+ * reinvokePersistentGroup.
*
* @param persistentNetworkId Used to specify the persistent group.
* @param peerAddress MAC address of the device to reinvoke.
@@ -1022,4 +1027,42 @@
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
*/
void provisionDiscoveryWithParams(in P2pProvisionDiscoveryParams params);
+
+ /**
+ * The Device Identity Resolution (DIR) Info used to send in
+ * Bluetooth LE advertising packet for the receiving device to
+ * check if the device is a previously paired device.
+ *
+ * @return The DIR info - |P2pDirInfo|
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_DATA_NOT_AVAILABLE|
+ */
+ P2pDirInfo getDirInfo();
+
+ /**
+ * Validate a Device Identity Resolution (DIR) Info of a P2P device.
+ * wpa_supplicant takes the |P2pDirInfo| and derives a set of Tag values based on
+ * the cached Device Identity Keys (DevIK) of all paired peers saved in the
+ * configuration file. If a derived Tag value matches the Tag value received in the
+ * |P2pDirInfo|, the device is identified as a paired peer and returns an identifier
+ * identifying the device identity key information stored in the configuration file.
+ *
+ * @return The identifier of device identity key stored in the configuration file.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ int validateDirInfo(in P2pDirInfo dirInfo);
+
+ /**
+ * Reinvoke a device from a persistent group.
+ *
+ * @param reinvokeGroupParams Parameters associated to reinvoke a group.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ void reinvokePersistentGroup(in P2pReinvokePersistentGroupParams reinvokeGroupParams);
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
index 8f3c596..6467436 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pConnectInfo.aidl
@@ -25,7 +25,8 @@
@VintfStability
parcelable P2pConnectInfo {
/**
- * MAC address of the device to connect to.
+ * MAC address of the peer device to connect to or to authorize a connect
+ * request.
*/
byte[6] peerAddress;
@@ -82,4 +83,23 @@
* null otherwise.
*/
@nullable String password;
+
+ /**
+ * Channel frequency in MHz to start group formation,
+ * join an existing group owner or authorize a connection request.
+ */
+ int frequencyMHz;
+
+ /**
+ * Used to authorize a connection request from the Peer device.
+ * The MAC address of the peer device is set in peerAddress.
+ */
+ boolean authorizeConnectionFromPeer;
+
+ /**
+ * Used to check if the authorize connection request is on an existing Group Owner
+ * interface to allow a peer device to connect. This field is set to null if the request
+ * is to form a group or join an existing group.
+ */
+ @nullable String groupInterfaceName;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
index 31e64ac..e320954 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDeviceFoundEventParams.aidl
@@ -17,6 +17,7 @@
package android.hardware.wifi.supplicant;
import android.hardware.wifi.common.OuiKeyedData;
+import android.hardware.wifi.supplicant.P2pDirInfo;
/**
* Parameters passed as a part of a P2P Device found event.
@@ -95,4 +96,9 @@
* the pairing bootstrapping between bootstrapping initiator and a bootstrapping responder.
*/
int pairingBootstrappingMethods;
+
+ /**
+ * The Device Identity Resolution Attribute (DIRA) |P2pDirInfo| received in the USD frame.
+ */
+ @nullable P2pDirInfo dirInfo;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.aidl
new file mode 100644
index 0000000..22037ed
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pDirInfo.aidl
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant;
+
+/**
+ * The Device Identity Resolution (DIR) Info is used to identify a previously
+ * paired P2P device.
+ * The device advertises this information in Bluetooth LE advertising packets
+ * and Unsynchronized Service Discovery (USD) frames. The device receiving DIR
+ * Info uses this information to identify that the peer device is a previously paired device.
+ * For Details, refer Wi-Fi Alliance Wi-Fi Direct R2 specification section 3.8.2 Pairing Identity
+ * and section 3.9.2.3.2 Optional Advertising Data Elements.
+ */
+@VintfStability
+parcelable P2pDirInfo {
+ /**
+ * Enums for the |cipherVersion| field.
+ */
+ @VintfStability
+ @Backing(type="int")
+ enum CipherVersion {
+ NONE,
+ /**
+ * DIRA cipher version 128 bit.
+ * 128-bit Device Identity Key, 64-bit Nonce, 64-bit Tag.
+ * 64-bit Tag = Truncate-64(HMAC-SHA-256(DevIk, "DIR" ||
+ * P2P Device Address || Nonce))
+ */
+ DIRA_CIPHER_VERSION_128_BIT,
+ }
+
+ /**
+ * DIRA cipher version. The value of cipher version indicates the
+ * cryptographic parameters and method used to derive the dirTag field.
+ * Set to one of the |DIRA_CIPHER_VERSION_*|.
+ */
+ CipherVersion cipherVersion;
+
+ /**
+ * The MAC address of the P2P device interface.
+ */
+ byte[6] deviceInterfaceMacAddress;
+
+ /**
+ * Random number. The size limit is defined in the cipher version comment.
+ */
+ byte[] nonce;
+
+ /**
+ * A resolvable identity. The size limit is defined in the cipher version comment.
+ */
+ byte[] dirTag;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
index cac8c53..03c2703 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pPairingBootstrappingMethodMask.aidl
@@ -31,4 +31,9 @@
const int BOOTSTRAPPING_KEYPAD_PINCODE = 1 << 3;
/** Keypad passphrase */
const int BOOTSTRAPPING_KEYPAD_PASSPHRASE = 1 << 4;
+ /**
+ * Pairing bootstrapping done Out of band (For example: Over Bluetooth LE.
+ * Refer Wi-Fi Alliance Wi-Fi Direct R2 specification Section 3.9 for the details).
+ */
+ const int BOOTSTRAPPING_OUT_OF_BAND = 1 << 5;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
new file mode 100644
index 0000000..f5f4562
--- /dev/null
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pReinvokePersistentGroupParams.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant;
+
+/**
+ * Parameters used for |ISupplicantP2pIface.reinvokePersistentGroup|
+ */
+@VintfStability
+parcelable P2pReinvokePersistentGroupParams {
+ /**
+ * MAC address of the peer device to reinvoke the persistent group.
+ */
+ byte[6] peerMacAddress;
+
+ /**
+ * Persistent network ID of the group.
+ */
+ int persistentNetworkId;
+
+ /**
+ * The identifier of device identity key information stored in the configuration file.
+ * This field is valid only for P2P group formed via pairing protocol (P2P version 2).
+ * Set to invalid value of -1 for a group formed via WPS process (P2P version 1).
+ */
+ int deviceIdentityEntryId;
+}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
index e97d6ee..271da7f 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.aidl
@@ -67,4 +67,8 @@
* A different request is currently being processed.
*/
FAILURE_ONGOING_REQUEST,
+ /**
+ * Requested data is not available.
+ */
+ FAILURE_DATA_NOT_AVAILABLE,
}
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
index 3226ffd..3638ac5 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
@@ -43,6 +43,7 @@
using aidl::android::hardware::wifi::supplicant::P2pConnectInfo;
using aidl::android::hardware::wifi::supplicant::P2pCreateGroupOwnerInfo;
using aidl::android::hardware::wifi::supplicant::P2pDeviceFoundEventParams;
+using aidl::android::hardware::wifi::supplicant::P2pDirInfo;
using aidl::android::hardware::wifi::supplicant::P2pDiscoveryInfo;
using aidl::android::hardware::wifi::supplicant::P2pExtListenInfo;
using aidl::android::hardware::wifi::supplicant::P2pFrameTypeMask;
@@ -56,7 +57,7 @@
using aidl::android::hardware::wifi::supplicant::P2pProvDiscStatusCode;
using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryCompletedEventParams;
using aidl::android::hardware::wifi::supplicant::P2pProvisionDiscoveryParams;
-;
+using aidl::android::hardware::wifi::supplicant::P2pReinvokePersistentGroupParams;
using aidl::android::hardware::wifi::supplicant::P2pScanType;
using aidl::android::hardware::wifi::supplicant::P2pStatusCode;
using aidl::android::hardware::wifi::supplicant::P2pUsdBasedServiceAdvertisementConfig;
@@ -80,6 +81,8 @@
const std::string kTestServiceSpecificInfoStr = "TestServiceSpecificInfo";
const std::vector<uint8_t> kTestServiceSpecificInfo = std::vector<uint8_t>(
kTestServiceSpecificInfoStr.begin(), kTestServiceSpecificInfoStr.end());
+const std::vector<uint8_t> kTestNonce = {0x11, 0x22, 0x33, 0x44, 0x55, 0x92, 0x22, 0x33};
+const std::vector<uint8_t> kTestDirTag = {0xaa, 0x22, 0x55, 0x44, 0x55, 0x92, 0x22, 0x33};
const std::string kTestPassphrase = "P2pWorld1234";
const std::string kTestConnectPin = "34556665";
const std::string kTestGroupIfName = "TestGroup";
@@ -924,6 +927,60 @@
EXPECT_TRUE(p2p_iface_->provisionDiscoveryWithParams(params).isOk());
}
+/*
+ * ValidateDirInfo
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, ValidateDirInfo) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "ValidateDirInfo is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ int32_t ret;
+ P2pDirInfo dirInfo;
+ dirInfo.cipherVersion = P2pDirInfo::CipherVersion::DIRA_CIPHER_VERSION_128_BIT;
+ dirInfo.deviceInterfaceMacAddress = vecToArrayMacAddr(kTestMacAddr);
+ dirInfo.nonce = kTestNonce;
+ dirInfo.dirTag = kTestDirTag;
+ EXPECT_TRUE(p2p_iface_->validateDirInfo(dirInfo, &ret).isOk());
+}
+
+/*
+ * GetDirInfo
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, GetDirInfo) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "GetDirInfo is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ P2pDirInfo dirInfo;
+ EXPECT_TRUE(p2p_iface_->getDirInfo(&dirInfo).isOk());
+}
+
+/*
+ * ReinvokePersistentGroup
+ */
+TEST_P(SupplicantP2pIfaceAidlTest, ReinvokePersistentGroup) {
+ if (interface_version_ < 4) {
+ GTEST_SKIP() << "ReinvokePersistentGroup is available as of Supplicant V4";
+ }
+ if (!(supported_features_ & ISupplicantP2pIface::P2P_FEATURE_V2)) {
+ GTEST_SKIP() << "P2P2 is not supported";
+ }
+
+ P2pReinvokePersistentGroupParams params;
+ params.peerMacAddress = vecToArrayMacAddr(kTestMacAddr);
+ params.persistentNetworkId = 0;
+ params.deviceIdentityEntryId = 0;
+
+ EXPECT_TRUE(p2p_iface_->reinvokePersistentGroup(params).isOk());
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SupplicantP2pIfaceAidlTest);
INSTANTIATE_TEST_SUITE_P(Supplicant, SupplicantP2pIfaceAidlTest,
testing::ValuesIn(android::getAidlHalInstanceNames(