Merge "Expose more from hwtrust for DICE chain validation" into main
diff --git a/audio/aidl/default/CapEngineConfigXmlConverter.cpp b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
index 8210664..a6e78b9 100644
--- a/audio/aidl/default/CapEngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
@@ -69,29 +69,36 @@
std::string criterionName = xsdcRule.getSelectionCriterion();
std::string criterionValue = xsdcRule.getValue();
if (iequals(criterionName, toString(Tag::availableInputDevices))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::availableInputDevices>();
- rule.criterionTypeValue =
- VALUE_OR_RETURN(convertDeviceTypeToAidl(gLegacyInputDevicePrefix + criterionValue));
+ AudioHalCapCriterionV2::AvailableDevices value;
+ value.values.emplace_back(VALUE_OR_RETURN(
+ convertDeviceTypeToAidl(gLegacyInputDevicePrefix + criterionValue)));
+ rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::availableInputDevices>(value);
+
} else if (iequals(criterionName, toString(Tag::availableOutputDevices))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::availableOutputDevices>();
- rule.criterionTypeValue = VALUE_OR_RETURN(
- convertDeviceTypeToAidl(gLegacyOutputDevicePrefix + criterionValue));
+ AudioHalCapCriterionV2::AvailableDevices value;
+ value.values.emplace_back(VALUE_OR_RETURN(
+ convertDeviceTypeToAidl(gLegacyOutputDevicePrefix + criterionValue)));
+ rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::availableOutputDevices>(value);
} else if (iequals(criterionName, toString(Tag::availableInputDevicesAddresses))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::availableInputDevicesAddresses>();
- rule.criterionTypeValue =
- AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(criterionValue);
+ AudioHalCapCriterionV2::AvailableDevicesAddresses value;
+ value.values.emplace_back(criterionValue);
+ rule.criterionAndValue =
+ AudioHalCapCriterionV2::make<Tag::availableInputDevicesAddresses>(value);
} else if (iequals(criterionName, toString(Tag::availableOutputDevicesAddresses))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::availableOutputDevicesAddresses>();
- rule.criterionTypeValue =
- AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(criterionValue);
+ AudioHalCapCriterionV2::AvailableDevicesAddresses value;
+ value.values.emplace_back(criterionValue);
+ rule.criterionAndValue =
+ AudioHalCapCriterionV2::make<Tag::availableOutputDevicesAddresses>(value);
} else if (iequals(criterionName, toString(Tag::telephonyMode))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::telephonyMode>();
- rule.criterionTypeValue = VALUE_OR_RETURN(convertTelephonyModeToAidl(criterionValue));
+ AudioHalCapCriterionV2::TelephonyMode value;
+ value.values.emplace_back(VALUE_OR_RETURN(convertTelephonyModeToAidl(criterionValue)));
+ rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::telephonyMode>(value);
} else if (!fastcmp<strncmp>(criterionName.c_str(), kXsdcForceConfigForUse,
strlen(kXsdcForceConfigForUse))) {
- rule.criterion = AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(
- VALUE_OR_RETURN(convertForceUseCriterionToAidl(criterionName)));
- rule.criterionTypeValue = VALUE_OR_RETURN(convertForcedConfigToAidl(criterionValue));
+ AudioHalCapCriterionV2::ForceConfigForUse value;
+ value.forceUse = VALUE_OR_RETURN(convertForceUseCriterionToAidl(criterionName));
+ value.values.emplace_back(VALUE_OR_RETURN(convertForcedConfigToAidl(criterionValue)));
+ rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(value);
} else {
LOG(ERROR) << __func__ << " unrecognized criterion " << criterionName;
return unexpected(BAD_VALUE);
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index f0622a8..d716975 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -429,19 +429,28 @@
}
}
- // Generate multitone input between -1 to +1 using testFrequencies
- void generateMultiTone(const std::vector<int>& testFrequencies, std::vector<float>& input,
- const int samplingFrequency) {
+ // Generate multitone input between -amplitude to +amplitude using testFrequencies
+ // All test frequencies are considered having the same amplitude
+ void generateSineWave(const std::vector<int>& testFrequencies, std::vector<float>& input,
+ const float amplitude = 1.0,
+ const int samplingFrequency = kSamplingFrequency) {
for (size_t i = 0; i < input.size(); i++) {
input[i] = 0;
for (size_t j = 0; j < testFrequencies.size(); j++) {
input[i] += sin(2 * M_PI * testFrequencies[j] * i / samplingFrequency);
}
- input[i] /= testFrequencies.size();
+ input[i] *= amplitude / testFrequencies.size();
}
}
+ // Generate single tone input between -amplitude to +amplitude using testFrequency
+ void generateSineWave(const int testFrequency, std::vector<float>& input,
+ const float amplitude = 1.0,
+ const int samplingFrequency = kSamplingFrequency) {
+ generateSineWave(std::vector<int>{testFrequency}, input, amplitude, samplingFrequency);
+ }
+
// Use FFT transform to convert the buffer to frequency domain
// Compute its magnitude at binOffsets
std::vector<float> calculateMagnitude(const std::vector<float>& buffer,
diff --git a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
index 25fcd46..583143c 100644
--- a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
@@ -355,7 +355,6 @@
const AudioHalCapRule& rule,
const std::vector<std::optional<AudioHalCapCriterionV2>>& criteria) {
const auto& compoundRule = rule.compoundRule;
- using TypeTag = AudioHalCapCriterionV2::Type::Tag;
if (rule.nestedRules.empty() && rule.criterionRules.empty()) {
EXPECT_EQ(compoundRule, AudioHalCapRule::CompoundRule::ALL);
}
@@ -365,8 +364,8 @@
ValidateAudioHalConfigurationRule(nestedRule, criteria);
}
for (const auto& criterionRule : rule.criterionRules) {
- auto selectionCriterion = criterionRule.criterion;
- auto criterionValue = criterionRule.criterionTypeValue;
+ auto selectionCriterion = criterionRule.criterionAndValue;
+ auto criterionValue = criterionRule.criterionAndValue;
auto matchesWhen = criterionRule.matchingRule;
auto criteriaIt = find_if(criteria.begin(), criteria.end(), [&](const auto& criterion) {
return criterion.has_value() &&
@@ -377,50 +376,65 @@
AudioHalCapCriterionV2 matchingCriterion = (*criteriaIt).value();
switch (selectionCriterion.getTag()) {
case AudioHalCapCriterionV2::availableInputDevices: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesType);
+ const auto& values =
+ criterionValue.get<AudioHalCapCriterionV2::availableInputDevices>()
+ .values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
matchingCriterion.get<AudioHalCapCriterionV2::availableInputDevices>(),
- criterionValue.get<TypeTag::availableDevicesType>(), matchesWhen);
+ values[0], matchesWhen);
break;
}
case AudioHalCapCriterionV2::availableOutputDevices: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesType);
+ const auto& values =
+ criterionValue.get<AudioHalCapCriterionV2::availableOutputDevices>()
+ .values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
matchingCriterion.get<AudioHalCapCriterionV2::availableOutputDevices>(),
- criterionValue.get<TypeTag::availableDevicesType>(), matchesWhen);
+ values[0], matchesWhen);
break;
}
case AudioHalCapCriterionV2::availableInputDevicesAddresses: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesAddressesType);
+ const auto& values =
+ criterionValue
+ .get<AudioHalCapCriterionV2::availableInputDevicesAddresses>()
+ .values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
matchingCriterion
.get<AudioHalCapCriterionV2::availableInputDevicesAddresses>(),
- criterionValue.get<TypeTag::availableDevicesAddressesType>(),
- matchesWhen);
+ values[0], matchesWhen);
break;
}
case AudioHalCapCriterionV2::availableOutputDevicesAddresses: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesAddressesType);
+ const auto& values =
+ criterionValue
+ .get<AudioHalCapCriterionV2::availableOutputDevicesAddresses>()
+ .values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
matchingCriterion
.get<AudioHalCapCriterionV2::availableOutputDevicesAddresses>(),
- criterionValue.get<TypeTag::availableDevicesAddressesType>(),
- matchesWhen);
+ values[0], matchesWhen);
break;
}
case AudioHalCapCriterionV2::telephonyMode: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::telephonyModeType);
+ const auto& values =
+ criterionValue.get<AudioHalCapCriterionV2::telephonyMode>().values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
matchingCriterion.get<AudioHalCapCriterionV2::telephonyMode>(),
- criterionValue.get<TypeTag::telephonyModeType>(), matchesWhen);
+ values[0], matchesWhen);
break;
}
case AudioHalCapCriterionV2::forceConfigForUse: {
- EXPECT_EQ(criterionValue.getTag(), TypeTag::forcedConfigType);
+ const auto& values =
+ criterionValue.get<AudioHalCapCriterionV2::forceConfigForUse>().values;
+ ASSERT_FALSE(values.empty());
validateAudioHalCapRule(
- matchingCriterion
- .get<AudioHalCapCriterionV2::forceConfigForUse>(),
- criterionValue.get<TypeTag::forcedConfigType>(), matchesWhen);
+ matchingCriterion.get<AudioHalCapCriterionV2::forceConfigForUse>(),
+ values[0], matchesWhen);
break;
}
default:
diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
index 4c54043..5a24be7 100644
--- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
@@ -187,18 +187,6 @@
}
}
- // Generate multitone input between -1 to +1 using testFrequencies
- void generateMultiTone(const std::vector<int>& testFrequencies, std::vector<float>& input) {
- for (auto i = 0; i < kInputSize; i++) {
- input[i] = 0;
-
- for (size_t j = 0; j < testFrequencies.size(); j++) {
- input[i] += sin(2 * M_PI * testFrequencies[j] * i / kSamplingFrequency);
- }
- input[i] /= testFrequencies.size();
- }
- }
-
// Use FFT transform to convert the buffer to frequency domain
// Compute its magnitude at binOffsets
std::vector<float> calculateMagnitude(const std::vector<float>& buffer,
@@ -251,7 +239,8 @@
roundToFreqCenteredToFftBin(testFrequencies, binOffsets);
- generateMultiTone(testFrequencies, input);
+ // Generate multitone input
+ generateSineWave(testFrequencies, input);
inputMag = calculateMagnitude(input, binOffsets);
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index 1e4e735..a29920e 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -224,12 +224,6 @@
output.size());
}
- void generateSineWaveInput(std::vector<float>& input) {
- int frequency = 1000;
- for (size_t i = 0; i < input.size(); i++) {
- input[i] = sin(2 * M_PI * frequency * i / kSamplingFrequency);
- }
- }
using Maker = EnvironmentalReverb (*)(int);
static constexpr std::array<Maker, static_cast<int>(EnvironmentalReverb::bypass) + 1>
@@ -287,6 +281,7 @@
static constexpr int kDurationMilliSec = 500;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
+ static constexpr int kInputFrequency = 1000;
int mStereoChannelCount =
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
@@ -349,7 +344,7 @@
: EnvironmentalReverbHelper(std::get<DESCRIPTOR_INDEX>(GetParam())) {
std::tie(mTag, mParamValues) = std::get<TAG_VALUE_PAIR>(GetParam());
mInput.resize(kBufferSize);
- generateSineWaveInput(mInput);
+ generateSineWave(kInputFrequency, mInput);
}
void SetUp() override {
SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
@@ -439,7 +434,7 @@
TEST_P(EnvironmentalReverbMinimumParamTest, MinimumValueTest) {
std::vector<float> input(kBufferSize);
- generateSineWaveInput(input);
+ generateSineWave(kInputFrequency, input);
std::vector<float> output(kBufferSize);
setParameterAndProcess(input, output, mValue, mTag);
float energy = computeOutputEnergy(input, output);
@@ -475,7 +470,7 @@
: EnvironmentalReverbHelper(std::get<DESCRIPTOR_INDEX>(GetParam())) {
std::tie(mTag, mParamValues) = std::get<TAG_VALUE_PAIR>(GetParam());
mInput.resize(kBufferSize);
- generateSineWaveInput(mInput);
+ generateSineWave(kInputFrequency, mInput);
}
void SetUp() override {
SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
@@ -554,7 +549,7 @@
if (mIsInputMute) {
std::fill(mInput.begin(), mInput.end(), 0);
} else {
- generateSineWaveInput(mInput);
+ generateSineWave(kInputFrequency, mInput);
}
}
void SetUp() override {
diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
index 8b82427..3ce9e53 100644
--- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
@@ -132,7 +132,8 @@
public:
PresetReverbProcessTest() {
std::tie(mFactory, mDescriptor) = GetParam();
- generateSineWaveInput();
+ mInput.resize(kBufferSize);
+ generateSineWave(1000 /*Input Frequency*/, mInput);
}
void SetUp() override {
@@ -144,13 +145,6 @@
ASSERT_NO_FATAL_FAILURE(TearDownPresetReverb());
}
- void generateSineWaveInput() {
- int frequency = 1000;
- for (size_t i = 0; i < kBufferSize; i++) {
- mInput.push_back(sin(2 * M_PI * frequency * i / kSamplingFrequency));
- }
- }
-
bool isAuxiliary() {
return mDescriptor.common.flags.type ==
aidl::android::hardware::audio::effect::Flags::Type::AUXILIARY;
diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
index 1b7dd67..3021370 100644
--- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
@@ -163,10 +163,7 @@
if (mZeroInput) {
std::fill(buffer.begin(), buffer.end(), 0);
} else {
- int frequency = 100;
- for (size_t i = 0; i < buffer.size(); i++) {
- buffer[i] = sin(2 * M_PI * frequency * i / kSamplingFrequency);
- }
+ generateSineWave(1000 /*Input Frequency*/, buffer);
}
}
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 14ebc4a..b58c1c6 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -162,7 +162,7 @@
mInputMag.resize(mTestFrequencies.size());
mBinOffsets.resize(mTestFrequencies.size());
roundToFreqCenteredToFftBin(mTestFrequencies, mBinOffsets, kBinWidth);
- generateMultiTone(mTestFrequencies, mInput, kSamplingFrequency);
+ generateSineWave(mTestFrequencies, mInput);
mInputMag = calculateMagnitude(mInput, mBinOffsets, kNPointFFT);
}
diff --git a/automotive/evs/aidl/Android.bp b/automotive/evs/aidl/Android.bp
index dfb15c6..9f5ab97 100644
--- a/automotive/evs/aidl/Android.bp
+++ b/automotive/evs/aidl/Android.bp
@@ -28,9 +28,11 @@
"android/hardware/automotive/evs/*.aidl",
],
stability: "vintf",
+ defaults: [
+ "android.hardware.graphics.common-latest",
+ ],
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V5",
],
backend: {
java: {
diff --git a/camera/device/aidl/Android.bp b/camera/device/aidl/Android.bp
index 78aefac..31c2dbe 100644
--- a/camera/device/aidl/Android.bp
+++ b/camera/device/aidl/Android.bp
@@ -14,12 +14,14 @@
srcs: ["android/hardware/camera/device/*.aidl"],
frozen: true,
stability: "vintf",
+ defaults: [
+ "android.hardware.graphics.common-latest",
+ ],
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
"android.hardware.camera.common-V1",
"android.hardware.camera.metadata-V3",
- "android.hardware.graphics.common-V5",
],
backend: {
cpp: {
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index cd8fe2d..9e4a6c3 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -388,7 +388,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.config</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
@@ -406,7 +406,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.messaging</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioMessaging</name>
<instance>slot1</instance>
@@ -416,7 +416,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.modem</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioModem</name>
<instance>slot1</instance>
@@ -426,7 +426,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.network</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioNetwork</name>
<instance>slot1</instance>
@@ -436,7 +436,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.sim</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioSim</name>
<instance>slot1</instance>
@@ -456,7 +456,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.voice</name>
- <version>3</version>
+ <version>3-4</version>
<interface>
<name>IRadioVoice</name>
<instance>slot1</instance>
@@ -466,7 +466,7 @@
</hal>
<hal format="aidl">
<name>android.hardware.radio.ims</name>
- <version>2</version>
+ <version>2-3</version>
<interface>
<name>IRadioIms</name>
<instance>slot1</instance>
diff --git a/graphics/Android.bp b/graphics/Android.bp
index cae5292..ac5c17f 100644
--- a/graphics/Android.bp
+++ b/graphics/Android.bp
@@ -16,6 +16,23 @@
default_applicable_licenses: ["hardware_interfaces_license"],
}
+aidl_interface_defaults {
+ name: "android.hardware.graphics.allocator-latest",
+ imports: [
+ "android.hardware.graphics.allocator-V2",
+ ],
+}
+
+rust_defaults {
+ name: "android.hardware.graphics.allocator-latest-rust",
+ rustlibs: [
+ "android.hardware.graphics.allocator-V2-rust",
+ ],
+ defaults: [
+ "android.hardware.graphics.common-latest-rust",
+ ],
+}
+
cc_defaults {
name: "android.hardware.graphics.allocator-ndk_static",
static_libs: [
@@ -36,6 +53,20 @@
],
}
+aidl_interface_defaults {
+ name: "android.hardware.graphics.common-latest",
+ imports: [
+ "android.hardware.graphics.common-V5",
+ ],
+}
+
+rust_defaults {
+ name: "android.hardware.graphics.common-latest-rust",
+ rustlibs: [
+ "android.hardware.graphics.common-V5-rust",
+ ],
+}
+
cc_defaults {
name: "android.hardware.graphics.common-ndk_static",
static_libs: [
@@ -50,6 +81,13 @@
],
}
+aidl_interface_defaults {
+ name: "android.hardware.graphics.composer3-latest",
+ imports: [
+ "android.hardware.graphics.composer3-V4",
+ ],
+}
+
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_static",
static_libs: [
diff --git a/graphics/allocator/aidl/Android.bp b/graphics/allocator/aidl/Android.bp
index 7bb6b50..30b341c 100644
--- a/graphics/allocator/aidl/Android.bp
+++ b/graphics/allocator/aidl/Android.bp
@@ -13,9 +13,11 @@
vendor_available: true,
double_loadable: true,
srcs: ["android/hardware/graphics/allocator/*.aidl"],
+ defaults: [
+ "android.hardware.graphics.common-latest",
+ ],
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V5",
],
stability: "vintf",
backend: {
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
index c4e6878..ace940a 100644
--- a/graphics/composer/aidl/Android.bp
+++ b/graphics/composer/aidl/Android.bp
@@ -34,8 +34,10 @@
"android/hardware/graphics/composer3/*.aidl",
],
stability: "vintf",
+ defaults: [
+ "android.hardware.graphics.common-latest",
+ ],
imports: [
- "android.hardware.graphics.common-V5",
"android.hardware.common-V2",
],
backend: {
diff --git a/neuralnetworks/aidl/Android.bp b/neuralnetworks/aidl/Android.bp
index c9242ca..9589750 100644
--- a/neuralnetworks/aidl/Android.bp
+++ b/neuralnetworks/aidl/Android.bp
@@ -16,9 +16,11 @@
"android/hardware/neuralnetworks/*.aidl",
],
stability: "vintf",
+ defaults: [
+ "android.hardware.graphics.common-latest",
+ ],
imports: [
"android.hardware.common-V2",
- "android.hardware.graphics.common-V5",
],
backend: {
java: {
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index 517ad86..eca9a27 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -37,7 +37,7 @@
},
],
- frozen: true,
+ frozen: false,
}
@@ -47,7 +47,7 @@
host_supported: true,
srcs: ["android/hardware/radio/config/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -71,7 +71,7 @@
},
],
- frozen: true,
+ frozen: false,
}
@@ -81,7 +81,7 @@
host_supported: true,
srcs: ["android/hardware/radio/data/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -114,7 +114,7 @@
host_supported: true,
srcs: ["android/hardware/radio/messaging/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -138,7 +138,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -147,7 +147,7 @@
host_supported: true,
srcs: ["android/hardware/radio/modem/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -171,7 +171,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -180,7 +180,7 @@
host_supported: true,
srcs: ["android/hardware/radio/network/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -204,7 +204,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -242,8 +242,8 @@
srcs: ["android/hardware/radio/sim/*.aidl"],
stability: "vintf",
imports: [
- "android.hardware.radio-V3",
- "android.hardware.radio.config-V3",
+ "android.hardware.radio-V4",
+ "android.hardware.radio.config-V4",
],
backend: {
cpp: {
@@ -277,7 +277,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -286,7 +286,7 @@
host_supported: true,
srcs: ["android/hardware/radio/voice/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: true,
@@ -310,7 +310,7 @@
},
],
- frozen: true,
+ frozen: false,
}
aidl_interface {
@@ -319,7 +319,7 @@
srcs: ["android/hardware/radio/ims/media/*.aidl"],
stability: "vintf",
imports: [
- "android.hardware.radio-V3",
+ "android.hardware.radio-V4",
"android.hardware.radio.data-V4",
],
backend: {
@@ -355,7 +355,7 @@
vendor_available: true,
srcs: ["android/hardware/radio/ims/*.aidl"],
stability: "vintf",
- imports: ["android.hardware.radio-V3"],
+ imports: ["android.hardware.radio-V4"],
backend: {
cpp: {
enabled: false,
@@ -375,5 +375,5 @@
},
],
- frozen: true,
+ frozen: false,
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
index 11e7356..45e6ccf 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
@@ -43,5 +43,5 @@
int csiSinr;
int csiCqiTableIndex;
byte[] csiCqiReport;
- int timingAdvance = 0x7FFFFFFF;
+ int timingAdvance = android.hardware.radio.RadioConst.VALUE_UNAVAILABLE /* 2147483647 */;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
index 970cd1e..e24a35d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
@@ -35,6 +35,9 @@
/* @hide */
@JavaDerive(toString=true) @VintfStability
parcelable RadioConst {
+ const int VALUE_UNAVAILABLE = 0x7FFFFFFF;
+ const long VALUE_UNAVAILABLE_LONG = 0x7FFFFFFFFFFFFFFF;
+ const byte VALUE_UNAVAILABLE_BYTE = 0xFFu8;
const int MAX_RILDS = 3;
const int MAX_UUID_LENGTH = 64;
const int CARD_MAX_APPS = 8;
diff --git a/radio/aidl/android/hardware/radio/RadioConst.aidl b/radio/aidl/android/hardware/radio/RadioConst.aidl
index 7b923b9..df27526 100644
--- a/radio/aidl/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/android/hardware/radio/RadioConst.aidl
@@ -20,6 +20,9 @@
@VintfStability
@JavaDerive(toString=true)
parcelable RadioConst {
+ const int VALUE_UNAVAILABLE = 0x7FFFFFFF;
+ const long VALUE_UNAVAILABLE_LONG = 0x7FFFFFFFFFFFFFFF;
+ const byte VALUE_UNAVAILABLE_BYTE = 0xFFu8;
const int MAX_RILDS = 3;
const int MAX_UUID_LENGTH = 64;
const int CARD_MAX_APPS = 8;
diff --git a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
index 1838f2e..90c4454 100644
--- a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
+++ b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
@@ -40,7 +40,7 @@
byte[] sourceAddress;
/**
* Source port if relevant for the given type
- * INT_MAX: 0x7FFFFFFF denotes that the field is unused
+ * RadioConst:VALUE_UNAVAILABLE denotes that the field is unused
*/
int sourcePort;
/**
@@ -49,7 +49,7 @@
byte[] destinationAddress;
/**
* Destination if relevant for the given type
- * INT_MAX: 0x7FFFFFFF denotes that the field is unused
+ * RadioConst:VALUE_UNAVAILABLE denotes that the field is unused
*/
int destinationPort;
/**
diff --git a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
index 957973d..7ac560f 100644
--- a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
@@ -44,14 +44,14 @@
* The time, as reported by SystemClock.elapsedRealtime(), when this link address will be or
* was deprecated. -1 indicates this information is not available. At the time existing
* connections can still use this address until it expires, but new connections should use the
- * new address. LONG_MAX(0x7FFFFFFFFFFFFFFF) indicates this link address will never be
+ * new address. RadioConst:VALUE_UNAVAILABLE_LONG indicates this link address will never be
* deprecated.
*/
long deprecationTime;
/**
* The time, as reported by SystemClock.elapsedRealtime(), when this link address will expire
* and be removed from the interface. -1 indicates this information is not available.
- * LONG_MAX(0x7FFFFFFFFFFFFFFF) indicates this link address will never expire.
+ * RadioConst:VALUE_UNAVAILABLE_LONG indicates this link address will never expire.
*/
long expirationTime;
}
diff --git a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
index b8f01c0..31fb14c 100644
--- a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -68,10 +68,10 @@
/**
* 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
- * suggestion. 0 indicates retry should be performed immediately. 0x7fffffffffffffff indicates
- * the device should not retry data setup anymore. During this time, no calls to
- * IRadioData.setupDataCall for this APN will be made unless IRadioDataIndication.unthrottleApn
- * is sent with the same APN.
+ * suggestion. 0 indicates retry should be performed immediately.
+ * RadioConst:VALUE_UNAVAILABLE_LONG indicates the device should not retry data setup anymore.
+ * During this time, no calls to IRadioData.setupDataCall for this APN will be made unless
+ * IRadioDataIndication.unthrottleApn is sent with the same APN.
*/
long suggestedRetryTime;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
index ae7aa93..0e241d3 100644
--- a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
@@ -22,12 +22,12 @@
parcelable CdmaSignalStrength {
/**
* This value is the actual RSSI value multiplied by -1. Example: If the actual RSSI is -75,
- * then this response value will be 75. INT_MAX means invalid/unreported.
+ * then this response value will be 75. RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int dbm;
/**
* This value is the actual Ec/Io multiplied by -10. Example: If the actual Ec/Io is -12.5 dB,
- * then this response value will be 125. INT_MAX means invalid/unreported.
+ * then this response value will be 125. RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int ecio;
}
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
index b93988f..acf3db1 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
@@ -23,27 +23,27 @@
@JavaDerive(toString=true)
parcelable CellIdentityCdma {
/**
- * Network Id 0..65535, INT_MAX if unknown
+ * Network Id 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int networkId;
/**
- * CDMA System Id 0..32767, INT_MAX if unknown
+ * CDMA System Id 0..32767, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int systemId;
/**
- * Base Station Id 0..65535, INT_MAX if unknown
+ * Base Station Id 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int baseStationId;
/**
* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in
* units of 0.25 seconds and ranges from -2592000 to 2592000, both values inclusive
- * (corresponding to a range of -180 to +180 degrees). INT_MAX if unknown
+ * (corresponding to a range of -180 to +180 degrees). RadioConst:VALUE_UNAVAILABLE if unknown
*/
int longitude;
/**
* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in
* units of 0.25 seconds and ranges from -1296000 to 1296000, both values inclusive
- * (corresponding to a range of -90 to +90 degrees). INT_MAX if unknown
+ * (corresponding to a range of -90 to +90 degrees). RadioConst:VALUE_UNAVAILABLE if unknown
*/
int latitude;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
index bc02adc..fe39a0e 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
@@ -31,11 +31,12 @@
*/
String mnc;
/**
- * 16-bit Location Area Code, 0..65535, INT_MAX if unknown
+ * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int lac;
/**
- * 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown
+ * 16-bit GSM Cell Identity described in TS 27.007, 0..65535,
+ * RadioConst:VALUE_UNAVAILABLE if unknown
*/
int cid;
/**
@@ -43,7 +44,7 @@
*/
int arfcn;
/**
- * 6-bit Base Station Identity Code, 0xFF if unknown
+ * 6-bit Base Station Identity Code, RadioConst:VALUE_UNAVAILABLE_BYTE if unknown
*/
byte bsic;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
index c4c76cf..9c4fc3c 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
@@ -33,7 +33,7 @@
*/
String mnc;
/**
- * 28-bit Cell Identity described in TS TS 27.007, INT_MAX if unknown
+ * 28-bit Cell Identity described in TS 27.007, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int ci;
/**
@@ -41,7 +41,7 @@
*/
int pci;
/**
- * 16-bit tracking area code, INT_MAX if unknown
+ * 16-bit tracking area code, RadioConst:VALUE_UNAVAILABLE if unknown
*/
int tac;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
index 4192845..7ebc0cd 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
@@ -29,12 +29,12 @@
parcelable CellIdentityNr {
/**
* 3-digit Mobile Country Code, in range[0, 999]; This value must be valid for registered or
- * camped cells; INT_MAX means invalid/unreported.
+ * camped cells; Empty string means invalid/unreported.
*/
String mcc;
/**
* 2 or 3-digit Mobile Network Code, in range [0, 999], This value must be valid for
- * registered or camped cells; INT_MAX means invalid/unreported.
+ * registered or camped cells; Empty string means invalid/unreported.
*/
String mnc;
/**
@@ -48,7 +48,7 @@
*/
int pci;
/**
- * 16-bit tracking area code, INT_MAX means invalid/unreported.
+ * 16-bit tracking area code, RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int tac;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
index 33ffc6f..8373493 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
@@ -32,15 +32,17 @@
*/
String mnc;
/**
- * 16-bit Location Area Code, 0..65535, INT_MAX if unknown.
+ * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown.
*/
int lac;
/**
- * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown.
+ * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, RadioConst:VALUE_UNAVAILABLE
+ * if unknown.
*/
int cid;
/**
- * 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown.
+ * 8-bit Cell Parameters ID described in TS 25.331, 0..127, RadioConst:VALUE_UNAVAILABLE if
+ * unknown.
*/
int cpid;
/**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
index b6e328a..ab703f1 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
@@ -32,11 +32,12 @@
*/
String mnc;
/**
- * 16-bit Location Area Code, 0..65535, INT_MAX if unknown.
+ * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown.
*/
int lac;
/**
- * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown.
+ * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, RadioConst:VALUE_UNAVAILABLE
+ * if unknown.
*/
int cid;
/**
diff --git a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
index fc7cc1b..ac6928e 100644
--- a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
@@ -22,17 +22,17 @@
parcelable EvdoSignalStrength {
/**
* This value is the actual RSSI value multiplied by -1. Example: If the actual RSSI is -75,
- * then this response value will be 75; INT_MAX means invalid/unreported.
+ * then this response value will be 75; RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int dbm;
/**
* This value is the actual Ec/Io multiplied by -10. Example: If the actual Ec/Io is -12.5 dB,
- * then this response value will be 125; INT_MAX means invalid/unreported.
+ * then this response value will be 125; RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int ecio;
/**
- * Valid values are 0-8. 8 is the highest signal to noise ratio; INT_MAX means
- * invalid/unreported.
+ * Valid values are 0-8. 8 is the highest signal to noise ratio; RadioConst:VALUE_UNAVAILABLE
+ * means invalid/unreported.
*/
int signalNoiseRatio;
}
diff --git a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
index d569cf7..4a99646 100644
--- a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
@@ -21,15 +21,18 @@
@JavaDerive(toString=true)
parcelable GsmSignalStrength {
/**
- * Valid values are (0-61, 99) as defined in TS 27.007 8.69; INT_MAX means invalid/unreported.
+ * Valid values are (0-61, 99) as defined in TS 27.007 8.69; RadioConst:VALUE_UNAVAILABLE means
+ * invalid/unreported.
*/
int signalStrength;
/**
- * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+ * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+ * invalid/unreported.
*/
int bitErrorRate;
/**
- * Timing advance in bit periods. 1 bit period = 48/13 us. INT_MAX means invalid/unreported.
+ * Timing advance in bit periods. 1 bit period = 48/13 us. RadioConst:VALUE_UNAVAILABLE means
+ * invalid/unreported.
*/
int timingAdvance;
}
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 5f26195..a4f97e3 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -278,7 +278,7 @@
/**
* Sets the minimum time between when unsolicited cellInfoList() must be invoked.
* A value of 0, means invoke cellInfoList() when any of the reported information changes.
- * Setting the value to INT_MAX(0x7fffffff) means never issue a unsolicited cellInfoList().
+ * Value of RadioConst:VALUE_UNAVAILABLE means never issue a unsolicited cellInfoList().
*
* @param serial Serial number of request.
* @param rate minimum time in milliseconds to indicate time between unsolicited cellInfoList()
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
index da82b78..34948fb 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
@@ -221,6 +221,12 @@
* - If a device uses a 2G network to send a AUTHENTICATION_AND_CIPHERING_RESPONSE message on
* the NAS and the message includes an IMEISV.
*
+ * cellularIdentifierDisclosure indications must be sent to Android regardless of the screen
+ * state. If the screen is off, the indications must still be sent to Android.
+ *
+ * Note: in the NRSA scenario, only a SUCI generated by a null scheme should be considered as a
+ * plain-text identifier.
+ *
* @param type Type of radio indication
* @param disclosure A CellularIdentifierDisclosure as specified by
* IRadioNetwork.setCellularIdentifierTransparencyEnabled.
@@ -232,23 +238,78 @@
/*
* Indicates that a new ciphering or integrity algorithm was used for a particular voice,
* signaling, or data connection for a given PLMN and/or access network. Due to power
- * concerns, once a connection type has been reported on, follow-up reports about that
- * connection type are only generated if there is any change to the most-recently reported
- * encryption or integrity, or if the value of SecurityAlgorithmUpdate#isUnprotectedEmergency
- * changes. A change only in cell ID should not trigger an update, as the design is intended
- * to be agnostic to dual connectivity ("secondary serving cells").
+ * concerns, once a ConnectionEvent has been reported on, follow-up reports about that
+ * ConnectionEvent are only generated if there is any change to the most-recently reported
+ * encryption or integrity, if there is a RAT change, or if the value of
+ * SecurityAlgorithmUpdate#isUnprotectedEmergency changes. A change only in cell ID should not
+ * trigger an update, as the design is intended to be agnostic to dual connectivity ("secondary
+ * serving cells").
*
- * Sample scenario to further clarify "most-recently reported":
+ * Example to further clarify "most-recently reported":
+ * 1. After booting up, the UE is in ENDC with LTE. Modem reports NAS_SIGNALLING_LTE and
+ * AS_SIGNALLING_LTE are well-ciphered but AS_SIGNALLING_5G is null-ciphered.
+ * 2. UE moves to 3G and enters the connected mode. Modem reports indications of PS_SERVICE_3G
+ * and SIGNALLING_3G to Android.
+ * 3. UE moves to LTE. UE enters the connected mode and there is no ENDC. The algorithms of
+ * NAS_SIGNALLING_LTE and AS_SIGNALLING_LTE are the same as in Step 1. The UE should send
+ * this indication to AP as it’s a RAT switch.
+ * 4. Later, UE establishes ENDC. AS_SIGNALLING_5G is null-ciphered. The UE should send this
+ * indication as well, as it is a RAT switch.
+ * 5. The UE enter IDLE mode, and later connected mode in ENDC. There are no changes to security
+ * algorithms, so the modem does not need to send any updates.
*
- * 1. Modem reports user is connected to a null-ciphered 3G network.
- * 2. User then moves and connects to a well-ciphered 5G network, and modem reports this.
- * 3. User returns to original location and reconnects to the null-ciphered 3G network. Modem
- * should report this as it's different than the most-recently reported data from step (2).
+ * Most recently reported state is reset when (1) RadioState is transitioned to ON from any
+ * other state (e.g. radio is turned on during device boot, or modem boot), and (2) when
+ * CardState is transitioned to PRESENT from any other state (e.g. when SIM is inserted), or (3)
+ * if there is a change in access network (PLMN) or RAT.
*
- * State is reset when (1) RadioState is transitioned to ON from any other state (e.g. radio
- * is turned on during device boot, or modem boot), and (2) when CardState is transitioned
- * to PRESENT from any other state (e.g. when SIM is inserted), or (3) if there is a change in
- * access network (PLMN).
+ * securityAlgorithmUpdate indications must be sent to Android regardless of the screen state.
+ * If the screen is off, the indications must still be sent to Android.
+ *
+ *
+ * 5G TS 38.331 cipheringDisabled and integrityProtection
+ * ======================================================
+ * For most connections, generally what is reported by the network is what ends up being used.
+ * There are two significant cases where this may not be the case. In 5G, per the introduction
+ * of network configuration options cipheringDisabled and integrityProtection (TS 38.331), the
+ * network can have declared certain security algorithms to be used while also requiring a null
+ * algorithm via those parameters.
+ *
+ *
+ * Exceptions for DRBs with null integrity (pre-5G Rel 16)
+ * =======================================================
+ * When reporting the SecurityAlgorithm for a ConnectionType which includes a DRB, there is an
+ * exception where a DRB with null integrity is not to be considered/included in reporting
+ * except for 5G Rel 16 connections and newer. Because DRBs almost always use null integrity in
+ * practice, and thus if included the report would always be null, rendering the report
+ * useless. For anything 5G Rel 16 or newer, accurate reporting for the DRB's integrity is
+ * required.
+ *
+ *
+ * NRDC MCG and SCGs
+ * =================
+ * In the NRDC case, there can be two sets of algorithms, one for the MCG (Master Cell Group)
+ * and one for the SCG (Secondary Cell Group). In this case, always send a combined update that
+ * reflects the weaker of the algorithms, e.g. (weakest) NEA0 < NEA1 < NEA2 < NEA3 (strongest).
+ * This applies to both the ciphering and integrity algorithms.
+ *
+ *
+ * Determining the value of isUnprotectedEmergency
+ * ===============================================
+ * 2G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+ * 3G: isUnprotectedEmergency is true if the ciphering and integrity algorithm are NULL.
+ * 4G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+ * 5G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+ * Notes:
+ * - On integrity: In 4G, PDCP can be LTE-based or NR-based. Starting from 5G Rel 17, only
+ * the NR-based PDCP supports DRB integrity. As the PDCP version can change during a DRB's
+ * 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).
+ * - 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.
*
* @param type Type of radio indication
* @param securityAlgorithmUpdate SecurityAlgorithmUpdate encapsulates details of security
diff --git a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
index 21d3ec7..785db0b 100644
--- a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
@@ -21,41 +21,43 @@
@JavaDerive(toString=true)
parcelable LteSignalStrength {
/**
- * Valid values are (0-31, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+ * Valid values are (0-31, 99) as defined in TS 27.007 8.5;
+ * RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int signalStrength;
/**
* The current Reference Signal Receive Power in dBm multiplied by -1. Range: 44 to 140 dBm;
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.133 9.1.4
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.133 9.1.4
*/
int rsrp;
/**
* The current Reference Signal Receive Quality in dB multiplied by -1. Range: 20 to 3 dB;
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.133 9.1.7
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.133 9.1.7
*/
int rsrq;
/**
* The current reference signal signal-to-noise ratio in 0.1 dB units.
* Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.101 8.1.1
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.101 8.1.1
*/
int rssnr;
/**
* The current Channel Quality Indicator. Range: 0 to 15.
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.101 9.2, 9.3, A.4
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value.
+ * Ref: 3GPP TS 36.101 9.2, 9.3, A.4
*/
int cqi;
/**
* Timing advance in micro seconds for a one way trip from cell to device. Approximate distance
* is calculated using 300m/us * timingAdvance. Range: 0 to 1282 inclusive.
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP 36.213 section 4.2.3
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP 36.213 section 4.2.3
*/
int timingAdvance;
/**
* CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
* The definition of CQI in each table is different.
* Reference: 3GPP TS 136.213 section 7.2.3.
- * Range [1, 6], INT_MAX means invalid/unreported.
+ * Range [1, 6], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int cqiTableIndex;
}
diff --git a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
index 65daf36..a0db2d5 100644
--- a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
@@ -16,6 +16,8 @@
package android.hardware.radio.network;
+import android.hardware.radio.RadioConst;
+
/** @hide */
@VintfStability
@JavaDerive(toString=true)
@@ -23,44 +25,44 @@
/**
* SS reference signal received power, multiplied by -1.
* Reference: 3GPP TS 38.215.
- * Range [44, 140], INT_MAX means invalid/unreported.
+ * Range [44, 140], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int ssRsrp;
/**
* SS reference signal received quality, multiplied by -1.
* Reference: 3GPP TS 38.215, 3GPP TS 38.133 section 10.
- * Range [-20 dB, 43 dB], INT_MAX means invalid/unreported.
+ * Range [-20 dB, 43 dB], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int ssRsrq;
/**
* SS signal-to-noise and interference ratio.
* Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
- * Range [-23, 40], INT_MAX means invalid/unreported.
+ * Range [-23, 40], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int ssSinr;
/**
* CSI reference signal received power, multiplied by -1.
* Reference: 3GPP TS 38.215.
- * Range [44, 140], INT_MAX means invalid/unreported.
+ * Range [44, 140], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int csiRsrp;
/**
* CSI reference signal received quality, multiplied by -1.
* Reference: 3GPP TS 38.215.
- * Range [3, 20], INT_MAX means invalid/unreported.
+ * Range [3, 20], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int csiRsrq;
/**
* CSI signal-to-noise and interference ratio.
* Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
- * Range [-23, 40], INT_MAX means invalid/unreported.
+ * Range [-23, 40], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int csiSinr;
/**
* CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
* The definition of CQI in each table is different.
* Reference: 3GPP TS 138.214 section 5.2.2.1.
- * Range [1, 3], INT_MAX means invalid/unreported.
+ * Range [1, 3], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
*/
int csiCqiTableIndex;
/**
@@ -69,14 +71,14 @@
* index is provided for each subband, in ascending order of subband index. If CQI is not
* available, the CQI report is empty.
* Reference: 3GPP TS 138.214 section 5.2.2.1.
- * Range [0, 15], 0xFF means invalid/unreported.
+ * Range [0, 15], RadioConst:VALUE_UNAVAILABLE_BYTE means invalid/unreported.
*/
byte[] csiCqiReport;
/**
* Timing advance in micro seconds for a one way trip from cell to device. Approximate distance
* is calculated using 300m/us * timingAdvance. Range: 0 to 1282 inclusive.
- * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value.
+ * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value.
* Reference: 3GPP 36.213 section 4.2.3
*/
- int timingAdvance = 0x7FFFFFFF;
+ int timingAdvance = RadioConst.VALUE_UNAVAILABLE;
}
diff --git a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
index 5fed522..fbe3be2 100644
--- a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
@@ -30,37 +30,37 @@
parcelable SignalStrength {
/**
* If GSM measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
GsmSignalStrength gsm;
/**
* If CDMA measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
CdmaSignalStrength cdma;
/**
* If EvDO measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
EvdoSignalStrength evdo;
/**
* If LTE measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
LteSignalStrength lte;
/**
* If TD-SCDMA measurements are provided, this structure must contain valid measurements;
- * otherwise all fields should be set to INT_MAX to mark them as invalid.
+ * otherwise all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
TdscdmaSignalStrength tdscdma;
/**
* If WCDMA measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
WcdmaSignalStrength wcdma;
/**
* If NR 5G measurements are provided, this structure must contain valid measurements; otherwise
- * all fields should be set to INT_MAX to mark them as invalid.
+ * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
*/
NrSignalStrength nr;
}
diff --git a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
index 4afdd0f..87c6baa 100644
--- a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
@@ -22,17 +22,17 @@
parcelable TdscdmaSignalStrength {
/**
* UTRA carrier RSSI as defined in TS 25.225 5.1.4. Valid values are (0-31, 99) as defined in
- * TS 27.007 8.5. INT_MAX denotes that the value is invalid/unreported.
+ * TS 27.007 8.5. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
*/
int signalStrength;
/**
* Transport Channel BER as defined in TS 25.225 5.2.5. Valid values are (0-7, 99) as defined in
- * TS 27.007 8.5. INT_MAX denotes that the value is invalid/unreported.
+ * TS 27.007 8.5. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
*/
int bitErrorRate;
/**
* P-CCPCH RSCP as defined in TS 25.225 5.1.1. Valid values are (0-96, 255) as defined in
- * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+ * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
*/
int rscp;
}
diff --git a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
index ace89ed..8bc7fb8 100644
--- a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
@@ -21,21 +21,23 @@
@JavaDerive(toString=true)
parcelable WcdmaSignalStrength {
/**
- * Valid values are (0-31, 99) as defined in TS 27.007 8.5; INT_MAX means unreported.
+ * Valid values are (0-31, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+ * unreported.
*/
int signalStrength;
/**
- * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+ * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+ * invalid/unreported.
*/
int bitErrorRate;
/**
* CPICH RSCP as defined in TS 25.215 5.1.1. Valid values are (0-96, 255) as defined in
- * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+ * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
*/
int rscp;
/**
* Ec/No value as defined in TS 25.215 5.1.5. Valid values are (0-49, 255) as defined in
- * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+ * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
*/
int ecno;
}
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index 3fbd398..a3a8c20 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -25,16 +25,16 @@
cc_defaults {
name: "android.hardware.radio-library.aidl_deps",
shared_libs: [
- "android.hardware.radio.config-V3-ndk",
+ "android.hardware.radio.config-V4-ndk",
"android.hardware.radio.data-V4-ndk",
- "android.hardware.radio.ims-V2-ndk",
+ "android.hardware.radio.ims-V3-ndk",
"android.hardware.radio.ims.media-V3-ndk",
- "android.hardware.radio.messaging-V3-ndk",
- "android.hardware.radio.modem-V3-ndk",
- "android.hardware.radio.network-V3-ndk",
+ "android.hardware.radio.messaging-V4-ndk",
+ "android.hardware.radio.modem-V4-ndk",
+ "android.hardware.radio.network-V4-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.sim-V3-ndk",
- "android.hardware.radio.voice-V3-ndk",
+ "android.hardware.radio.sim-V4-ndk",
+ "android.hardware.radio.voice-V4-ndk",
],
}
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index 37e0ba8..6e8ce8b 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -77,17 +77,17 @@
"server_configurable_flags",
],
static_libs: [
- "android.hardware.radio-V3-ndk",
- "android.hardware.radio.config-V3-ndk",
+ "android.hardware.radio-V4-ndk",
+ "android.hardware.radio.config-V4-ndk",
"android.hardware.radio.data-V4-ndk",
- "android.hardware.radio.ims-V2-ndk",
+ "android.hardware.radio.ims-V3-ndk",
"android.hardware.radio.ims.media-V3-ndk",
- "android.hardware.radio.messaging-V3-ndk",
- "android.hardware.radio.modem-V3-ndk",
- "android.hardware.radio.network-V3-ndk",
+ "android.hardware.radio.messaging-V4-ndk",
+ "android.hardware.radio.modem-V4-ndk",
+ "android.hardware.radio.network-V4-ndk",
"android.hardware.radio.sap-V1-ndk",
- "android.hardware.radio.sim-V3-ndk",
- "android.hardware.radio.voice-V3-ndk",
+ "android.hardware.radio.sim-V4-ndk",
+ "android.hardware.radio.voice-V4-ndk",
"telephony_flags_c_lib",
],
test_suites: [
diff --git a/security/rkp/OWNERS b/security/rkp/OWNERS
index 8f854b4..fd43089 100644
--- a/security/rkp/OWNERS
+++ b/security/rkp/OWNERS
@@ -2,3 +2,4 @@
jbires@google.com
sethmo@google.com
+vikramgaur@google.com