Merge "Fix bug where buffer slots to clear were not set correctly" into udc-dev
diff --git a/audio/aidl/aidl_api/android.hardware.audio.core.sounddose/current/android/hardware/audio/core/sounddose/ISoundDose.aidl b/audio/aidl/aidl_api/android.hardware.audio.core.sounddose/current/android/hardware/audio/core/sounddose/ISoundDose.aidl
index 3b5d2d0..5800091 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.core.sounddose/current/android/hardware/audio/core/sounddose/ISoundDose.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.core.sounddose/current/android/hardware/audio/core/sounddose/ISoundDose.aidl
@@ -34,8 +34,8 @@
package android.hardware.audio.core.sounddose;
@VintfStability
interface ISoundDose {
- void setOutputRs2(float rs2ValueDbA);
- float getOutputRs2();
+ void setOutputRs2UpperBound(float rs2ValueDbA);
+ float getOutputRs2UpperBound();
void registerSoundDoseCallback(in android.hardware.audio.core.sounddose.ISoundDose.IHalSoundDoseCallback callback);
const int DEFAULT_MAX_RS2 = 100;
const int MIN_RS2 = 80;
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Descriptor.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Descriptor.aidl
index 0baac3d..82dae97 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Descriptor.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Descriptor.aidl
@@ -36,20 +36,22 @@
parcelable Descriptor {
android.hardware.audio.effect.Descriptor.Common common;
android.hardware.audio.effect.Capability capability;
- const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
- const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
- const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
- const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
- const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
const String EFFECT_TYPE_UUID_AGC1 = "0a8abfe0-654c-11e0-ba26-0002a5d5c51b";
const String EFFECT_TYPE_UUID_AGC2 = "ae3c653b-be18-4ab8-8938-418f0a7f06ac";
- const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
- const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
- const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
+ const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_DOWNMIX = "381e49cc-a858-4aa2-87f6-e8388e7601b2";
const String EFFECT_TYPE_UUID_DYNAMICS_PROCESSING = "7261676f-6d75-7369-6364-28e2fd3ac39e";
+ const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
+ const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
const String EFFECT_TYPE_UUID_HAPTIC_GENERATOR = "1411e6d6-aecd-4021-a1cf-a6aceb0d71e5";
+ const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
+ const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
const String EFFECT_TYPE_UUID_SPATIALIZER = "ccd4cf09-a79d-46c2-9aae-06a1698d6c8f";
- const String EFFECT_TYPE_UUID_VOLUME = "09e8ede0-ddde-11db-b4f6-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_VISUALIZER = "d069d9e0-8329-11df-9168-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_VOLUME = "fa81a2b8-588b-11ed-9b6a-0242ac120002";
@VintfStability
parcelable Identity {
android.media.audio.common.AudioUuid type;
diff --git a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Parameter.aidl b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Parameter.aidl
index b50a2f1..0422bd9 100644
--- a/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Parameter.aidl
+++ b/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Parameter.aidl
@@ -38,6 +38,7 @@
android.media.audio.common.AudioDeviceDescription[] deviceDescription;
android.media.audio.common.AudioMode mode;
android.media.audio.common.AudioSource source;
+ boolean offload;
android.hardware.audio.effect.Parameter.VolumeStereo volumeStereo;
android.hardware.audio.effect.Parameter.Specific specific;
@VintfStability
diff --git a/audio/aidl/android/hardware/audio/core/IModule.aidl b/audio/aidl/android/hardware/audio/core/IModule.aidl
index 7830501..7622d9a 100644
--- a/audio/aidl/android/hardware/audio/core/IModule.aidl
+++ b/audio/aidl/android/hardware/audio/core/IModule.aidl
@@ -192,6 +192,19 @@
* device address is specified for a point-to-multipoint external device
* connection.
*
+ * Since not all modules have a DSP that could perform sample rate and
+ * format conversions, behavior related to mix port configurations may vary.
+ * For modules with a DSP, mix ports can be pre-configured and have a fixed
+ * set of audio profiles supported by the DSP. For modules without a DSP,
+ * audio profiles of mix ports may change after connecting an external
+ * device. The typical case is that the mix port has an empty set of
+ * profiles when no external devices are connected, and after external
+ * device connection it receives the same set of profiles as the device
+ * ports that they can be routed to. The client will re-query current port
+ * configurations using 'getAudioPorts'. All mix ports that can be routed to
+ * the connected device port must have a non-empty set of audio profiles
+ * after successful connection of an external device.
+ *
* Handling of a disconnect is done in a reverse order:
* 1. Reset port configuration using the 'resetAudioPortConfig' method.
* 2. Release the connected device port by calling the 'disconnectExternalDevice'
diff --git a/audio/aidl/android/hardware/audio/core/sounddose/ISoundDose.aidl b/audio/aidl/android/hardware/audio/core/sounddose/ISoundDose.aidl
index 953ab62..b442ac5 100644
--- a/audio/aidl/android/hardware/audio/core/sounddose/ISoundDose.aidl
+++ b/audio/aidl/android/hardware/audio/core/sounddose/ISoundDose.aidl
@@ -35,21 +35,21 @@
const int MIN_RS2 = 80;
/**
- * Sets the RS2 value used for momentary exposure warnings. Default value is
+ * Sets the RS2 upper bound used for momentary exposure warnings. Default value is
* DEFAULT_MAX_RS2 as specified in IEC62368-1 3rd edition.
*
- * @param rs2ValueDbA custom RS2 value to use. Must not be higher than DEFAULT_MAX_RS2
+ * @param rs2ValueDbA custom RS2 upper bound to use
* @throws EX_ILLEGAL_ARGUMENT if rs2ValueDbA is greater than DEFAULT_MAX_RS2 or lower
- * than 80dBA
+ * than MIN_RS2
*/
- void setOutputRs2(float rs2ValueDbA);
+ void setOutputRs2UpperBound(float rs2ValueDbA);
/**
- * Gets the RS2 value used for momentary exposure warnings.
+ * Gets the RS2 upper bound used for momentary exposure warnings.
*
- * @return the RS2 value in dBA
+ * @return the RS2 upper bound in dBA
*/
- float getOutputRs2();
+ float getOutputRs2UpperBound();
/**
* Registers the HAL callback for sound dose computation. If sound dose is supported
@@ -68,9 +68,9 @@
@VintfStability
oneway interface IHalSoundDoseCallback {
/**
- * Called whenever the current MEL value exceeds the set RS2 value.
+ * Called whenever the current MEL value exceeds the set RS2 upper bound.
*
- * @param currentDbA the current MEL value which exceeds the RS2 value
+ * @param currentDbA the current MEL value which exceeds the RS2 upper bound
* @param audioDevice the audio device where the MEL exposure warning was recorded
*/
void onMomentaryExposureWarning(float currentDbA, in AudioDevice audioDevice);
@@ -78,14 +78,15 @@
@VintfStability
parcelable MelRecord {
/**
- * Array of continuously recorded MEL values >= RS1 (1 per second).
+ * Array of continuously recorded MEL values >= MIN_RS2 (1 per second).
* First value in the array was recorded at 'timestamp'.
*/
float[] melValues;
/**
- * Corresponds to the time in seconds when the first MEL entry in melValues
- * was recorded. The timestamp values have to be consistent throughout all
- * audio ports, equal timestamp values will be aggregated.
+ * Corresponds to the time in seconds, as reported by CLOCK_MONOTONIC, when
+ * the first MEL entry in melValues was recorded. The timestamp values have
+ * to be consistent throughout all audio ports, equal timestamp values will
+ * be aggregated.
*/
long timestamp;
}
diff --git a/audio/aidl/android/hardware/audio/effect/Descriptor.aidl b/audio/aidl/android/hardware/audio/effect/Descriptor.aidl
index 01ca1c6..2fbc401 100644
--- a/audio/aidl/android/hardware/audio/effect/Descriptor.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Descriptor.aidl
@@ -37,25 +37,10 @@
* UUID for effect types, these definitions are in sync with SDK, see @c AudioEffect.java.
*/
/**
- * UUID for environmental reverberation effect type.
+ * UUID for Acoustic Echo Canceler (AEC) type.
*/
- const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
- /**
- * UUID for preset reverberation effect type.
- */
- const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
- /**
- * UUID for equalizer effect type.
- */
- const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
- /**
- * UUID for bass boost effect type.
- */
- const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
- /**
- * UUID for virtualizer effect type.
- */
- const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
+
/**
* UUID for Automatic Gain Control V1 (AGC1) type.
*/
@@ -65,33 +50,57 @@
*/
const String EFFECT_TYPE_UUID_AGC2 = "ae3c653b-be18-4ab8-8938-418f0a7f06ac";
/**
- * UUID for Acoustic Echo Canceler (AEC) type.
+ * UUID for bass boost effect type.
*/
- const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
/**
- * UUID for Noise Suppressor (NS) type.
+ * UUID for downmix effect type.
*/
- const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
- /**
- * UUID for Loudness Enhancer type.
- */
- const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
+ const String EFFECT_TYPE_UUID_DOWNMIX = "381e49cc-a858-4aa2-87f6-e8388e7601b2";
/**
* UUID for Dynamics Processing type.
*/
const String EFFECT_TYPE_UUID_DYNAMICS_PROCESSING = "7261676f-6d75-7369-6364-28e2fd3ac39e";
/**
+ * UUID for environmental reverberation effect type.
+ */
+ const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
+ /**
+ * UUID for equalizer effect type.
+ */
+ const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
+ /**
* UUID for Haptic Generator type.
*/
const String EFFECT_TYPE_UUID_HAPTIC_GENERATOR = "1411e6d6-aecd-4021-a1cf-a6aceb0d71e5";
/**
+ * UUID for Loudness Enhancer type.
+ */
+ const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
+ /**
+ * UUID for Noise Suppressor (NS) type.
+ */
+ const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
+ /**
+ * UUID for preset reverberation effect type.
+ */
+ const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
+ /**
* UUID for Spatializer type.
*/
const String EFFECT_TYPE_UUID_SPATIALIZER = "ccd4cf09-a79d-46c2-9aae-06a1698d6c8f";
/**
- * UUID for Volume type. The volume effect is used for automated tests only.
+ * UUID for virtualizer effect type.
*/
- const String EFFECT_TYPE_UUID_VOLUME = "09e8ede0-ddde-11db-b4f6-0002a5d5c51b";
+ const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
+ /**
+ * UUID for visualizer effect type.
+ */
+ const String EFFECT_TYPE_UUID_VISUALIZER = "d069d9e0-8329-11df-9168-0002a5d5c51b";
+ /**
+ * UUID for Volume effect type.
+ */
+ const String EFFECT_TYPE_UUID_VOLUME = "fa81a2b8-588b-11ed-9b6a-0242ac120002";
/**
* This structure completely identifies an effect implementation.
diff --git a/audio/aidl/android/hardware/audio/effect/Flags.aidl b/audio/aidl/android/hardware/audio/effect/Flags.aidl
index 1612234..28685c3 100644
--- a/audio/aidl/android/hardware/audio/effect/Flags.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Flags.aidl
@@ -112,31 +112,31 @@
HardwareAccelerator hwAcceleratorMode = HardwareAccelerator.NONE;
/**
- * Effect instance set this flag to true if it requires update on if the playback thread the
- * effect attached to is offloaded or not. In this case the framework must call
+ * Effect instance sets this flag to true if it requires updates on whether the playback thread
+ * the effect is attached to is offloaded or not. In this case the framework must call
* IEffect.setParameter(Parameter.offload) to notify effect instance when playback thread
* offload changes.
*/
boolean offloadIndication;
/**
- * Effect instance set this flag to true if it requires device change update. In this case the
+ * Effect instance sets this flag to true if it requires device change update. In this case the
* framework must call IEffect.setParameter(Parameter.device) to notify effect instance when the
* device changes.
*/
boolean deviceIndication;
/**
- * Effect instance set this flag to true if it requires audio mode change update. In this case
+ * Effect instance sets this flag to true if it requires audio mode change update. In this case
* the framework must call IEffect.setParameter(Parameter.mode) to notify effect instance when
* the audio mode changes.
*/
boolean audioModeIndication;
/**
- * Effect instance set this flag to true if it requires audio source change update. In this case
- * the framework must call IEffect.setParameter(Parameter.source) to notify effect instance when
- * the audio source changes.
+ * Effect instance sets this flag to true if it requires audio source change update. In this
+ * case the framework must call IEffect.setParameter(Parameter.source) to notify effect instance
+ * when the audio source changes.
*/
boolean audioSourceIndication;
diff --git a/audio/aidl/android/hardware/audio/effect/Parameter.aidl b/audio/aidl/android/hardware/audio/effect/Parameter.aidl
index 229c621..0954055 100644
--- a/audio/aidl/android/hardware/audio/effect/Parameter.aidl
+++ b/audio/aidl/android/hardware/audio/effect/Parameter.aidl
@@ -135,11 +135,13 @@
* Effect must implement setParameter(deviceDescription) if Flags.deviceIndication set to true.
*/
AudioDeviceDescription[] deviceDescription;
+
/**
* Used by audio framework to set the audio mode to effect engine.
* Effect must implement setParameter(mode) if Flags.audioModeIndication set to true.
*/
AudioMode mode;
+
/**
* Used by audio framework to set the audio source to effect engine.
* Effect must implement setParameter(source) if Flags.audioSourceIndication set to true.
@@ -147,6 +149,12 @@
AudioSource source;
/**
+ * Used by audio framework to indicate whether the playback thread the effect is attached to is
+ * offloaded or not.
+ */
+ boolean offload;
+
+ /**
* The volume gain for left and right channel, left and right equals to same value if it's mono.
*/
@VintfStability
diff --git a/audio/aidl/common/Android.bp b/audio/aidl/common/Android.bp
index a3f7f0b..4c6a74e 100644
--- a/audio/aidl/common/Android.bp
+++ b/audio/aidl/common/Android.bp
@@ -41,6 +41,20 @@
],
}
+cc_library {
+ name: "libaudioaidlranges",
+ host_supported: true,
+ vendor_available: true,
+ static_libs: [
+ "android.hardware.audio.effect-V1-ndk",
+ ],
+ export_include_dirs: ["include"],
+ header_libs: ["libaudioaidl_headers"],
+ srcs: [
+ "EffectRangeSpecific.cpp",
+ ],
+}
+
cc_test {
name: "libaudioaidlcommon_test",
host_supported: true,
diff --git a/audio/aidl/common/EffectRangeSpecific.cpp b/audio/aidl/common/EffectRangeSpecific.cpp
new file mode 100644
index 0000000..bd78ea0
--- /dev/null
+++ b/audio/aidl/common/EffectRangeSpecific.cpp
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <aidl/android/hardware/audio/effect/DynamicsProcessing.h>
+#include <aidl/android/hardware/audio/effect/Range.h>
+
+#include "EffectRangeSpecific.h"
+#include "effect-impl/EffectRange.h"
+
+namespace aidl::android::hardware::audio::effect {
+
+namespace DynamicsProcessingRanges {
+
+static bool isInputGainConfigInRange(const std::vector<DynamicsProcessing::InputGain>& cfgs,
+ const DynamicsProcessing::InputGain& min,
+ const DynamicsProcessing::InputGain& max) {
+ auto func = [](const DynamicsProcessing::InputGain& arg) {
+ return std::make_tuple(arg.channel, arg.gainDb);
+ };
+ return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isLimiterConfigInRange(const std::vector<DynamicsProcessing::LimiterConfig>& cfgs,
+ const DynamicsProcessing::LimiterConfig& min,
+ const DynamicsProcessing::LimiterConfig& max) {
+ auto func = [](const DynamicsProcessing::LimiterConfig& arg) {
+ return std::make_tuple(arg.channel, arg.enable, arg.linkGroup, arg.attackTimeMs,
+ arg.releaseTimeMs, arg.ratio, arg.thresholdDb, arg.postGainDb);
+ };
+ return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isMbcBandConfigInRange(const std::vector<DynamicsProcessing::MbcBandConfig>& cfgs,
+ const DynamicsProcessing::MbcBandConfig& min,
+ const DynamicsProcessing::MbcBandConfig& max) {
+ auto func = [](const DynamicsProcessing::MbcBandConfig& arg) {
+ return std::make_tuple(arg.channel, arg.band, arg.enable, arg.cutoffFrequencyHz,
+ arg.attackTimeMs, arg.releaseTimeMs, arg.ratio, arg.thresholdDb,
+ arg.kneeWidthDb, arg.noiseGateThresholdDb, arg.expanderRatio,
+ arg.preGainDb, arg.postGainDb);
+ };
+ return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isEqBandConfigInRange(const std::vector<DynamicsProcessing::EqBandConfig>& cfgs,
+ const DynamicsProcessing::EqBandConfig& min,
+ const DynamicsProcessing::EqBandConfig& max) {
+ auto func = [](const DynamicsProcessing::EqBandConfig& arg) {
+ return std::make_tuple(arg.channel, arg.band, arg.enable, arg.cutoffFrequencyHz,
+ arg.gainDb);
+ };
+ return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isChannelConfigInRange(const std::vector<DynamicsProcessing::ChannelConfig>& cfgs,
+ const DynamicsProcessing::ChannelConfig& min,
+ const DynamicsProcessing::ChannelConfig& max) {
+ auto func = [](const DynamicsProcessing::ChannelConfig& arg) {
+ return std::make_tuple(arg.channel, arg.enable);
+ };
+ return isTupleInRange(cfgs, min, max, func);
+}
+
+static bool isEngineConfigInRange(const DynamicsProcessing::EngineArchitecture& cfg,
+ const DynamicsProcessing::EngineArchitecture& min,
+ const DynamicsProcessing::EngineArchitecture& max) {
+ auto func = [](const DynamicsProcessing::EngineArchitecture& arg) {
+ return std::make_tuple(arg.resolutionPreference, arg.preferredProcessingDurationMs,
+ arg.preEqStage.inUse, arg.preEqStage.bandCount,
+ arg.postEqStage.inUse, arg.postEqStage.bandCount, arg.mbcStage.inUse,
+ arg.mbcStage.bandCount, arg.limiterInUse);
+ };
+ return isTupleInRange(func(cfg), func(min), func(max));
+}
+
+static int locateMinMaxForTag(DynamicsProcessing::Tag tag,
+ const std::vector<Range::DynamicsProcessingRange>& ranges) {
+ for (int i = 0; i < (int)ranges.size(); i++) {
+ if (tag == ranges[i].min.getTag() && tag == ranges[i].max.getTag()) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+bool isParamInRange(const DynamicsProcessing& dp,
+ const std::vector<Range::DynamicsProcessingRange>& ranges) {
+ auto tag = dp.getTag();
+ int i = locateMinMaxForTag(tag, ranges);
+ if (i == -1) return true;
+
+ switch (tag) {
+ case DynamicsProcessing::engineArchitecture: {
+ return isEngineConfigInRange(
+ dp.get<DynamicsProcessing::engineArchitecture>(),
+ ranges[i].min.get<DynamicsProcessing::engineArchitecture>(),
+ ranges[i].max.get<DynamicsProcessing::engineArchitecture>());
+ }
+ case DynamicsProcessing::preEq: {
+ return isChannelConfigInRange(dp.get<DynamicsProcessing::preEq>(),
+ ranges[i].min.get<DynamicsProcessing::preEq>()[0],
+ ranges[i].max.get<DynamicsProcessing::preEq>()[0]);
+ }
+ case DynamicsProcessing::postEq: {
+ return isChannelConfigInRange(dp.get<DynamicsProcessing::postEq>(),
+ ranges[i].min.get<DynamicsProcessing::postEq>()[0],
+ ranges[i].max.get<DynamicsProcessing::postEq>()[0]);
+ }
+ case DynamicsProcessing::mbc: {
+ return isChannelConfigInRange(dp.get<DynamicsProcessing::mbc>(),
+ ranges[i].min.get<DynamicsProcessing::mbc>()[0],
+ ranges[i].max.get<DynamicsProcessing::mbc>()[0]);
+ }
+ case DynamicsProcessing::preEqBand: {
+ return isEqBandConfigInRange(dp.get<DynamicsProcessing::preEqBand>(),
+ ranges[i].min.get<DynamicsProcessing::preEqBand>()[0],
+ ranges[i].max.get<DynamicsProcessing::preEqBand>()[0]);
+ }
+ case DynamicsProcessing::postEqBand: {
+ return isEqBandConfigInRange(dp.get<DynamicsProcessing::postEqBand>(),
+ ranges[i].min.get<DynamicsProcessing::postEqBand>()[0],
+ ranges[i].max.get<DynamicsProcessing::postEqBand>()[0]);
+ }
+ case DynamicsProcessing::mbcBand: {
+ return isMbcBandConfigInRange(dp.get<DynamicsProcessing::mbcBand>(),
+ ranges[i].min.get<DynamicsProcessing::mbcBand>()[0],
+ ranges[i].max.get<DynamicsProcessing::mbcBand>()[0]);
+ }
+ case DynamicsProcessing::limiter: {
+ return isLimiterConfigInRange(dp.get<DynamicsProcessing::limiter>(),
+ ranges[i].min.get<DynamicsProcessing::limiter>()[0],
+ ranges[i].max.get<DynamicsProcessing::limiter>()[0]);
+ }
+ case DynamicsProcessing::inputGain: {
+ return isInputGainConfigInRange(dp.get<DynamicsProcessing::inputGain>(),
+ ranges[i].min.get<DynamicsProcessing::inputGain>()[0],
+ ranges[i].max.get<DynamicsProcessing::inputGain>()[0]);
+ }
+ default: {
+ return true;
+ }
+ }
+ return true;
+}
+
+} // namespace DynamicsProcessingRanges
+
+} // namespace aidl::android::hardware::audio::effect
\ No newline at end of file
diff --git a/audio/aidl/common/include/EffectRangeSpecific.h b/audio/aidl/common/include/EffectRangeSpecific.h
new file mode 100644
index 0000000..c7262bb
--- /dev/null
+++ b/audio/aidl/common/include/EffectRangeSpecific.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+namespace aidl::android::hardware::audio::effect {
+
+namespace DynamicsProcessingRanges {
+
+bool isParamInRange(const DynamicsProcessing& dp,
+ const std::vector<Range::DynamicsProcessingRange>& ranges);
+
+} // namespace DynamicsProcessingRanges
+
+} // namespace aidl::android::hardware::audio::effect
\ No newline at end of file
diff --git a/audio/aidl/common/include/Utils.h b/audio/aidl/common/include/Utils.h
index 2cf862c..305c924 100644
--- a/audio/aidl/common/include/Utils.h
+++ b/audio/aidl/common/include/Utils.h
@@ -99,6 +99,12 @@
return 0;
}
+constexpr bool isDefaultAudioFormat(
+ const ::aidl::android::media::audio::common::AudioFormatDescription& desc) {
+ return desc.type == ::aidl::android::media::audio::common::AudioFormatType::DEFAULT &&
+ desc.pcm == ::aidl::android::media::audio::common::PcmType::DEFAULT;
+}
+
constexpr bool isTelephonyDeviceType(
::aidl::android::media::audio::common::AudioDeviceType device) {
return device == ::aidl::android::media::audio::common::AudioDeviceType::IN_TELEPHONY_RX ||
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 8bacbb3..c9edae0 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -92,9 +92,6 @@
"audio_policy_configuration_aidl_default",
"audio_policy_engine_configuration_aidl_default",
],
- visibility: [
- ":__subpackages__",
- ],
}
cc_binary {
diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp
index c030b7a..5a83fef 100644
--- a/audio/aidl/default/EffectConfig.cpp
+++ b/audio/aidl/default/EffectConfig.cpp
@@ -16,6 +16,7 @@
#define LOG_TAG "AHAL_EffectConfig"
#include <android-base/logging.h>
+#include <system/audio_effects/effect_uuid.h>
#include "effectFactory-impl/EffectConfig.h"
@@ -163,15 +164,53 @@
libraryUuid.name = name;
}
- const char* uuid = xml.Attribute("uuid");
- RETURN_VALUE_IF(!uuid, false, "noUuidAttribute");
- RETURN_VALUE_IF(!stringToUuid(uuid, &libraryUuid.uuid), false, "invalidUuidAttribute");
+ const char* uuidStr = xml.Attribute("uuid");
+ RETURN_VALUE_IF(!uuidStr, false, "noUuidAttribute");
+ libraryUuid.uuid = stringToUuid(uuidStr);
+ RETURN_VALUE_IF((libraryUuid.uuid == getEffectUuidZero()), false, "invalidUuidAttribute");
LOG(DEBUG) << __func__ << (isProxy ? " proxy " : libraryUuid.name) << " : "
<< libraryUuid.uuid.toString();
return true;
}
+bool EffectConfig::findUuid(const std::string& xmlEffectName, AudioUuid* uuid) {
+// Difference from EFFECT_TYPE_LIST_DEF, there could be multiple name mapping to same Effect Type
+#define EFFECT_XML_TYPE_LIST_DEF(V) \
+ V("acoustic_echo_canceler", AcousticEchoCanceler) \
+ V("automatic_gain_control_v1", AutomaticGainControlV1) \
+ V("automatic_gain_control_v2", AutomaticGainControlV2) \
+ V("bassboost", BassBoost) \
+ V("downmix", Downmix) \
+ V("dynamics_processing", DynamicsProcessing) \
+ V("equalizer", Equalizer) \
+ V("haptic_generator", HapticGenerator) \
+ V("loudness_enhancer", LoudnessEnhancer) \
+ V("env_reverb", EnvReverb) \
+ V("reverb_env_aux", EnvReverb) \
+ V("reverb_env_ins", EnvReverb) \
+ V("preset_reverb", PresetReverb) \
+ V("reverb_pre_aux", PresetReverb) \
+ V("reverb_pre_ins", PresetReverb) \
+ V("noise_suppression", NoiseSuppression) \
+ V("spatializer", Spatializer) \
+ V("virtualizer", Virtualizer) \
+ V("visualizer", Visualizer) \
+ V("volume", Volume)
+
+#define GENERATE_MAP_ENTRY_V(s, symbol) {s, &getEffectTypeUuid##symbol},
+
+ typedef const AudioUuid& (*UuidGetter)(void);
+ static const std::map<std::string, UuidGetter> uuidMap{
+ // std::make_pair("s", &getEffectTypeUuidExtension)};
+ {EFFECT_XML_TYPE_LIST_DEF(GENERATE_MAP_ENTRY_V)}};
+ if (auto it = uuidMap.find(xmlEffectName); it != uuidMap.end()) {
+ *uuid = (*it->second)();
+ return true;
+ }
+ return false;
+}
+
const char* EffectConfig::dump(const tinyxml2::XMLElement& element,
tinyxml2::XMLPrinter&& printer) const {
element.Accept(&printer);
diff --git a/audio/aidl/default/EffectFactory.cpp b/audio/aidl/default/EffectFactory.cpp
index 638fa7f..f0687cc 100644
--- a/audio/aidl/default/EffectFactory.cpp
+++ b/audio/aidl/default/EffectFactory.cpp
@@ -14,20 +14,19 @@
* limitations under the License.
*/
+#include <dlfcn.h>
#include <iterator>
#include <memory>
#include <tuple>
-#include "include/effect-impl/EffectTypes.h"
-#define LOG_TAG "AHAL_EffectFactory"
-#include <dlfcn.h>
#include <unordered_set>
+#define LOG_TAG "AHAL_EffectFactory"
#include <android-base/logging.h>
#include <android/binder_ibinder_platform.h>
+#include <system/audio_effects/effect_uuid.h>
#include <system/thread_defs.h>
#include "effect-impl/EffectTypes.h"
-#include "effect-impl/EffectUUID.h"
#include "effectFactory-impl/EffectFactory.h"
using aidl::android::media::audio::common::AudioUuid;
@@ -76,6 +75,8 @@
RETURN_IF(!libInterface || !libInterface->queryEffectFunc, EX_NULL_POINTER,
"dlNullQueryEffectFunc");
RETURN_IF_BINDER_EXCEPTION(libInterface->queryEffectFunc(&id.uuid, &desc));
+ // update proxy UUID with information from config xml
+ desc.common.id.proxy = id.proxy;
_aidl_return->emplace_back(std::move(desc));
}
}
@@ -214,8 +215,8 @@
void Factory::loadEffectLibs() {
const auto& configEffectsMap = mConfig.getEffectsMap();
for (const auto& configEffects : configEffectsMap) {
- if (auto typeUuid = kUuidNameTypeMap.find(configEffects.first /* effect name */);
- typeUuid != kUuidNameTypeMap.end()) {
+ if (AudioUuid uuid;
+ EffectConfig::findUuid(configEffects.first /* xml effect name */, &uuid)) {
const auto& configLibs = configEffects.second;
std::optional<AudioUuid> proxyUuid;
if (configLibs.proxyLibrary.has_value()) {
@@ -223,7 +224,7 @@
proxyUuid = proxyLib.uuid;
}
for (const auto& configLib : configLibs.libraries) {
- createIdentityWithConfig(configLib, typeUuid->second, proxyUuid);
+ createIdentityWithConfig(configLib, uuid, proxyUuid);
}
} else {
LOG(ERROR) << __func__ << ": can not find type UUID for effect " << configEffects.first
diff --git a/audio/aidl/default/EffectImpl.cpp b/audio/aidl/default/EffectImpl.cpp
index e90fe35..da1ad11 100644
--- a/audio/aidl/default/EffectImpl.cpp
+++ b/audio/aidl/default/EffectImpl.cpp
@@ -40,7 +40,7 @@
ndk::ScopedAStatus EffectImpl::open(const Parameter::Common& common,
const std::optional<Parameter::Specific>& specific,
OpenEffectReturn* ret) {
- LOG(DEBUG) << __func__;
+ LOG(DEBUG) << getEffectName() << __func__;
// effect only support 32bits float
RETURN_IF(common.input.base.format.pcm != common.output.base.format.pcm ||
common.input.base.format.pcm != PcmType::FLOAT_32_BIT,
@@ -71,12 +71,12 @@
RETURN_IF(releaseContext() != RetCode::SUCCESS, EX_UNSUPPORTED_OPERATION,
"FailedToCreateWorker");
- LOG(DEBUG) << __func__;
+ LOG(DEBUG) << getEffectName() << __func__;
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus EffectImpl::setParameter(const Parameter& param) {
- LOG(DEBUG) << __func__ << " with: " << param.toString();
+ LOG(DEBUG) << getEffectName() << __func__ << " with: " << param.toString();
const auto tag = param.getTag();
switch (tag) {
@@ -91,7 +91,8 @@
return setParameterSpecific(param.get<Parameter::specific>());
}
default: {
- LOG(ERROR) << __func__ << " unsupportedParameterTag " << toString(tag);
+ LOG(ERROR) << getEffectName() << __func__ << " unsupportedParameterTag "
+ << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
"ParameterNotSupported");
}
@@ -99,7 +100,7 @@
}
ndk::ScopedAStatus EffectImpl::getParameter(const Parameter::Id& id, Parameter* param) {
- LOG(DEBUG) << __func__ << id.toString();
+ LOG(DEBUG) << getEffectName() << __func__ << id.toString();
auto tag = id.getTag();
switch (tag) {
case Parameter::Id::commonTag: {
@@ -116,7 +117,7 @@
break;
}
}
- LOG(DEBUG) << __func__ << param->toString();
+ LOG(DEBUG) << getEffectName() << __func__ << param->toString();
return ndk::ScopedAStatus::ok();
}
@@ -149,7 +150,8 @@
EX_ILLEGAL_ARGUMENT, "setVolumeStereoFailed");
break;
default: {
- LOG(ERROR) << __func__ << " unsupportedParameterTag " << toString(tag);
+ LOG(ERROR) << getEffectName() << __func__ << " unsupportedParameterTag "
+ << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
"commonParamNotSupported");
}
@@ -183,7 +185,7 @@
break;
}
default: {
- LOG(DEBUG) << __func__ << " unsupported tag " << toString(tag);
+ LOG(DEBUG) << getEffectName() << __func__ << " unsupported tag " << toString(tag);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
"tagNotSupported");
}
@@ -198,8 +200,8 @@
ndk::ScopedAStatus EffectImpl::command(CommandId command) {
RETURN_IF(mState == State::INIT, EX_ILLEGAL_STATE, "CommandStateError");
- LOG(DEBUG) << __func__ << ": receive command: " << toString(command) << " at state "
- << toString(mState);
+ LOG(DEBUG) << getEffectName() << __func__ << ": receive command: " << toString(command)
+ << " at state " << toString(mState);
switch (command) {
case CommandId::START:
@@ -217,11 +219,11 @@
mState = State::IDLE;
break;
default:
- LOG(ERROR) << __func__ << " instance still processing";
+ LOG(ERROR) << getEffectName() << __func__ << " instance still processing";
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
"CommandIdNotSupported");
}
- LOG(DEBUG) << __func__ << " transfer to state: " << toString(mState);
+ LOG(DEBUG) << getEffectName() << __func__ << " transfer to state: " << toString(mState);
return ndk::ScopedAStatus::ok();
}
@@ -252,7 +254,7 @@
for (int i = 0; i < samples; i++) {
*out++ = *in++;
}
- LOG(DEBUG) << __func__ << " done processing " << samples << " samples";
+ LOG(DEBUG) << getEffectName() << __func__ << " done processing " << samples << " samples";
return {STATUS_OK, samples, samples};
}
diff --git a/audio/aidl/default/EffectThread.cpp b/audio/aidl/default/EffectThread.cpp
index 4f8fb3c..844127d 100644
--- a/audio/aidl/default/EffectThread.cpp
+++ b/audio/aidl/default/EffectThread.cpp
@@ -36,7 +36,7 @@
RetCode EffectThread::createThread(std::shared_ptr<EffectContext> context, const std::string& name,
int priority, int sleepUs /* kSleepTimeUs */) {
if (mThread.joinable()) {
- LOG(WARNING) << __func__ << " thread already created, no-op";
+ LOG(WARNING) << "-" << mName << "-" << __func__ << " thread already created, no-op";
return RetCode::SUCCESS;
}
mName = name;
@@ -47,7 +47,7 @@
mThreadContext = std::move(context);
}
mThread = std::thread(&EffectThread::threadLoop, this);
- LOG(DEBUG) << __func__ << " " << name << " priority " << mPriority << " done";
+ LOG(DEBUG) << "-" << mName << "-" << __func__ << " priority " << mPriority << " done";
return RetCode::SUCCESS;
}
@@ -66,7 +66,7 @@
std::lock_guard lg(mThreadMutex);
mThreadContext.reset();
}
- LOG(DEBUG) << __func__ << " done";
+ LOG(DEBUG) << "-" << mName << "-" << __func__ << " done";
return RetCode::SUCCESS;
}
@@ -80,21 +80,23 @@
RetCode EffectThread::handleStartStop(bool stop) {
if (!mThread.joinable()) {
- LOG(ERROR) << __func__ << " thread already destroyed";
+ LOG(ERROR) << "-" << mName << "-" << __func__ << ": "
+ << " thread already destroyed";
return RetCode::ERROR_THREAD;
}
{
std::lock_guard lg(mThreadMutex);
if (stop == mStop) {
- LOG(WARNING) << __func__ << " already " << (stop ? "stop" : "start");
+ LOG(WARNING) << "-" << mName << "-" << __func__ << ": "
+ << " already " << (stop ? "stop" : "start");
return RetCode::SUCCESS;
}
mStop = stop;
}
mCv.notify_one();
- LOG(DEBUG) << (stop ? "stop done" : "start done");
+ LOG(DEBUG) << ": " << mName << (stop ? " stop done" : " start done");
return RetCode::SUCCESS;
}
@@ -124,16 +126,18 @@
auto readSamples = inputMQ->availableToRead(), writeSamples = outputMQ->availableToWrite();
if (readSamples && writeSamples) {
auto processSamples = std::min(readSamples, writeSamples);
- LOG(DEBUG) << __func__ << " available to read " << readSamples << " available to write "
- << writeSamples << " process " << processSamples;
+ LOG(DEBUG) << "-" << mName << "-" << __func__ << ": "
+ << " available to read " << readSamples << " available to write " << writeSamples
+ << " process " << processSamples;
inputMQ->read(buffer, processSamples);
IEffect::Status status = effectProcessImpl(buffer, buffer, processSamples);
outputMQ->write(buffer, status.fmqProduced);
statusMQ->writeBlocking(&status, 1);
- LOG(DEBUG) << __func__ << " done processing, effect consumed " << status.fmqConsumed
- << " produced " << status.fmqProduced;
+ LOG(DEBUG) << "-" << mName << "-" << __func__ << ": "
+ << " done processing, effect consumed " << status.fmqConsumed << " produced "
+ << status.fmqProduced;
} else {
usleep(mSleepTimeUs);
}
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 984b9a1..6b417a4 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -143,6 +143,21 @@
}
}
+std::ostream& operator<<(std::ostream& os, Module::Type t) {
+ switch (t) {
+ case Module::Type::DEFAULT:
+ os << "default";
+ break;
+ case Module::Type::R_SUBMIX:
+ os << "r_submix";
+ break;
+ case Module::Type::USB:
+ os << "usb";
+ break;
+ }
+ return os;
+}
+
void Module::cleanUpPatch(int32_t patchId) {
erase_all_values(mPatches, std::set<int32_t>{patchId});
}
@@ -352,16 +367,17 @@
ndk::ScopedAStatus Module::setModuleDebug(
const ::aidl::android::hardware::audio::core::ModuleDebug& in_debug) {
- LOG(DEBUG) << __func__ << ": old flags:" << mDebug.toString()
+ LOG(DEBUG) << __func__ << ": " << mType << ": old flags:" << mDebug.toString()
<< ", new flags: " << in_debug.toString();
if (mDebug.simulateDeviceConnections != in_debug.simulateDeviceConnections &&
!mConnectedDevicePorts.empty()) {
- LOG(ERROR) << __func__ << ": attempting to change device connections simulation "
- << "while having external devices connected";
+ LOG(ERROR) << __func__ << ": " << mType
+ << ": attempting to change device connections simulation while having external "
+ << "devices connected";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
if (in_debug.streamTransientStateDelayMs < 0) {
- LOG(ERROR) << __func__ << ": streamTransientStateDelayMs is negative: "
+ LOG(ERROR) << __func__ << ": " << mType << ": streamTransientStateDelayMs is negative: "
<< in_debug.streamTransientStateDelayMs;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
@@ -440,38 +456,45 @@
LOG(DEBUG) << __func__ << ": device port " << connectedPort.id << " device set to "
<< connectedDevicePort.device.toString();
// Check if there is already a connected port with for the same external device.
- for (auto connectedPortId : mConnectedDevicePorts) {
- auto connectedPortIt = findById<AudioPort>(ports, connectedPortId);
+ for (auto connectedPortPair : mConnectedDevicePorts) {
+ auto connectedPortIt = findById<AudioPort>(ports, connectedPortPair.first);
if (connectedPortIt->ext.get<AudioPortExt::Tag::device>().device ==
connectedDevicePort.device) {
LOG(ERROR) << __func__ << ": device " << connectedDevicePort.device.toString()
- << " is already connected at the device port id " << connectedPortId;
+ << " is already connected at the device port id "
+ << connectedPortPair.first;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
}
}
if (!mDebug.simulateDeviceConnections) {
- // In a real HAL here we would attempt querying the profiles from the device.
- LOG(ERROR) << __func__ << ": failed to query supported device profiles";
- // TODO: Check the return value when it is ready for actual devices.
- populateConnectedDevicePort(&connectedPort);
+ if (ndk::ScopedAStatus status = populateConnectedDevicePort(&connectedPort);
+ !status.isOk()) {
+ return status;
+ }
+ } else {
+ auto& connectedProfiles = getConfig().connectedProfiles;
+ if (auto connectedProfilesIt = connectedProfiles.find(templateId);
+ connectedProfilesIt != connectedProfiles.end()) {
+ connectedPort.profiles = connectedProfilesIt->second;
+ }
+ }
+ if (connectedPort.profiles.empty()) {
+ LOG(ERROR) << "Profiles of a connected port still empty after connecting external device "
+ << connectedPort.toString();
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
connectedPort.id = ++getConfig().nextPortId;
- mConnectedDevicePorts.insert(connectedPort.id);
+ auto [connectedPortsIt, _] =
+ mConnectedDevicePorts.insert(std::pair(connectedPort.id, std::vector<int32_t>()));
LOG(DEBUG) << __func__ << ": template port " << templateId << " external device connected, "
<< "connected port ID " << connectedPort.id;
- auto& connectedProfiles = getConfig().connectedProfiles;
- if (auto connectedProfilesIt = connectedProfiles.find(templateId);
- connectedProfilesIt != connectedProfiles.end()) {
- connectedPort.profiles = connectedProfilesIt->second;
- }
ports.push_back(connectedPort);
onExternalDeviceConnectionChanged(connectedPort, true /*connected*/);
- *_aidl_return = std::move(connectedPort);
+ std::vector<int32_t> routablePortIds;
std::vector<AudioRoute> newRoutes;
auto& routes = getConfig().routes;
for (auto& r : routes) {
@@ -481,15 +504,30 @@
newRoute.sinkPortId = connectedPort.id;
newRoute.isExclusive = r.isExclusive;
newRoutes.push_back(std::move(newRoute));
+ routablePortIds.insert(routablePortIds.end(), r.sourcePortIds.begin(),
+ r.sourcePortIds.end());
} else {
auto& srcs = r.sourcePortIds;
if (std::find(srcs.begin(), srcs.end(), templateId) != srcs.end()) {
srcs.push_back(connectedPort.id);
+ routablePortIds.push_back(r.sinkPortId);
}
}
}
routes.insert(routes.end(), newRoutes.begin(), newRoutes.end());
+ // Note: this is a simplistic approach assuming that a mix port can only be populated
+ // from a single device port. Implementing support for stuffing dynamic profiles with a superset
+ // of all profiles from all routable dynamic device ports would be more involved.
+ for (const auto mixPortId : routablePortIds) {
+ auto portsIt = findById<AudioPort>(ports, mixPortId);
+ if (portsIt != ports.end() && portsIt->profiles.empty()) {
+ portsIt->profiles = connectedPort.profiles;
+ connectedPortsIt->second.push_back(portsIt->id);
+ }
+ }
+ *_aidl_return = std::move(connectedPort);
+
return ndk::ScopedAStatus::ok();
}
@@ -504,7 +542,8 @@
LOG(ERROR) << __func__ << ": port id " << in_portId << " is not a device port";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
- if (mConnectedDevicePorts.count(in_portId) == 0) {
+ auto connectedPortsIt = mConnectedDevicePorts.find(in_portId);
+ if (connectedPortsIt == mConnectedDevicePorts.end()) {
LOG(ERROR) << __func__ << ": port id " << in_portId << " is not a connected device port";
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}
@@ -525,7 +564,6 @@
}
onExternalDeviceConnectionChanged(*portIt, false /*connected*/);
ports.erase(portIt);
- mConnectedDevicePorts.erase(in_portId);
LOG(DEBUG) << __func__ << ": connected device port " << in_portId << " released";
auto& routes = getConfig().routes;
@@ -540,6 +578,14 @@
}
}
+ for (const auto mixPortId : connectedPortsIt->second) {
+ auto mixPortIt = findById<AudioPort>(ports, mixPortId);
+ if (mixPortIt != ports.end()) {
+ mixPortIt->profiles = {};
+ }
+ }
+ mConnectedDevicePorts.erase(connectedPortsIt);
+
return ndk::ScopedAStatus::ok();
}
diff --git a/audio/aidl/default/SoundDose.cpp b/audio/aidl/default/SoundDose.cpp
index be9f93a..f12ce5d 100644
--- a/audio/aidl/default/SoundDose.cpp
+++ b/audio/aidl/default/SoundDose.cpp
@@ -22,7 +22,7 @@
namespace aidl::android::hardware::audio::core::sounddose {
-ndk::ScopedAStatus SoundDose::setOutputRs2(float in_rs2ValueDbA) {
+ndk::ScopedAStatus SoundDose::setOutputRs2UpperBound(float in_rs2ValueDbA) {
if (in_rs2ValueDbA < MIN_RS2 || in_rs2ValueDbA > DEFAULT_MAX_RS2) {
LOG(ERROR) << __func__ << ": RS2 value is invalid: " << in_rs2ValueDbA;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
@@ -32,7 +32,7 @@
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus SoundDose::getOutputRs2(float* _aidl_return) {
+ndk::ScopedAStatus SoundDose::getOutputRs2UpperBound(float* _aidl_return) {
*_aidl_return = mRs2Value;
LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
return ndk::ScopedAStatus::ok();
diff --git a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
index 561f9a3..63a014a 100644
--- a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
+++ b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.cpp
@@ -22,19 +22,21 @@
#define LOG_TAG "AHAL_AcousticEchoCancelerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "AcousticEchoCancelerSw.h"
using aidl::android::hardware::audio::effect::AcousticEchoCancelerSw;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidAcousticEchoCancelerSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAcousticEchoCanceler;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kAcousticEchoCancelerSwImplUUID;
using aidl::android::hardware::audio::effect::Range;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kAcousticEchoCancelerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAcousticEchoCancelerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -49,7 +51,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kAcousticEchoCancelerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAcousticEchoCancelerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -69,8 +71,8 @@
const Capability AcousticEchoCancelerSw::kCapability = {.range = AcousticEchoCancelerSw::kRanges};
const Descriptor AcousticEchoCancelerSw::kDescriptor = {
- .common = {.id = {.type = kAcousticEchoCancelerTypeUUID,
- .uuid = kAcousticEchoCancelerSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidAcousticEchoCanceler(),
+ .uuid = getEffectImplUuidAcousticEchoCancelerSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.h b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.h
index 753207d..73cf42b 100644
--- a/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.h
+++ b/audio/aidl/default/acousticEchoCanceler/AcousticEchoCancelerSw.h
@@ -23,7 +23,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.cpp b/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.cpp
index 39290b4..ce10ae1 100644
--- a/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.cpp
+++ b/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.cpp
@@ -17,18 +17,20 @@
#define LOG_TAG "AHAL_AutomaticGainControlV1Sw"
#include <android-base/logging.h>
+#include <system/audio_effects/effect_uuid.h>
#include "AutomaticGainControlV1Sw.h"
using aidl::android::hardware::audio::effect::AutomaticGainControlV1Sw;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidAutomaticGainControlV1Sw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainControlV1;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kAutomaticGainControlV1SwImplUUID;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kAutomaticGainControlV1SwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAutomaticGainControlV1Sw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -43,7 +45,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kAutomaticGainControlV1SwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAutomaticGainControlV1Sw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -63,8 +65,8 @@
.range = AutomaticGainControlV1Sw::kRanges};
const Descriptor AutomaticGainControlV1Sw::kDescriptor = {
- .common = {.id = {.type = kAutomaticGainControlV1TypeUUID,
- .uuid = kAutomaticGainControlV1SwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidAutomaticGainControlV1(),
+ .uuid = getEffectImplUuidAutomaticGainControlV1Sw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.h b/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.h
index 6ba7328..7d2a69f 100644
--- a/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.h
+++ b/audio/aidl/default/automaticGainControlV1/AutomaticGainControlV1Sw.h
@@ -17,7 +17,6 @@
#pragma once
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
index 50712a4..1e336ac 100644
--- a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
+++ b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.cpp
@@ -17,22 +17,24 @@
#include <algorithm>
#include <cstddef>
#include <memory>
-
#define LOG_TAG "AHAL_AutomaticGainControlV2Sw"
+
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "AutomaticGainControlV2Sw.h"
using aidl::android::hardware::audio::effect::AutomaticGainControlV2Sw;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidAutomaticGainControlV2Sw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainControlV2;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kAutomaticGainControlV2SwImplUUID;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kAutomaticGainControlV2SwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAutomaticGainControlV2Sw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kAutomaticGainControlV2SwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidAutomaticGainControlV2Sw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -67,8 +69,8 @@
.range = AutomaticGainControlV2Sw::kRanges};
const Descriptor AutomaticGainControlV2Sw::kDescriptor = {
- .common = {.id = {.type = kAutomaticGainControlV2TypeUUID,
- .uuid = kAutomaticGainControlV2SwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidAutomaticGainControlV2(),
+ .uuid = getEffectImplUuidAutomaticGainControlV2Sw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.h b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.h
index 0b50f4d..9aa60ea 100644
--- a/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.h
+++ b/audio/aidl/default/automaticGainControlV2/AutomaticGainControlV2Sw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/bassboost/BassBoostSw.cpp b/audio/aidl/default/bassboost/BassBoostSw.cpp
index fb5374f..dbf2e15 100644
--- a/audio/aidl/default/bassboost/BassBoostSw.cpp
+++ b/audio/aidl/default/bassboost/BassBoostSw.cpp
@@ -21,19 +21,22 @@
#define LOG_TAG "AHAL_BassBoostSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "BassBoostSw.h"
using aidl::android::hardware::audio::effect::BassBoostSw;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidBassBoostProxy;
+using aidl::android::hardware::audio::effect::getEffectImplUuidBassBoostSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidBassBoost;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kBassBoostSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kBassBoostSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidBassBoostSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -48,7 +51,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kBassBoostSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidBassBoostSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -64,9 +67,9 @@
MAKE_RANGE(BassBoost, strengthPm, 0, 1000)};
const Capability BassBoostSw::kCapability = {.range = {BassBoostSw::kRanges}};
const Descriptor BassBoostSw::kDescriptor = {
- .common = {.id = {.type = kBassBoostTypeUUID,
- .uuid = kBassBoostSwImplUUID,
- .proxy = kBassBoostProxyUUID},
+ .common = {.id = {.type = getEffectTypeUuidBassBoost(),
+ .uuid = getEffectImplUuidBassBoostSw(),
+ .proxy = getEffectImplUuidBassBoostProxy()},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
.volume = Flags::Volume::CTRL},
diff --git a/audio/aidl/default/bassboost/BassBoostSw.h b/audio/aidl/default/bassboost/BassBoostSw.h
index 8d183dd..1132472 100644
--- a/audio/aidl/default/bassboost/BassBoostSw.h
+++ b/audio/aidl/default/bassboost/BassBoostSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/downmix/DownmixSw.cpp b/audio/aidl/default/downmix/DownmixSw.cpp
index 81a4c89..ce5fe20 100644
--- a/audio/aidl/default/downmix/DownmixSw.cpp
+++ b/audio/aidl/default/downmix/DownmixSw.cpp
@@ -20,19 +20,21 @@
#define LOG_TAG "AHAL_DownmixSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "DownmixSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::DownmixSw;
+using aidl::android::hardware::audio::effect::getEffectImplUuidDownmixSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidDownmix;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kDownmixSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kDownmixSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidDownmixSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kDownmixSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidDownmixSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -59,13 +61,14 @@
const std::string DownmixSw::kEffectName = "DownmixSw";
const Descriptor DownmixSw::kDescriptor = {
- .common = {
- .id = {.type = kDownmixTypeUUID, .uuid = kDownmixSwImplUUID, .proxy = std::nullopt},
- .flags = {.type = Flags::Type::INSERT,
- .insert = Flags::Insert::FIRST,
- .volume = Flags::Volume::CTRL},
- .name = kEffectName,
- .implementor = "The Android Open Source Project"}};
+ .common = {.id = {.type = getEffectTypeUuidDownmix(),
+ .uuid = getEffectImplUuidDownmixSw(),
+ .proxy = std::nullopt},
+ .flags = {.type = Flags::Type::INSERT,
+ .insert = Flags::Insert::FIRST,
+ .volume = Flags::Volume::CTRL},
+ .name = kEffectName,
+ .implementor = "The Android Open Source Project"}};
ndk::ScopedAStatus DownmixSw::getDescriptor(Descriptor* _aidl_return) {
LOG(DEBUG) << __func__ << kDescriptor.toString();
diff --git a/audio/aidl/default/downmix/DownmixSw.h b/audio/aidl/default/downmix/DownmixSw.h
index 37c978b..3f8a09b 100644
--- a/audio/aidl/default/downmix/DownmixSw.h
+++ b/audio/aidl/default/downmix/DownmixSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
index 1dda6d1..ed6cfa0 100644
--- a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
+++ b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.cpp
@@ -22,19 +22,21 @@
#define LOG_TAG "AHAL_DynamicsProcessingSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "DynamicsProcessingSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::DynamicsProcessingSw;
+using aidl::android::hardware::audio::effect::getEffectImplUuidDynamicsProcessingSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessing;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kDynamicsProcessingSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kDynamicsProcessingSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidDynamicsProcessingSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -49,7 +51,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kDynamicsProcessingSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidDynamicsProcessingSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -88,8 +90,8 @@
const Capability DynamicsProcessingSw::kCapability = {.range = DynamicsProcessingSw::kRanges};
const Descriptor DynamicsProcessingSw::kDescriptor = {
- .common = {.id = {.type = kDynamicsProcessingTypeUUID,
- .uuid = kDynamicsProcessingSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidDynamicsProcessing(),
+ .uuid = getEffectImplUuidDynamicsProcessingSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
index 769f9ef..641cf71 100644
--- a/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
+++ b/audio/aidl/default/dynamicProcessing/DynamicsProcessingSw.h
@@ -25,7 +25,6 @@
#include <fmq/AidlMessageQueue.h>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/envReverb/EnvReverbSw.cpp b/audio/aidl/default/envReverb/EnvReverbSw.cpp
index 29288ca..73975c6 100644
--- a/audio/aidl/default/envReverb/EnvReverbSw.cpp
+++ b/audio/aidl/default/envReverb/EnvReverbSw.cpp
@@ -21,19 +21,21 @@
#define LOG_TAG "AHAL_EnvReverbSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "EnvReverbSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::EnvReverbSw;
+using aidl::android::hardware::audio::effect::getEffectImplUuidEnvReverbSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidEnvReverb;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kEnvReverbSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kEnvReverbSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidEnvReverbSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -48,7 +50,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kEnvReverbSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidEnvReverbSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -76,8 +78,8 @@
.range = Range::make<Range::environmentalReverb>(EnvReverbSw::kRanges)};
const Descriptor EnvReverbSw::kDescriptor = {
- .common = {.id = {.type = kEnvReverbTypeUUID,
- .uuid = kEnvReverbSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidEnvReverb(),
+ .uuid = getEffectImplUuidEnvReverbSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/envReverb/EnvReverbSw.h b/audio/aidl/default/envReverb/EnvReverbSw.h
index dd2cf5d..5e31e2f 100644
--- a/audio/aidl/default/envReverb/EnvReverbSw.h
+++ b/audio/aidl/default/envReverb/EnvReverbSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/equalizer/EqualizerSw.cpp b/audio/aidl/default/equalizer/EqualizerSw.cpp
index 0fa7a11..9769924 100644
--- a/audio/aidl/default/equalizer/EqualizerSw.cpp
+++ b/audio/aidl/default/equalizer/EqualizerSw.cpp
@@ -20,19 +20,21 @@
#define LOG_TAG "AHAL_EqualizerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "EqualizerSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::EqualizerSw;
+using aidl::android::hardware::audio::effect::getEffectImplUuidEqualizerSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kEqualizerSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kEqualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidEqualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kEqualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidEqualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -86,15 +88,16 @@
MAKE_RANGE(Equalizer, centerFreqMh, std::vector<int>({1}), std::vector<int>({0}))};
const Capability EqualizerSw::kEqCap = {.range = EqualizerSw::kRanges};
-const Descriptor EqualizerSw::kDesc = {.common = {.id = {.type = kEqualizerTypeUUID,
- .uuid = kEqualizerSwImplUUID,
- .proxy = kEqualizerProxyUUID},
- .flags = {.type = Flags::Type::INSERT,
- .insert = Flags::Insert::FIRST,
- .volume = Flags::Volume::CTRL},
- .name = EqualizerSw::kEffectName,
- .implementor = "The Android Open Source Project"},
- .capability = EqualizerSw::kEqCap};
+const Descriptor EqualizerSw::kDesc = {
+ .common = {.id = {.type = getEffectTypeUuidEqualizer(),
+ .uuid = getEffectImplUuidEqualizerSw(),
+ .proxy = getEffectImplUuidEqualizerProxy()},
+ .flags = {.type = Flags::Type::INSERT,
+ .insert = Flags::Insert::FIRST,
+ .volume = Flags::Volume::CTRL},
+ .name = EqualizerSw::kEffectName,
+ .implementor = "The Android Open Source Project"},
+ .capability = EqualizerSw::kEqCap};
ndk::ScopedAStatus EqualizerSw::getDescriptor(Descriptor* _aidl_return) {
LOG(DEBUG) << __func__ << kDesc.toString();
diff --git a/audio/aidl/default/equalizer/EqualizerSw.h b/audio/aidl/default/equalizer/EqualizerSw.h
index f8987c7..56af3b5 100644
--- a/audio/aidl/default/equalizer/EqualizerSw.h
+++ b/audio/aidl/default/equalizer/EqualizerSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/extension/ExtensionEffect.cpp b/audio/aidl/default/extension/ExtensionEffect.cpp
index db1e4a4..c4eebc0 100644
--- a/audio/aidl/default/extension/ExtensionEffect.cpp
+++ b/audio/aidl/default/extension/ExtensionEffect.cpp
@@ -23,22 +23,23 @@
#define LOG_TAG "AHAL_ExtensionEffect"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "ExtensionEffect.h"
using aidl::android::hardware::audio::effect::DefaultExtension;
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::ExtensionEffect;
+using aidl::android::hardware::audio::effect::getEffectUuidExtensionImpl;
+using aidl::android::hardware::audio::effect::getEffectUuidExtensionType;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kExtensionEffectImplUUID;
-using aidl::android::hardware::audio::effect::kExtensionEffectTypeUUID;
using aidl::android::hardware::audio::effect::Range;
using aidl::android::hardware::audio::effect::VendorExtension;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kExtensionEffectImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectUuidExtensionImpl()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -53,7 +54,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kExtensionEffectImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectUuidExtensionImpl()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -66,8 +67,8 @@
const std::string ExtensionEffect::kEffectName = "ExtensionEffectExample";
const Descriptor ExtensionEffect::kDescriptor = {
- .common = {.id = {.type = kExtensionEffectTypeUUID,
- .uuid = kExtensionEffectImplUUID,
+ .common = {.id = {.type = getEffectUuidExtensionType(),
+ .uuid = getEffectUuidExtensionImpl(),
.proxy = std::nullopt},
.name = ExtensionEffect::kEffectName,
.implementor = "The Android Open Source Project"}};
diff --git a/audio/aidl/default/extension/ExtensionEffect.h b/audio/aidl/default/extension/ExtensionEffect.h
index f432d40..e7a068b 100644
--- a/audio/aidl/default/extension/ExtensionEffect.h
+++ b/audio/aidl/default/extension/ExtensionEffect.h
@@ -22,7 +22,6 @@
#include <vector>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
index 944f715..27cdac8 100644
--- a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
+++ b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.cpp
@@ -20,19 +20,21 @@
#define LOG_TAG "AHAL_HapticGeneratorSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "HapticGeneratorSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidHapticGeneratorSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidHapticGenerator;
using aidl::android::hardware::audio::effect::HapticGeneratorSw;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kHapticGeneratorSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kHapticGeneratorSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidHapticGeneratorSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kHapticGeneratorSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidHapticGeneratorSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -60,8 +62,8 @@
const std::string HapticGeneratorSw::kEffectName = "HapticGeneratorSw";
/* Effect descriptor */
const Descriptor HapticGeneratorSw::kDescriptor = {
- .common = {.id = {.type = kHapticGeneratorTypeUUID,
- .uuid = kHapticGeneratorSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidHapticGenerator(),
+ .uuid = getEffectImplUuidHapticGeneratorSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h
index 428f460..3bbe41a 100644
--- a/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h
+++ b/audio/aidl/default/hapticGenerator/HapticGeneratorSw.h
@@ -16,13 +16,14 @@
#pragma once
-#include <aidl/android/hardware/audio/effect/BnEffect.h>
-#include <fmq/AidlMessageQueue.h>
#include <cstdlib>
+#include <map>
#include <memory>
+#include <aidl/android/hardware/audio/effect/BnEffect.h>
+#include <fmq/AidlMessageQueue.h>
+
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/include/core-impl/Configuration.h b/audio/aidl/default/include/core-impl/Configuration.h
index 4dd0133..70320e4 100644
--- a/audio/aidl/default/include/core-impl/Configuration.h
+++ b/audio/aidl/default/include/core-impl/Configuration.h
@@ -33,7 +33,8 @@
std::vector<::aidl::android::media::audio::common::AudioPort> ports;
std::vector<::aidl::android::media::audio::common::AudioPortConfig> portConfigs;
std::vector<::aidl::android::media::audio::common::AudioPortConfig> initialConfigs;
- // Port id -> List of profiles to use when the device port state is set to 'connected'.
+ // Port id -> List of profiles to use when the device port state is set to 'connected'
+ // in connection simulation mode.
std::map<int32_t, std::vector<::aidl::android::media::audio::common::AudioProfile>>
connectedProfiles;
std::vector<AudioRoute> routes;
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 2cbda7d..83ecfaa 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -177,8 +177,10 @@
ChildInterface<IBluetooth> mBluetooth;
ChildInterface<IBluetoothA2dp> mBluetoothA2dp;
ChildInterface<IBluetoothLe> mBluetoothLe;
- // ids of ports created at runtime via 'connectExternalDevice'.
- std::set<int32_t> mConnectedDevicePorts;
+ // ids of device ports created at runtime via 'connectExternalDevice'.
+ // Also stores ids of mix ports with dynamic profiles which got populated from the connected
+ // port.
+ std::map<int32_t, std::vector<int32_t>> mConnectedDevicePorts;
Streams mStreams;
// Maps port ids and port config ids to patch ids.
// Multimap because both ports and configs can be used by multiple patches.
diff --git a/audio/aidl/default/include/core-impl/SoundDose.h b/audio/aidl/default/include/core-impl/SoundDose.h
index 306aa04..2a069d9 100644
--- a/audio/aidl/default/include/core-impl/SoundDose.h
+++ b/audio/aidl/default/include/core-impl/SoundDose.h
@@ -29,8 +29,8 @@
public:
SoundDose() : mRs2Value(DEFAULT_MAX_RS2){};
- ndk::ScopedAStatus setOutputRs2(float in_rs2ValueDbA) override;
- ndk::ScopedAStatus getOutputRs2(float* _aidl_return) override;
+ ndk::ScopedAStatus setOutputRs2UpperBound(float in_rs2ValueDbA) override;
+ ndk::ScopedAStatus getOutputRs2UpperBound(float* _aidl_return) override;
ndk::ScopedAStatus registerSoundDoseCallback(
const std::shared_ptr<ISoundDose::IHalSoundDoseCallback>& in_callback) override;
diff --git a/audio/aidl/default/include/core-impl/StreamUsb.h b/audio/aidl/default/include/core-impl/StreamUsb.h
index f1815dd..36e64cb 100644
--- a/audio/aidl/default/include/core-impl/StreamUsb.h
+++ b/audio/aidl/default/include/core-impl/StreamUsb.h
@@ -56,7 +56,7 @@
std::vector<::aidl::android::media::audio::common::AudioDeviceAddress> mConnectedDevices
GUARDED_BY(mLock);
std::vector<std::shared_ptr<alsa_device_proxy>> mAlsaDeviceProxies GUARDED_BY(mLock);
- bool mIsStandby = false;
+ bool mIsStandby = true;
};
class StreamInUsb final : public StreamIn {
diff --git a/audio/aidl/default/include/effect-impl/EffectRange.h b/audio/aidl/default/include/effect-impl/EffectRange.h
new file mode 100644
index 0000000..a3ea01f
--- /dev/null
+++ b/audio/aidl/default/include/effect-impl/EffectRange.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <algorithm>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+namespace aidl::android::hardware::audio::effect {
+
+template <typename T>
+bool isInRange(const T& value, const T& low, const T& high) {
+ return (value >= low) && (value <= high);
+}
+
+template <typename T, std::size_t... Is>
+bool isTupleInRange(const T& test, const T& min, const T& max, std::index_sequence<Is...>) {
+ return (isInRange(std::get<Is>(test), std::get<Is>(min), std::get<Is>(max)) && ...);
+}
+
+template <typename T, std::size_t TupSize = std::tuple_size_v<T>>
+bool isTupleInRange(const T& test, const T& min, const T& max) {
+ return isTupleInRange(test, min, max, std::make_index_sequence<TupSize>{});
+}
+
+template <typename T, typename F>
+bool isTupleInRange(const std::vector<T>& cfgs, const T& min, const T& max, const F& func) {
+ auto minT = func(min), maxT = func(max);
+ return std::all_of(cfgs.cbegin(), cfgs.cend(),
+ [&](const T& cfg) { return isTupleInRange(func(cfg), minT, maxT); });
+}
+
+} // namespace aidl::android::hardware::audio::effect
diff --git a/audio/aidl/default/include/effect-impl/EffectTypes.h b/audio/aidl/default/include/effect-impl/EffectTypes.h
index fe534d7..4bda7be 100644
--- a/audio/aidl/default/include/effect-impl/EffectTypes.h
+++ b/audio/aidl/default/include/effect-impl/EffectTypes.h
@@ -15,7 +15,6 @@
*/
#pragma once
-#include <ostream>
#include <string>
#include <aidl/android/hardware/audio/effect/BnEffect.h>
@@ -128,23 +127,4 @@
#define MAKE_RANGE(T, Tag, l, r) \
{ .min = T::make<T::Tag>(l), .max = T::make<T::Tag>(r) }
-static inline bool stringToUuid(const char* str,
- ::aidl::android::media::audio::common::AudioUuid* uuid) {
- RETURN_VALUE_IF(!uuid || !str, false, "nullPtr");
-
- uint32_t tmp[10];
- if (sscanf(str, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x", tmp, tmp + 1, tmp + 2, tmp + 3,
- tmp + 4, tmp + 5, tmp + 6, tmp + 7, tmp + 8, tmp + 9) < 10) {
- return false;
- }
-
- uuid->timeLow = (uint32_t)tmp[0];
- uuid->timeMid = (uint16_t)tmp[1];
- uuid->timeHiAndVersion = (uint16_t)tmp[2];
- uuid->clockSeq = (uint16_t)tmp[3];
- uuid->node.insert(uuid->node.end(), {(uint8_t)tmp[4], (uint8_t)tmp[5], (uint8_t)tmp[6],
- (uint8_t)tmp[7], (uint8_t)tmp[8], (uint8_t)tmp[9]});
- return true;
-}
-
} // namespace aidl::android::hardware::audio::effect
diff --git a/audio/aidl/default/include/effect-impl/EffectUUID.h b/audio/aidl/default/include/effect-impl/EffectUUID.h
deleted file mode 100644
index bc61c0f..0000000
--- a/audio/aidl/default/include/effect-impl/EffectUUID.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-#include <map>
-
-#include <aidl/android/media/audio/common/AudioUuid.h>
-
-namespace aidl::android::hardware::audio::effect {
-
-using ::aidl::android::media::audio::common::AudioUuid;
-
-// ec7178ec-e5e1-4432-a3f4-4657e6795210
-static const AudioUuid kEffectNullUuid = {static_cast<int32_t>(0xec7178ec),
- 0xe5e1,
- 0x4432,
- 0xa3f4,
- {0x46, 0x57, 0xe6, 0x79, 0x52, 0x10}};
-// Zero UUID
-static const AudioUuid kEffectZeroUuid = {
- static_cast<int32_t>(0x0), 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}};
-
-// 7b491460-8d4d-11e0-bd61-0002a5d5c51b.
-static const AudioUuid kAcousticEchoCancelerTypeUUID = {static_cast<int32_t>(0x7b491460),
- 0x8d4d,
- 0x11e0,
- 0xbd61,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// bb392ec0-8d4d-11e0-a896-0002a5d5c51b
-static const AudioUuid kAcousticEchoCancelerSwImplUUID = {static_cast<int32_t>(0xbb392ec0),
- 0x8d4d,
- 0x11e0,
- 0xa896,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 0a8abfe0-654c-11e0-ba26-0002a5d5c51b
-static const AudioUuid kAutomaticGainControlV1TypeUUID = {static_cast<int32_t>(0x0a8abfe0),
- 0x654c,
- 0x11e0,
- 0xba26,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// aa8130e0-66fc-11e0-bad0-0002a5d5c51b
-static const AudioUuid kAutomaticGainControlV1SwImplUUID = {static_cast<int32_t>(0xaa8130e0),
- 0x66fc,
- 0x11e0,
- 0xbad0,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// ae3c653b-be18-4ab8-8938-418f0a7f06ac
-static const AudioUuid kAutomaticGainControlV2TypeUUID = {static_cast<int32_t>(0xae3c653b),
- 0xbe18,
- 0x4ab8,
- 0x8938,
- {0x41, 0x8f, 0x0a, 0x7f, 0x06, 0xac}};
-// 89f38e65-d4d2-4d64-ad0e-2b3e799ea886
-static const AudioUuid kAutomaticGainControlV2SwImplUUID = {static_cast<int32_t>(0x89f38e65),
- 0xd4d2,
- 0x4d64,
- 0xad0e,
- {0x2b, 0x3e, 0x79, 0x9e, 0xa8, 0x86}};
-// 0634f220-ddd4-11db-a0fc-0002a5d5c51b
-static const AudioUuid kBassBoostTypeUUID = {static_cast<int32_t>(0x0634f220),
- 0xddd4,
- 0x11db,
- 0xa0fc,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa8181f2-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kBassBoostSwImplUUID = {static_cast<int32_t>(0xfa8181f2),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 8631f300-72e2-11df-b57e-0002a5d5c51b
-static const AudioUuid kBassBoostBundleImplUUID = {static_cast<int32_t>(0x8631f300),
- 0x72e2,
- 0x11df,
- 0xb57e,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 14804144-a5ee-4d24-aa88-0002a5d5c51b
-static const AudioUuid kBassBoostProxyUUID = {static_cast<int32_t>(0x14804144),
- 0xa5ee,
- 0x4d24,
- 0xaa88,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 381e49cc-a858-4aa2-87f6-e8388e7601b2
-static const AudioUuid kDownmixTypeUUID = {static_cast<int32_t>(0x381e49cc),
- 0xa858,
- 0x4aa2,
- 0x87f6,
- {0xe8, 0x38, 0x8e, 0x76, 0x01, 0xb2}};
-// fa8187ba-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kDownmixSwImplUUID = {static_cast<int32_t>(0xfa8187ba),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 93f04452-e4fe-41cc-91f9-e475b6d1d69f
-static const AudioUuid kDownmixImplUUID = {static_cast<int32_t>(0x93f04452),
- 0xe4fe,
- 0x41cc,
- 0x91f9,
- {0xe4, 0x75, 0xb6, 0xd1, 0xd6, 0x9f}};
-// 0bed4300-ddd6-11db-8f34-0002a5d5c51b.
-static const AudioUuid kEqualizerTypeUUID = {static_cast<int32_t>(0x0bed4300),
- 0xddd6,
- 0x11db,
- 0x8f34,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 0bed4300-847d-11df-bb17-0002a5d5c51b
-static const AudioUuid kEqualizerSwImplUUID = {static_cast<int32_t>(0x0bed4300),
- 0x847d,
- 0x11df,
- 0xbb17,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// ce772f20-847d-11df-bb17-0002a5d5c51b
-static const AudioUuid kEqualizerBundleImplUUID = {static_cast<int32_t>(0xce772f20),
- 0x847d,
- 0x11df,
- 0xbb17,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// c8e70ecd-48ca-456e-8a4f-0002a5d5c51b
-static const AudioUuid kEqualizerProxyUUID = {static_cast<int32_t>(0xc8e70ecd),
- 0x48ca,
- 0x456e,
- 0x8a4f,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 7261676f-6d75-7369-6364-28e2fd3ac39e
-static const AudioUuid kDynamicsProcessingTypeUUID = {static_cast<int32_t>(0x7261676f),
- 0x6d75,
- 0x7369,
- 0x6364,
- {0x28, 0xe2, 0xfd, 0x3a, 0xc3, 0x9e}};
-// fa818d78-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kDynamicsProcessingSwImplUUID = {static_cast<int32_t>(0xfa818d78),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// e0e6539b-1781-7261-676f-6d7573696340
-static const AudioUuid kDynamicsProcessingImplUUID = {static_cast<int32_t>(0xe0e6539b),
- 0x1781,
- 0x7261,
- 0x676f,
- {0x6d, 0x75, 0x73, 0x69, 0x63, 0x40}};
-// 1411e6d6-aecd-4021-a1cf-a6aceb0d71e5
-static const AudioUuid kHapticGeneratorTypeUUID = {static_cast<int32_t>(0x1411e6d6),
- 0xaecd,
- 0x4021,
- 0xa1cf,
- {0xa6, 0xac, 0xeb, 0x0d, 0x71, 0xe5}};
-// fa819110-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kHapticGeneratorSwImplUUID = {static_cast<int32_t>(0xfa819110),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 97c4acd1-8b82-4f2f-832e-c2fe5d7a9931
-static const AudioUuid kHapticGeneratorImplUUID = {static_cast<int32_t>(0x97c4acd1),
- 0x8b82,
- 0x4f2f,
- 0x832e,
- {0xc2, 0xfe, 0x5d, 0x7a, 0x99, 0x31}};
-// fe3199be-aed0-413f-87bb-11260eb63cf1
-static const AudioUuid kLoudnessEnhancerTypeUUID = {static_cast<int32_t>(0xfe3199be),
- 0xaed0,
- 0x413f,
- 0x87bb,
- {0x11, 0x26, 0x0e, 0xb6, 0x3c, 0xf1}};
-// fa819610-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kLoudnessEnhancerSwImplUUID = {static_cast<int32_t>(0xfa819610),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// fa415329-2034-4bea-b5dc-5b381c8d1e2c
-static const AudioUuid kLoudnessEnhancerImplUUID = {static_cast<int32_t>(0xfa415329),
- 0x2034,
- 0x4bea,
- 0xb5dc,
- {0x5b, 0x38, 0x1c, 0x8d, 0x1e, 0x2c}};
-// c2e5d5f0-94bd-4763-9cac-4e234d06839e
-static const AudioUuid kEnvReverbTypeUUID = {static_cast<int32_t>(0xc2e5d5f0),
- 0x94bd,
- 0x4763,
- 0x9cac,
- {0x4e, 0x23, 0x4d, 0x06, 0x83, 0x9e}};
-// fa819886-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kEnvReverbSwImplUUID = {static_cast<int32_t>(0xfa819886),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 4a387fc0-8ab3-11df-8bad-0002a5d5c51b
-static const AudioUuid kAuxEnvReverbImplUUID = {static_cast<int32_t>(0x4a387fc0),
- 0x8ab3,
- 0x11df,
- 0x8bad,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// c7a511a0-a3bb-11df-860e-0002a5d5c51b
-static const AudioUuid kInsertEnvReverbImplUUID = {static_cast<int32_t>(0xc7a511a0),
- 0xa3bb,
- 0x11df,
- 0x860e,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 58b4b260-8e06-11e0-aa8e-0002a5d5c51b
-static const AudioUuid kNoiseSuppressionTypeUUID = {static_cast<int32_t>(0x58b4b260),
- 0x8e06,
- 0x11e0,
- 0xaa8e,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// c06c8400-8e06-11e0-9cb6-0002a5d5c51b
-static const AudioUuid kNoiseSuppressionSwImplUUID = {static_cast<int32_t>(0xc06c8400),
- 0x8e06,
- 0x11e0,
- 0x9cb6,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 47382d60-ddd8-11db-bf3a-0002a5d5c51b
-static const AudioUuid kPresetReverbTypeUUID = {static_cast<int32_t>(0x47382d60),
- 0xddd8,
- 0x11db,
- 0xbf3a,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa8199c6-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kPresetReverbSwImplUUID = {static_cast<int32_t>(0xfa8199c6),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// f29a1400-a3bb-11df-8ddc-0002a5d5c51b
-static const AudioUuid kAuxPresetReverbImplUUID = {static_cast<int32_t>(0xf29a1400),
- 0xa3bb,
- 0x11df,
- 0x8ddc,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 172cdf00-a3bc-11df-a72f-0002a5d5c51b
-static const AudioUuid kInsertPresetReverbImplUUID = {static_cast<int32_t>(0x172cdf00),
- 0xa3bc,
- 0x11df,
- 0xa72f,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// 37cc2c00-dddd-11db-8577-0002a5d5c51b
-static const AudioUuid kVirtualizerTypeUUID = {static_cast<int32_t>(0x37cc2c00),
- 0xdddd,
- 0x11db,
- 0x8577,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa819d86-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kVirtualizerSwImplUUID = {static_cast<int32_t>(0xfa819d86),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 1d4033c0-8557-11df-9f2d-0002a5d5c51b
-static const AudioUuid kVirtualizerBundleImplUUID = {static_cast<int32_t>(0x1d4033c0),
- 0x8557,
- 0x11df,
- 0x9f2d,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// d3467faa-acc7-4d34-acaf-0002a5d5c51b
-static const AudioUuid kVirtualizerProxyUUID = {static_cast<int32_t>(0xd3467faa),
- 0xacc7,
- 0x4d34,
- 0xacaf,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// e46b26a0-dddd-11db-8afd-0002a5d5c51b
-static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xe46b26a0),
- 0xdddd,
- 0x11db,
- 0x8afd,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa81a0f6-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// d069d9e0-8329-11df-9168-0002a5d5c51b
-// {0xd069d9e0, 0x8329, 0x11df, 0x9168, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
-static const AudioUuid kVisualizerImplUUID = {static_cast<int32_t>(0xd069d9e0),
- 0x8329,
- 0x11df,
- 0x9168,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-// fa81a2b8-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kVolumeTypeUUID = {static_cast<int32_t>(0xfa81a2b8),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// fa81a718-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kVolumeSwImplUUID = {static_cast<int32_t>(0xfa81a718),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// 119341a0-8469-11df-81f9-0002a5d5c51b
-static const AudioUuid kVolumeBundleImplUUID = {static_cast<int32_t>(0x119341a0),
- 0x8469,
- 0x11df,
- 0x81f9,
- {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-
-// fa81dbde-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kExtensionEffectTypeUUID = {static_cast<int32_t>(0xfa81dbde),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-// fa81dd00-588b-11ed-9b6a-0242ac120002
-static const AudioUuid kExtensionEffectImplUUID = {static_cast<int32_t>(0xfa81dd00),
- 0x588b,
- 0x11ed,
- 0x9b6a,
- {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
-/**
- * @brief A map between effect name and effect type UUID.
- * All <name> attribution in effect/effectProxy of audio_effects.xml should be listed in this map.
- * We need this map is because existing audio_effects.xml don't have a type UUID defined.
- */
-static const std::map<const std::string /* effect type */, const AudioUuid&> kUuidNameTypeMap = {
- {"acoustic_echo_canceler", kAcousticEchoCancelerTypeUUID},
- {"automatic_gain_control_v1", kAutomaticGainControlV1TypeUUID},
- {"automatic_gain_control_v2", kAutomaticGainControlV2TypeUUID},
- {"bassboost", kBassBoostTypeUUID},
- {"downmix", kDownmixTypeUUID},
- {"dynamics_processing", kDynamicsProcessingTypeUUID},
- {"equalizer", kEqualizerTypeUUID},
- {"extensioneffect", kExtensionEffectTypeUUID},
- {"haptic_generator", kHapticGeneratorTypeUUID},
- {"loudness_enhancer", kLoudnessEnhancerTypeUUID},
- {"env_reverb", kEnvReverbTypeUUID},
- {"noise_suppression", kNoiseSuppressionTypeUUID},
- {"preset_reverb", kPresetReverbTypeUUID},
- {"reverb_env_aux", kEnvReverbTypeUUID},
- {"reverb_env_ins", kEnvReverbTypeUUID},
- {"reverb_pre_aux", kPresetReverbTypeUUID},
- {"reverb_pre_ins", kPresetReverbTypeUUID},
- {"virtualizer", kVirtualizerTypeUUID},
- {"visualizer", kVisualizerTypeUUID},
- {"volume", kVolumeTypeUUID},
-};
-
-} // namespace aidl::android::hardware::audio::effect
diff --git a/audio/aidl/default/include/effectFactory-impl/EffectConfig.h b/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
index c499811..c627a27 100644
--- a/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
+++ b/audio/aidl/default/include/effectFactory-impl/EffectConfig.h
@@ -17,6 +17,7 @@
#pragma once
#include <functional>
+#include <map>
#include <memory>
#include <string>
#include <unordered_map>
@@ -62,6 +63,9 @@
return mProcessingMap;
}
+ static bool findUuid(const std::string& xmlEffectName,
+ ::aidl::android::media::audio::common::AudioUuid* uuid);
+
private:
static constexpr const char* kEffectLibPath[] =
#ifdef __LP64__
diff --git a/audio/aidl/default/include/effectFactory-impl/EffectFactory.h b/audio/aidl/default/include/effectFactory-impl/EffectFactory.h
index fc9ef02..b7f63af 100644
--- a/audio/aidl/default/include/effectFactory-impl/EffectFactory.h
+++ b/audio/aidl/default/include/effectFactory-impl/EffectFactory.h
@@ -105,7 +105,7 @@
const std::string& path);
void createIdentityWithConfig(
const EffectConfig::LibraryUuid& configLib,
- const ::aidl::android::media::audio::common::AudioUuid& typeUuid,
+ const ::aidl::android::media::audio::common::AudioUuid& typeUuidStr,
const std::optional<::aidl::android::media::audio::common::AudioUuid> proxyUuid);
void loadEffectLibs();
/* Get effect_dl_interface_s from library handle */
diff --git a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
index f115cc5..7954316 100644
--- a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
+++ b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.cpp
@@ -20,19 +20,21 @@
#define LOG_TAG "AHAL_LoudnessEnhancerSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "LoudnessEnhancerSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidLoudnessEnhancerSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidLoudnessEnhancer;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kLoudnessEnhancerSwImplUUID;
using aidl::android::hardware::audio::effect::LoudnessEnhancerSw;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kLoudnessEnhancerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidLoudnessEnhancerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kLoudnessEnhancerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidLoudnessEnhancerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -59,8 +61,8 @@
const std::string LoudnessEnhancerSw::kEffectName = "LoudnessEnhancerSw";
const Descriptor LoudnessEnhancerSw::kDescriptor = {
- .common = {.id = {.type = kLoudnessEnhancerTypeUUID,
- .uuid = kLoudnessEnhancerSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidLoudnessEnhancer(),
+ .uuid = getEffectImplUuidLoudnessEnhancerSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h
index e252f4a..25824f2 100644
--- a/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h
+++ b/audio/aidl/default/loudnessEnhancer/LoudnessEnhancerSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
index ba39b16..9b2cb7c 100644
--- a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
+++ b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
@@ -17,22 +17,25 @@
#include <algorithm>
#include <cstddef>
#include <memory>
+#define LOG_TAG "AHAL_NoiseSuppressionSw"
#define LOG_TAG "AHAL_NoiseSuppressionSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "NoiseSuppressionSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidNoiseSuppressionSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidNoiseSuppression;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kNoiseSuppressionSwImplUUID;
using aidl::android::hardware::audio::effect::NoiseSuppressionSw;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kNoiseSuppressionSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidNoiseSuppressionSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +50,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kNoiseSuppressionSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidNoiseSuppressionSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -59,8 +62,8 @@
const std::string NoiseSuppressionSw::kEffectName = "NoiseSuppressionSw";
const Descriptor NoiseSuppressionSw::kDescriptor = {
- .common = {.id = {.type = kNoiseSuppressionTypeUUID,
- .uuid = kNoiseSuppressionSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidNoiseSuppression(),
+ .uuid = getEffectImplUuidNoiseSuppressionSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
index 22bf066..fc1e028 100644
--- a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
+++ b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
@@ -16,13 +16,13 @@
#pragma once
-#include <aidl/android/hardware/audio/effect/BnEffect.h>
-#include <fmq/AidlMessageQueue.h>
#include <cstdlib>
#include <memory>
+#include <aidl/android/hardware/audio/effect/BnEffect.h>
+#include <fmq/AidlMessageQueue.h>
+
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/presetReverb/PresetReverbSw.cpp b/audio/aidl/default/presetReverb/PresetReverbSw.cpp
index 14546a4..3f02eb7 100644
--- a/audio/aidl/default/presetReverb/PresetReverbSw.cpp
+++ b/audio/aidl/default/presetReverb/PresetReverbSw.cpp
@@ -21,19 +21,21 @@
#include <android-base/logging.h>
#include <android/binder_enums.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "PresetReverbSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidPresetReverbSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidPresetReverb;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kPresetReverbSwImplUUID;
using aidl::android::hardware::audio::effect::PresetReverbSw;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kPresetReverbSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidPresetReverbSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -48,7 +50,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kPresetReverbSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidPresetReverbSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -72,8 +74,8 @@
.range = Range::make<Range::presetReverb>(PresetReverbSw::kRanges)};
const Descriptor PresetReverbSw::kDescriptor = {
- .common = {.id = {.type = kPresetReverbTypeUUID,
- .uuid = kPresetReverbSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidPresetReverb(),
+ .uuid = getEffectImplUuidPresetReverbSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/presetReverb/PresetReverbSw.h b/audio/aidl/default/presetReverb/PresetReverbSw.h
index 5061475..9ceee7c 100644
--- a/audio/aidl/default/presetReverb/PresetReverbSw.h
+++ b/audio/aidl/default/presetReverb/PresetReverbSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/usb/ModuleUsb.cpp b/audio/aidl/default/usb/ModuleUsb.cpp
index 80b0a5b..89895bf 100644
--- a/audio/aidl/default/usb/ModuleUsb.cpp
+++ b/audio/aidl/default/usb/ModuleUsb.cpp
@@ -120,7 +120,11 @@
const bool isInput = isUsbInputDeviceType(devicePort.device.type.type);
alsa_device_profile profile;
profile_init(&profile, isInput ? PCM_IN : PCM_OUT);
+ profile.card = alsaAddress[0];
+ profile.device = alsaAddress[1];
if (!profile_read_device_info(&profile)) {
+ LOG(ERROR) << __func__ << ": failed to read device info, card=" << profile.card
+ << ", device=" << profile.device;
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
diff --git a/audio/aidl/default/usb/StreamUsb.cpp b/audio/aidl/default/usb/StreamUsb.cpp
index fbfe0f1..5d1d7fe 100644
--- a/audio/aidl/default/usb/StreamUsb.cpp
+++ b/audio/aidl/default/usb/StreamUsb.cpp
@@ -107,10 +107,13 @@
::android::status_t DriverUsb::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
int32_t* latencyMs) {
if (!mConfig.has_value() || mConnectedDevices.empty()) {
+ LOG(ERROR) << __func__ << ": failed, has config: " << mConfig.has_value()
+ << ", has connected devices: " << mConnectedDevices.empty();
return ::android::NO_INIT;
}
if (mIsStandby) {
if (::android::status_t status = exitStandby(); status != ::android::OK) {
+ LOG(ERROR) << __func__ << ": failed to exit standby, status=" << status;
return status;
}
}
@@ -151,6 +154,7 @@
std::vector<std::shared_ptr<alsa_device_proxy>> alsaDeviceProxies;
for (const auto& device : connectedDevices) {
alsa_device_profile profile;
+ profile_init(&profile, mIsInput ? PCM_IN : PCM_OUT);
profile.card = device.get<AudioDeviceAddress::alsa>()[0];
profile.device = device.get<AudioDeviceAddress::alsa>()[1];
if (!profile_read_device_info(&profile)) {
@@ -174,6 +178,11 @@
<< " error=" << err;
return ::android::UNKNOWN_ERROR;
}
+ if (int err = proxy_open(proxy.get()); err != 0) {
+ LOG(ERROR) << __func__ << ": failed to open device, address=" << device.toString()
+ << " error=" << err;
+ return ::android::UNKNOWN_ERROR;
+ }
alsaDeviceProxies.push_back(std::move(proxy));
}
{
diff --git a/audio/aidl/default/usb/UsbAlsaUtils.cpp b/audio/aidl/default/usb/UsbAlsaUtils.cpp
index 3a74c2a..74d9c28 100644
--- a/audio/aidl/default/usb/UsbAlsaUtils.cpp
+++ b/audio/aidl/default/usb/UsbAlsaUtils.cpp
@@ -114,8 +114,8 @@
static const AudioFormatDescToPcmFormatMap formatDescToPcmFormatMap = {
{make_AudioFormatDescription(PcmType::UINT_8_BIT), PCM_FORMAT_S8},
{make_AudioFormatDescription(PcmType::INT_16_BIT), PCM_FORMAT_S16_LE},
- {make_AudioFormatDescription(PcmType::INT_24_BIT), PCM_FORMAT_S24_LE},
- {make_AudioFormatDescription(PcmType::FIXED_Q_8_24), PCM_FORMAT_S24_3LE},
+ {make_AudioFormatDescription(PcmType::FIXED_Q_8_24), PCM_FORMAT_S24_LE},
+ {make_AudioFormatDescription(PcmType::INT_24_BIT), PCM_FORMAT_S24_3LE},
{make_AudioFormatDescription(PcmType::INT_32_BIT), PCM_FORMAT_S32_LE},
{make_AudioFormatDescription(PcmType::FLOAT_32_BIT), PCM_FORMAT_FLOAT_LE},
};
diff --git a/audio/aidl/default/virtualizer/VirtualizerSw.cpp b/audio/aidl/default/virtualizer/VirtualizerSw.cpp
index c5a0e8d..e34464f 100644
--- a/audio/aidl/default/virtualizer/VirtualizerSw.cpp
+++ b/audio/aidl/default/virtualizer/VirtualizerSw.cpp
@@ -21,12 +21,14 @@
#include <Utils.h>
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "VirtualizerSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidVirtualizerSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVirtualizer;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kVirtualizerSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::hardware::audio::effect::VirtualizerSw;
using aidl::android::media::audio::common::AudioChannelLayout;
@@ -36,7 +38,7 @@
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kVirtualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVirtualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -51,7 +53,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kVirtualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVirtualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -73,9 +75,9 @@
.range = Range::make<Range::virtualizer>(VirtualizerSw::kRanges)};
const Descriptor VirtualizerSw::kDescriptor = {
- .common = {.id = {.type = kVirtualizerTypeUUID,
- .uuid = kVirtualizerSwImplUUID,
- .proxy = kVirtualizerProxyUUID},
+ .common = {.id = {.type = getEffectTypeUuidVirtualizer(),
+ .uuid = getEffectImplUuidVirtualizerSw(),
+ .proxy = getEffectImplUuidVirtualizerProxy()},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
.volume = Flags::Volume::CTRL},
diff --git a/audio/aidl/default/virtualizer/VirtualizerSw.h b/audio/aidl/default/virtualizer/VirtualizerSw.h
index 5c5b616..5e114d9 100644
--- a/audio/aidl/default/virtualizer/VirtualizerSw.h
+++ b/audio/aidl/default/virtualizer/VirtualizerSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/visualizer/VisualizerSw.cpp b/audio/aidl/default/visualizer/VisualizerSw.cpp
index deb3204..0909f25 100644
--- a/audio/aidl/default/visualizer/VisualizerSw.cpp
+++ b/audio/aidl/default/visualizer/VisualizerSw.cpp
@@ -17,19 +17,21 @@
#define LOG_TAG "AHAL_VisualizerSw"
#include <android-base/logging.h>
+#include <system/audio_effects/effect_uuid.h>
#include "VisualizerSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidVisualizerSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVisualizer;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kVisualizerSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::hardware::audio::effect::VisualizerSw;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kVisualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVisualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -44,7 +46,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kVisualizerSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVisualizerSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -66,8 +68,8 @@
.range = Range::make<Range::visualizer>(VisualizerSw::kRanges)};
const Descriptor VisualizerSw::kDescriptor = {
- .common = {.id = {.type = kVisualizerTypeUUID,
- .uuid = kVisualizerSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidVisualizer(),
+ .uuid = getEffectImplUuidVisualizerSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/visualizer/VisualizerSw.h b/audio/aidl/default/visualizer/VisualizerSw.h
index ee7276a..995774e 100644
--- a/audio/aidl/default/visualizer/VisualizerSw.h
+++ b/audio/aidl/default/visualizer/VisualizerSw.h
@@ -16,11 +16,10 @@
#pragma once
-#include <aidl/android/hardware/audio/effect/BnEffect.h>
#include <vector>
+#include <aidl/android/hardware/audio/effect/BnEffect.h>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/default/volume/VolumeSw.cpp b/audio/aidl/default/volume/VolumeSw.cpp
index 44cac44..8902584 100644
--- a/audio/aidl/default/volume/VolumeSw.cpp
+++ b/audio/aidl/default/volume/VolumeSw.cpp
@@ -20,19 +20,21 @@
#define LOG_TAG "AHAL_VolumeSw"
#include <android-base/logging.h>
#include <fmq/AidlMessageQueue.h>
+#include <system/audio_effects/effect_uuid.h>
#include "VolumeSw.h"
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectImplUuidVolumeSw;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVolume;
using aidl::android::hardware::audio::effect::IEffect;
-using aidl::android::hardware::audio::effect::kVolumeSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::hardware::audio::effect::VolumeSw;
using aidl::android::media::audio::common::AudioUuid;
extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
std::shared_ptr<IEffect>* instanceSpp) {
- if (!in_impl_uuid || *in_impl_uuid != kVolumeSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVolumeSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -47,7 +49,7 @@
}
extern "C" binder_exception_t queryEffect(const AudioUuid* in_impl_uuid, Descriptor* _aidl_return) {
- if (!in_impl_uuid || *in_impl_uuid != kVolumeSwImplUUID) {
+ if (!in_impl_uuid || *in_impl_uuid != getEffectImplUuidVolumeSw()) {
LOG(ERROR) << __func__ << "uuid not supported";
return EX_ILLEGAL_ARGUMENT;
}
@@ -64,8 +66,8 @@
const Capability VolumeSw::kCapability = {.range = Range::make<Range::volume>(VolumeSw::kRanges)};
const Descriptor VolumeSw::kDescriptor = {
- .common = {.id = {.type = kVolumeTypeUUID,
- .uuid = kVolumeSwImplUUID,
+ .common = {.id = {.type = getEffectTypeUuidVolume(),
+ .uuid = getEffectImplUuidVolumeSw(),
.proxy = std::nullopt},
.flags = {.type = Flags::Type::INSERT,
.insert = Flags::Insert::FIRST,
diff --git a/audio/aidl/default/volume/VolumeSw.h b/audio/aidl/default/volume/VolumeSw.h
index 2dd4324..1432b2b 100644
--- a/audio/aidl/default/volume/VolumeSw.h
+++ b/audio/aidl/default/volume/VolumeSw.h
@@ -22,7 +22,6 @@
#include <memory>
#include "effect-impl/EffectImpl.h"
-#include "effect-impl/EffectUUID.h"
namespace aidl::android::hardware::audio::effect {
diff --git a/audio/aidl/sounddose/vts/VtsHalSoundDoseFactoryTargetTest.cpp b/audio/aidl/sounddose/vts/VtsHalSoundDoseFactoryTargetTest.cpp
index df35bae..7722ccf 100644
--- a/audio/aidl/sounddose/vts/VtsHalSoundDoseFactoryTargetTest.cpp
+++ b/audio/aidl/sounddose/vts/VtsHalSoundDoseFactoryTargetTest.cpp
@@ -71,6 +71,7 @@
std::shared_ptr<ISoundDoseFactory> soundDoseFactory;
};
+// @VsrTest = VSR-5.5-002.001
TEST_P(SoundDoseFactory, GetSoundDoseForSameModule) {
const std::string module = "primary";
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index 8db8eaf..852255d 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -37,6 +37,7 @@
"general-tests",
"vts",
],
+ srcs: [":effectCommonFile"],
}
cc_test {
@@ -83,6 +84,7 @@
cc_test {
name: "VtsHalDynamicsProcessingTargetTest",
defaults: ["VtsHalAudioTargetTestDefaults"],
+ static_libs: ["libaudioaidlranges"],
srcs: ["VtsHalDynamicsProcessingTest.cpp"],
}
diff --git a/audio/aidl/vts/EffectFactoryHelper.h b/audio/aidl/vts/EffectFactoryHelper.h
index 4add844..a2499fd 100644
--- a/audio/aidl/vts/EffectFactoryHelper.h
+++ b/audio/aidl/vts/EffectFactoryHelper.h
@@ -24,7 +24,6 @@
#include <android/binder_auto_utils.h>
#include "TestUtils.h"
-#include "effect-impl/EffectUUID.h"
using namespace android;
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index a128f7c..831977b 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -31,6 +31,7 @@
#include <fmq/AidlMessageQueue.h>
#include <gtest/gtest.h>
#include <system/audio_effects/aidl_effects_utils.h>
+#include <system/audio_effects/effect_uuid.h>
#include "AudioHalBinderServiceUtil.h"
#include "EffectFactoryHelper.h"
@@ -227,10 +228,10 @@
*/
template <typename S, typename = std::enable_if_t<std::is_arithmetic_v<S>>>
static std::set<S> expandTestValueBasic(std::set<S>& s) {
- const auto min = *s.begin(), max = *s.rbegin();
const auto minLimit = std::numeric_limits<S>::min(),
maxLimit = std::numeric_limits<S>::max();
if (s.size()) {
+ const auto min = *s.begin(), max = *s.rbegin();
s.insert(min + (max - min) / 2);
if (min != minLimit) {
s.insert(min - 1);
diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp
index 2d36cbb..8828c41 100644
--- a/audio/aidl/vts/VtsHalAECTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp
@@ -29,9 +29,9 @@
using aidl::android::hardware::audio::effect::AcousticEchoCanceler;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAcousticEchoCanceler;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kAcousticEchoCancelerTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::Range;
@@ -148,7 +148,8 @@
AECParamTest, AECParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kAcousticEchoCancelerTypeUUID)),
+ IFactory::descriptor,
+ getEffectTypeUuidAcousticEchoCanceler())),
testing::ValuesIn(EffectHelper::getTestValueSet<AcousticEchoCanceler, int,
Range::acousticEchoCanceler,
AcousticEchoCanceler::echoDelayUs>(
diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
index 15a9374..edfcdf6 100644
--- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp
@@ -24,9 +24,9 @@
using aidl::android::hardware::audio::effect::AutomaticGainControlV1;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainControlV1;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kAutomaticGainControlV1TypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
enum ParamName {
@@ -158,7 +158,8 @@
AGC1ParamTest, AGC1ParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kAutomaticGainControlV1TypeUUID)),
+ IFactory::descriptor,
+ getEffectTypeUuidAutomaticGainControlV1())),
testing::ValuesIn(EffectHelper::getTestValueSet<
AutomaticGainControlV1, int, Range::automaticGainControlV1,
AutomaticGainControlV1::targetPeakLevelDbFs>(
diff --git a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
index 140537e..8ba8e45 100644
--- a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp
@@ -25,9 +25,9 @@
using aidl::android::hardware::audio::effect::AutomaticGainControlV2;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainControlV2;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kAutomaticGainControlV2TypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
enum ParamName {
@@ -164,7 +164,8 @@
AGC2ParamTest, AGC2ParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kAutomaticGainControlV2TypeUUID)),
+ IFactory::descriptor,
+ getEffectTypeUuidAutomaticGainControlV2())),
testing::ValuesIn(EffectHelper::getTestValueSet<
AutomaticGainControlV2, int, Range::automaticGainControlV2,
AutomaticGainControlV2::fixedDigitalGainMb>(
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 5d522a3..825b865 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -129,7 +129,9 @@
using Tag = AudioDeviceAddress::Tag;
if (std::string_view connection = description.connection;
connection == AudioDeviceDescription::CONNECTION_BT_A2DP ||
- connection == AudioDeviceDescription::CONNECTION_BT_LE ||
+ // Note: BT LE Broadcast uses a "group id".
+ (description.type != AudioDeviceType::OUT_BROADCAST &&
+ connection == AudioDeviceDescription::CONNECTION_BT_LE) ||
connection == AudioDeviceDescription::CONNECTION_BT_SCO ||
connection == AudioDeviceDescription::CONNECTION_WIRELESS) {
return Tag::mac;
@@ -1778,6 +1780,42 @@
}
}
+// Note: This test relies on simulation of external device connections by the HAL module.
+TEST_P(AudioCoreModule, ExternalDeviceMixPortConfigs) {
+ // After an external device has been connected, all mix ports that can be routed
+ // to the device port for the connected device must have non-empty profiles.
+ ASSERT_NO_FATAL_FAILURE(SetUpModuleConfig());
+ std::vector<AudioPort> externalDevicePorts = moduleConfig->getExternalDevicePorts();
+ if (externalDevicePorts.empty()) {
+ GTEST_SKIP() << "No external devices in the module.";
+ }
+ for (const auto& port : externalDevicePorts) {
+ WithDevicePortConnectedState portConnected(GenerateUniqueDeviceAddress(port));
+ ASSERT_NO_FATAL_FAILURE(portConnected.SetUp(module.get()));
+ std::vector<AudioRoute> routes;
+ ASSERT_IS_OK(module->getAudioRoutesForAudioPort(portConnected.getId(), &routes));
+ std::vector<AudioPort> allPorts;
+ ASSERT_IS_OK(module->getAudioPorts(&allPorts));
+ for (const auto& r : routes) {
+ if (r.sinkPortId == portConnected.getId()) {
+ for (const auto& srcPortId : r.sourcePortIds) {
+ const auto srcPortIt = findById(allPorts, srcPortId);
+ ASSERT_NE(allPorts.end(), srcPortIt) << "port ID " << srcPortId;
+ EXPECT_NE(0UL, srcPortIt->profiles.size())
+ << " source port " << srcPortIt->toString() << " must have its profiles"
+ << " populated following external device connection";
+ }
+ } else {
+ const auto sinkPortIt = findById(allPorts, r.sinkPortId);
+ ASSERT_NE(allPorts.end(), sinkPortIt) << "port ID " << r.sinkPortId;
+ EXPECT_NE(0UL, sinkPortIt->profiles.size())
+ << " source port " << sinkPortIt->toString() << " must have its"
+ << " profiles populated following external device connection";
+ }
+ }
+ }
+}
+
TEST_P(AudioCoreModule, MasterMute) {
bool isSupported = false;
EXPECT_NO_FATAL_FAILURE(TestAccessors<bool>(module.get(), &IModule::getMasterMute,
@@ -3532,6 +3570,7 @@
return ndk::ScopedAStatus::ok();
}
+// @VsrTest = VSR-5.5-002.001
TEST_P(AudioCoreSoundDose, SameInstance) {
if (soundDose == nullptr) {
GTEST_SKIP() << "SoundDose is not supported";
@@ -3543,29 +3582,33 @@
<< "getSoundDose must return the same interface instance across invocations";
}
-TEST_P(AudioCoreSoundDose, GetSetOutputRs2) {
+// @VsrTest = VSR-5.5-002.001
+TEST_P(AudioCoreSoundDose, GetSetOutputRs2UpperBound) {
if (soundDose == nullptr) {
GTEST_SKIP() << "SoundDose is not supported";
}
bool isSupported = false;
- EXPECT_NO_FATAL_FAILURE(TestAccessors<float>(soundDose.get(), &ISoundDose::getOutputRs2,
- &ISoundDose::setOutputRs2,
+ EXPECT_NO_FATAL_FAILURE(TestAccessors<float>(soundDose.get(),
+ &ISoundDose::getOutputRs2UpperBound,
+ &ISoundDose::setOutputRs2UpperBound,
/*validValues=*/{80.f, 90.f, 100.f},
/*invalidValues=*/{79.f, 101.f}, &isSupported));
- EXPECT_TRUE(isSupported) << "Getting/Setting RS2 must be supported";
+ EXPECT_TRUE(isSupported) << "Getting/Setting RS2 upper bound must be supported";
}
-TEST_P(AudioCoreSoundDose, CheckDefaultRs2Value) {
+// @VsrTest = VSR-5.5-002.001
+TEST_P(AudioCoreSoundDose, CheckDefaultRs2UpperBound) {
if (soundDose == nullptr) {
GTEST_SKIP() << "SoundDose is not supported";
}
float rs2Value;
- ASSERT_IS_OK(soundDose->getOutputRs2(&rs2Value));
+ ASSERT_IS_OK(soundDose->getOutputRs2UpperBound(&rs2Value));
EXPECT_EQ(rs2Value, ISoundDose::DEFAULT_MAX_RS2);
}
+// @VsrTest = VSR-5.5-002.001
TEST_P(AudioCoreSoundDose, RegisterSoundDoseCallbackTwiceThrowsException) {
if (soundDose == nullptr) {
GTEST_SKIP() << "SoundDose is not supported";
@@ -3576,6 +3619,7 @@
<< "Registering sound dose callback twice should throw EX_ILLEGAL_STATE";
}
+// @VsrTest = VSR-5.5-002.001
TEST_P(AudioCoreSoundDose, RegisterSoundDoseNullCallbackThrowsException) {
if (soundDose == nullptr) {
GTEST_SKIP() << "SoundDose is not supported";
diff --git a/audio/aidl/vts/VtsHalAudioCoreTargetTest.xml b/audio/aidl/vts/VtsHalAudioCoreTargetTest.xml
new file mode 100644
index 0000000..dfc1039
--- /dev/null
+++ b/audio/aidl/vts/VtsHalAudioCoreTargetTest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs VtsHalAudioCoreTargetTest.">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-native" />
+
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+ <target_preparer class="com.android.tradefed.targetprep.StopServicesSetup"/>
+
+ <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+ <option name="run-command" value="setprop vts.native_server.on 1"/>
+ <option name="teardown-command" value="setprop vts.native_server.on 0"/>
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.GTest" >
+ <option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="VtsHalAudioCoreTargetTest" />
+ <option name="native-test-timeout" value="10m" />
+ </test>
+</configuration>
diff --git a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
index 21f5eb5..7b9477d 100644
--- a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp
@@ -28,6 +28,7 @@
#include <android/binder_interface_utils.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
+#include <system/audio_effects/effect_uuid.h>
#include <aidl/android/hardware/audio/effect/IFactory.h>
@@ -38,10 +39,10 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectUuidNull;
+using aidl::android::hardware::audio::effect::getEffectUuidZero;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kEffectNullUuid;
-using aidl::android::hardware::audio::effect::kEffectZeroUuid;
using aidl::android::hardware::audio::effect::Processing;
using aidl::android::media::audio::common::AudioSource;
using aidl::android::media::audio::common::AudioStreamType;
@@ -65,8 +66,8 @@
std::unique_ptr<EffectFactoryHelper> mFactoryHelper;
std::shared_ptr<IFactory> mEffectFactory;
std::vector<std::shared_ptr<IEffect>> mEffects;
- const Descriptor::Identity kNullId = {.uuid = kEffectNullUuid};
- const Descriptor::Identity kZeroId = {.uuid = kEffectZeroUuid};
+ const Descriptor::Identity kNullId = {.uuid = getEffectUuidNull()};
+ const Descriptor::Identity kZeroId = {.uuid = getEffectUuidZero()};
const Descriptor kNullDesc = {.common.id = kNullId};
const Descriptor kZeroDesc = {.common.id = kZeroId};
@@ -132,13 +133,13 @@
TEST_P(EffectFactoryTest, ExpectAllAospEffectTypes) {
std::vector<Descriptor> descs;
std::set<AudioUuid> typeUuidSet(
- {aidl::android::hardware::audio::effect::kBassBoostTypeUUID,
- aidl::android::hardware::audio::effect::kEqualizerTypeUUID,
- aidl::android::hardware::audio::effect::kEnvReverbTypeUUID,
- aidl::android::hardware::audio::effect::kPresetReverbTypeUUID,
- aidl::android::hardware::audio::effect::kDynamicsProcessingTypeUUID,
- aidl::android::hardware::audio::effect::kHapticGeneratorTypeUUID,
- aidl::android::hardware::audio::effect::kVirtualizerTypeUUID});
+ {aidl::android::hardware::audio::effect::getEffectTypeUuidBassBoost(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidEnvReverb(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidPresetReverb(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessing(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidHapticGenerator(),
+ aidl::android::hardware::audio::effect::getEffectTypeUuidVirtualizer()});
EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, std::nullopt, &descs));
EXPECT_TRUE(descs.size() >= typeUuidSet.size());
@@ -155,19 +156,22 @@
TEST_P(EffectFactoryTest, QueryNullTypeUuid) {
std::vector<Descriptor> descs;
- EXPECT_IS_OK(mEffectFactory->queryEffects(kEffectNullUuid, std::nullopt, std::nullopt, &descs));
+ EXPECT_IS_OK(
+ mEffectFactory->queryEffects(getEffectUuidNull(), std::nullopt, std::nullopt, &descs));
EXPECT_EQ(descs.size(), 0UL);
}
TEST_P(EffectFactoryTest, QueriedNullImplUuid) {
std::vector<Descriptor> descs;
- EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, kEffectNullUuid, std::nullopt, &descs));
+ EXPECT_IS_OK(
+ mEffectFactory->queryEffects(std::nullopt, getEffectUuidNull(), std::nullopt, &descs));
EXPECT_EQ(descs.size(), 0UL);
}
TEST_P(EffectFactoryTest, QueriedNullProxyUuid) {
std::vector<Descriptor> descs;
- EXPECT_IS_OK(mEffectFactory->queryEffects(std::nullopt, std::nullopt, kEffectNullUuid, &descs));
+ EXPECT_IS_OK(
+ mEffectFactory->queryEffects(std::nullopt, std::nullopt, getEffectUuidNull(), &descs));
EXPECT_EQ(descs.size(), 0UL);
}
diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
index df66bd3..d8ad6c9 100644
--- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
@@ -139,7 +139,10 @@
Descriptor desc;
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
ASSERT_NO_FATAL_FAILURE(getDescriptor(mEffect, desc));
- EXPECT_EQ(mDescriptor.common, desc.common);
+ EXPECT_EQ(mDescriptor.common.id.type, desc.common.id.type);
+ EXPECT_EQ(mDescriptor.common.id.uuid, desc.common.id.uuid);
+ EXPECT_EQ(mDescriptor.common.name, desc.common.name);
+ EXPECT_EQ(mDescriptor.common.implementor, desc.common.implementor);
// Effect implementation Must fill in implementor and name
EXPECT_NE("", desc.common.name);
EXPECT_NE("", desc.common.implementor);
@@ -176,7 +179,11 @@
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
ASSERT_NO_FATAL_FAILURE(getDescriptor(mEffect, desc));
- EXPECT_EQ(1ul, idSet.count(desc.common.id));
+ int uuidCount = std::count_if(idSet.begin(), idSet.end(), [&](const auto& id) {
+ return id.uuid == desc.common.id.uuid && id.type == desc.common.id.type;
+ });
+
+ EXPECT_EQ(1, uuidCount);
ASSERT_NO_FATAL_FAILURE(destroy(mFactory, mEffect));
}
diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
index 824bd9f..9cfdc50 100644
--- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
@@ -27,9 +27,9 @@
using aidl::android::hardware::audio::effect::BassBoost;
using aidl::android::hardware::audio::effect::Capability;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidBassBoost;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kBassBoostTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::Range;
@@ -138,7 +138,7 @@
BassBoostTest, BassBoostParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kBassBoostTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidBassBoost())),
testing::ValuesIn(EffectHelper::getTestValueSet<BassBoost, int, Range::bassBoost,
BassBoost::strengthPm>(
kDescPair, EffectHelper::expandTestValueBasic<int>))),
diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
index bd3b76b..5aeebde 100644
--- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
@@ -24,10 +24,9 @@
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::Downmix;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidDownmix;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kDownmixTypeUUID;
-using aidl::android::hardware::audio::effect::kEffectNullUuid;
using aidl::android::hardware::audio::effect::Parameter;
/**
@@ -122,7 +121,7 @@
INSTANTIATE_TEST_SUITE_P(
DownmixTest, DownmixParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDownmixTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidDownmix())),
testing::ValuesIn(kTypeValues)),
[](const testing::TestParamInfo<DownmixParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 0b05b17..033e3b5 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -25,14 +25,16 @@
#include <Utils.h>
#include "EffectHelper.h"
+#include "EffectRangeSpecific.h"
using namespace android;
+using namespace aidl::android::hardware::audio::effect::DynamicsProcessingRanges;
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::DynamicsProcessing;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessing;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kDynamicsProcessingTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
/**
@@ -95,6 +97,19 @@
template <typename T>
bool isAidlVectorEqual(const std::vector<T>& source, const std::vector<T>& target);
+ template <typename T>
+ bool isChannelConfigValid(const std::vector<T>& cfgs) {
+ auto& channelCount = mChannelCount;
+ return std::all_of(cfgs.cbegin(), cfgs.cend(), [channelCount](const T& cfg) {
+ return (cfg.channel >= 0 && cfg.channel < channelCount);
+ });
+ }
+
+ template <typename T>
+ bool isBandConfigValid(const std::vector<T>& cfgs, int bandCount);
+
+ bool isParamValid(const DynamicsProcessing::Tag& tag, const DynamicsProcessing& dp);
+
// get set params and validate
void SetAndGetDynamicsProcessingParameters();
@@ -133,9 +148,11 @@
static const std::set<DynamicsProcessing::StageEnablement> kStageEnablementTestSet;
static const std::set<std::vector<DynamicsProcessing::InputGain>> kInputGainTestSet;
+ protected:
+ int mChannelCount;
+
private:
int32_t mChannelLayout;
- int mChannelCount;
std::vector<std::pair<DynamicsProcessing::Tag, DynamicsProcessing>> mTags;
void CleanUp() {
mTags.clear();
@@ -152,6 +169,8 @@
{.inUse = true, .bandCount = DynamicsProcessingTestHelper::kBandCount},
{.inUse = true, .bandCount = 0},
{.inUse = true, .bandCount = -1},
+ {.inUse = false, .bandCount = 0},
+ {.inUse = false, .bandCount = -1},
{.inUse = false, .bandCount = DynamicsProcessingTestHelper::kBandCount}};
// test value set for DynamicsProcessing::ChannelConfig
@@ -161,9 +180,7 @@
{.channel = 0, .enable = true},
{.channel = 1, .enable = false},
{.channel = 2, .enable = true}},
-
{{.channel = -1, .enable = false}, {.channel = 2, .enable = true}},
-
{{.channel = 0, .enable = true}, {.channel = 1, .enable = true}}};
// test value set for DynamicsProcessing::InputGain
@@ -172,10 +189,65 @@
{{.channel = 0, .gainDb = 10.f},
{.channel = 1, .gainDb = 0.f},
{.channel = 2, .gainDb = -10.f}},
-
{{.channel = -1, .gainDb = -10.f}, {.channel = -2, .gainDb = 10.f}},
+ {{.channel = -1, .gainDb = 10.f}, {.channel = 0, .gainDb = -10.f}},
+ {{.channel = 0, .gainDb = 10.f}, {.channel = 1, .gainDb = -10.f}}};
- {{.channel = -1, .gainDb = 10.f}, {.channel = 0, .gainDb = -10.f}}};
+template <typename T>
+bool DynamicsProcessingTestHelper::isBandConfigValid(const std::vector<T>& cfgs, int bandCount) {
+ std::vector<float> freqs(cfgs.size(), -1);
+ for (auto cfg : cfgs) {
+ if (cfg.channel < 0 || cfg.channel >= mChannelCount) return false;
+ if (cfg.band < 0 || cfg.band >= bandCount) return false;
+ freqs[cfg.band] = cfg.cutoffFrequencyHz;
+ }
+ if (std::count(freqs.begin(), freqs.end(), -1)) return false;
+ return std::is_sorted(freqs.begin(), freqs.end());
+}
+
+bool DynamicsProcessingTestHelper::isParamValid(const DynamicsProcessing::Tag& tag,
+ const DynamicsProcessing& dp) {
+ switch (tag) {
+ case DynamicsProcessing::preEq: {
+ if (!mEngineConfigApplied.preEqStage.inUse) return false;
+ return isChannelConfigValid(dp.get<DynamicsProcessing::preEq>());
+ }
+ case DynamicsProcessing::postEq: {
+ if (!mEngineConfigApplied.postEqStage.inUse) return false;
+ return isChannelConfigValid(dp.get<DynamicsProcessing::postEq>());
+ }
+ case DynamicsProcessing::mbc: {
+ if (!mEngineConfigApplied.mbcStage.inUse) return false;
+ return isChannelConfigValid(dp.get<DynamicsProcessing::mbc>());
+ }
+ case DynamicsProcessing::preEqBand: {
+ if (!mEngineConfigApplied.preEqStage.inUse) return false;
+ return isBandConfigValid(dp.get<DynamicsProcessing::preEqBand>(),
+ mEngineConfigApplied.preEqStage.bandCount);
+ }
+ case DynamicsProcessing::postEqBand: {
+ if (!mEngineConfigApplied.postEqStage.inUse) return false;
+ return isBandConfigValid(dp.get<DynamicsProcessing::postEqBand>(),
+ mEngineConfigApplied.postEqStage.bandCount);
+ }
+ case DynamicsProcessing::mbcBand: {
+ if (!mEngineConfigApplied.mbcStage.inUse) return false;
+ return isBandConfigValid(dp.get<DynamicsProcessing::mbcBand>(),
+ mEngineConfigApplied.mbcStage.bandCount);
+ }
+ case DynamicsProcessing::limiter: {
+ if (!mEngineConfigApplied.limiterInUse) return false;
+ return isChannelConfigValid(dp.get<DynamicsProcessing::limiter>());
+ }
+ case DynamicsProcessing::inputGain: {
+ return isChannelConfigValid(dp.get<DynamicsProcessing::inputGain>());
+ }
+ default: {
+ return true;
+ }
+ }
+ return true;
+}
bool DynamicsProcessingTestHelper::isParamEqual(const DynamicsProcessing::Tag& tag,
const DynamicsProcessing& dpRef,
@@ -270,8 +342,8 @@
// validate parameter
Descriptor desc;
ASSERT_STATUS(EX_NONE, mEffect->getDescriptor(&desc));
- const bool valid =
- isParameterValid<DynamicsProcessing, Range::dynamicsProcessing>(dp, desc);
+ bool valid = isParamInRange(dp, desc.capability.range.get<Range::dynamicsProcessing>());
+ if (valid) valid = isParamValid(tag, dp);
const binder_exception_t expected = valid ? EX_NONE : EX_ILLEGAL_ARGUMENT;
// set parameter
@@ -428,11 +500,12 @@
DynamicsProcessingTest, DynamicsProcessingTestEngineArchitecture,
::testing::Combine(
testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
- testing::Values(DynamicsProcessing::ResolutionPreference::FAVOR_TIME_RESOLUTION,
- DynamicsProcessing::ResolutionPreference::
- FAVOR_FREQUENCY_RESOLUTION), // variant
- testing::Values(-10.f, 0.f, 10.f), // processing duration
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
+ testing::Values(
+ DynamicsProcessing::ResolutionPreference::FAVOR_TIME_RESOLUTION,
+ DynamicsProcessing::ResolutionPreference::FAVOR_FREQUENCY_RESOLUTION,
+ static_cast<DynamicsProcessing::ResolutionPreference>(-1)), // variant
+ testing::Values(-10.f, 0.f, 10.f), // processing duration
testing::ValuesIn(
DynamicsProcessingTestHelper::kStageEnablementTestSet), // preEQ/postEQ/mbc
testing::Bool()), // limiter enable
@@ -480,7 +553,7 @@
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestInputGain,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
testing::ValuesIn(DynamicsProcessingTestInputGain::kInputGainTestSet)),
[](const auto& info) {
auto descriptor = std::get<INPUT_GAIN_INSTANCE_NAME>(info.param).second;
@@ -515,12 +588,12 @@
LIMITER_MAX_NUM,
};
using LimiterConfigTestAdditional = std::array<float, LIMITER_MAX_NUM>;
-// attachTime, releaseTime, ratio, thresh, postGain
+// 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}}};
+ {1, 60, 2.5, -2, 3.14}}};
using LimiterConfigTestParams =
std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t, bool, int32_t, bool,
@@ -567,7 +640,7 @@
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestLimiterConfig,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
testing::Values(-1, 0, 1, 2), // channel count
testing::Bool(), // enable
testing::Values(3), // link group
@@ -642,7 +715,7 @@
DynamicsProcessingTest, DynamicsProcessingTestChannelConfig,
::testing::Combine(
testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
testing::ValuesIn(
DynamicsProcessingTestHelper::kChannelConfigTestSet), // channel config
testing::Bool()), // Engine inUse
@@ -669,15 +742,13 @@
enum EqBandConfigTestParamName {
EQ_BAND_INSTANCE_NAME,
EQ_BAND_CHANNEL,
- EQ_BAND_CHANNEL_ENABLE,
EQ_BAND_ENABLE,
EQ_BAND_CUT_OFF_FREQ,
EQ_BAND_GAIN,
EQ_BAND_STAGE_IN_USE
};
using EqBandConfigTestParams = std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
- std::vector<DynamicsProcessing::ChannelConfig>, bool,
- std::vector<std::pair<int, float>>, float, bool>;
+ bool, std::vector<std::pair<int, float>>, float, bool>;
void fillEqBandConfig(std::vector<DynamicsProcessing::EqBandConfig>& cfgs,
const EqBandConfigTestParams& params) {
@@ -698,8 +769,7 @@
public:
DynamicsProcessingTestEqBandConfig()
: DynamicsProcessingTestHelper(std::get<EQ_BAND_INSTANCE_NAME>(GetParam())),
- mStageInUse(std::get<EQ_BAND_STAGE_IN_USE>(GetParam())),
- mChannelConfig(std::get<EQ_BAND_CHANNEL_ENABLE>(GetParam())) {
+ mStageInUse(std::get<EQ_BAND_STAGE_IN_USE>(GetParam())) {
fillEqBandConfig(mCfgs, GetParam());
}
@@ -709,14 +779,18 @@
std::vector<DynamicsProcessing::EqBandConfig> mCfgs;
const bool mStageInUse;
- const std::vector<DynamicsProcessing::ChannelConfig> mChannelConfig;
};
TEST_P(DynamicsProcessingTestEqBandConfig, SetAndGetPreEqBandConfig) {
mEngineConfigPreset.preEqStage.inUse = mStageInUse;
mEngineConfigPreset.preEqStage.bandCount = mCfgs.size();
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
- EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(mChannelConfig));
+ std::vector<DynamicsProcessing::ChannelConfig> cfgs(mChannelCount);
+ for (int i = 0; i < mChannelCount; i++) {
+ cfgs[i].channel = i;
+ cfgs[i].enable = true;
+ }
+ EXPECT_NO_FATAL_FAILURE(addPreEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPreEqBandConfigs(mCfgs));
SetAndGetDynamicsProcessingParameters();
}
@@ -725,7 +799,12 @@
mEngineConfigPreset.postEqStage.inUse = mStageInUse;
mEngineConfigPreset.postEqStage.bandCount = mCfgs.size();
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
- EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(mChannelConfig));
+ std::vector<DynamicsProcessing::ChannelConfig> cfgs(mChannelCount);
+ for (int i = 0; i < mChannelCount; i++) {
+ cfgs[i].channel = i;
+ cfgs[i].enable = true;
+ }
+ EXPECT_NO_FATAL_FAILURE(addPostEqChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addPostEqBandConfigs(mCfgs));
SetAndGetDynamicsProcessingParameters();
}
@@ -776,28 +855,23 @@
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestEqBandConfig,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
- testing::Values(-1, 0, 10), // channel ID
- testing::ValuesIn(
- DynamicsProcessingTestHelper::kChannelConfigTestSet), // channel enable
- testing::Bool(), // band enable
- testing::ValuesIn(kBands), // cut off frequencies
- testing::Values(-3.14f, 3.14f), // gain
- testing::Bool()), // stage in use
+ ::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(-3.14f, 3.14f), // gain
+ testing::Values(true)), // stage in use
[](const auto& info) {
auto descriptor = std::get<EQ_BAND_INSTANCE_NAME>(info.param).second;
std::vector<DynamicsProcessing::EqBandConfig> cfgs;
fillEqBandConfig(cfgs, info.param);
- std::string enable =
- ::android::internal::ToString(std::get<EQ_BAND_CHANNEL_ENABLE>(info.param));
std::string bands = ::android::internal::ToString(cfgs);
std::string stageInUse = std::to_string(std::get<EQ_BAND_STAGE_IN_USE>(info.param));
std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_" + enable + "_bands_" +
- bands + "_stageInUse_" + stageInUse;
+ descriptor.common.id.uuid.toString() + "_bands_" + bands +
+ "_stageInUse_" + stageInUse;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
@@ -811,7 +885,6 @@
enum MbcBandConfigParamName {
MBC_BAND_INSTANCE_NAME,
MBC_BAND_CHANNEL,
- MBC_BAND_CHANNEL_CONFIG,
MBC_BAND_ENABLE,
MBC_BAND_CUTOFF_FREQ,
MBC_BAND_STAGE_IN_USE,
@@ -831,16 +904,15 @@
};
using TestParamsMbcBandConfigAdditional = std::array<float, MBC_ADD_MAX_NUM>;
-// attachTime, releaseTime, ratio, thresh, kneeWidth, noise, expander, preGain, postGain
+// attackTime, releaseTime, ratio, thresh, kneeWidth, noise, expander, preGain, postGain
static constexpr std::array<TestParamsMbcBandConfigAdditional, 4> kMbcBandConfigAdditionalParam = {
{{-3, -10, -2, -2, -5, -90, -2.5, -2, -2},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{-3, 10, -2, 2, -5, 90, -2.5, 2, -2},
- {3, 10, 2, 2, 5, 90, 2.5, 2, 2}}};
+ {3, 10, 2, -2, -5, 90, 2.5, 2, 2}}};
using TestParamsMbcBandConfig =
- std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t,
- std::vector<DynamicsProcessing::ChannelConfig>, bool,
+ std::tuple<std::pair<std::shared_ptr<IFactory>, Descriptor>, int32_t, bool,
std::vector<std::pair<int, float>>, bool, TestParamsMbcBandConfigAdditional>;
void fillMbcBandConfig(std::vector<DynamicsProcessing::MbcBandConfig>& cfgs,
@@ -873,8 +945,7 @@
public:
DynamicsProcessingTestMbcBandConfig()
: DynamicsProcessingTestHelper(std::get<MBC_BAND_INSTANCE_NAME>(GetParam())),
- mStageInUse(std::get<MBC_BAND_STAGE_IN_USE>(GetParam())),
- mChannelConfig(std::get<MBC_BAND_CHANNEL_CONFIG>(GetParam())) {
+ mStageInUse(std::get<MBC_BAND_STAGE_IN_USE>(GetParam())) {
fillMbcBandConfig(mCfgs, GetParam());
}
@@ -884,42 +955,41 @@
std::vector<DynamicsProcessing::MbcBandConfig> mCfgs;
const bool mStageInUse;
- const std::vector<DynamicsProcessing::ChannelConfig> mChannelConfig;
};
TEST_P(DynamicsProcessingTestMbcBandConfig, SetAndGetMbcBandConfig) {
mEngineConfigPreset.mbcStage.inUse = mStageInUse;
mEngineConfigPreset.mbcStage.bandCount = mCfgs.size();
EXPECT_NO_FATAL_FAILURE(addEngineConfig(mEngineConfigPreset));
- EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(mChannelConfig));
+ std::vector<DynamicsProcessing::ChannelConfig> cfgs(mChannelCount);
+ for (int i = 0; i < mChannelCount; i++) {
+ cfgs[i].channel = i;
+ cfgs[i].enable = true;
+ }
+ EXPECT_NO_FATAL_FAILURE(addMbcChannelConfig(cfgs));
EXPECT_NO_FATAL_FAILURE(addMbcBandConfigs(mCfgs));
SetAndGetDynamicsProcessingParameters();
}
INSTANTIATE_TEST_SUITE_P(
DynamicsProcessingTest, DynamicsProcessingTestMbcBandConfig,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kDynamicsProcessingTypeUUID)),
- testing::Values(-1, 0, 10), // channel count
- testing::ValuesIn(
- DynamicsProcessingTestHelper::kChannelConfigTestSet), // channel config
- testing::Bool(), // enable
- testing::ValuesIn(kBands), // cut off frequencies
- testing::Bool(), // stage in use
- testing::ValuesIn(kMbcBandConfigAdditionalParam)), // Additional
+ ::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::Bool(), // stage in use
+ testing::ValuesIn(kMbcBandConfigAdditionalParam)), // Additional
[](const auto& info) {
auto descriptor = std::get<MBC_BAND_INSTANCE_NAME>(info.param).second;
std::vector<DynamicsProcessing::MbcBandConfig> cfgs;
fillMbcBandConfig(cfgs, info.param);
- std::string enable =
- ::android::internal::ToString(std::get<MBC_BAND_CHANNEL_CONFIG>(info.param));
std::string mbcBands = ::android::internal::ToString(cfgs);
std::string stageInUse = std::to_string(std::get<MBC_BAND_STAGE_IN_USE>(info.param));
std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
descriptor.common.name + "_UUID_" +
- descriptor.common.id.uuid.toString() + "_enable_" + enable +
- "_bands_" + mbcBands + "_stageInUse_" + stageInUse;
+ descriptor.common.id.uuid.toString() + "_bands_" + mbcBands +
+ "_stageInUse_" + stageInUse;
std::replace_if(
name.begin(), name.end(), [](const char c) { return !std::isalnum(c); }, '_');
return name;
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index a2deb7c..05c2c5b 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -24,9 +24,9 @@
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::EnvironmentalReverb;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidEnvReverb;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kEnvReverbTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
/**
@@ -200,7 +200,7 @@
EnvironmentalReverbTest, EnvironmentalReverbRoomLevelTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kEnvReverbTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
Range::environmentalReverb,
EnvironmentalReverb::roomLevelMb>(
@@ -239,13 +239,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbRoomHfLevelTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::roomHfLevelMb>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::roomHfLevelMb>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbRoomHfLevelTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string roomHfLevel = std::to_string(std::get<1>(info.param));
@@ -280,13 +279,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbDecayTimeTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::decayTimeMs>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::decayTimeMs>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbDecayTimeTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string decayTime = std::to_string(std::get<1>(info.param));
@@ -322,7 +320,7 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbDecayHfRatioTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kEnvReverbTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
testing::ValuesIn(EffectHelper::getTestValueSet<
EnvironmentalReverb, int, Range::environmentalReverb,
EnvironmentalReverb::decayHfRatioPm>(
@@ -362,13 +360,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbLevelTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::levelMb>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::levelMb>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbDecayHfRatioTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string level = std::to_string(std::get<1>(info.param));
@@ -403,13 +400,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbDelayTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::delayMs>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::delayMs>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbDelayTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string delay = std::to_string(std::get<1>(info.param));
@@ -444,13 +440,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbDiffusionTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::diffusionPm>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::diffusionPm>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbDiffusionTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string diffusion = std::to_string(std::get<1>(info.param));
@@ -485,13 +480,12 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbDensityTest,
- ::testing::Combine(
- testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(IFactory::descriptor,
- kEnvReverbTypeUUID)),
- testing::ValuesIn(EffectHelper::getTestValueSet<EnvironmentalReverb, int,
- Range::environmentalReverb,
- EnvironmentalReverb::densityPm>(
- kDescPair, EffectHelper::expandTestValueBasic<int>))),
+ ::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
+ testing::ValuesIn(EffectHelper::getTestValueSet<
+ EnvironmentalReverb, int, Range::environmentalReverb,
+ EnvironmentalReverb::densityPm>(
+ kDescPair, EffectHelper::expandTestValueBasic<int>))),
[](const testing::TestParamInfo<EnvironmentalReverbDensityTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
std::string density = std::to_string(std::get<1>(info.param));
@@ -527,7 +521,7 @@
INSTANTIATE_TEST_SUITE_P(
EnvironmentalReverbTest, EnvironmentalReverbBypassTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kEnvReverbTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidEnvReverb())),
testing::Bool()),
[](const testing::TestParamInfo<EnvironmentalReverbBypassTest::ParamType>& info) {
auto descriptor = std::get<0>(info.param).second;
diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
index 9beb0a7..716a2c6 100644
--- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp
@@ -37,15 +37,14 @@
#include "AudioHalBinderServiceUtil.h"
#include "EffectHelper.h"
#include "TestUtils.h"
-#include "effect-impl/EffectUUID.h"
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
using aidl::android::hardware::audio::effect::Equalizer;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kEqualizerTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
/**
@@ -195,7 +194,7 @@
EqualizerTest, EqualizerTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kEqualizerTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidEqualizer())),
testing::ValuesIn(EffectHelper::getTestValueSet<Equalizer, int, Range::equalizer,
Equalizer::preset>(
kDescPair, EffectHelper::expandTestValueBasic<int>)),
diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
index 32ebc4f..7c79d1b 100644
--- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp
@@ -28,10 +28,10 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidHapticGenerator;
using aidl::android::hardware::audio::effect::HapticGenerator;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kHapticGeneratorTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
/**
@@ -179,7 +179,7 @@
INSTANTIATE_TEST_SUITE_P(
HapticGeneratorValidTest, HapticGeneratorParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kHapticGeneratorTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidHapticGenerator())),
testing::ValuesIn(kHapticScaleIdValues),
testing::ValuesIn(kVibratorScaleValues),
testing::ValuesIn(kResonantFrequencyValues),
@@ -209,7 +209,7 @@
INSTANTIATE_TEST_SUITE_P(
HapticGeneratorInvalidTest, HapticGeneratorParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kHapticGeneratorTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidHapticGenerator())),
testing::Values(MIN_ID - 1),
testing::Values(HapticGenerator::VibratorScale::NONE),
testing::Values(MIN_FLOAT), testing::Values(MIN_FLOAT),
@@ -419,7 +419,7 @@
INSTANTIATE_TEST_SUITE_P(
HapticGeneratorScalesTest, HapticGeneratorScalesTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kHapticGeneratorTypeUUID))),
+ IFactory::descriptor, getEffectTypeUuidHapticGenerator()))),
[](const testing::TestParamInfo<HapticGeneratorScalesTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
std::string name = "Implementor_" + descriptor.common.implementor + "_name_" +
diff --git a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
index 5faf7f4..96b048e 100644
--- a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp
@@ -25,9 +25,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidLoudnessEnhancer;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kLoudnessEnhancerTypeUUID;
using aidl::android::hardware::audio::effect::LoudnessEnhancer;
using aidl::android::hardware::audio::effect::Parameter;
@@ -126,7 +126,7 @@
INSTANTIATE_TEST_SUITE_P(
LoudnessEnhancerTest, LoudnessEnhancerParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kLoudnessEnhancerTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidLoudnessEnhancer())),
testing::ValuesIn(kGainMbValues)),
[](const testing::TestParamInfo<LoudnessEnhancerParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp
index 4fcda6b..5525c80 100644
--- a/audio/aidl/vts/VtsHalNSTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp
@@ -27,9 +27,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidNoiseSuppression;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kNoiseSuppressionTypeUUID;
using aidl::android::hardware::audio::effect::NoiseSuppression;
using aidl::android::hardware::audio::effect::Parameter;
@@ -146,7 +146,7 @@
INSTANTIATE_TEST_SUITE_P(
NSParamTest, NSParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kNoiseSuppressionTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidNoiseSuppression())),
testing::ValuesIn(NSParamTest::getLevelValues()),
testing::ValuesIn(NSParamTest::getTypeValues())),
[](const testing::TestParamInfo<NSParamTest::ParamType>& info) {
diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
index 7bce9c3..8fb4ebf 100644
--- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
@@ -24,10 +24,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidPresetReverb;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kEffectNullUuid;
-using aidl::android::hardware::audio::effect::kPresetReverbTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::PresetReverb;
@@ -132,7 +131,7 @@
INSTANTIATE_TEST_SUITE_P(
PresetReverbTest, PresetReverbParamTest,
::testing::Combine(testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kPresetReverbTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidPresetReverb())),
testing::ValuesIn(kPresetsValues)),
[](const testing::TestParamInfo<PresetReverbParamTest::ParamType>& info) {
auto descriptor = std::get<PARAM_INSTANCE_NAME>(info.param).second;
diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
index 84b980f..6b1da63 100644
--- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
@@ -23,9 +23,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVirtualizer;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kVirtualizerTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::Virtualizer;
@@ -134,7 +134,7 @@
VirtualizerTest, VirtualizerParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kVirtualizerTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidVirtualizer())),
testing::ValuesIn(EffectHelper::getTestValueSet<
Virtualizer, int, Range::virtualizer, Virtualizer::strengthPm>(
kDescPair, EffectHelper::expandTestValueBasic<int>))),
diff --git a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
index e273824..f41ba30 100644
--- a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp
@@ -26,9 +26,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVisualizer;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kVisualizerTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::Visualizer;
@@ -177,7 +177,7 @@
VisualizerParamTest, VisualizerParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kVisualizerTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidVisualizer())),
testing::ValuesIn(EffectHelper::getTestValueSet<Visualizer, int, Range::visualizer,
Visualizer::captureSamples>(
kDescPair, EffectHelper::expandTestValueBasic<int>)),
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index fbd10a8..90b7f37 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -23,9 +23,9 @@
using namespace android;
using aidl::android::hardware::audio::effect::Descriptor;
+using aidl::android::hardware::audio::effect::getEffectTypeUuidVolume;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
-using aidl::android::hardware::audio::effect::kVolumeTypeUUID;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::Volume;
@@ -140,7 +140,7 @@
VolumeTest, VolumeParamTest,
::testing::Combine(
testing::ValuesIn(kDescPair = EffectFactoryHelper::getAllEffectDescriptors(
- IFactory::descriptor, kVolumeTypeUUID)),
+ IFactory::descriptor, getEffectTypeUuidVolume())),
testing::ValuesIn(
EffectHelper::getTestValueSet<Volume, int, Range::volume, Volume::levelDb>(
kDescPair, EffectHelper::expandTestValueBasic<int>)),
diff --git a/automotive/audiocontrol/1.0/default/test/fuzzer/Android.bp b/automotive/audiocontrol/1.0/default/test/fuzzer/Android.bp
index 78f5b52..4308d52 100644
--- a/automotive/audiocontrol/1.0/default/test/fuzzer/Android.bp
+++ b/automotive/audiocontrol/1.0/default/test/fuzzer/Android.bp
@@ -48,5 +48,13 @@
"android-media-fuzzing-reports@google.com",
],
componentid: 533764,
+ hotlists: [
+ "4593311",
+ ],
+ description: "The fuzzer targets the APIs of android.hardware.automotive.audiocontrol@1.0-service binary",
+ vector: "local_privileges_required",
+ service_privilege: "privileged",
+ users: "multi_user",
+ fuzzed_code_usage: "shipped",
},
}
diff --git a/automotive/audiocontrol/aidl/default/audiocontrol-default.xml b/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
index 3536bb9..95cd7f0 100644
--- a/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
+++ b/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
@@ -1,7 +1,7 @@
<manifest version="2.0" type="device">
<hal format="aidl">
<name>android.hardware.automotive.audiocontrol</name>
- <version>2</version>
+ <version>3</version>
<fqname>IAudioControl/default</fqname>
</hal>
</manifest>
diff --git a/automotive/can/1.0/default/tests/fuzzer/Android.bp b/automotive/can/1.0/default/tests/fuzzer/Android.bp
index 52b43b0..de0b96f 100644
--- a/automotive/can/1.0/default/tests/fuzzer/Android.bp
+++ b/automotive/can/1.0/default/tests/fuzzer/Android.bp
@@ -50,5 +50,13 @@
"android-media-fuzzing-reports@google.com",
],
componentid: 533764,
+ hotlists: [
+ "4593311",
+ ],
+ description: "The fuzzer targets the APIs of android.hardware.automotive.can@1.0-service",
+ vector: "local_no_privileges_required",
+ service_privilege: "privileged",
+ users: "multi_user",
+ fuzzed_code_usage: "shipped",
},
}
diff --git a/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl b/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl
index 225b504..4cefdf2 100644
--- a/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl
+++ b/automotive/evs/aidl/aidl_api/android.hardware.automotive.evs/current/android/hardware/automotive/evs/IEvsEnumerator.aidl
@@ -47,4 +47,5 @@
android.hardware.automotive.evs.IEvsDisplay openDisplay(in int id);
android.hardware.automotive.evs.IEvsUltrasonicsArray openUltrasonicsArray(in String ultrasonicsArrayId);
void registerStatusCallback(in android.hardware.automotive.evs.IEvsEnumeratorStatusCallback callback);
+ android.hardware.automotive.evs.DisplayState getDisplayStateById(in int id);
}
diff --git a/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl b/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl
index 8698700..37b8ea5 100644
--- a/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl
+++ b/automotive/evs/aidl/android/hardware/automotive/evs/IEvsEnumerator.aidl
@@ -78,12 +78,12 @@
byte[] getDisplayIdList();
/**
- * This call requests the current state of the display
+ * This call requests the current state of the primary display
*
* If there is no open display, this returns DisplayState::NOT_OPEN. otherwise, it returns
- * the actual state of the active display. This call is replicated on the IEvsEnumerator
- * interface in order to allow secondary clients to monitor the state of the EVS display
- * without acquiring exclusive ownership of the display.
+ * the actual state of the active primary display. This call is replicated on the
+ * IEvsEnumerator interface in order to allow secondary clients to monitor the state of the EVS
+ * display without acquiring exclusive ownership of the display.
*
* @return Current DisplayState of this Display.
* @throws EvsResult::OWNERSHIP_LOST if current display is inactive
@@ -163,4 +163,19 @@
* @param in callback IEvsEnumeratorStatusCallback implementation
*/
void registerStatusCallback(in IEvsEnumeratorStatusCallback callback);
+
+ /**
+ * This call requests the current state of the display
+ *
+ * If the requested display is not active, this returns DisplayState::NOT_OPEN. otherwise, it
+ * returns the actual state of the active display. This call is replicated on the
+ * IEvsEnumerator interface in order to allow secondary clients to monitor the state of the EVS
+ * display without acquiring exclusive ownership of the display.
+ *
+ * @param in id ID of the requested display.
+ * @return Current DisplayState of this Display.
+ * @throws EvsResult::OWNERSHIP_LOST if current display is inactive
+ * EvsResult::PERMISSION_DENIED if the process is not permitted to do this operation.
+ */
+ DisplayState getDisplayStateById(in int id);
}
diff --git a/automotive/evs/aidl/impl/Android.bp b/automotive/evs/aidl/impl/Android.bp
index 0b51a0c..fa44ebb 100644
--- a/automotive/evs/aidl/impl/Android.bp
+++ b/automotive/evs/aidl/impl/Android.bp
@@ -22,7 +22,7 @@
name: "EvsHalDefaults",
defaults: ["android.hardware.graphics.common-ndk_static"],
static_libs: [
- "android.hardware.automotive.evs-V1-ndk",
+ "android.hardware.automotive.evs-V2-ndk",
"android.hardware.common-V2-ndk",
],
shared_libs: [
diff --git a/automotive/evs/aidl/impl/default/Android.bp b/automotive/evs/aidl/impl/default/Android.bp
index bf6c0be..70c523b 100644
--- a/automotive/evs/aidl/impl/default/Android.bp
+++ b/automotive/evs/aidl/impl/default/Android.bp
@@ -38,7 +38,7 @@
],
srcs: [
":libgui_frame_event_aidl",
- "src/*.cpp"
+ "src/*.cpp",
],
shared_libs: [
"android.hardware.graphics.bufferqueue@1.0",
@@ -61,7 +61,7 @@
],
static_libs: [
"android.frameworks.automotive.display-V1-ndk",
- "android.hardware.automotive.evs-V1-ndk",
+ "android.hardware.automotive.evs-V2-ndk",
"android.hardware.common-V2-ndk",
"libaidlcommonsupport",
"libcutils",
diff --git a/automotive/evs/aidl/impl/default/include/EvsEnumerator.h b/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
index b11dd3e..259c266 100644
--- a/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
+++ b/automotive/evs/aidl/impl/default/include/EvsEnumerator.h
@@ -52,6 +52,7 @@
ndk::ScopedAStatus closeDisplay(const std::shared_ptr<evs::IEvsDisplay>& obj) override;
ndk::ScopedAStatus getDisplayIdList(std::vector<uint8_t>* list) override;
ndk::ScopedAStatus getDisplayState(evs::DisplayState* state) override;
+ ndk::ScopedAStatus getDisplayStateById(int32_t displayId, evs::DisplayState* state) override;
ndk::ScopedAStatus registerStatusCallback(
const std::shared_ptr<evs::IEvsEnumeratorStatusCallback>& callback) override;
ndk::ScopedAStatus openUltrasonicsArray(
@@ -101,6 +102,8 @@
bool checkPermission();
void closeCamera_impl(const std::shared_ptr<evs::IEvsCamera>& pCamera,
const std::string& cameraId);
+ ndk::ScopedAStatus getDisplayStateImpl(std::optional<int32_t> displayId,
+ evs::DisplayState* state);
static bool qualifyCaptureDevice(const char* deviceName);
static CameraRecord* findCameraById(const std::string& cameraId);
diff --git a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
index 46d47e7..7e010a2 100644
--- a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
+++ b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
@@ -146,7 +146,21 @@
// For the extended info
std::unordered_map<uint32_t, std::vector<uint8_t>> mExtInfo;
- std::unordered_map<CameraParam, int32_t> mParams;
+
+ // For the camera parameters.
+ struct CameraParameterDesc {
+ CameraParameterDesc(int min = 0, int max = 0, int step = 0, int value = 0) {
+ this->range.min = min;
+ this->range.max = max;
+ this->range.step = step;
+ this->value = value;
+ }
+
+ ParameterRange range;
+ int32_t value;
+ };
+ std::unordered_map<CameraParam, std::shared_ptr<CameraParameterDesc>> mParams;
+ void initializeParameters();
};
} // namespace aidl::android::hardware::automotive::evs::implementation
diff --git a/automotive/evs/aidl/impl/default/manifest_evs-default-service.xml b/automotive/evs/aidl/impl/default/manifest_evs-default-service.xml
index 8480651..50692f7 100644
--- a/automotive/evs/aidl/impl/default/manifest_evs-default-service.xml
+++ b/automotive/evs/aidl/impl/default/manifest_evs-default-service.xml
@@ -2,5 +2,6 @@
<hal format="aidl">
<name>android.hardware.automotive.evs</name>
<fqname>IEvsEnumerator/hw/0</fqname>
+ <version>1</version>
</hal>
</manifest>
diff --git a/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp b/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
index 6e2405d..5178958 100644
--- a/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsEnumerator.cpp
@@ -357,24 +357,32 @@
ScopedAStatus EvsEnumerator::getDisplayState(DisplayState* state) {
LOG(DEBUG) << __FUNCTION__;
+ return getDisplayStateImpl(std::nullopt, state);
+}
+
+ScopedAStatus EvsEnumerator::getDisplayStateById(int32_t displayId, DisplayState* state) {
+ LOG(DEBUG) << __FUNCTION__;
+ return getDisplayStateImpl(displayId, state);
+}
+
+ScopedAStatus EvsEnumerator::getDisplayStateImpl(std::optional<int32_t> displayId,
+ DisplayState* state) {
if (!checkPermission()) {
*state = DisplayState::DEAD;
return ScopedAStatus::fromServiceSpecificError(
static_cast<int>(EvsResult::PERMISSION_DENIED));
}
- // TODO(b/262779341): For now we can just return the state of the 1st display. Need to update
- // the API later.
-
const auto& all_displays = mutableActiveDisplays().getAllDisplays();
- // Do we still have a display object we think should be active?
- if (all_displays.empty()) {
+ const auto display_search = displayId ? all_displays.find(*displayId) : all_displays.begin();
+
+ if (display_search == all_displays.end()) {
*state = DisplayState::NOT_OPEN;
return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::OWNERSHIP_LOST));
}
- std::shared_ptr<IEvsDisplay> pActiveDisplay = all_displays.begin()->second.displayWeak.lock();
+ std::shared_ptr<IEvsDisplay> pActiveDisplay = display_search->second.displayWeak.lock();
if (pActiveDisplay) {
return pActiveDisplay->getDisplayState(state);
} else {
diff --git a/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
index 4b46a5a..797b221 100644
--- a/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsMockCamera.cpp
@@ -68,6 +68,9 @@
const size_t len = get_camera_metadata_size(camInfo->characteristics);
mDescription.metadata.insert(mDescription.metadata.end(), ptr, ptr + len);
}
+
+ // Initialize parameters.
+ initializeParameters();
}
EvsMockCamera::~EvsMockCamera() {
@@ -75,6 +78,18 @@
shutdown();
}
+void EvsMockCamera::initializeParameters() {
+ mParams.emplace(
+ CameraParam::BRIGHTNESS,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+ mParams.emplace(
+ CameraParam::CONTRAST,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+ mParams.emplace(
+ CameraParam::SHARPNESS,
+ new CameraParameterDesc(/* min= */ 0, /* max= */ 255, /* step= */ 1, /* value= */ 255));
+}
+
// This gets called if another caller "steals" ownership of the camera
void EvsMockCamera::shutdown() {
LOG(DEBUG) << __FUNCTION__;
@@ -291,27 +306,105 @@
return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::getIntParameterRange([[maybe_unused]] CameraParam id,
- [[maybe_unused]] ParameterRange* _aidl_return) {
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ScopedAStatus EvsMockCamera::getIntParameterRange(CameraParam id, ParameterRange* _aidl_return) {
+ auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+
+ _aidl_return->min = it->second->range.min;
+ _aidl_return->max = it->second->range.max;
+ _aidl_return->step = it->second->range.step;
+ return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::setIntParameter(
- [[maybe_unused]] CameraParam id, [[maybe_unused]] int32_t value,
- [[maybe_unused]] std::vector<int32_t>* effectiveValue) {
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ScopedAStatus EvsMockCamera::setIntParameter(CameraParam id, int32_t value,
+ std::vector<int32_t>* effectiveValue) {
+ auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+
+ // Rounding down to the closest value.
+ int32_t candidate = value / it->second->range.step * it->second->range.step;
+ if (candidate < it->second->range.min || candidate > it->second->range.max) {
+ return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::INVALID_ARG));
+ }
+
+ it->second->value = candidate;
+ effectiveValue->push_back(candidate);
+ return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::getIntParameter([[maybe_unused]] CameraParam id,
- [[maybe_unused]] std::vector<int32_t>* value) {
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ScopedAStatus EvsMockCamera::getIntParameter(CameraParam id, std::vector<int32_t>* value) {
+ auto it = mParams.find(id);
+ if (it == mParams.end()) {
+ return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ }
+
+ value->push_back(it->second->value);
+ return ScopedAStatus::ok();
}
-ScopedAStatus EvsMockCamera::importExternalBuffers(
- [[maybe_unused]] const std::vector<BufferDesc>& buffers,
- [[maybe_unused]] int32_t* _aidl_return) {
- LOG(DEBUG) << "This implementation does not support an external buffer import.";
- return ScopedAStatus::fromServiceSpecificError(static_cast<int>(EvsResult::NOT_SUPPORTED));
+ScopedAStatus EvsMockCamera::importExternalBuffers(const std::vector<BufferDesc>& buffers,
+ int32_t* _aidl_return) {
+ size_t numBuffersToAdd = buffers.size();
+ if (numBuffersToAdd < 1) {
+ LOG(DEBUG) << "Ignoring a request to import external buffers with an empty list.";
+ return ScopedAStatus::ok();
+ }
+
+ std::lock_guard lock(mAccessLock);
+ if (numBuffersToAdd > (kMaxBuffersInFlight - mFramesAllowed)) {
+ numBuffersToAdd -= (kMaxBuffersInFlight - mFramesAllowed);
+ LOG(WARNING) << "Exceed the limit on the number of buffers. " << numBuffersToAdd
+ << " buffers will be imported only.";
+ }
+
+ ::android::GraphicBufferMapper& mapper = ::android::GraphicBufferMapper::get();
+ const size_t before = mFramesAllowed;
+ for (size_t i = 0; i < numBuffersToAdd; ++i) {
+ auto& b = buffers[i];
+ const AHardwareBuffer_Desc* pDesc =
+ reinterpret_cast<const AHardwareBuffer_Desc*>(&b.buffer.description);
+
+ buffer_handle_t handleToImport = ::android::dupFromAidl(b.buffer.handle);
+ buffer_handle_t handleToStore = nullptr;
+ if (handleToImport == nullptr) {
+ LOG(WARNING) << "Failed to duplicate a memory handle. Ignoring a buffer " << b.bufferId;
+ continue;
+ }
+
+ ::android::status_t result =
+ mapper.importBuffer(handleToImport, pDesc->width, pDesc->height, pDesc->layers,
+ pDesc->format, pDesc->usage, pDesc->stride, &handleToStore);
+ if (result != ::android::NO_ERROR || handleToStore == nullptr) {
+ LOG(WARNING) << "Failed to import a buffer " << b.bufferId;
+ continue;
+ }
+
+ bool stored = false;
+ for (auto&& rec : mBuffers) {
+ if (rec.handle != nullptr) {
+ continue;
+ }
+
+ // Use this existing entry.
+ rec.handle = handleToStore;
+ rec.inUse = false;
+ stored = true;
+ break;
+ }
+
+ if (!stored) {
+ // Add a BufferRecord wrapping this handle to our set of available buffers.
+ mBuffers.push_back(BufferRecord(handleToStore));
+ }
+ ++mFramesAllowed;
+ }
+
+ *_aidl_return = mFramesAllowed - before;
+ return ScopedAStatus::ok();
}
bool EvsMockCamera::setAvailableFrames_Locked(unsigned bufferCount) {
diff --git a/automotive/evs/aidl/vts/Android.bp b/automotive/evs/aidl/vts/Android.bp
index 5aa9501..e50c913 100644
--- a/automotive/evs/aidl/vts/Android.bp
+++ b/automotive/evs/aidl/vts/Android.bp
@@ -14,18 +14,17 @@
// limitations under the License.
//
-package{
+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"],
+ default_applicable_licenses: ["hardware_interfaces_license"],
}
cc_test {
-name:
- "VtsHalEvsTargetTest",
+ name: "VtsHalEvsTargetTest",
srcs: [
"*.cpp",
],
@@ -42,7 +41,7 @@
],
static_libs: [
"android.hardware.automotive.evs@common-default-lib",
- "android.hardware.automotive.evs-V1-ndk",
+ "android.hardware.automotive.evs-V2-ndk",
"android.hardware.common-V2-ndk",
"libaidlcommonsupport",
],
diff --git a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
index 2706c49..a6d99ad 100644
--- a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
+++ b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
@@ -51,6 +51,7 @@
#include <ui/GraphicBufferAllocator.h>
#include <utils/Timers.h>
+#include <chrono>
#include <deque>
#include <thread>
#include <unordered_set>
@@ -2197,6 +2198,203 @@
}
}
+/*
+ * DisplayOpen:
+ * Test both clean shut down and "aggressive open" device stealing behavior.
+ */
+TEST_P(EvsAidlTest, DisplayOpen) {
+ LOG(INFO) << "Starting DisplayOpen test";
+
+ // Request available display IDs.
+ std::vector<uint8_t> displayIds;
+ ASSERT_TRUE(mEnumerator->getDisplayIdList(&displayIds).isOk());
+ EXPECT_GT(displayIds.size(), 0);
+
+ for (const auto displayId : displayIds) {
+ std::shared_ptr<IEvsDisplay> pDisplay;
+
+ // Request exclusive access to each EVS display, then let it go.
+ ASSERT_TRUE(mEnumerator->openDisplay(displayId, &pDisplay).isOk());
+ ASSERT_NE(pDisplay, nullptr);
+
+ {
+ // Ask the display what its name is.
+ DisplayDesc desc;
+ ASSERT_TRUE(pDisplay->getDisplayInfo(&desc).isOk());
+ LOG(DEBUG) << "Found display " << desc.id;
+ }
+
+ ASSERT_TRUE(mEnumerator->closeDisplay(pDisplay).isOk());
+
+ // Ensure we can reopen the display after it has been closed.
+ ASSERT_TRUE(mEnumerator->openDisplay(displayId, &pDisplay).isOk());
+ ASSERT_NE(pDisplay, nullptr);
+
+ // Open the display while its already open -- ownership should be transferred.
+ std::shared_ptr<IEvsDisplay> pDisplay2;
+ ASSERT_TRUE(mEnumerator->openDisplay(displayId, &pDisplay2).isOk());
+ ASSERT_NE(pDisplay2, nullptr);
+
+ {
+ // Ensure the old display properly reports its assassination.
+ DisplayState badState;
+ EXPECT_TRUE(pDisplay->getDisplayState(&badState).isOk());
+ EXPECT_EQ(badState, DisplayState::DEAD);
+ }
+
+ // Close only the newest display instance -- the other should already be a zombie.
+ ASSERT_TRUE(mEnumerator->closeDisplay(pDisplay2).isOk());
+
+ // Finally, validate that we can open the display after the provoked failure above.
+ ASSERT_TRUE(mEnumerator->openDisplay(displayId, &pDisplay).isOk());
+ ASSERT_NE(pDisplay, nullptr);
+ ASSERT_TRUE(mEnumerator->closeDisplay(pDisplay).isOk());
+ }
+}
+
+/*
+ * DisplayStates:
+ * Validate that display states transition as expected and can be queried from either the display
+ * object itself or the owning enumerator.
+ */
+TEST_P(EvsAidlTest, DisplayStates) {
+ using std::literals::chrono_literals::operator""ms;
+
+ LOG(INFO) << "Starting DisplayStates test";
+
+ // Request available display IDs.
+ std::vector<uint8_t> displayIds;
+ ASSERT_TRUE(mEnumerator->getDisplayIdList(&displayIds).isOk());
+ EXPECT_GT(displayIds.size(), 0);
+
+ for (const auto displayId : displayIds) {
+ // Ensure the display starts in the expected state.
+ {
+ DisplayState state;
+ EXPECT_FALSE(mEnumerator->getDisplayState(&state).isOk());
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+
+ // Scope to limit the lifetime of the pDisplay pointer, and thus the IEvsDisplay object.
+ {
+ // Request exclusive access to the EVS display.
+ std::shared_ptr<IEvsDisplay> pDisplay;
+ ASSERT_TRUE(mEnumerator->openDisplay(displayId, &pDisplay).isOk());
+ ASSERT_NE(pDisplay, nullptr);
+ {
+ DisplayState state;
+ EXPECT_TRUE(mEnumerator->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::NOT_VISIBLE);
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ if (displayIdToQuery == displayId) {
+ EXPECT_TRUE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ EXPECT_EQ(state, DisplayState::NOT_VISIBLE);
+ } else {
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+ }
+
+ // Activate the display.
+ EXPECT_TRUE(pDisplay->setDisplayState(DisplayState::VISIBLE_ON_NEXT_FRAME).isOk());
+ {
+ DisplayState state;
+ EXPECT_TRUE(mEnumerator->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE_ON_NEXT_FRAME);
+ }
+ {
+ DisplayState state;
+ EXPECT_TRUE(pDisplay->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE_ON_NEXT_FRAME);
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ if (displayIdToQuery == displayId) {
+ EXPECT_TRUE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE_ON_NEXT_FRAME);
+ } else {
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+ }
+
+ // Get the output buffer we'd use to display the imagery.
+ BufferDesc tgtBuffer;
+ ASSERT_TRUE(pDisplay->getTargetBuffer(&tgtBuffer).isOk());
+
+ // Send the target buffer back for display (we didn't actually fill anything).
+ EXPECT_TRUE(pDisplay->returnTargetBufferForDisplay(tgtBuffer).isOk());
+
+ // Sleep for a tenth of a second to ensure the driver has time to get the image
+ // displayed.
+ std::this_thread::sleep_for(100ms);
+ {
+ DisplayState state;
+ EXPECT_TRUE(mEnumerator->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE);
+ }
+ {
+ DisplayState state;
+ EXPECT_TRUE(pDisplay->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE);
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ if (displayIdToQuery == displayId) {
+ EXPECT_TRUE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ EXPECT_EQ(state, DisplayState::VISIBLE);
+ } else {
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+ }
+
+ // Turn off the display.
+ EXPECT_TRUE(pDisplay->setDisplayState(DisplayState::NOT_VISIBLE).isOk());
+ std::this_thread::sleep_for(100ms);
+ {
+ DisplayState state;
+ EXPECT_TRUE(mEnumerator->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::NOT_VISIBLE);
+ }
+ {
+ DisplayState state;
+ EXPECT_TRUE(pDisplay->getDisplayState(&state).isOk());
+ EXPECT_EQ(state, DisplayState::NOT_VISIBLE);
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ if (displayIdToQuery == displayId) {
+ EXPECT_TRUE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ EXPECT_EQ(state, DisplayState::NOT_VISIBLE);
+ } else {
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+ }
+
+ // Close the display.
+ mEnumerator->closeDisplay(pDisplay);
+ }
+
+ // Now that the display pointer has gone out of scope, causing the IEvsDisplay interface
+ // object to be destroyed, we should be back to the "not open" state.
+ // NOTE: If we want this to pass without the sleep above, we'd have to add the
+ // (now recommended) closeDisplay() call instead of relying on the smarter pointer
+ // going out of scope. I've not done that because I want to verify that the deletion
+ // of the object does actually clean up (eventually).
+ {
+ DisplayState state;
+ EXPECT_FALSE(mEnumerator->getDisplayState(&state).isOk());
+ }
+ for (const auto displayIdToQuery : displayIds) {
+ DisplayState state;
+ EXPECT_FALSE(mEnumerator->getDisplayStateById(displayIdToQuery, &state).isOk());
+ }
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EvsAidlTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, EvsAidlTest,
diff --git a/automotive/occupant_awareness/aidl/default/Android.bp b/automotive/occupant_awareness/aidl/default/Android.bp
index 1b760a5..dc280df 100644
--- a/automotive/occupant_awareness/aidl/default/Android.bp
+++ b/automotive/occupant_awareness/aidl/default/Android.bp
@@ -26,6 +26,7 @@
cc_binary {
name: "android.hardware.automotive.occupant_awareness@1.0-service",
init_rc: ["android.hardware.automotive.occupant_awareness@1.0-service.rc"],
+ vintf_fragments: ["android.hardware.automotive.occupant_awareness-service.xml"],
relative_install_path: "hw",
vendor: true,
srcs: [
diff --git a/automotive/occupant_awareness/aidl/default/android.hardware.automotive.occupant_awareness-service.xml b/automotive/occupant_awareness/aidl/default/android.hardware.automotive.occupant_awareness-service.xml
new file mode 100644
index 0000000..b4f8fa5
--- /dev/null
+++ b/automotive/occupant_awareness/aidl/default/android.hardware.automotive.occupant_awareness-service.xml
@@ -0,0 +1,7 @@
+<manifest version="1.0" type="device">
+ <hal format="aidl">
+ <name>android.hardware.automotive.occupant_awareness</name>
+ <version>1</version>
+ <fqname>IOccupantAwareness/default</fqname>
+ </hal>
+</manifest>
diff --git a/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
index 9b6eb2f..b0935c2 100644
--- a/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
+++ b/automotive/remoteaccess/aidl_api/android.hardware.automotive.remoteaccess/current/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
@@ -34,8 +34,9 @@
package android.hardware.automotive.remoteaccess;
@VintfStability
interface IRemoteAccess {
- String getDeviceId();
+ String getVehicleId();
String getWakeupServiceName();
+ String getProcessorId();
void setRemoteTaskCallback(android.hardware.automotive.remoteaccess.IRemoteTaskCallback callback);
void clearRemoteTaskCallback();
void notifyApStateChange(in android.hardware.automotive.remoteaccess.ApState state);
diff --git a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
index a198b03..0f4125f 100644
--- a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
+++ b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteAccess.aidl
@@ -28,19 +28,19 @@
@VintfStability
interface IRemoteAccess {
/**
- * Gets a unique device ID that could be recognized by wake up server.
+ * Gets a unique vehicle ID that could be recognized by wake up server.
*
- * This device ID is provisioned during car production and is registered
+ * <p>This vehicle ID is provisioned during car production and is registered
* with the wake up server.
*
- * @return a unique device ID.
+ * @return a unique vehicle ID.
*/
- String getDeviceId();
+ String getVehicleId();
/**
* Gets the name for the remote wakeup server.
*
- * This name will be provided to remote task server during registration
+ * <p>This name will be provided to remote task server during registration
* and used by remote task server to find the remote wakeup server to
* use for waking up the device. This name must be pre-negotiated between
* the remote wakeup server/client and the remote task server/client and
@@ -51,6 +51,17 @@
String getWakeupServiceName();
/**
+ * Gets a unique processor ID that could be recognized by wake up client.
+ *
+ * <p>This processor ID is used to identify each processor in the vehicle.
+ * The wake up client which handles many processors determines which
+ * processor to wake up from the processor ID.
+ *
+ * <p> The processor ID must be unique in the vehicle.
+ */
+ String getProcessorId();
+
+ /**
* Sets a callback to be called when a remote task is requested.
*
* @param callback A callback to be called when a remote task is requested.
diff --git a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteTaskCallback.aidl b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteTaskCallback.aidl
index 7a1616f..2cd7a5d 100644
--- a/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteTaskCallback.aidl
+++ b/automotive/remoteaccess/android/hardware/automotive/remoteaccess/IRemoteTaskCallback.aidl
@@ -24,6 +24,10 @@
/**
* A callback that is called when a remote task is requested.
*
+ * The data is passed down from the remote server to the remote task client
+ * which is an Android application, and is not interpreted/parsed by the
+ * Android system.
+ *
* @param clientId An ID to uniquely identify a remote task client.
* @param data Opaque task data passed to the remote task client.
*/
diff --git a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
index 74c2af4..9aabad6 100644
--- a/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
+++ b/automotive/remoteaccess/hal/default/include/RemoteAccessService.h
@@ -62,7 +62,9 @@
~RemoteAccessService();
- ndk::ScopedAStatus getDeviceId(std::string* deviceId) override;
+ ndk::ScopedAStatus getVehicleId(std::string* vehicleId) override;
+
+ ndk::ScopedAStatus getProcessorId(std::string* processorId) override;
ndk::ScopedAStatus getWakeupServiceName(std::string* wakeupServiceName) override;
@@ -95,7 +97,10 @@
bool mTaskWaitStopped GUARDED_BY(mLock);
// A mutex to make sure startTaskLoop does not overlap with stopTaskLoop.
std::mutex mStartStopTaskLoopLock;
- bool mTaskLoopRunning GUARDED_BY(mStartStopTaskLoopLock);
+ bool mTaskLoopRunning GUARDED_BY(mStartStopTaskLoopLock) = false;
+ bool mGrpcConnected GUARDED_BY(mLock) = false;
+ std::unordered_map<std::string, size_t> mClientIdToTaskCount GUARDED_BY(mLock);
+
// Default wait time before retry connecting to remote access client is 10s.
size_t mRetryWaitInMs = 10'000;
std::shared_ptr<DebugRemoteTaskCallback> mDebugCallback;
@@ -103,11 +108,17 @@
void runTaskLoop();
void maybeStartTaskLoop();
void maybeStopTaskLoop();
- ndk::ScopedAStatus getDeviceIdWithClient(
- android::frameworks::automotive::vhal::IVhalClient& client, std::string* deviceId);
+ ndk::ScopedAStatus getVehicleIdWithClient(
+ android::frameworks::automotive::vhal::IVhalClient& client, std::string* vehicleId);
void setRetryWaitInMs(size_t retryWaitInMs) { mRetryWaitInMs = retryWaitInMs; }
void dumpHelp(int fd);
+ void printCurrentStatus(int fd);
+ std::string clientIdToTaskCountToStringLocked() REQUIRES(mLock);
+ void debugInjectTask(int fd, std::string_view clientId, std::string_view taskData);
+ void updateGrpcConnected(bool connected);
+ android::base::Result<void> deliverRemoteTaskThroughCallback(const std::string& clientId,
+ std::string_view taskData);
};
} // namespace remoteaccess
diff --git a/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc b/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
index 6437d70..59315eb 100644
--- a/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
+++ b/automotive/remoteaccess/hal/default/remoteaccess-tcu-test-service.rc
@@ -2,3 +2,4 @@
class hal
user vehicle_network
group system inet
+ capabilities NET_RAW
diff --git a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
index 4be30a2..bbda9df 100644
--- a/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
+++ b/automotive/remoteaccess/hal/default/src/RemoteAccessService.cpp
@@ -36,6 +36,8 @@
using ::aidl::android::hardware::automotive::remoteaccess::ApState;
using ::aidl::android::hardware::automotive::remoteaccess::IRemoteTaskCallback;
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
+using ::android::base::Error;
+using ::android::base::Result;
using ::android::base::ScopedLockAssertion;
using ::android::base::StringAppendF;
using ::android::base::StringPrintf;
@@ -48,13 +50,16 @@
using ::ndk::ScopedAStatus;
const std::string WAKEUP_SERVICE_NAME = "com.google.vehicle.wakeup";
+const std::string PROCESSOR_ID = "application_processor";
constexpr char COMMAND_SET_AP_STATE[] = "--set-ap-state";
constexpr char COMMAND_START_DEBUG_CALLBACK[] = "--start-debug-callback";
constexpr char COMMAND_STOP_DEBUG_CALLBACK[] = "--stop-debug-callback";
constexpr char COMMAND_SHOW_TASK[] = "--show-task";
-constexpr char COMMAND_GET_DEVICE_ID[] = "--get-device-id";
+constexpr char COMMAND_GET_VEHICLE_ID[] = "--get-vehicle-id";
+constexpr char COMMAND_INJECT_TASK[] = "--inject-task";
+constexpr char COMMAND_STATUS[] = "--status";
-std::vector<uint8_t> stringToBytes(const std::string& s) {
+std::vector<uint8_t> stringToBytes(std::string_view s) {
const char* data = s.data();
return std::vector<uint8_t>(data, data + s.size());
}
@@ -80,6 +85,10 @@
dprintf(fd, "%s, code: %d, error: %s\n", detail, status.getStatus(), status.getMessage());
}
+std::string boolToString(bool x) {
+ return x ? "true" : "false";
+}
+
} // namespace
RemoteAccessService::RemoteAccessService(WakeupClient::StubInterface* grpcStub)
@@ -125,6 +134,33 @@
mTaskLoopRunning = false;
}
+void RemoteAccessService::updateGrpcConnected(bool connected) {
+ std::lock_guard<std::mutex> lockGuard(mLock);
+ mGrpcConnected = connected;
+}
+
+Result<void> RemoteAccessService::deliverRemoteTaskThroughCallback(const std::string& clientId,
+ std::string_view taskData) {
+ std::shared_ptr<IRemoteTaskCallback> callback;
+ {
+ std::lock_guard<std::mutex> lockGuard(mLock);
+ callback = mRemoteTaskCallback;
+ mClientIdToTaskCount[clientId] += 1;
+ }
+ if (callback == nullptr) {
+ return Error() << "No callback registered, task ignored";
+ }
+ ALOGD("Calling onRemoteTaskRequested callback for client ID: %s", clientId.c_str());
+ ScopedAStatus callbackStatus =
+ callback->onRemoteTaskRequested(clientId, stringToBytes(taskData));
+ if (!callbackStatus.isOk()) {
+ return Error() << "Failed to call onRemoteTaskRequested callback, status: "
+ << callbackStatus.getStatus()
+ << ", message: " << callbackStatus.getMessage();
+ }
+ return {};
+}
+
void RemoteAccessService::runTaskLoop() {
GetRemoteTasksRequest request = {};
std::unique_ptr<ClientReaderInterface<GetRemoteTasksResponse>> reader;
@@ -134,28 +170,19 @@
mGetRemoteTasksContext.reset(new ClientContext());
reader = mGrpcStub->GetRemoteTasks(mGetRemoteTasksContext.get(), request);
}
+ updateGrpcConnected(true);
GetRemoteTasksResponse response;
while (reader->Read(&response)) {
ALOGI("Receiving one task from remote task client");
- std::shared_ptr<IRemoteTaskCallback> callback;
- {
- std::lock_guard<std::mutex> lockGuard(mLock);
- callback = mRemoteTaskCallback;
- }
- if (callback == nullptr) {
- ALOGD("No callback registered, task ignored");
+ if (auto result =
+ deliverRemoteTaskThroughCallback(response.clientid(), response.data());
+ !result.ok()) {
+ ALOGE("%s", result.error().message().c_str());
continue;
}
- ALOGD("Calling onRemoteTaskRequested callback for client ID: %s",
- response.clientid().c_str());
- ScopedAStatus callbackStatus = callback->onRemoteTaskRequested(
- response.clientid(), stringToBytes(response.data()));
- if (!callbackStatus.isOk()) {
- ALOGE("Failed to call onRemoteTaskRequested callback, status: %d, message: %s",
- callbackStatus.getStatus(), callbackStatus.getMessage());
- }
}
+ updateGrpcConnected(false);
Status status = reader->Finish();
mGetRemoteTasksContext.reset();
@@ -176,23 +203,23 @@
}
}
-ScopedAStatus RemoteAccessService::getDeviceId(std::string* deviceId) {
+ScopedAStatus RemoteAccessService::getVehicleId(std::string* vehicleId) {
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
auto vhalClient = IVhalClient::tryCreate();
if (vhalClient == nullptr) {
ALOGE("Failed to connect to VHAL");
return ScopedAStatus::fromServiceSpecificErrorWithMessage(
- /*errorCode=*/0, "Failed to connect to VHAL to get device ID");
+ /*errorCode=*/0, "Failed to connect to VHAL to get vehicle ID");
}
- return getDeviceIdWithClient(*vhalClient.get(), deviceId);
+ return getVehicleIdWithClient(*vhalClient.get(), vehicleId);
#else
// Don't use VHAL client in fuzzing since IPC is not allowed.
return ScopedAStatus::ok();
#endif
}
-ScopedAStatus RemoteAccessService::getDeviceIdWithClient(IVhalClient& vhalClient,
- std::string* deviceId) {
+ScopedAStatus RemoteAccessService::getVehicleIdWithClient(IVhalClient& vhalClient,
+ std::string* vehicleId) {
auto result = vhalClient.getValueSync(
*vhalClient.createHalPropValue(toInt(VehicleProperty::INFO_VIN)));
if (!result.ok()) {
@@ -200,7 +227,12 @@
/*errorCode=*/0,
("failed to get INFO_VIN from VHAL: " + result.error().message()).c_str());
}
- *deviceId = (*result)->getStringValue();
+ *vehicleId = (*result)->getStringValue();
+ return ScopedAStatus::ok();
+}
+
+ScopedAStatus RemoteAccessService::getProcessorId(std::string* processorId) {
+ *processorId = PROCESSOR_ID;
return ScopedAStatus::ok();
}
@@ -246,15 +278,17 @@
}
void RemoteAccessService::dumpHelp(int fd) {
- dprintf(fd, "%s",
- (std::string("RemoteAccess HAL debug interface, Usage: \n") + COMMAND_SET_AP_STATE +
- " [0/1](isReadyForRemoteTask) [0/1](isWakeupRequired) Set the new AP state\n" +
- COMMAND_START_DEBUG_CALLBACK +
- " Start a debug callback that will record the received tasks\n" +
- COMMAND_STOP_DEBUG_CALLBACK + " Stop the debug callback\n" + COMMAND_SHOW_TASK +
- " Show tasks received by debug callback\n" + COMMAND_GET_DEVICE_ID +
- " Get device id\n")
- .c_str());
+ dprintf(fd,
+ "RemoteAccess HAL debug interface, Usage: \n"
+ "%s [0/1](isReadyForRemoteTask) [0/1](isWakeupRequired): Set the new AP state\n"
+ "%s: Start a debug callback that will record the received tasks\n"
+ "%s: Stop the debug callback\n"
+ "%s: Show tasks received by debug callback\n"
+ "%s: Get vehicle id\n"
+ "%s [client_id] [task_data]: Inject a task\n"
+ "%s: Show status\n",
+ COMMAND_SET_AP_STATE, COMMAND_START_DEBUG_CALLBACK, COMMAND_STOP_DEBUG_CALLBACK,
+ COMMAND_SHOW_TASK, COMMAND_GET_VEHICLE_ID, COMMAND_INJECT_TASK, COMMAND_STATUS);
}
binder_status_t RemoteAccessService::dump(int fd, const char** args, uint32_t numArgs) {
@@ -265,6 +299,7 @@
if (numArgs == 0) {
dumpHelp(fd);
+ printCurrentStatus(fd);
return STATUS_OK;
}
@@ -316,14 +351,22 @@
dprintf(fd, "Debug callback is not currently used, use \"%s\" first.\n",
COMMAND_START_DEBUG_CALLBACK);
}
- } else if (!strcmp(args[0], COMMAND_GET_DEVICE_ID)) {
- std::string deviceId;
- auto status = getDeviceId(&deviceId);
+ } else if (!strcmp(args[0], COMMAND_GET_VEHICLE_ID)) {
+ std::string vehicleId;
+ auto status = getVehicleId(&vehicleId);
if (!status.isOk()) {
- dprintErrorStatus(fd, "Failed to get device ID", status);
+ dprintErrorStatus(fd, "Failed to get vehicle ID", status);
} else {
- dprintf(fd, "Device Id: %s\n", deviceId.c_str());
+ dprintf(fd, "Vehicle Id: %s\n", vehicleId.c_str());
}
+ } else if (!strcmp(args[0], COMMAND_INJECT_TASK)) {
+ if (numArgs < 3) {
+ dumpHelp(fd);
+ return STATUS_OK;
+ }
+ debugInjectTask(fd, args[1], args[2]);
+ } else if (!strcmp(args[0], COMMAND_STATUS)) {
+ printCurrentStatus(fd);
} else {
dumpHelp(fd);
}
@@ -331,6 +374,37 @@
return STATUS_OK;
}
+void RemoteAccessService::printCurrentStatus(int fd) {
+ std::lock_guard<std::mutex> lockGuard(mLock);
+ dprintf(fd,
+ "\nRemoteAccess HAL status \n"
+ "Remote task callback registered: %s\n"
+ "Task receiving GRPC connection established: %s\n"
+ "Received task count by clientId: \n%s\n",
+ boolToString(mRemoteTaskCallback.get()).c_str(), boolToString(mGrpcConnected).c_str(),
+ clientIdToTaskCountToStringLocked().c_str());
+}
+
+void RemoteAccessService::debugInjectTask(int fd, std::string_view clientId,
+ std::string_view taskData) {
+ std::string clientIdCopy = std::string(clientId);
+ if (auto result = deliverRemoteTaskThroughCallback(clientIdCopy, taskData); !result.ok()) {
+ dprintf(fd, "Failed to inject task: %s", result.error().message().c_str());
+ return;
+ }
+ dprintf(fd, "Task for client: %s, data: [%s] successfully injected\n", clientId.data(),
+ taskData.data());
+}
+
+std::string RemoteAccessService::clientIdToTaskCountToStringLocked() {
+ // Print the table header
+ std::string output = "| ClientId | Count |\n";
+ for (const auto& [clientId, taskCount] : mClientIdToTaskCount) {
+ output += StringPrintf(" %-9s %-6zu\n", clientId.c_str(), taskCount);
+ }
+ return output;
+}
+
ScopedAStatus DebugRemoteTaskCallback::onRemoteTaskRequested(const std::string& clientId,
const std::vector<uint8_t>& data) {
std::lock_guard<std::mutex> lockGuard(mLock);
diff --git a/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp b/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
index 8c4fa08..c5afd63 100644
--- a/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
+++ b/automotive/remoteaccess/hal/default/test/RemoteAccessServiceUnitTest.cpp
@@ -187,8 +187,8 @@
void setRetryWaitInMs(size_t retryWaitInMs) { mService->setRetryWaitInMs(retryWaitInMs); }
- ScopedAStatus getDeviceIdWithClient(IVhalClient& vhalClient, std::string* deviceId) {
- return mService->getDeviceIdWithClient(vhalClient, deviceId);
+ ScopedAStatus getVehicleIdWithClient(IVhalClient& vhalClient, std::string* vehicleId) {
+ return mService->getVehicleIdWithClient(vhalClient, vehicleId);
}
private:
@@ -358,13 +358,13 @@
std::this_thread::sleep_for(std::chrono::milliseconds(150));
}
-TEST_F(RemoteAccessServiceUnitTest, testGetDeviceId) {
- std::string deviceId;
+TEST_F(RemoteAccessServiceUnitTest, testGetVehicleId) {
+ std::string vehicleId;
FakeVhalClient vhalClient;
- ASSERT_TRUE(getDeviceIdWithClient(vhalClient, &deviceId).isOk());
- ASSERT_EQ(deviceId, kTestVin);
+ ASSERT_TRUE(getVehicleIdWithClient(vhalClient, &vehicleId).isOk());
+ ASSERT_EQ(vehicleId, kTestVin);
}
} // namespace remoteaccess
diff --git a/automotive/sv/1.0/default/tests/fuzzer/Android.bp b/automotive/sv/1.0/default/tests/fuzzer/Android.bp
index 394c532..696bfad 100644
--- a/automotive/sv/1.0/default/tests/fuzzer/Android.bp
+++ b/automotive/sv/1.0/default/tests/fuzzer/Android.bp
@@ -47,5 +47,13 @@
"android-media-fuzzing-reports@google.com",
],
componentid: 533764,
+ hotlists: [
+ "4593311",
+ ],
+ description: "The fuzzer targets the APIs of android.hardware.automotive.sv@1.0-service",
+ vector: "local_no_privileges_required",
+ service_privilege: "privileged",
+ users: "multi_user",
+ fuzzed_code_usage: "shipped",
},
}
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
index 33e211c..586a98e 100644
--- a/automotive/vehicle/2.0/default/Android.bp
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -292,5 +292,13 @@
"android-media-fuzzing-reports@google.com",
],
componentid: 533764,
+ hotlists: [
+ "4593311",
+ ],
+ description: "The fuzzer targets the APIs of android.hardware.automotive.vehicle@2.0-manager-lib",
+ vector: "local_no_privileges_required",
+ service_privilege: "privileged",
+ users: "multi_user",
+ fuzzed_code_usage: "shipped",
},
}
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/tests/DefaultVhalImpl_test.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/tests/DefaultVhalImpl_test.cpp
index b5026a6..edd4484 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/tests/DefaultVhalImpl_test.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/tests/DefaultVhalImpl_test.cpp
@@ -756,8 +756,9 @@
// Clear existing events.
mEventQueue.flush();
std::this_thread::sleep_for(std::chrono::milliseconds(500));
- // There should be no new events generated.
- EXPECT_EQ((size_t)0, mEventQueue.flush().size());
+ // Technically there should be no new events generated, however, there might still be one event
+ // in the queue while we are stopping the generator.
+ EXPECT_LE(mEventQueue.flush().size(), 1u);
}
std::string getTestFilePath(const char* filename) {
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 00d0452..5b0a505 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -57,46 +57,25 @@
};
/**
- * Vehicle Areas
+ * List of different supported area types for vehicle properties.
* Used to construct property IDs in the VehicleProperty enum.
*
- * Some properties may be associated with particular vehicle areas. For
- * example, VehicleProperty:DOOR_LOCK property must be associated with
- * particular door, thus this property must be marked with
- * VehicleArea:DOOR flag.
+ * Some properties may be associated with particular areas in the vehicle. For example,
+ * VehicleProperty#DOOR_LOCK property must be associated with a particular door, thus this property
+ * must be of the VehicleArea#DOOR area type.
*
- * Other properties may not be associated with particular vehicle area.
- * These kinds of properties must have VehicleArea:GLOBAL flag.
+ * Other properties may not be associated with a particular area in the vehicle. These kinds of
+ * properties must be of the VehicleArea#GLOBAL area type.
*
- * [Definition] Area: An area represents a unique element of an AreaType.
- * For instance, if AreaType is WINDOW, then an area may be FRONT_WINDSHIELD.
- *
- * [Definition] AreaID: An AreaID is a combination of one or more areas,
- * and is represented using a bitmask of Area enums. Different AreaTypes may
- * not be mixed in a single AreaID. For instance, a window area cannot be
- * combined with a seat area in an AreaID.
- *
- * Rules for mapping a zoned property to AreaIDs:
- * - A property must be mapped to an array of AreaIDs that are impacted when
- * the property value changes.
- * - Each element in the array must represent an AreaID, in which the
- * property value can only be changed together in all the areas within
- * the AreaID and never independently. That is, when the property value
- * changes in one of the areas in an AreaID in the array, then it must
- * automatically change in all other areas in the AreaID.
- * - The property value must be independently controllable in any two
- * different AreaIDs in the array.
- * - An area must only appear once in the array of AreaIDs. That is, an
- * area must only be part of a single AreaID in the array.
- *
- * [Definition] Global Property: A property that applies to the entire car
- * and is not associated with a specific area. For example, FUEL_LEVEL,
- * HVAC_STEERING_WHEEL_HEAT.
- *
- * Rules for mapping a global property to AreaIDs:
- * - A global property must not be mapped to AreaIDs.
-*/
+ * Note: This is not the same as areaId used in VehicleAreaConfig. E.g. for a global property, the
+ * property ID is of the VehicleArea#GLOBAL area type, however, the area ID must be 0.
+ */
+// A better name would be VehicleAreaType
enum VehicleArea : int32_t {
+ /**
+ * A global property is a property that applies to the entire vehicle and is not associated with
+ * a specific area. For example, FUEL_LEVEL, HVAC_STEERING_WHEEL_HEAT are global properties.
+ */
GLOBAL = 0x01000000,
/** WINDOW maps to enum VehicleAreaWindow */
WINDOW = 0x03000000,
@@ -1810,11 +1789,11 @@
*
* This parameter selects the memory preset to use to select the seat
* position. The minValue is always 0, and the maxValue determines the
- * number of seat positions available.
+ * number of seat positions available (i.e. numSeatPositions - 1).
*
* For instance, if the driver's seat has 3 memory presets, the maxValue
- * will be 3. When the user wants to select a preset, the desired preset
- * number (1, 2, or 3) is set.
+ * will be 2. When the user wants to select a preset, the desired preset
+ * number (0, 1, or 2) is set.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:WRITE
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/RawPropValues.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/RawPropValues.aidl
index 9c6875b..28ccc1d 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/RawPropValues.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/RawPropValues.aidl
@@ -20,8 +20,8 @@
@JavaDerive(equals=true, toString=true)
parcelable RawPropValues {
/**
- * This is used for properties of types VehiclePropertyType#INT
- * and VehiclePropertyType#INT_VEC
+ * This is used for properties of types VehiclePropertyType#INT32,
+ * VehiclePropertyType#BOOLEAN and VehiclePropertyType#INT32_VEC
*/
int[] int32Values = {};
@@ -31,7 +31,10 @@
*/
float[] floatValues;
- /** This is used for properties of type VehiclePropertyType#INT64 */
+ /**
+ * This is used for properties of type VehiclePropertyType#INT64 and
+ * VehiclePropertyType#INT64_VEC
+ */
long[] int64Values;
/** This is used for properties of type VehiclePropertyType#BYTES */
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleAreaConfig.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleAreaConfig.aidl
index abd9540..20c046d 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleAreaConfig.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehicleAreaConfig.aidl
@@ -20,7 +20,7 @@
@JavaDerive(equals=true, toString=true)
parcelable VehicleAreaConfig {
/**
- * Area id is ignored for VehiclePropertyGroup:GLOBAL properties.
+ * Area id is always 0 for VehicleArea#GLOBAL properties.
*/
int areaId;
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropConfig.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropConfig.aidl
index 1b48f0b..61b9369 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropConfig.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropConfig.aidl
@@ -37,7 +37,25 @@
VehiclePropertyChangeMode changeMode = VehiclePropertyChangeMode.STATIC;
/**
- * Contains per-area configuration.
+ * Contains per-areaId configuration.
+ *
+ * [Definition] area: An area represents a unique element of a VehicleArea. For instance, if the
+ * VehicleArea is WINDOW, then an example area is FRONT_WINDSHIELD.
+ *
+ * [Definition] area ID: An area ID is a combination of one or more areas, and is created by
+ * bitwise "OR"ing the areas together. Areas from different VehicleArea values may not be
+ * mixed in a single area ID. For example, a VehicleAreaWindow area cannot be combined with a
+ * VehicleAreaSeat area in an area ID.
+ *
+ * For VehicleArea#GLOBAL properties, they must map only to a single area ID of 0.
+ *
+ * Rules for mapping a non VehicleArea#GLOBAL property to area IDs:
+ * - A property must be mapped to a set of area IDs that are impacted when the property value
+ * changes.
+ * - An area cannot be part of multiple area IDs, it must only be part of a single area ID.
+ * - When the property value changes in one of the areas in an area ID, then it must
+ * automatically change in all other areas in the area ID.
+ * - The property value must be independently controllable in any two different area IDs.
*/
VehicleAreaConfig[] areaConfigs;
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
index c8a36b8..d0c6e83 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
@@ -272,9 +272,6 @@
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess::READ},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyAccess::READ_WRITE},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess::READ},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyAccess::READ},
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
index bea5002..48532c9 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
@@ -272,9 +272,6 @@
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode::ON_CHANGE},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
- {VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyChangeMode::ON_CHANGE},
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
index ee214ef..758670d 100644
--- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
@@ -263,10 +263,7 @@
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyAccess.READ),
- Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyAccess.READ_WRITE),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess.READ),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyAccess.READ)
+ Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyAccess.READ)
);
}
diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
index d3cf71e..29069f8 100644
--- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
@@ -263,10 +263,7 @@
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_LEAD_VEHICLE_MEASURED_DISTANCE, VehiclePropertyChangeMode.CONTINUOUS),
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.HANDS_ON_DETECTION_DRIVER_STATE, VehiclePropertyChangeMode.ON_CHANGE),
- Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
- Map.entry(VehicleProperty.DRIVER_ATTENTION_MONITORING_WARNING, VehiclePropertyChangeMode.ON_CHANGE)
+ Map.entry(VehicleProperty.HANDS_ON_DETECTION_WARNING, VehiclePropertyChangeMode.ON_CHANGE)
);
}
diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
index d921079..ec0d310 100644
--- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
+++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/src/JsonConfigLoader.cpp
@@ -41,8 +41,6 @@
using ::aidl::android::hardware::automotive::vehicle::CruiseControlCommand;
using ::aidl::android::hardware::automotive::vehicle::CruiseControlState;
using ::aidl::android::hardware::automotive::vehicle::CruiseControlType;
-using ::aidl::android::hardware::automotive::vehicle::DriverAttentionMonitoringState;
-using ::aidl::android::hardware::automotive::vehicle::DriverAttentionMonitoringWarning;
using ::aidl::android::hardware::automotive::vehicle::EmergencyLaneKeepAssistState;
using ::aidl::android::hardware::automotive::vehicle::ErrorState;
using ::aidl::android::hardware::automotive::vehicle::EvConnectorType;
@@ -245,10 +243,6 @@
std::make_unique<ConstantParser<HandsOnDetectionDriverState>>();
mConstantParsersByType["HandsOnDetectionWarning"] =
std::make_unique<ConstantParser<HandsOnDetectionWarning>>();
- mConstantParsersByType["DriverAttentionMonitoringState"] =
- std::make_unique<ConstantParser<DriverAttentionMonitoringState>>();
- mConstantParsersByType["DriverAttentionMonitoringWarning"] =
- std::make_unique<ConstantParser<DriverAttentionMonitoringWarning>>();
mConstantParsersByType["ErrorState"] = std::make_unique<ConstantParser<ErrorState>>();
mConstantParsersByType["AutomaticEmergencyBrakingState"] =
std::make_unique<ConstantParser<AutomaticEmergencyBrakingState>>();
diff --git a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
index fe7f0cb..ae36290 100644
--- a/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/default_config/config/DefaultProperties.json
@@ -80,7 +80,7 @@
"property": "VehicleProperty::INFO_MODEL_YEAR",
"defaultValue": {
"int32Values": [
- 2020
+ 2023
]
}
},
@@ -2371,7 +2371,7 @@
66.19999694824219,
"VehicleUnit::FAHRENHEIT",
19.0,
- 66.5
+ 66.0
]
}
},
@@ -3537,50 +3537,6 @@
]
},
{
- "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED",
- "defaultValue": {
- "int32Values": [
- 1
- ]
- }
- },
- {
- "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE",
- "defaultValue": {
- "int32Values": [
- "DriverAttentionMonitoringState::NOT_DISTRACTED"
- ]
- },
- "areas": [
- {
- "areaId": 0,
- "supportedEnumValues": [
- "ErrorState::NOT_AVAILABLE_DISABLED",
- "DriverAttentionMonitoringState::DISTRACTED",
- "DriverAttentionMonitoringState::NOT_DISTRACTED"
- ]
- }
- ]
- },
- {
- "property": "VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING",
- "defaultValue": {
- "int32Values": [
- "DriverAttentionMonitoringWarning::NO_WARNING"
- ]
- },
- "areas": [
- {
- "areaId": 0,
- "supportedEnumValues": [
- "ErrorState::NOT_AVAILABLE_DISABLED",
- "DriverAttentionMonitoringWarning::NO_WARNING",
- "DriverAttentionMonitoringWarning::WARNING"
- ]
- }
- ]
- },
- {
"property": "VehicleProperty::INITIAL_USER_INFO"
},
{
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
index 6fd2367..7b74092 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -178,6 +178,13 @@
void eventFromVehicleBus(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value);
+ int getHvacTempNumIncrements(int requestedTemp, int minTemp, int maxTemp, int increment);
+ void updateHvacTemperatureValueSuggestionInput(
+ const std::vector<int>& hvacTemperatureSetConfigArray,
+ std::vector<float>* hvacTemperatureValueSuggestionInput);
+ VhalResult<void> setHvacTemperatureValueSuggestion(
+ const aidl::android::hardware::automotive::vehicle::VehiclePropValue&
+ hvacTemperatureValueSuggestion);
VhalResult<void> maybeSetSpecialValue(
const aidl::android::hardware::automotive::vehicle::VehiclePropValue& value,
bool* isSpecialValue);
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 78c21e9..4544389 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -67,6 +67,7 @@
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyStatus;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyType;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
+using ::aidl::android::hardware::automotive::vehicle::VehicleUnit;
using ::android::base::EqualsIgnoreCase;
using ::android::base::Error;
@@ -298,6 +299,94 @@
return {};
}
+int FakeVehicleHardware::getHvacTempNumIncrements(int requestedTemp, int minTemp, int maxTemp,
+ int increment) {
+ requestedTemp = std::max(requestedTemp, minTemp);
+ requestedTemp = std::min(requestedTemp, maxTemp);
+ int numIncrements = (requestedTemp - minTemp) / increment;
+ return numIncrements;
+}
+
+void FakeVehicleHardware::updateHvacTemperatureValueSuggestionInput(
+ const std::vector<int>& hvacTemperatureSetConfigArray,
+ std::vector<float>* hvacTemperatureValueSuggestionInput) {
+ int minTempInCelsius = hvacTemperatureSetConfigArray[0];
+ int maxTempInCelsius = hvacTemperatureSetConfigArray[1];
+ int incrementInCelsius = hvacTemperatureSetConfigArray[2];
+
+ int minTempInFahrenheit = hvacTemperatureSetConfigArray[3];
+ int maxTempInFahrenheit = hvacTemperatureSetConfigArray[4];
+ int incrementInFahrenheit = hvacTemperatureSetConfigArray[5];
+
+ // The HVAC_TEMPERATURE_SET config array values are temperature values that have been multiplied
+ // by 10 and converted to integers. Therefore, requestedTemp must also be multiplied by 10 and
+ // converted to an integer in order for them to be the same units.
+ int requestedTemp = static_cast<int>((*hvacTemperatureValueSuggestionInput)[0] * 10.0f);
+ int numIncrements =
+ (*hvacTemperatureValueSuggestionInput)[1] == toInt(VehicleUnit::CELSIUS)
+ ? getHvacTempNumIncrements(requestedTemp, minTempInCelsius, maxTempInCelsius,
+ incrementInCelsius)
+ : getHvacTempNumIncrements(requestedTemp, minTempInFahrenheit,
+ maxTempInFahrenheit, incrementInFahrenheit);
+
+ int suggestedTempInCelsius = minTempInCelsius + incrementInCelsius * numIncrements;
+ int suggestedTempInFahrenheit = minTempInFahrenheit + incrementInFahrenheit * numIncrements;
+ // HVAC_TEMPERATURE_VALUE_SUGGESTION specifies the temperature values to be in the original
+ // floating point form so we divide by 10 and convert to float.
+ (*hvacTemperatureValueSuggestionInput)[2] = static_cast<float>(suggestedTempInCelsius) / 10.0f;
+ (*hvacTemperatureValueSuggestionInput)[3] =
+ static_cast<float>(suggestedTempInFahrenheit) / 10.0f;
+}
+
+VhalResult<void> FakeVehicleHardware::setHvacTemperatureValueSuggestion(
+ const VehiclePropValue& hvacTemperatureValueSuggestion) {
+ auto hvacTemperatureSetConfigResult =
+ mServerSidePropStore->getConfig(toInt(VehicleProperty::HVAC_TEMPERATURE_SET));
+
+ if (!hvacTemperatureSetConfigResult.ok()) {
+ return StatusError(getErrorCode(hvacTemperatureSetConfigResult)) << StringPrintf(
+ "Failed to set HVAC_TEMPERATURE_VALUE_SUGGESTION because"
+ " HVAC_TEMPERATURE_SET could not be retrieved. Error: %s",
+ getErrorMsg(hvacTemperatureSetConfigResult).c_str());
+ }
+
+ const auto& originalInput = hvacTemperatureValueSuggestion.value.floatValues;
+ if (originalInput.size() != 4) {
+ return StatusError(StatusCode::INVALID_ARG) << StringPrintf(
+ "Failed to set HVAC_TEMPERATURE_VALUE_SUGGESTION because float"
+ " array value is not size 4.");
+ }
+
+ bool isTemperatureUnitSpecified = originalInput[1] == toInt(VehicleUnit::CELSIUS) ||
+ originalInput[1] == toInt(VehicleUnit::FAHRENHEIT);
+ if (!isTemperatureUnitSpecified) {
+ return StatusError(StatusCode::INVALID_ARG) << StringPrintf(
+ "Failed to set HVAC_TEMPERATURE_VALUE_SUGGESTION because float"
+ " value at index 1 is not any of %d or %d, which corresponds to"
+ " VehicleUnit#CELSIUS and VehicleUnit#FAHRENHEIT respectively.",
+ toInt(VehicleUnit::CELSIUS), toInt(VehicleUnit::FAHRENHEIT));
+ }
+
+ auto updatedValue = mValuePool->obtain(hvacTemperatureValueSuggestion);
+ const auto& hvacTemperatureSetConfigArray = hvacTemperatureSetConfigResult.value()->configArray;
+ auto& hvacTemperatureValueSuggestionInput = updatedValue->value.floatValues;
+
+ updateHvacTemperatureValueSuggestionInput(hvacTemperatureSetConfigArray,
+ &hvacTemperatureValueSuggestionInput);
+
+ updatedValue->timestamp = elapsedRealtimeNano();
+ auto writeResult = mServerSidePropStore->writeValue(std::move(updatedValue),
+ /* updateStatus = */ true,
+ VehiclePropertyStore::EventMode::ALWAYS);
+ if (!writeResult.ok()) {
+ return StatusError(getErrorCode(writeResult))
+ << StringPrintf("failed to write value into property store, error: %s",
+ getErrorMsg(writeResult).c_str());
+ }
+
+ return {};
+}
+
bool FakeVehicleHardware::isHvacPropAndHvacNotAvailable(int32_t propId, int32_t areaId) const {
std::unordered_set<int32_t> powerProps(std::begin(HVAC_POWER_PROPERTIES),
std::end(HVAC_POWER_PROPERTIES));
@@ -491,6 +580,9 @@
case VENDOR_PROPERTY_ID:
*isSpecialValue = true;
return StatusError((StatusCode)VENDOR_ERROR_CODE);
+ case toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION):
+ *isSpecialValue = true;
+ return setHvacTemperatureValueSuggestion(value);
#ifdef ENABLE_VEHICLE_HAL_TEST_PROPERTIES
case toInt(VehicleProperty::CLUSTER_REPORT_STATE):
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index 93a63ad..a50b4ad 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -57,6 +57,7 @@
using ::aidl::android::hardware::automotive::vehicle::VehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropertyStatus;
using ::aidl::android::hardware::automotive::vehicle::VehiclePropValue;
+using ::aidl::android::hardware::automotive::vehicle::VehicleUnit;
using ::android::base::expected;
using ::android::base::ScopedLockAssertion;
using ::android::base::StringPrintf;
@@ -2242,6 +2243,359 @@
}
}
+TEST_F(FakeVehicleHardwareTest, testSetHvacTemperatureValueSuggestion) {
+ float CELSIUS = static_cast<float>(toInt(VehicleUnit::CELSIUS));
+ float FAHRENHEIT = static_cast<float>(toInt(VehicleUnit::FAHRENHEIT));
+
+ VehiclePropValue floatArraySizeFour = {
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {0, CELSIUS, 0, 0},
+ };
+ StatusCode status = setValue(floatArraySizeFour);
+ EXPECT_EQ(status, StatusCode::OK);
+
+ VehiclePropValue floatArraySizeZero = {
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ };
+ status = setValue(floatArraySizeZero);
+ EXPECT_EQ(status, StatusCode::INVALID_ARG);
+
+ VehiclePropValue floatArraySizeFive = {
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {0, CELSIUS, 0, 0, 0},
+ };
+ status = setValue(floatArraySizeFive);
+ EXPECT_EQ(status, StatusCode::INVALID_ARG);
+
+ VehiclePropValue invalidUnit = {
+ .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {0, 0, 0, 0},
+ };
+ status = setValue(floatArraySizeFive);
+ EXPECT_EQ(status, StatusCode::INVALID_ARG);
+ clearChangedProperties();
+
+ // Config array values from HVAC_TEMPERATURE_SET in DefaultProperties.json
+ auto configs = getHardware()->getAllPropertyConfigs();
+ VehiclePropConfig* hvacTemperatureSetConfig = nullptr;
+ for (auto& config : configs) {
+ if (config.prop == toInt(VehicleProperty::HVAC_TEMPERATURE_SET)) {
+ hvacTemperatureSetConfig = &config;
+ break;
+ }
+ }
+ EXPECT_NE(hvacTemperatureSetConfig, nullptr);
+
+ auto& hvacTemperatureSetConfigArray = hvacTemperatureSetConfig->configArray;
+ // The HVAC_TEMPERATURE_SET config array values are temperature values that have been multiplied
+ // by 10 and converted to integers. HVAC_TEMPERATURE_VALUE_SUGGESTION specifies the temperature
+ // values to be in the original floating point form so we divide by 10 and convert to float.
+ float minTempInCelsius = hvacTemperatureSetConfigArray[0] / 10.0f;
+ float maxTempInCelsius = hvacTemperatureSetConfigArray[1] / 10.0f;
+ float incrementInCelsius = hvacTemperatureSetConfigArray[2] / 10.0f;
+ float minTempInFahrenheit = hvacTemperatureSetConfigArray[3] / 10.0f;
+ float maxTempInFahrenheit = hvacTemperatureSetConfigArray[4] / 10.0f;
+ float incrementInFahrenheit = hvacTemperatureSetConfigArray[5] / 10.0f;
+
+ auto testCases = {
+ SetSpecialValueTestCase{
+ .name = "min_celsius_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInCelsius, CELSIUS, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInCelsius, CELSIUS,
+ minTempInCelsius,
+ minTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "min_fahrenheit_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInFahrenheit, FAHRENHEIT,
+ 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInFahrenheit, FAHRENHEIT,
+ minTempInCelsius,
+ minTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "max_celsius_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInCelsius, CELSIUS, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInCelsius, CELSIUS,
+ maxTempInCelsius,
+ maxTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "max_fahrenheit_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInFahrenheit, FAHRENHEIT,
+ 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInFahrenheit, FAHRENHEIT,
+ maxTempInCelsius,
+ maxTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "below_min_celsius_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInCelsius - 1, CELSIUS, 0,
+ 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInCelsius - 1, CELSIUS,
+ minTempInCelsius,
+ minTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "below_min_fahrenheit_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInFahrenheit - 1,
+ FAHRENHEIT, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInFahrenheit - 1,
+ FAHRENHEIT, minTempInCelsius,
+ minTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "above_max_celsius_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInCelsius + 1, CELSIUS, 0,
+ 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInCelsius + 1, CELSIUS,
+ maxTempInCelsius,
+ maxTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "above_max_fahrenheit_temperature",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInFahrenheit + 1,
+ FAHRENHEIT, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {maxTempInFahrenheit + 1,
+ FAHRENHEIT, maxTempInCelsius,
+ maxTempInFahrenheit},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "inbetween_value_celsius",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInCelsius +
+ incrementInCelsius * 2.5f,
+ CELSIUS, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues =
+ {minTempInCelsius + incrementInCelsius * 2.5f,
+ CELSIUS,
+ minTempInCelsius + incrementInCelsius * 2,
+ minTempInFahrenheit +
+ incrementInFahrenheit * 2},
+ },
+ },
+ },
+ SetSpecialValueTestCase{
+ .name = "inbetween_value_fahrenheit",
+ .valuesToSet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues = {minTempInFahrenheit +
+ incrementInFahrenheit *
+ 2.5f,
+ FAHRENHEIT, 0, 0},
+ },
+ },
+ .expectedValuesToGet =
+ {
+ VehiclePropValue{
+ .prop = toInt(
+ VehicleProperty::
+ HVAC_TEMPERATURE_VALUE_SUGGESTION),
+ .areaId = HVAC_ALL,
+ .value.floatValues =
+ {minTempInFahrenheit +
+ incrementInFahrenheit * 2.5f,
+ FAHRENHEIT,
+ minTempInCelsius + incrementInCelsius * 2,
+ minTempInFahrenheit +
+ incrementInFahrenheit * 2},
+ },
+ },
+ },
+ };
+
+ for (auto& tc : testCases) {
+ StatusCode status = setValue(tc.valuesToSet[0]);
+ EXPECT_EQ(status, StatusCode::OK);
+
+ auto events = getChangedProperties();
+ EXPECT_EQ(events.size(), static_cast<size_t>(1));
+ events[0].timestamp = 0;
+
+ EXPECT_EQ(events[0], (tc.expectedValuesToGet[0]))
+ << "Failed Test: " << tc.name << "\n"
+ << "Received - prop: " << events[0].prop << ", areaId: " << events[0].areaId
+ << ", floatValues: {" << events[0].value.floatValues[0] << ", "
+ << events[0].value.floatValues[1] << ", " << events[0].value.floatValues[2] << ", "
+ << events[0].value.floatValues[3] << "}\n"
+ << "Expected - prop: " << tc.expectedValuesToGet[0].prop
+ << ", areaId: " << tc.expectedValuesToGet[0].areaId << ", floatValues: {"
+ << tc.expectedValuesToGet[0].value.floatValues[0] << ", "
+ << tc.expectedValuesToGet[0].value.floatValues[1] << ", "
+ << tc.expectedValuesToGet[0].value.floatValues[2] << ", "
+ << tc.expectedValuesToGet[0].value.floatValues[3] << "}\n";
+ clearChangedProperties();
+ }
+}
+
} // namespace fake
} // namespace vehicle
} // namespace automotive
diff --git a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
index 7db4246..e6d657d 100644
--- a/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
+++ b/automotive/vehicle/aidl/impl/utils/common/include/VehicleHalTypes.h
@@ -24,8 +24,6 @@
#include <aidl/android/hardware/automotive/vehicle/CruiseControlType.h>
#include <aidl/android/hardware/automotive/vehicle/DiagnosticFloatSensorIndex.h>
#include <aidl/android/hardware/automotive/vehicle/DiagnosticIntegerSensorIndex.h>
-#include <aidl/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.h>
-#include <aidl/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.h>
#include <aidl/android/hardware/automotive/vehicle/EmergencyLaneKeepAssistState.h>
#include <aidl/android/hardware/automotive/vehicle/ErrorState.h>
#include <aidl/android/hardware/automotive/vehicle/EvConnectorType.h>
diff --git a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
index 4d587ee..9834cdb 100644
--- a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
+++ b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.automotive.vehicle</name>
- <version>1</version>
+ <version>2</version>
<fqname>IVehicle/default</fqname>
</hal>
</manifest>
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
index e0267f3..ba75e7b 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -270,7 +270,4 @@
HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313942 */,
HANDS_ON_DETECTION_DRIVER_STATE = (((0x1017 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411095 */,
HANDS_ON_DETECTION_WARNING = (((0x1018 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411096 */,
- DRIVER_ATTENTION_MONITORING_ENABLED = (((0x1019 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313945 */,
- DRIVER_ATTENTION_MONITORING_STATE = (((0x101A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411098 */,
- DRIVER_ATTENTION_MONITORING_WARNING = (((0x101B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411099 */,
}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
deleted file mode 100644
index 7ebf844..0000000
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.automotive.vehicle;
-
-/**
- * Used to enumerate the current driver state of Driver Attention Monitoring.
- *
- * This enum could be extended in future releases to include additional feature states.
- */
-@VintfStability
-@Backing(type="int")
-enum DriverAttentionMonitoringState {
- /**
- * This state is used as an alternative for any DriverAttentionMonitoringState value that is
- * not defined in the platform. Ideally, implementations of
- * VehicleProperty#DRIVER_ATTENTION_MONITORING_STATE should not use this state. The
- * framework can use this field to remain backwards compatible if DriverAttentionMonitoringState
- * is extended to include additional states.
- */
- OTHER = 0,
- /**
- * The system detects that the driver is distracted.
- */
- DISTRACTED = 1,
- /**
- * The system detects that the driver is attentive / not distracted.
- */
- NOT_DISTRACTED = 2,
-}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
deleted file mode 100644
index 373dd7f..0000000
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.automotive.vehicle;
-
-/**
- * Used to enumerate the current warning state of Driver Attention Monitoring.
- */
-@VintfStability
-@Backing(type="int")
-enum DriverAttentionMonitoringWarning {
- /**
- * This state is used as an alternative for any DriverAttentionMonitoringWarning value that is
- * defined in the platform. Ideally, implementations of
- * VehicleProperty#DRIVER_ATTENTION_MONITORING_WARNING should not use this state. The framework
- * can use this field to remain backwards compatible if DriverAttentionMonitoringWarning is
- * extended to include additional states.
- */
- OTHER = 0,
- /**
- * Driver Attention Monitoring is enabled and the driver's current state does not warrant
- * sending a warning.
- */
- NO_WARNING = 1,
- /**
- * Driver Attention Monitoring is enabled and the driver has been distracted for too long of a
- * duration, and the vehicle is sending a warning to the driver as a consequence of this.
- */
- WARNING = 2,
-}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleArea.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleArea.aidl
index dab0349..6f7f783 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleArea.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleArea.aidl
@@ -16,9 +16,28 @@
package android.hardware.automotive.vehicle;
+/**
+ * List of different supported area types for vehicle properties.
+ * Used to construct property IDs in the VehicleProperty enum.
+ *
+ * Some properties may be associated with particular areas in the vehicle. For example,
+ * VehicleProperty#DOOR_LOCK property must be associated with a particular door, thus this property
+ * must be of the VehicleArea#DOOR area type.
+ *
+ * Other properties may not be associated with a particular area in the vehicle. These kinds of
+ * properties must be of the VehicleArea#GLOBAL area type.
+ *
+ * Note: This is not the same as areaId used in VehicleAreaConfig. E.g. for a global property, the
+ * property ID is of the VehicleArea#GLOBAL area type, however, the area ID must be 0.
+ */
@VintfStability
@Backing(type="int")
+// A better name would be VehicleAreaType
enum VehicleArea {
+ /**
+ * A global property is a property that applies to the entire vehicle and is not associated with
+ * a specific area. For example, FUEL_LEVEL, HVAC_STEERING_WHEEL_HEAT are global properties.
+ */
GLOBAL = 0x01000000,
/** WINDOW maps to enum VehicleAreaWindow */
WINDOW = 0x03000000,
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl
index fa5d711..f5b77de 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleHvacFanDirection.aidl
@@ -29,6 +29,9 @@
* FACE_AND_FLOOR = FACE | FLOOR
*/
FACE_AND_FLOOR = 0x3,
+ /**
+ * DEFROST may also be described as the windshield fan direction.
+ */
DEFROST = 0x4,
/**
* DEFROST_AND_FLOOR = DEFROST | FLOOR
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index cd1f294..8a3ab90 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -340,6 +340,9 @@
/**
* Fuel door open
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -375,6 +378,9 @@
/**
* EV charge port open
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -407,6 +413,10 @@
* all energy sources in a vehicle. For example, a hybrid car's range will
* be the sum of the ranges based on fuel and battery.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE because a navigation app could
+ * update the range if it has a more accurate estimate based on the upcoming route. However,
+ * this property can be implemented as VehiclePropertyAccess.READ only at the OEM's discretion.
+ *
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ_WRITE
* @unit VehicleUnit:METER
@@ -461,6 +471,9 @@
* If true, the vehicle may automatically shut off the engine when it is not needed and then
* automatically restart it when needed.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -540,6 +553,9 @@
* regenerated from braking. The minInt32Value in default area's VehicleAreaConfig indicates no
* regenerative braking.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -625,6 +641,9 @@
*
* The EvStoppingMode enum may be extended to include more states in the future.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum EvStoppingMode
@@ -679,6 +698,9 @@
*
* Fan speed setting
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -687,6 +709,9 @@
/**
* Fan direction setting
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleHvacFanDirection
@@ -723,6 +748,9 @@
* that property to get the suggested value before setting HVAC_TEMPERATURE_SET. Otherwise,
* the application may choose the value in HVAC_TEMPERATURE_SET configArray by itself.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @unit VehicleUnit:CELSIUS
@@ -732,6 +760,9 @@
/**
* Fan-based defrost for designated window.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -740,6 +771,9 @@
/**
* On/off AC for designated areaId
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @config_flags Supported areaIds
@@ -754,6 +788,9 @@
* Any parameters modified as a side effect of turning on/off the MAX AC
* parameter shall generate onPropertyEvent() callbacks to the VHAL.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -773,6 +810,9 @@
* areaConfig.areaId = {ROW_1_LEFT | ROW_1_RIGHT} indicates HVAC_MAX_DEFROST_ON
* only can be controlled for the front rows.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -786,6 +826,9 @@
* Recirc “off” means the majority of the airflow into the cabin is coming
* from outside the car.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -821,6 +864,9 @@
* onPropertyEvent() callbacks (i.e. HVAC_DUAL_ON = false,
* HVAC_TEMPERATURE_SET[AreaID] = xxx, etc).
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -829,6 +875,9 @@
/**
* On/off automatic mode
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -845,6 +894,9 @@
* min/max range defines the allowable range and number of steps in each
* direction.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -857,6 +909,9 @@
* The Max value in the config data represents the highest heating level.
* The Min value in the config data MUST be zero and indicates no heating.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -871,6 +926,9 @@
* Negative value indicates cooling.
* 0 indicates temperature control is off.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -889,6 +947,12 @@
* Values must be one of VehicleUnit::CELSIUS or VehicleUnit::FAHRENHEIT
* Note that internally, all temperatures are represented in floating point Celsius.
*
+ * If updating HVAC_TEMPERATURE_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS
+ * properties, then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleUnit
@@ -940,6 +1004,9 @@
* - ROW_1_LEFT | ROW_1_RIGHT
* - ROW_2_LEFT | ROW_2_CENTER | ROW_2_RIGHT | ROW_3_LEFT | ROW_3_CENTER | ROW_3_RIGHT
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -971,6 +1038,9 @@
* switch to recirculation mode if the vehicle detects poor incoming air
* quality.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -986,6 +1056,9 @@
* ventilation. This is different than seating cooling. It can be on at the
* same time as cooling, or not.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -994,6 +1067,9 @@
/**
* Electric defrosters' status
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1050,6 +1126,13 @@
* For example: configArray[0] = METER
* configArray[1] = KILOMETER
* configArray[2] = MILE
+ *
+ * If updating DISTANCE_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties,
+ * then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleUnit
@@ -1066,6 +1149,13 @@
* Volume units are defined in VehicleUnit.
* For example: configArray[0] = LITER
* configArray[1] = GALLON
+ *
+ * If updating FUEL_VOLUME_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties,
+ * then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleUnit
@@ -1083,6 +1173,13 @@
* For example: configArray[0] = KILOPASCAL
* configArray[1] = PSI
* configArray[2] = BAR
+ *
+ * If updating TIRE_PRESSURE_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS
+ * properties, then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleUnit
@@ -1100,6 +1197,13 @@
* For example: configArray[0] = WATT_HOUR
* configArray[1] = AMPERE_HOURS
* configArray[2] = KILOWATT_HOUR
+ *
+ * If updating EV_BATTERY_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS properties,
+ * then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleUnit
@@ -1113,6 +1217,9 @@
* True indicates units are distance over volume such as MPG.
* False indicates units are volume over distance such as L/100KM.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1128,6 +1235,13 @@
* For example: configArray[0] = METER_PER_SEC
* configArray[1] = MILES_PER_HOUR
* configArray[2] = KILOMETERS_PER_HOUR
+ *
+ * If updating VEHICLE_SPEED_DISPLAY_UNITS affects the values of other *_DISPLAY_UNITS
+ * properties, then their values must be updated and communicated to the AAOS framework as well.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1255,7 +1369,6 @@
*
* int32Values[0] : VehicleApPowerStateReport enum value
* int32Values[1] : Time in ms to wake up, if necessary. Otherwise 0.
-
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -1464,9 +1577,12 @@
* This is an integer in case a door may be set to a particular position.
* Max value indicates fully open, min value (0) indicates fully closed.
*
- * Some vehicles (minivans) can open the door electronically. Hence, the
+ * Some vehicles (minivans) can open the door electronically. Hence, the
* ability to write this property.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1475,6 +1591,9 @@
/**
* Door move
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1485,6 +1604,9 @@
*
* 'true' indicates door is locked
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1497,6 +1619,9 @@
*
* If enabled, the door is unable to be opened from the inside.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1507,6 +1632,9 @@
*
* Positive value indicates tilt upwards, negative value is downwards
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1517,6 +1645,9 @@
*
* Positive value indicates tilt upwards, negative value is downwards
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1527,6 +1658,9 @@
*
* Positive value indicate tilt right, negative value is left
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1537,6 +1671,9 @@
*
* Positive value indicate tilt right, negative value is left
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1547,6 +1684,9 @@
*
* True indicates mirror positions are locked and not changeable
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1557,6 +1697,9 @@
*
* True indicates mirrors are folded
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1570,6 +1713,9 @@
* (for example, when the mirrors fold inward automatically when one exits and locks the
* vehicle) is enabled.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1584,6 +1730,9 @@
* (for example, when the mirrors tilt downward automatically when one reverses the vehicle) is
* enabled.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1596,11 +1745,11 @@
*
* This parameter selects the memory preset to use to select the seat
* position. The minValue is always 0, and the maxValue determines the
- * number of seat positions available.
+ * number of seat preset memory slots available (i.e. numSeatPresets - 1).
*
* For instance, if the driver's seat has 3 memory presets, the maxValue
- * will be 3. When the user wants to select a preset, the desired preset
- * number (1, 2, or 3) is set.
+ * will be 2. When the user wants to select a preset, the desired preset
+ * number (0, 1, or 2) is set.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.WRITE
@@ -1627,6 +1776,9 @@
* Write access indicates automatic seat buckling capabilities. There are
* no known cars at this time, but you never know...
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1639,6 +1791,9 @@
* Max value indicates highest position
* Min value indicates lowest position
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1647,6 +1802,9 @@
/**
* Seatbelt height move
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1659,6 +1817,9 @@
* Max value indicates closest to wheel, min value indicates most rearward
* position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1669,6 +1830,9 @@
*
* Moves the seat position forward and aft.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1681,6 +1845,9 @@
* Max value indicates angling forward towards the steering wheel.
* Min value indicates full recline.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1691,6 +1858,9 @@
*
* Moves the backrest forward or recline.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1703,6 +1873,9 @@
* Max value indicates angling forward towards the steering wheel.
* Min value indicates full recline.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1713,6 +1886,9 @@
*
* Moves the backrest forward or recline.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1725,6 +1901,9 @@
* Max value indicates highest position.
* Min value indicates lowest position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1735,6 +1914,9 @@
*
* Moves the seat height.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1747,6 +1929,9 @@
* Max value indicates longest depth position.
* Min value indicates shortest position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1757,6 +1942,9 @@
*
* Adjusts the seat depth.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1769,6 +1957,9 @@
* Max value indicates front edge of seat higher than back edge.
* Min value indicates front edge of seat lower than back edge.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1779,6 +1970,9 @@
*
* Tilts the seat.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1791,6 +1985,9 @@
* Max value indicates most forward position.
* Min value indicates most rearward position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1801,6 +1998,9 @@
*
* Adjusts the lumbar support.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1813,6 +2013,9 @@
* Max value indicates widest lumbar setting (i.e. least support)
* Min value indicates thinnest lumbar setting.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1823,6 +2026,9 @@
*
* Adjusts the amount of lateral lumbar support.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1839,6 +2045,9 @@
* Max value indicates tallest setting.
* Min value indicates shortest setting.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1857,6 +2066,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1868,6 +2080,9 @@
*
* Moves the headrest up and down.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1880,6 +2095,9 @@
* Max value indicates most upright angle.
* Min value indicates shallowest headrest angle.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1890,6 +2108,9 @@
*
* Adjusts the angle of the headrest
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1902,6 +2123,9 @@
* Max value indicates position closest to front of car.
* Min value indicates position closest to rear of car.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1910,6 +2134,9 @@
/**
* Headrest fore/aft move
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1951,6 +2178,9 @@
* For each supported area ID, the VehicleAreaConfig#supportedEnumValues must be defined unless
* all enum values of VehicleLightSwitch are supported.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -1964,6 +2194,9 @@
* exit the vehicle. Each area ID must map to the seat that the user is trying to enter/exit
* with the help of the easy access feature.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1980,6 +2213,9 @@
* This property can be set to VehiclePropertyAccess.READ read only for the sake of regulation
* or safety concerns.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -1996,6 +2232,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2015,6 +2254,9 @@
* Larger absolute values, either positive or negative, indicate a faster movement speed. Once
* the seat cushion side support reaches the positional limit, the value resets to 0.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2031,6 +2273,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2052,6 +2297,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2073,6 +2321,9 @@
* The area ID must match the seat that actually moves when the walk-in feature activates, not
* the intended seat the passengers will sit in.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2104,6 +2355,9 @@
*
* Note that in this mode, 0 indicates the window is closed.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2132,6 +2386,9 @@
* Max = open the sunroof, automatically stop when sunroof is fully open.
* Min = open the vent, automatically stop when vent is fully open.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2142,6 +2399,9 @@
*
* True indicates windows are locked and can't be moved.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2199,12 +2459,12 @@
* unless all states in WindshieldWipersSwitch are supported (including OTHER, which is not
* recommended).
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
- * If this property is implemented as read_write and the OTHER state is listed in the
- * VehicleAreaConfig#supportedEnumValues array, then OTHER is not a supported value for writing.
- * It is only a supported value for reading.
+ * If this property is implemented as VehiclePropertyAccess.READ_WRITE and the OTHER state is
+ * listed in the VehicleAreaConfig#supportedEnumValues array, then OTHER is not a supported
+ * value for writing. It is only a supported value for reading.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -2227,6 +2487,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2246,6 +2509,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2263,6 +2529,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2281,6 +2550,9 @@
*
* This value is not in any particular unit but in a specified range of steps.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2292,6 +2564,9 @@
* If true, the steering wheel will lock automatically to prevent theft in certain
* situations.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2302,6 +2577,9 @@
*
* If true, the steering wheel's position is locked and not changeable.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2313,6 +2591,9 @@
* If true, the driver’s steering wheel will automatically adjust to make it easier for the
* driver to enter and exit the vehicle.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2335,6 +2616,9 @@
* front right dashboard has a glove box embedded in it, then the area ID should be
* SEAT_1_RIGHT).
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2350,6 +2634,9 @@
* front right dashboard has a glove box embedded in it, then the area ID should be
* VehicleAreaSeat#ROW_1_RIGHT).
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -2381,7 +2668,12 @@
* when computing the vehicle's location that is shared with Android through the GNSS HAL.
*
* The value must return a collection of bit flags. The bit flags are defined in
- * LocationCharacterization.
+ * LocationCharacterization. The value must also include exactly one of DEAD_RECKONED or
+ * RAW_GNSS_ONLY among its collection of bit flags.
+ *
+ * When this property is not supported, it is assumed that no additional sensor inputs are fused
+ * into the GNSS updates provided through the GNSS HAL. That is unless otherwise specified
+ * through the GNSS HAL interfaces.
*
* @change_mode VehiclePropertyChangeMode.STATIC
* @access VehiclePropertyAccess.READ
@@ -2561,6 +2853,9 @@
*
* The setting that the user wants.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2572,6 +2867,9 @@
*
* The setting that the user wants.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2599,6 +2897,9 @@
* Only one of FOG_LIGHTS_SWITCH or REAR_FOG_LIGHTS_SWITCH must be implemented and not both.
* FRONT_FOG_LIGHTS_SWITCH must not be implemented.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2610,6 +2911,9 @@
*
* The setting that the user wants.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2635,6 +2939,9 @@
* is open or because of a voice command.
* For example, while the switch is in the "off" or "automatic" position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2660,6 +2967,9 @@
* is open or because of a voice command.
* For example, while the switch is in the "off" or "automatic" position.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -2702,6 +3012,9 @@
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless
* all enum values of VehicleLightSwitch are supported.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -3368,6 +3681,9 @@
* Only one of FOG_LIGHTS_SWITCH or FRONT_FOG_LIGHTS_SWITCH must be implemented. Please refer to
* the documentation on FOG_LIGHTS_SWITCH for more information.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -3396,6 +3712,9 @@
* Only one of FOG_LIGHTS_SWITCH or REAR_FOG_LIGHTS_SWITCH must be implemented. Please refer to
* the documentation on FOG_LIGHTS_SWITCH for more information.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum VehicleLightSwitch
@@ -3409,6 +3728,9 @@
* configArray[0] is used to specify the max current draw allowed by
* the vehicle in Amperes.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @unit VehicleUnit:AMPERE
@@ -3427,6 +3749,9 @@
* then the configArray should be {20, 40, 60, 80, 100}
* If the configArray is empty then all values from 0 to 100 must be valid.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -3451,6 +3776,9 @@
* The setting that the user wants. Setting this property to true starts the battery charging
* and setting to false stops charging.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
*/
@@ -3643,8 +3971,8 @@
* low, that information must be conveyed through the ErrorState values in the
* AUTOMATIC_EMERGENCY_BRAKING_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3685,8 +4013,8 @@
* low, that information must be conveyed through the ErrorState values in the
* FORWARD_COLLISION_WARNING_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3724,8 +4052,8 @@
* information must be conveyed through the ErrorState values in the BLIND_SPOT_WARNING_STATE
* property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3764,8 +4092,8 @@
* high, that information must be conveyed through the ErrorState values in the
* LANE_DEPARTURE_WARNING_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3808,8 +4136,8 @@
* high, that information must be conveyed through the ErrorState values in the
* LANE_KEEP_ASSIST_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3856,8 +4184,8 @@
* high, that information must be conveyed through the ErrorState values in the
* LANE_CENTERING_ASSIST_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3924,8 +4252,8 @@
* low, that information must be conveyed through the ErrorState values in the
* EMERGENCY_LANE_KEEP_ASSIST_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3967,8 +4295,8 @@
* information must be conveyed through the ErrorState values in the CRUISE_CONTROL_STATE
* property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -3992,6 +4320,9 @@
* Trying to write CruiseControlType#OTHER or an ErrorState to this property will throw an
* IllegalArgumentException.
*
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
+ *
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
* @data_enum CruiseControlType
@@ -4027,7 +4358,10 @@
*
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
* unless all states of CruiseControlState are supported. Any unsupported commands sent through
- * this property should return StatusCode.INVALID_ARG.
+ * this property must return StatusCode#INVALID_ARG.
+ *
+ * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
+ * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.WRITE
@@ -4045,8 +4379,8 @@
* The maxFloatValue represents the upper bound of the target speed.
* The minFloatValue represents the lower bound of the target speed.
*
- * When this property is not available (for example when CRUISE_CONTROL_ENABLED is false), it
- * should return StatusCode.NOT_AVAILABLE_DISABLED.
+ * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
+ * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ
@@ -4068,7 +4402,11 @@
* ascending order. All values must be positive. If the property is writable, all values must be
* writable.
*
- * Writing to this property when it is not available should return StatusCode.NOT_AVAILABLE.
+ * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
+ * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+ *
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -4092,6 +4430,9 @@
* vehicle is too far away for the sensor to detect), this property should return
* StatusCode.NOT_AVAILABLE.
*
+ * When this property is not available because CC is disabled (i.e. CRUISE_CONTROL_ENABLED is
+ * false), this property must return StatusCode#NOT_AVAILABLE_DISABLED.
+ *
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ
* @unit VehicleUnit:MILLIMETER
@@ -4110,8 +4451,8 @@
* not available due to some temporary state, that information must be conveyed through the
* ErrorState values in the HANDS_ON_DETECTION_STATE property.
*
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
+ * This property is defined as VehiclePropertyAccess.READ_WRITE, but OEMs have the option to
+ * implement it as VehiclePropertyAccess.READ only.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.READ_WRITE
@@ -4165,72 +4506,6 @@
HANDS_ON_DETECTION_WARNING =
0x1018 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
- /**
- * Enable or disable driver attention monitoring.
- *
- * Set true to enable driver attention monitoring and false to disable driver attention
- * monitoring. When driver attention monitoring is enabled, a system inside the vehicle should
- * be monitoring the attention level of the driver and should send a warning if it detects that
- * the driver is distracted.
- *
- * In general, DRIVER_ATTENTION_MONITORING_ENABLED should always return true or false. If the
- * feature is not available due to some temporary state, that information must be conveyed
- * through the ErrorState values in the DRIVER_ATTENTION_MONITORING_STATE property.
- *
- * This property is defined as read_write, but OEMs have the option to implement it as read
- * only.
- *
- * @change_mode VehiclePropertyChangeMode.ON_CHANGE
- * @access VehiclePropertyAccess.READ_WRITE
- */
- DRIVER_ATTENTION_MONITORING_ENABLED =
- 0x1019 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
-
- /**
- * Driver attention monitoring state.
- *
- * Returns whether the driver is currently attentive or distracted. Generally, this property
- * should return a valid state defined in the DriverAttentionMonitoringState or ErrorState. For
- * example, if the feature is not available due to some temporary state, that information should
- * be conveyed through an ErrorState.
- *
- * If the vehicle wants to send a warning to the user because the driver has been distracted for
- * too long, the warning should be surfaced through DRIVER_ATTENTION_MONITORING_WARNING.
- *
- * The VehicleAreaConfig#configArray array must define all states from
- * DriverAttentionMonitoringState (including OTHER, which is not recommended) and ErrorState
- * that are supported.
- *
- * @change_mode VehiclePropertyChangeMode.ON_CHANGE
- * @access VehiclePropertyAccess.READ
- * @data_enum DriverAttentionMonitoringState
- * @data_enum ErrorState
- */
- DRIVER_ATTENTION_MONITORING_STATE =
- 0x101A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
-
- /**
- * Driver attention monitoring warning.
- *
- * Returns whether a warning is being sent to the driver for being distracted for too long a
- * duration.
- *
- * Generally, this property should return a valid state defined in the
- * DriverAttentionMonitoringWarning or ErrorState. For example, if the feature is not available
- * due to some temporary state, that information should be conveyed through an ErrorState.
- *
- * For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
- * unless all states of both DriverAttentionMonitoringWarning (including OTHER, which is not
- * recommended) and ErrorState are supported.
- *
- * @change_mode VehiclePropertyChangeMode.ON_CHANGE
- * @access VehiclePropertyAccess.READ
- * @data_enum DriverAttentionMonitoringWarning
- * @data_enum ErrorState
- */
- DRIVER_ATTENTION_MONITORING_WARNING =
- 0x101B + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
-
/***************************************************************************
* End of ADAS Properties
**************************************************************************/
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehiclePropertyType.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehiclePropertyType.aidl
index 62d26de..7a68b4a 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehiclePropertyType.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehiclePropertyType.aidl
@@ -25,6 +25,10 @@
@Backing(type="int")
enum VehiclePropertyType {
STRING = 0x00100000,
+ /**
+ * Boolean values should be specified through the int32Values in RawPropValues.
+ * int32Value = {0} represents false and int32Value = {1} represents true.
+ */
BOOLEAN = 0x00200000,
INT32 = 0x00400000,
INT32_VEC = 0x00410000,
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index 90fc727..8bcad1e 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -601,24 +601,6 @@
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
}
-TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringEnabledConfig) {
- verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_ENABLED,
- VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
- VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
-}
-
-TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringStateConfig) {
- verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_STATE, VehiclePropertyAccess::READ,
- VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
- VehicleArea::GLOBAL, VehiclePropertyType::INT32);
-}
-
-TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyDriverAttentionMonitoringWarningConfig) {
- verifyProperty(VehicleProperty::DRIVER_ATTENTION_MONITORING_WARNING,
- VehiclePropertyAccess::READ, VehiclePropertyChangeMode::ON_CHANGE,
- VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::INT32);
-}
-
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyEvBrakeRegenerationLevelConfig) {
verifyProperty(VehicleProperty::EV_BRAKE_REGENERATION_LEVEL,
VehiclePropertyAccess::READ_WRITE, VehiclePropertyChangeMode::ON_CHANGE,
diff --git a/bluetooth/1.0/default/test/fuzzer/Android.bp b/bluetooth/1.0/default/test/fuzzer/Android.bp
index 691136f..de2b46d 100644
--- a/bluetooth/1.0/default/test/fuzzer/Android.bp
+++ b/bluetooth/1.0/default/test/fuzzer/Android.bp
@@ -60,5 +60,13 @@
"android-media-fuzzing-reports@google.com",
],
componentid: 533764,
+ hotlists: [
+ "4593311",
+ ],
+ description: "The fuzzer targets the APIs of android.hardware.bluetooth@1.0-impl library",
+ vector: "local_no_privileges_required",
+ service_privilege: "privileged",
+ users: "multi_user",
+ fuzzed_code_usage: "shipped",
},
}
diff --git a/bluetooth/aidl/TEST_MAPPING b/bluetooth/aidl/TEST_MAPPING
index 342a1e4..f059c04 100644
--- a/bluetooth/aidl/TEST_MAPPING
+++ b/bluetooth/aidl/TEST_MAPPING
@@ -1,7 +1,13 @@
{
"presubmit" : [
{
- "name" : "VtsHalBluetoothTargetTest"
+ "name" : "VtsHalBluetoothTargetTest",
+ "options": [
+ {
+ // TODO(b/275847929)
+ "exclude-filter": "VtsHalBluetoothTargetTest.PerInstance/BluetoothAidlTest#Cdd_C_12_1_Bluetooth5Requirements/0_android_hardware_bluetooth_IBluetoothHci_default"
+ }
+ ]
}
]
}
diff --git a/bluetooth/aidl/vts/Android.bp b/bluetooth/aidl/vts/Android.bp
index 414f707..5fc0b2e 100644
--- a/bluetooth/aidl/vts/Android.bp
+++ b/bluetooth/aidl/vts/Android.bp
@@ -13,7 +13,17 @@
"VtsHalTargetTestDefaults",
"use_libaidlvintf_gtest_helper_static",
],
- srcs: ["VtsHalBluetoothTargetTest.cpp"],
+ srcs: [
+ "VtsHalBluetoothTargetTest.cpp",
+ ":BluetoothPacketSources",
+ ":BluetoothHciPacketSources",
+ ],
+ generated_headers: [
+ "BluetoothGeneratedPackets_h",
+ ],
+ include_dirs: [
+ "packages/modules/Bluetooth/system/gd",
+ ],
shared_libs: [
"libbase",
"libbinder_ndk",
@@ -45,4 +55,8 @@
tidy_flags: [
"--header-filter=^.*tools\\/rootcanal\\/(model|include|net|desktop)\\/(.(?!\\.pb\\.h))*$",
],
+ tidy_disabled_srcs: [
+ ":BluetoothPacketSources",
+ ":BluetoothHciPacketSources",
+ ],
}
diff --git a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
index 3704c3d..529e092 100644
--- a/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
+++ b/bluetooth/aidl/vts/VtsHalBluetoothTargetTest.cpp
@@ -24,27 +24,50 @@
#include <android/binder_manager.h>
#include <android/binder_process.h>
#include <binder/IServiceManager.h>
-#include <binder/ProcessState.h>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <future>
-#include <mutex>
#include <queue>
#include <thread>
+#include <utility>
#include <vector>
+// TODO: Remove custom logging defines from PDL packets.
+#undef LOG_INFO
+#undef LOG_DEBUG
+#undef LOG_TAG
+#define LOG_TAG "VtsHalBluetooth"
+#include "hci/hci_packets.h"
+#include "packet/raw_builder.h"
+
using aidl::android::hardware::bluetooth::IBluetoothHci;
using aidl::android::hardware::bluetooth::IBluetoothHciCallbacks;
using aidl::android::hardware::bluetooth::Status;
using ndk::ScopedAStatus;
using ndk::SpAIBinder;
-// Bluetooth Core Specification 3.0 + HS
-static constexpr uint8_t kHciMinimumHciVersion = 5;
-// Bluetooth Core Specification 3.0 + HS
-static constexpr uint8_t kHciMinimumLmpVersion = 5;
+using ::bluetooth::hci::CommandBuilder;
+using ::bluetooth::hci::CommandCompleteView;
+using ::bluetooth::hci::CommandView;
+using ::bluetooth::hci::ErrorCode;
+using ::bluetooth::hci::EventView;
+using ::bluetooth::hci::LeReadLocalSupportedFeaturesBuilder;
+using ::bluetooth::hci::LeReadLocalSupportedFeaturesCompleteView;
+using ::bluetooth::hci::LeReadNumberOfSupportedAdvertisingSetsBuilder;
+using ::bluetooth::hci::LeReadNumberOfSupportedAdvertisingSetsCompleteView;
+using ::bluetooth::hci::LeReadResolvingListSizeBuilder;
+using ::bluetooth::hci::LeReadResolvingListSizeCompleteView;
+using ::bluetooth::hci::LLFeaturesBits;
+using ::bluetooth::hci::OpCode;
+using ::bluetooth::hci::OpCodeText;
+using ::bluetooth::hci::PacketView;
+using ::bluetooth::hci::ReadLocalVersionInformationBuilder;
+using ::bluetooth::hci::ReadLocalVersionInformationCompleteView;
+
+static constexpr uint8_t kMinLeAdvSetForBt5 = 16;
+static constexpr uint8_t kMinLeResolvingListForBt5 = 8;
static constexpr size_t kNumHciCommandsBandwidth = 100;
static constexpr size_t kNumScoPacketsBandwidth = 100;
@@ -55,65 +78,14 @@
static constexpr std::chrono::milliseconds kWaitForAclDataTimeout(1000);
static constexpr std::chrono::milliseconds kInterfaceCloseDelayMs(200);
-static constexpr uint8_t kCommandHciShouldBeUnknown[] = {
- 0xff, 0x3B, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
-static constexpr uint8_t kCommandHciReadLocalVersionInformation[] = {0x01, 0x10,
- 0x00};
-static constexpr uint8_t kCommandHciReadBufferSize[] = {0x05, 0x10, 0x00};
-static constexpr uint8_t kCommandHciWriteLoopbackModeLocal[] = {0x02, 0x18,
- 0x01, 0x01};
-static constexpr uint8_t kCommandHciReset[] = {0x03, 0x0c, 0x00};
-static constexpr uint8_t kCommandHciSynchronousFlowControlEnable[] = {
- 0x2f, 0x0c, 0x01, 0x01};
-static constexpr uint8_t kCommandHciWriteLocalName[] = {0x13, 0x0c, 0xf8};
-static constexpr uint8_t kHciStatusSuccess = 0x00;
-static constexpr uint8_t kHciStatusUnknownHciCommand = 0x01;
-
-static constexpr uint8_t kEventConnectionComplete = 0x03;
-static constexpr uint8_t kEventCommandComplete = 0x0e;
-static constexpr uint8_t kEventCommandStatus = 0x0f;
-static constexpr uint8_t kEventNumberOfCompletedPackets = 0x13;
-static constexpr uint8_t kEventLoopbackCommand = 0x19;
-
-static constexpr size_t kEventCodeByte = 0;
-static constexpr size_t kEventLengthByte = 1;
-static constexpr size_t kEventFirstPayloadByte = 2;
-static constexpr size_t kEventCommandStatusStatusByte = 2;
-static constexpr size_t kEventCommandStatusOpcodeLsByte = 4; // Bytes 4 and 5
-static constexpr size_t kEventCommandCompleteOpcodeLsByte = 3; // Bytes 3 and 4
-static constexpr size_t kEventCommandCompleteStatusByte = 5;
-static constexpr size_t kEventCommandCompleteFirstParamByte = 6;
-static constexpr size_t kEventLocalHciVersionByte =
- kEventCommandCompleteFirstParamByte;
-static constexpr size_t kEventLocalLmpVersionByte =
- kEventLocalHciVersionByte + 3;
-
-static constexpr size_t kEventConnectionCompleteParamLength = 11;
-static constexpr size_t kEventConnectionCompleteType = 11;
-static constexpr size_t kEventConnectionCompleteTypeSco = 0;
-static constexpr size_t kEventConnectionCompleteTypeAcl = 1;
-static constexpr size_t kEventConnectionCompleteHandleLsByte = 3;
-
-static constexpr size_t kEventNumberOfCompletedPacketsNumHandles = 2;
-
-static constexpr size_t kAclBroadcastFlagOffset = 6;
-static constexpr uint8_t kAclBroadcastFlagPointToPoint = 0x0;
-static constexpr uint8_t kAclBroadcastPointToPoint =
- (kAclBroadcastFlagPointToPoint << kAclBroadcastFlagOffset);
-
-static constexpr uint8_t kAclPacketBoundaryFlagOffset = 4;
-static constexpr uint8_t kAclPacketBoundaryFlagFirstAutoFlushable = 0x2;
-static constexpr uint8_t kAclPacketBoundaryFirstAutoFlushable =
- kAclPacketBoundaryFlagFirstAutoFlushable << kAclPacketBoundaryFlagOffset;
-
// To discard Qualcomm ACL debugging
static constexpr uint16_t kAclHandleQcaDebugMessage = 0xedc;
class ThroughputLogger {
public:
- ThroughputLogger(std::string task)
+ explicit ThroughputLogger(std::string task)
: total_bytes_(0),
- task_(task),
+ task_(std::move(task)),
start_time_(std::chrono::steady_clock::now()) {}
~ThroughputLogger() {
@@ -142,7 +114,7 @@
// The main test class for Bluetooth HAL.
class BluetoothAidlTest : public ::testing::TestWithParam<std::string> {
public:
- virtual void SetUp() override {
+ void SetUp() override {
// currently test passthrough mode only
hci = IBluetoothHci::fromBinder(
SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
@@ -158,7 +130,7 @@
ASSERT_NE(bluetooth_hci_death_recipient, nullptr);
ASSERT_EQ(STATUS_OK,
AIBinder_linkToDeath(hci->asBinder().get(),
- bluetooth_hci_death_recipient, 0));
+ bluetooth_hci_death_recipient, nullptr));
hci_cb = ndk::SharedRefBase::make<BluetoothHciCallbacks>(*this);
ASSERT_NE(hci_cb, nullptr);
@@ -179,7 +151,7 @@
ASSERT_TRUE(future.get());
}
- virtual void TearDown() override {
+ void TearDown() override {
ALOGI("TearDown");
// Should not be checked in production code
ASSERT_TRUE(hci->close().isOk());
@@ -205,8 +177,14 @@
void handle_no_ops();
void discard_qca_debugging();
void wait_for_event(bool timeout_is_error);
- void wait_for_command_complete_event(std::vector<uint8_t> cmd);
+ void wait_for_command_complete_event(OpCode opCode,
+ std::vector<uint8_t>& complete_event);
+ // Wait until a command complete is received.
+ // Command complete will be consumed after this method
+ void wait_and_validate_command_complete_event(OpCode opCode);
int wait_for_completed_packets_event(uint16_t handle);
+ void send_and_wait_for_cmd_complete(std::unique_ptr<CommandBuilder> cmd,
+ std::vector<uint8_t>& cmd_complete);
// A simple test implementation of BluetoothHciCallbacks.
class BluetoothHciCallbacks
@@ -214,36 +192,41 @@
BluetoothAidlTest& parent_;
public:
- BluetoothHciCallbacks(BluetoothAidlTest& parent) : parent_(parent){};
+ explicit BluetoothHciCallbacks(BluetoothAidlTest& parent)
+ : parent_(parent){};
- virtual ~BluetoothHciCallbacks() = default;
+ ~BluetoothHciCallbacks() override = default;
- ndk::ScopedAStatus initializationComplete(Status status) {
+ ndk::ScopedAStatus initializationComplete(Status status) override {
parent_.initialized_promise.set_value(status == Status::SUCCESS);
ALOGV("%s (status = %d)", __func__, static_cast<int>(status));
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus hciEventReceived(const std::vector<uint8_t>& event) {
+ ndk::ScopedAStatus hciEventReceived(
+ const std::vector<uint8_t>& event) override {
parent_.event_cb_count++;
parent_.event_queue.push(event);
- ALOGV("Event received (length = %d)", static_cast<int>(event.size()));
+ ALOGI("Event received (length = %d)", static_cast<int>(event.size()));
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus aclDataReceived(const std::vector<uint8_t>& data) {
+ ndk::ScopedAStatus aclDataReceived(
+ const std::vector<uint8_t>& data) override {
parent_.acl_cb_count++;
parent_.acl_queue.push(data);
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus scoDataReceived(const std::vector<uint8_t>& data) {
+ ndk::ScopedAStatus scoDataReceived(
+ const std::vector<uint8_t>& data) override {
parent_.sco_cb_count++;
parent_.sco_queue.push(data);
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus isoDataReceived(const std::vector<uint8_t>& data) {
+ ndk::ScopedAStatus isoDataReceived(
+ const std::vector<uint8_t>& data) override {
parent_.iso_cb_count++;
parent_.iso_queue.push(data);
return ScopedAStatus::ok();
@@ -253,7 +236,8 @@
template <class T>
class WaitQueue {
public:
- WaitQueue(){};
+ WaitQueue() = default;
+ ;
virtual ~WaitQueue() = default;
@@ -283,6 +267,14 @@
return true;
};
+ void pop() {
+ std::lock_guard<std::mutex> lock(m_);
+ if (q_.empty()) {
+ return;
+ }
+ q_.pop();
+ };
+
bool front(T& v) {
std::lock_guard<std::mutex> lock(m_);
if (q_.empty()) {
@@ -329,22 +321,22 @@
std::shared_ptr<IBluetoothHci> hci;
std::shared_ptr<BluetoothHciCallbacks> hci_cb;
- AIBinder_DeathRecipient* bluetooth_hci_death_recipient;
+ AIBinder_DeathRecipient* bluetooth_hci_death_recipient{};
WaitQueue<std::vector<uint8_t>> event_queue;
WaitQueue<std::vector<uint8_t>> acl_queue;
WaitQueue<std::vector<uint8_t>> sco_queue;
WaitQueue<std::vector<uint8_t>> iso_queue;
std::promise<bool> initialized_promise;
- int event_cb_count;
- int sco_cb_count;
- int acl_cb_count;
- int iso_cb_count;
+ int event_cb_count{};
+ int sco_cb_count{};
+ int acl_cb_count{};
+ int iso_cb_count{};
- int max_acl_data_packet_length;
- int max_sco_data_packet_length;
- int max_acl_data_packets;
- int max_sco_data_packets;
+ int max_acl_data_packet_length{};
+ int max_sco_data_packet_length{};
+ int max_acl_data_packets{};
+ int max_sco_data_packets{};
std::vector<uint16_t> sco_connection_handles;
std::vector<uint16_t> acl_connection_handles;
@@ -355,17 +347,20 @@
while (!event_queue.empty()) {
std::vector<uint8_t> event;
event_queue.front(event);
- ASSERT_GE(event.size(),
- static_cast<size_t>(kEventCommandCompleteStatusByte));
- bool event_is_no_op =
- (event[kEventCodeByte] == kEventCommandComplete) &&
- (event[kEventCommandCompleteOpcodeLsByte] == 0x00) &&
- (event[kEventCommandCompleteOpcodeLsByte + 1] == 0x00);
- event_is_no_op |= (event[kEventCodeByte] == kEventCommandStatus) &&
- (event[kEventCommandStatusOpcodeLsByte] == 0x00) &&
- (event[kEventCommandStatusOpcodeLsByte + 1] == 0x00);
- if (event_is_no_op) {
- event_queue.pop(event);
+ auto complete_view = ::bluetooth::hci::CommandCompleteView::Create(
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event))));
+ auto status_view = ::bluetooth::hci::CommandCompleteView::Create(
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event))));
+ bool is_complete_no_op =
+ complete_view.IsValid() &&
+ complete_view.GetCommandOpCode() == ::bluetooth::hci::OpCode::NONE;
+ bool is_status_no_op =
+ status_view.IsValid() &&
+ status_view.GetCommandOpCode() == ::bluetooth::hci::OpCode::NONE;
+ if (is_complete_no_op || is_status_no_op) {
+ event_queue.pop();
} else {
break;
}
@@ -377,12 +372,12 @@
while (!acl_queue.empty()) {
std::vector<uint8_t> acl_packet;
acl_queue.front(acl_packet);
- uint16_t connection_handle = acl_packet[1] & 0xF;
- connection_handle <<= 8;
- connection_handle |= acl_packet[0];
- bool packet_is_no_op = connection_handle == kAclHandleQcaDebugMessage;
- if (packet_is_no_op) {
- acl_queue.pop(acl_packet);
+ auto acl_view =
+ ::bluetooth::hci::AclView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(acl_packet)));
+ EXPECT_TRUE(acl_view.IsValid());
+ if (acl_view.GetHandle() == kAclHandleQcaDebugMessage) {
+ acl_queue.pop();
} else {
break;
}
@@ -407,48 +402,49 @@
}
}
-// Wait until a command complete is received.
void BluetoothAidlTest::wait_for_command_complete_event(
- std::vector<uint8_t> cmd) {
+ OpCode opCode, std::vector<uint8_t>& complete_event) {
ASSERT_NO_FATAL_FAILURE(wait_for_event());
- std::vector<uint8_t> event;
ASSERT_FALSE(event_queue.empty());
- ASSERT_TRUE(event_queue.pop(event));
+ ASSERT_TRUE(event_queue.pop(complete_event));
+ auto complete_view = ::bluetooth::hci::CommandCompleteView::Create(
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(complete_event))));
+ ASSERT_TRUE(complete_view.IsValid());
+ ASSERT_EQ(complete_view.GetCommandOpCode(), opCode);
+ ASSERT_EQ(complete_view.GetPayload()[0],
+ static_cast<uint8_t>(::bluetooth::hci::ErrorCode::SUCCESS));
+}
- ASSERT_GT(event.size(), static_cast<size_t>(kEventCommandCompleteStatusByte));
- ASSERT_EQ(kEventCommandComplete, event[kEventCodeByte]);
- ASSERT_EQ(cmd[0], event[kEventCommandCompleteOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandCompleteOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusSuccess, event[kEventCommandCompleteStatusByte]);
+void BluetoothAidlTest::wait_and_validate_command_complete_event(
+ ::bluetooth::hci::OpCode opCode) {
+ std::vector<uint8_t> complete_event;
+ ASSERT_NO_FATAL_FAILURE(
+ wait_for_command_complete_event(opCode, complete_event));
}
// Send the command to read the controller's buffer sizes.
void BluetoothAidlTest::setBufferSizes() {
- std::vector<uint8_t> cmd{
- kCommandHciReadBufferSize,
- kCommandHciReadBufferSize + sizeof(kCommandHciReadBufferSize)};
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ ::bluetooth::hci::ReadBufferSizeBuilder::Create()->Serialize(bi);
hci->sendHciCommand(cmd);
ASSERT_NO_FATAL_FAILURE(wait_for_event());
- if (event_queue.empty()) {
- return;
- }
std::vector<uint8_t> event;
ASSERT_TRUE(event_queue.pop(event));
+ auto complete_view = ::bluetooth::hci::ReadBufferSizeCompleteView::Create(
+ ::bluetooth::hci::CommandCompleteView::Create(
+ ::bluetooth::hci::EventView::Create(
+ ::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event)))));
- ASSERT_EQ(kEventCommandComplete, event[kEventCodeByte]);
- ASSERT_EQ(cmd[0], event[kEventCommandCompleteOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandCompleteOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusSuccess, event[kEventCommandCompleteStatusByte]);
-
- max_acl_data_packet_length =
- event[kEventCommandCompleteStatusByte + 1] +
- (event[kEventCommandCompleteStatusByte + 2] << 8);
- max_sco_data_packet_length = event[kEventCommandCompleteStatusByte + 3];
- max_acl_data_packets = event[kEventCommandCompleteStatusByte + 4] +
- (event[kEventCommandCompleteStatusByte + 5] << 8);
- max_sco_data_packets = event[kEventCommandCompleteStatusByte + 6] +
- (event[kEventCommandCompleteStatusByte + 7] << 8);
+ ASSERT_TRUE(complete_view.IsValid());
+ ASSERT_EQ(complete_view.GetStatus(), ::bluetooth::hci::ErrorCode::SUCCESS);
+ max_acl_data_packet_length = complete_view.GetAclDataPacketLength();
+ max_sco_data_packet_length = complete_view.GetSynchronousDataPacketLength();
+ max_acl_data_packets = complete_view.GetTotalNumAclDataPackets();
+ max_sco_data_packets = complete_view.GetTotalNumSynchronousDataPackets();
ALOGD("%s: ACL max %d num %d SCO max %d num %d", __func__,
static_cast<int>(max_acl_data_packet_length),
@@ -459,39 +455,39 @@
// Enable flow control packets for SCO
void BluetoothAidlTest::setSynchronousFlowControlEnable() {
- std::vector<uint8_t> cmd{kCommandHciSynchronousFlowControlEnable,
- kCommandHciSynchronousFlowControlEnable +
- sizeof(kCommandHciSynchronousFlowControlEnable)};
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ ::bluetooth::hci::WriteSynchronousFlowControlEnableBuilder::Create(
+ ::bluetooth::hci::Enable::ENABLED)
+ ->Serialize(bi);
hci->sendHciCommand(cmd);
- wait_for_command_complete_event(cmd);
+ wait_and_validate_command_complete_event(
+ ::bluetooth::hci::OpCode::WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE);
}
// Send an HCI command (in Loopback mode) and check the response.
void BluetoothAidlTest::sendAndCheckHci(int num_packets) {
- ThroughputLogger logger = {__func__};
- int command_size = 0;
+ ThroughputLogger logger{__func__};
+ size_t command_size = 0;
+ char new_name[] = "John Jacob Jingleheimer Schmidt ___________________";
+ size_t new_name_length = strlen(new_name);
for (int n = 0; n < num_packets; n++) {
- // Send an HCI packet
- std::vector<uint8_t> write_name{
- kCommandHciWriteLocalName,
- kCommandHciWriteLocalName + sizeof(kCommandHciWriteLocalName)};
- // With a name
- char new_name[] = "John Jacob Jingleheimer Schmidt ___________________0";
- size_t new_name_length = strlen(new_name);
+ // The name to set is new_name
+ std::array<uint8_t, 248> name_array{};
for (size_t i = 0; i < new_name_length; i++) {
- write_name.push_back(static_cast<uint8_t>(new_name[i]));
+ name_array[i] = new_name[i];
}
// And the packet number
- size_t i = new_name_length - 1;
- for (int digits = n; digits > 0; digits = digits / 10, i--) {
- write_name[i] = static_cast<uint8_t>('0' + digits % 10);
+ char number[11] = "0000000000";
+ snprintf(number, sizeof(number), "%010d", static_cast<int>(n));
+ for (size_t i = new_name_length; i < new_name_length + sizeof(number) - 1;
+ i++) {
+ name_array[new_name_length + i] = number[i];
}
- // And padding
- for (size_t i = 0; i < 248 - new_name_length; i++) {
- write_name.push_back(static_cast<uint8_t>(0));
- }
-
+ std::vector<uint8_t> write_name;
+ ::bluetooth::packet::BitInserter bi{write_name};
+ ::bluetooth::hci::WriteLocalNameBuilder::Create(name_array)->Serialize(bi);
hci->sendHciCommand(write_name);
// Check the loopback of the HCI packet
@@ -499,28 +495,17 @@
std::vector<uint8_t> event;
ASSERT_TRUE(event_queue.pop(event));
-
- size_t compare_length = (write_name.size() > static_cast<size_t>(0xff)
- ? static_cast<size_t>(0xff)
- : write_name.size());
- ASSERT_GT(event.size(), compare_length + kEventFirstPayloadByte - 1);
-
- ASSERT_EQ(kEventLoopbackCommand, event[kEventCodeByte]);
- ASSERT_EQ(compare_length, event[kEventLengthByte]);
-
- // Don't compare past the end of the event.
- if (compare_length + kEventFirstPayloadByte > event.size()) {
- compare_length = event.size() - kEventFirstPayloadByte;
- ALOGE("Only comparing %d bytes", static_cast<int>(compare_length));
- }
+ auto event_view = ::bluetooth::hci::LoopbackCommandView::Create(
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event))));
+ ASSERT_TRUE(event_view.IsValid());
+ std::vector<uint8_t> looped_back_command{event_view.GetPayload().begin(),
+ event_view.GetPayload().end()};
+ ASSERT_EQ(looped_back_command, write_name);
if (n == num_packets - 1) {
command_size = write_name.size();
}
-
- for (size_t i = 0; i < compare_length; i++) {
- ASSERT_EQ(write_name[i], event[kEventFirstPayloadByte + i]);
- }
}
logger.setTotalBytes(command_size * num_packets * 2);
}
@@ -528,16 +513,18 @@
// Send a SCO data packet (in Loopback mode) and check the response.
void BluetoothAidlTest::sendAndCheckSco(int num_packets, size_t size,
uint16_t handle) {
- ThroughputLogger logger = {__func__};
+ ThroughputLogger logger{__func__};
for (int n = 0; n < num_packets; n++) {
// Send a SCO packet
std::vector<uint8_t> sco_packet;
- sco_packet.push_back(static_cast<uint8_t>(handle & 0xff));
- sco_packet.push_back(static_cast<uint8_t>((handle & 0x0f00) >> 8));
- sco_packet.push_back(static_cast<uint8_t>(size & 0xff));
+ std::vector<uint8_t> payload;
for (size_t i = 0; i < size; i++) {
- sco_packet.push_back(static_cast<uint8_t>(i + n));
+ payload.push_back(static_cast<uint8_t>(i + n));
}
+ ::bluetooth::packet::BitInserter bi{sco_packet};
+ ::bluetooth::hci::ScoBuilder::Create(
+ handle, ::bluetooth::hci::PacketStatusFlag::CORRECTLY_RECEIVED, payload)
+ ->Serialize(bi);
hci->sendScoData(sco_packet);
// Check the loopback of the SCO packet
@@ -545,21 +532,7 @@
ASSERT_TRUE(
sco_queue.tryPopWithTimeout(sco_loopback, kWaitForScoDataTimeout));
- ASSERT_EQ(sco_packet.size(), sco_loopback.size());
- size_t successful_bytes = 0;
-
- for (size_t i = 0; i < sco_packet.size(); i++) {
- if (sco_packet[i] == sco_loopback[i]) {
- successful_bytes = i;
- } else {
- ALOGE("Miscompare at %d (expected %x, got %x)", static_cast<int>(i),
- sco_packet[i], sco_loopback[i]);
- ALOGE("At %d (expected %x, got %x)", static_cast<int>(i + 1),
- sco_packet[i + 1], sco_loopback[i + 1]);
- break;
- }
- }
- ASSERT_EQ(sco_packet.size(), successful_bytes + 1);
+ ASSERT_EQ(sco_packet, sco_loopback);
}
logger.setTotalBytes(num_packets * size * 2);
}
@@ -567,19 +540,20 @@
// Send an ACL data packet (in Loopback mode) and check the response.
void BluetoothAidlTest::sendAndCheckAcl(int num_packets, size_t size,
uint16_t handle) {
- ThroughputLogger logger = {__func__};
+ ThroughputLogger logger{__func__};
for (int n = 0; n < num_packets; n++) {
- // Send an ACL packet
- std::vector<uint8_t> acl_packet;
- acl_packet.push_back(static_cast<uint8_t>(handle & 0xff));
- acl_packet.push_back(static_cast<uint8_t>((handle & 0x0f00) >> 8) |
- kAclBroadcastPointToPoint |
- kAclPacketBoundaryFirstAutoFlushable);
- acl_packet.push_back(static_cast<uint8_t>(size & 0xff));
- acl_packet.push_back(static_cast<uint8_t>((size & 0xff00) >> 8));
+ // Send an ACL packet with counting data
+ auto payload = std::make_unique<::bluetooth::packet::RawBuilder>();
for (size_t i = 0; i < size; i++) {
- acl_packet.push_back(static_cast<uint8_t>(i + n));
+ payload->AddOctets1(static_cast<uint8_t>(i + n));
}
+ std::vector<uint8_t> acl_packet;
+ ::bluetooth::packet::BitInserter bi{acl_packet};
+ ::bluetooth::hci::AclBuilder::Create(
+ handle,
+ ::bluetooth::hci::PacketBoundaryFlag::FIRST_AUTOMATICALLY_FLUSHABLE,
+ ::bluetooth::hci::BroadcastFlag::POINT_TO_POINT, std::move(payload))
+ ->Serialize(bi);
hci->sendAclData(acl_packet);
std::vector<uint8_t> acl_loopback;
@@ -587,21 +561,7 @@
ASSERT_TRUE(
acl_queue.tryPopWithTimeout(acl_loopback, kWaitForAclDataTimeout));
- ASSERT_EQ(acl_packet.size(), acl_loopback.size());
- size_t successful_bytes = 0;
-
- for (size_t i = 0; i < acl_packet.size(); i++) {
- if (acl_packet[i] == acl_loopback[i]) {
- successful_bytes = i;
- } else {
- ALOGE("Miscompare at %d (expected %x, got %x)", static_cast<int>(i),
- acl_packet[i], acl_loopback[i]);
- ALOGE("At %d (expected %x, got %x)", static_cast<int>(i + 1),
- acl_packet[i + 1], acl_loopback[i + 1]);
- break;
- }
- }
- ASSERT_EQ(acl_packet.size(), successful_bytes + 1);
+ ASSERT_EQ(acl_packet, acl_loopback);
}
logger.setTotalBytes(num_packets * size * 2);
}
@@ -620,23 +580,29 @@
}
std::vector<uint8_t> event;
EXPECT_TRUE(event_queue.pop(event));
-
- EXPECT_EQ(kEventNumberOfCompletedPackets, event[kEventCodeByte]);
- EXPECT_EQ(1, event[kEventNumberOfCompletedPacketsNumHandles]);
-
- uint16_t event_handle = event[3] + (event[4] << 8);
- EXPECT_EQ(handle, event_handle);
-
- packets_processed += event[5] + (event[6] << 8);
+ auto event_view = ::bluetooth::hci::NumberOfCompletedPacketsView::Create(
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event))));
+ if (!event_view.IsValid()) {
+ ADD_FAILURE();
+ return packets_processed;
+ }
+ auto completed_packets = event_view.GetCompletedPackets();
+ for (const auto& entry : completed_packets) {
+ EXPECT_EQ(handle, entry.connection_handle_);
+ packets_processed += entry.host_num_of_completed_packets_;
+ }
}
return packets_processed;
}
// Send local loopback command and initialize SCO and ACL handles.
void BluetoothAidlTest::enterLoopbackMode() {
- std::vector<uint8_t> cmd{kCommandHciWriteLoopbackModeLocal,
- kCommandHciWriteLoopbackModeLocal +
- sizeof(kCommandHciWriteLoopbackModeLocal)};
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ ::bluetooth::hci::WriteLoopbackModeBuilder::Create(
+ bluetooth::hci::LoopbackMode::ENABLE_LOCAL)
+ ->Serialize(bi);
hci->sendHciCommand(cmd);
// Receive connection complete events with data channels
@@ -652,97 +618,128 @@
}
std::vector<uint8_t> event;
ASSERT_TRUE(event_queue.pop(event));
- ASSERT_GT(event.size(),
- static_cast<size_t>(kEventCommandCompleteStatusByte));
- if (event[kEventCodeByte] == kEventConnectionComplete) {
- ASSERT_GT(event.size(),
- static_cast<size_t>(kEventConnectionCompleteType));
- ASSERT_EQ(event[kEventLengthByte], kEventConnectionCompleteParamLength);
- uint8_t connection_type = event[kEventConnectionCompleteType];
+ auto event_view =
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event)));
+ ASSERT_TRUE(event_view.IsValid());
- ASSERT_TRUE(connection_type == kEventConnectionCompleteTypeSco ||
- connection_type == kEventConnectionCompleteTypeAcl);
-
- // Save handles
- uint16_t handle = event[kEventConnectionCompleteHandleLsByte] |
- event[kEventConnectionCompleteHandleLsByte + 1] << 8;
- if (connection_type == kEventConnectionCompleteTypeSco) {
- sco_connection_handles.push_back(handle);
- } else {
- acl_connection_handles.push_back(handle);
+ if (event_view.GetEventCode() ==
+ ::bluetooth::hci::EventCode::CONNECTION_COMPLETE) {
+ auto complete_view =
+ ::bluetooth::hci::ConnectionCompleteView::Create(event_view);
+ ASSERT_TRUE(complete_view.IsValid());
+ switch (complete_view.GetLinkType()) {
+ case ::bluetooth::hci::LinkType::ACL:
+ acl_connection_handles.push_back(complete_view.GetConnectionHandle());
+ break;
+ case ::bluetooth::hci::LinkType::SCO:
+ sco_connection_handles.push_back(complete_view.GetConnectionHandle());
+ break;
+ default:
+ ASSERT_EQ(complete_view.GetLinkType(),
+ ::bluetooth::hci::LinkType::ACL);
}
-
- ALOGD("Connect complete type = %d handle = %d",
- event[kEventConnectionCompleteType], handle);
connection_event_count++;
} else {
- ASSERT_EQ(kEventCommandComplete, event[kEventCodeByte]);
- ASSERT_EQ(cmd[0], event[kEventCommandCompleteOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandCompleteOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusSuccess, event[kEventCommandCompleteStatusByte]);
+ auto command_complete_view =
+ ::bluetooth::hci::WriteLoopbackModeCompleteView::Create(
+ ::bluetooth::hci::CommandCompleteView::Create(event_view));
+ ASSERT_TRUE(command_complete_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS,
+ command_complete_view.GetStatus());
command_complete_received = true;
}
}
}
+void BluetoothAidlTest::send_and_wait_for_cmd_complete(
+ std::unique_ptr<CommandBuilder> cmd, std::vector<uint8_t>& cmd_complete) {
+ std::vector<uint8_t> cmd_bytes = cmd->SerializeToBytes();
+ hci->sendHciCommand(cmd_bytes);
+
+ auto view = CommandView::Create(
+ PacketView<true>(std::make_shared<std::vector<uint8_t>>(cmd_bytes)));
+ ASSERT_TRUE(view.IsValid());
+ ALOGI("Waiting for %s[0x%x]", OpCodeText(view.GetOpCode()).c_str(),
+ static_cast<int>(view.GetOpCode()));
+ ASSERT_NO_FATAL_FAILURE(
+ wait_for_command_complete_event(view.GetOpCode(), cmd_complete));
+}
+
// Empty test: Initialize()/Close() are called in SetUp()/TearDown().
TEST_P(BluetoothAidlTest, InitializeAndClose) {}
// Send an HCI Reset with sendHciCommand and wait for a command complete event.
TEST_P(BluetoothAidlTest, HciReset) {
- std::vector<uint8_t> reset{kCommandHciReset,
- kCommandHciReset + sizeof(kCommandHciReset)};
+ std::vector<uint8_t> reset;
+ ::bluetooth::packet::BitInserter bi{reset};
+ ::bluetooth::hci::ResetBuilder::Create()->Serialize(bi);
hci->sendHciCommand(reset);
- wait_for_command_complete_event(reset);
+ wait_and_validate_command_complete_event(::bluetooth::hci::OpCode::RESET);
}
// Read and check the HCI version of the controller.
TEST_P(BluetoothAidlTest, HciVersionTest) {
- std::vector<uint8_t> cmd{kCommandHciReadLocalVersionInformation,
- kCommandHciReadLocalVersionInformation +
- sizeof(kCommandHciReadLocalVersionInformation)};
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ ::bluetooth::hci::ReadLocalVersionInformationBuilder::Create()->Serialize(bi);
hci->sendHciCommand(cmd);
ASSERT_NO_FATAL_FAILURE(wait_for_event());
std::vector<uint8_t> event;
ASSERT_TRUE(event_queue.pop(event));
- ASSERT_GT(event.size(), static_cast<size_t>(kEventLocalLmpVersionByte));
-
- ASSERT_EQ(kEventCommandComplete, event[kEventCodeByte]);
- ASSERT_EQ(cmd[0], event[kEventCommandCompleteOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandCompleteOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusSuccess, event[kEventCommandCompleteStatusByte]);
-
- ASSERT_LE(kHciMinimumHciVersion, event[kEventLocalHciVersionByte]);
- ASSERT_LE(kHciMinimumLmpVersion, event[kEventLocalLmpVersionByte]);
+ auto complete_view =
+ ::bluetooth::hci::ReadLocalVersionInformationCompleteView::Create(
+ ::bluetooth::hci::CommandCompleteView::Create(
+ ::bluetooth::hci::EventView::Create(
+ ::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event)))));
+ ASSERT_TRUE(complete_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS, complete_view.GetStatus());
+ auto version = complete_view.GetLocalVersionInformation();
+ ASSERT_LE(::bluetooth::hci::HciVersion::V_3_0, version.hci_version_);
+ ASSERT_LE(::bluetooth::hci::LmpVersion::V_3_0, version.lmp_version_);
}
// Send an unknown HCI command and wait for the error message.
TEST_P(BluetoothAidlTest, HciUnknownCommand) {
- std::vector<uint8_t> cmd{
- kCommandHciShouldBeUnknown,
- kCommandHciShouldBeUnknown + sizeof(kCommandHciShouldBeUnknown)};
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ ::bluetooth::hci::CommandBuilder::Create(
+ static_cast<::bluetooth::hci::OpCode>(0x3cff),
+ std::make_unique<::bluetooth::packet::RawBuilder>())
+ ->Serialize(bi);
hci->sendHciCommand(cmd);
ASSERT_NO_FATAL_FAILURE(wait_for_event());
std::vector<uint8_t> event;
ASSERT_TRUE(event_queue.pop(event));
+ auto event_view =
+ ::bluetooth::hci::EventView::Create(::bluetooth::hci::PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(event)));
+ ASSERT_TRUE(event_view.IsValid());
- ASSERT_GT(event.size(), static_cast<size_t>(kEventCommandCompleteStatusByte));
- if (event[kEventCodeByte] == kEventCommandComplete) {
- ASSERT_EQ(cmd[0], event[kEventCommandCompleteOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandCompleteOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusUnknownHciCommand,
- event[kEventCommandCompleteStatusByte]);
- } else {
- ASSERT_EQ(kEventCommandStatus, event[kEventCodeByte]);
- ASSERT_EQ(cmd[0], event[kEventCommandStatusOpcodeLsByte]);
- ASSERT_EQ(cmd[1], event[kEventCommandStatusOpcodeLsByte + 1]);
- ASSERT_EQ(kHciStatusUnknownHciCommand,
- event[kEventCommandStatusStatusByte]);
+ switch (event_view.GetEventCode()) {
+ case ::bluetooth::hci::EventCode::COMMAND_COMPLETE: {
+ auto command_complete =
+ ::bluetooth::hci::CommandCompleteView::Create(event_view);
+ ASSERT_TRUE(command_complete.IsValid());
+ ASSERT_EQ(command_complete.GetPayload()[0],
+ static_cast<uint8_t>(
+ ::bluetooth::hci::ErrorCode::UNKNOWN_HCI_COMMAND));
+ } break;
+ case ::bluetooth::hci::EventCode::COMMAND_STATUS: {
+ auto command_status =
+ ::bluetooth::hci::CommandStatusView::Create(event_view);
+ ASSERT_TRUE(command_status.IsValid());
+ ASSERT_EQ(command_status.GetStatus(),
+ ::bluetooth::hci::ErrorCode::UNKNOWN_HCI_COMMAND);
+ } break;
+ default:
+ ADD_FAILURE();
}
}
@@ -851,20 +848,24 @@
// Set all bits in the event mask
TEST_P(BluetoothAidlTest, SetEventMask) {
- std::vector<uint8_t> set_event_mask{
- 0x01, 0x0c, 0x08 /*parameter bytes*/, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff};
- hci->sendHciCommand({set_event_mask});
- wait_for_command_complete_event(set_event_mask);
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ uint64_t full_mask = UINT64_MAX;
+ ::bluetooth::hci::SetEventMaskBuilder::Create(full_mask)->Serialize(bi);
+ hci->sendHciCommand(cmd);
+ wait_and_validate_command_complete_event(
+ ::bluetooth::hci::OpCode::SET_EVENT_MASK);
}
// Set all bits in the LE event mask
TEST_P(BluetoothAidlTest, SetLeEventMask) {
- std::vector<uint8_t> set_event_mask{
- 0x20, 0x0c, 0x08 /*parameter bytes*/, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff};
- hci->sendHciCommand({set_event_mask});
- wait_for_command_complete_event(set_event_mask);
+ std::vector<uint8_t> cmd;
+ ::bluetooth::packet::BitInserter bi{cmd};
+ uint64_t full_mask = UINT64_MAX;
+ ::bluetooth::hci::LeSetEventMaskBuilder::Create(full_mask)->Serialize(bi);
+ hci->sendHciCommand(cmd);
+ wait_and_validate_command_complete_event(
+ ::bluetooth::hci::OpCode::LE_SET_EVENT_MASK);
}
// Call initialize twice, second one should fail.
@@ -872,28 +873,32 @@
class SecondCb
: public aidl::android::hardware::bluetooth::BnBluetoothHciCallbacks {
public:
- ndk::ScopedAStatus initializationComplete(Status status) {
+ ndk::ScopedAStatus initializationComplete(Status status) override {
EXPECT_EQ(status, Status::ALREADY_INITIALIZED);
init_promise.set_value();
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus hciEventReceived(const std::vector<uint8_t>& /*event*/) {
+ ndk::ScopedAStatus hciEventReceived(
+ const std::vector<uint8_t>& /*event*/) override {
ADD_FAILURE();
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus aclDataReceived(const std::vector<uint8_t>& /*data*/) {
+ ndk::ScopedAStatus aclDataReceived(
+ const std::vector<uint8_t>& /*data*/) override {
ADD_FAILURE();
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus scoDataReceived(const std::vector<uint8_t>& /*data*/) {
+ ndk::ScopedAStatus scoDataReceived(
+ const std::vector<uint8_t>& /*data*/) override {
ADD_FAILURE();
return ScopedAStatus::ok();
};
- ndk::ScopedAStatus isoDataReceived(const std::vector<uint8_t>& /*data*/) {
+ ndk::ScopedAStatus isoDataReceived(
+ const std::vector<uint8_t>& /*data*/) override {
ADD_FAILURE();
return ScopedAStatus::ok();
};
@@ -909,6 +914,66 @@
ASSERT_EQ(status, std::future_status::ready);
}
+TEST_P(BluetoothAidlTest, Cdd_C_12_1_Bluetooth5Requirements) {
+ std::vector<uint8_t> version_event;
+ send_and_wait_for_cmd_complete(ReadLocalVersionInformationBuilder::Create(),
+ version_event);
+ auto version_view = ReadLocalVersionInformationCompleteView::Create(
+ CommandCompleteView::Create(EventView::Create(PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(version_event)))));
+ ASSERT_TRUE(version_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS, version_view.GetStatus());
+ auto version = version_view.GetLocalVersionInformation();
+ if (version.hci_version_ < ::bluetooth::hci::HciVersion::V_5_0) {
+ // This test does not apply to controllers below 5.0
+ return;
+ };
+ // When HCI version is 5.0, LMP version must also be at least 5.0
+ ASSERT_GE(static_cast<int>(version.lmp_version_),
+ static_cast<int>(version.hci_version_));
+
+ std::vector<uint8_t> le_features_event;
+ send_and_wait_for_cmd_complete(LeReadLocalSupportedFeaturesBuilder::Create(),
+ le_features_event);
+ auto le_features_view = LeReadLocalSupportedFeaturesCompleteView::Create(
+ CommandCompleteView::Create(EventView::Create(PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(le_features_event)))));
+ ASSERT_TRUE(le_features_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS, le_features_view.GetStatus());
+ auto le_features = le_features_view.GetLeFeatures();
+ ASSERT_TRUE(le_features & static_cast<uint64_t>(LLFeaturesBits::LL_PRIVACY));
+ ASSERT_TRUE(le_features & static_cast<uint64_t>(LLFeaturesBits::LE_2M_PHY));
+ ASSERT_TRUE(le_features &
+ static_cast<uint64_t>(LLFeaturesBits::LE_CODED_PHY));
+ ASSERT_TRUE(le_features &
+ static_cast<uint64_t>(LLFeaturesBits::LE_EXTENDED_ADVERTISING));
+
+ std::vector<uint8_t> num_adv_set_event;
+ send_and_wait_for_cmd_complete(
+ LeReadNumberOfSupportedAdvertisingSetsBuilder::Create(),
+ num_adv_set_event);
+ auto num_adv_set_view =
+ LeReadNumberOfSupportedAdvertisingSetsCompleteView::Create(
+ CommandCompleteView::Create(EventView::Create(PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(num_adv_set_event)))));
+ ASSERT_TRUE(num_adv_set_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS, num_adv_set_view.GetStatus());
+ auto num_adv_set = num_adv_set_view.GetNumberSupportedAdvertisingSets();
+ ASSERT_GE(num_adv_set, kMinLeAdvSetForBt5);
+
+ std::vector<uint8_t> num_resolving_list_event;
+ send_and_wait_for_cmd_complete(LeReadResolvingListSizeBuilder::Create(),
+ num_resolving_list_event);
+ auto num_resolving_list_view = LeReadResolvingListSizeCompleteView::Create(
+ CommandCompleteView::Create(EventView::Create(PacketView<true>(
+ std::make_shared<std::vector<uint8_t>>(num_resolving_list_event)))));
+ ASSERT_TRUE(num_resolving_list_view.IsValid());
+ ASSERT_EQ(::bluetooth::hci::ErrorCode::SUCCESS,
+ num_resolving_list_view.GetStatus());
+ auto num_resolving_list = num_resolving_list_view.GetResolvingListSize();
+ ASSERT_GE(num_resolving_list, kMinLeResolvingListForBt5);
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothAidlTest);
INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothAidlTest,
testing::ValuesIn(android::getAidlHalInstanceNames(
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/AmFmRegionConfig.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/AmFmRegionConfig.aidl
index a3086c6..f4c6fd3 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/AmFmRegionConfig.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/AmFmRegionConfig.aidl
@@ -73,14 +73,15 @@
/**
* De-emphasis filter supported/configured.
*
- * It is a bitset of de-emphasis values (DEEMPHASIS_D50 and DEEMPHASIS_D75).
+ * It can be a combination of de-emphasis values ({@link #DEEMPHASIS_D50} and
+ * {@link #DEEMPHASIS_D75}).
*/
int fmDeemphasis;
/**
* RDS/RBDS variant supported/configured.
*
- * It is a bitset of RDS values (RDS and RBDS).
+ * It can be a combination of RDS values ({@link #RDS} and {@link #RBDS}).
*/
int fmRds;
}
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/ProgramInfo.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/ProgramInfo.aidl
index d650239..7632c81 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/ProgramInfo.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/ProgramInfo.aidl
@@ -150,6 +150,10 @@
/**
* Program flags.
+ *
+ * It can be a combination of {@link #FLAG_LIVE}, {@link #FLAG_MUTED},
+ * {@link #FLAG_TRAFFIC_PROGRAM}, {@link #FLAG_TRAFFIC_ANNOUNCEMENT},
+ * {@link #FLAG_TUNABLE}, and {@link #FLAG_STEREO}.
*/
int infoFlags;
diff --git a/broadcastradio/aidl/android/hardware/broadcastradio/ProgramSelector.aidl b/broadcastradio/aidl/android/hardware/broadcastradio/ProgramSelector.aidl
index 93b0e12..71b824b 100644
--- a/broadcastradio/aidl/android/hardware/broadcastradio/ProgramSelector.aidl
+++ b/broadcastradio/aidl/android/hardware/broadcastradio/ProgramSelector.aidl
@@ -51,8 +51,7 @@
* - analogue AM/FM: AMFM_FREQUENCY_KHZ;
* - FM RDS: RDS_PI;
* - HD Radio: HD_STATION_ID_EXT;
- * - DAB/DMB: DAB_SID_EXT (when used, DAB_ENSEMBLE and DAB_FREQUENCY_KHZ
- * must present in secondaryIds);
+ * - DAB/DMB: DAB_SID_EXT;
* - Digital Radio Mondiale: DRMO_SERVICE_ID;
* - SiriusXM: SXM_SERVICE_ID;
* - vendor-specific: VENDOR_START..VENDOR_END.
@@ -63,13 +62,16 @@
* Secondary program identifiers.
*
* These identifiers are supplementary and can speed up tuning process,
- * but the primary ID must be sufficient (i.e. RDS PI is enough to select
+ * but the primary ID should be sufficient (i.e. RDS PI is enough to select
* a station from the list after a full band scan).
*
* Two selectors with different secondary IDs, but the same primary ID are
* considered equal. In particular, secondary IDs array may get updated for
* an entry on the program list (ie. when a better frequency for a given
* station is found).
+ *
+ * If DAB_SID_EXT is used as primaryId, using DAB_ENSEMBLE or DAB_FREQUENCY_KHZ
+ * as secondray identifiers can uniquely identify the DAB station.
*/
ProgramIdentifier[] secondaryIds;
}
diff --git a/broadcastradio/aidl/default/BroadcastRadio.cpp b/broadcastradio/aidl/default/BroadcastRadio.cpp
index 36520fb..c0c475a 100644
--- a/broadcastradio/aidl/default/BroadcastRadio.cpp
+++ b/broadcastradio/aidl/default/BroadcastRadio.cpp
@@ -589,10 +589,11 @@
}
ProgramSelector sel = {};
if (isDab) {
- if (numArgs != 5) {
+ if (numArgs != 5 && numArgs != 3) {
dprintf(fd,
"Invalid number of arguments: please provide "
- "--tune dab <SID> <ENSEMBLE> <FREQUENCY>\n");
+ "--tune dab <SID> <ENSEMBLE> <FREQUENCY> or "
+ "--tune dab <SID>\n");
return STATUS_BAD_VALUE;
}
int sid;
@@ -600,17 +601,21 @@
dprintf(fd, "Non-integer sid provided with tune: %s\n", args[2]);
return STATUS_BAD_VALUE;
}
- int ensemble;
- if (!utils::parseArgInt(string(args[3]), &ensemble)) {
- dprintf(fd, "Non-integer ensemble provided with tune: %s\n", args[3]);
- return STATUS_BAD_VALUE;
+ if (numArgs == 3) {
+ sel = utils::makeSelectorDab(sid);
+ } else {
+ int ensemble;
+ if (!utils::parseArgInt(string(args[3]), &ensemble)) {
+ dprintf(fd, "Non-integer ensemble provided with tune: %s\n", args[3]);
+ return STATUS_BAD_VALUE;
+ }
+ int freq;
+ if (!utils::parseArgInt(string(args[4]), &freq)) {
+ dprintf(fd, "Non-integer frequency provided with tune: %s\n", args[4]);
+ return STATUS_BAD_VALUE;
+ }
+ sel = utils::makeSelectorDab(sid, ensemble, freq);
}
- int freq;
- if (!utils::parseArgInt(string(args[4]), &freq)) {
- dprintf(fd, "Non-integer frequency provided with tune: %s\n", args[4]);
- return STATUS_BAD_VALUE;
- }
- sel = utils::makeSelectorDab(sid, ensemble, freq);
} else {
if (numArgs != 3) {
dprintf(fd, "Invalid number of arguments: please provide --tune amfm <FREQUENCY>\n");
diff --git a/broadcastradio/common/utilsaidl/Utils.cpp b/broadcastradio/common/utilsaidl/Utils.cpp
index ad82366..0551bad 100644
--- a/broadcastradio/common/utilsaidl/Utils.cpp
+++ b/broadcastradio/common/utilsaidl/Utils.cpp
@@ -136,9 +136,18 @@
return getHdSubchannel(b) == 0 &&
haveEqualIds(a, b, IdentifierType::AMFM_FREQUENCY_KHZ);
case IdentifierType::DAB_SID_EXT:
- return haveEqualIds(a, b, IdentifierType::DAB_SID_EXT) &&
- haveEqualIds(a, b, IdentifierType::DAB_ENSEMBLE) &&
- haveEqualIds(a, b, IdentifierType::DAB_FREQUENCY_KHZ);
+ if (!haveEqualIds(a, b, IdentifierType::DAB_SID_EXT)) {
+ return false;
+ }
+ if (hasId(a, IdentifierType::DAB_ENSEMBLE) &&
+ !haveEqualIds(a, b, IdentifierType::DAB_ENSEMBLE)) {
+ return false;
+ }
+ if (hasId(a, IdentifierType::DAB_FREQUENCY_KHZ) &&
+ !haveEqualIds(a, b, IdentifierType::DAB_FREQUENCY_KHZ)) {
+ return false;
+ }
+ return true;
case IdentifierType::DRMO_SERVICE_ID:
return haveEqualIds(a, b, IdentifierType::DRMO_SERVICE_ID);
case IdentifierType::SXM_SERVICE_ID:
@@ -289,25 +298,7 @@
sel.primaryId.type > IdentifierType::VENDOR_END)) {
return false;
}
- if (!isValid(sel.primaryId)) {
- return false;
- }
-
- bool isDab = sel.primaryId.type == IdentifierType::DAB_SID_EXT;
- bool hasDabEnsemble = false;
- bool hasDabFrequency = false;
- for (auto it = sel.secondaryIds.begin(); it != sel.secondaryIds.end(); it++) {
- if (!isValid(*it)) {
- return false;
- }
- if (isDab && it->type == IdentifierType::DAB_ENSEMBLE) {
- hasDabEnsemble = true;
- }
- if (isDab && it->type == IdentifierType::DAB_FREQUENCY_KHZ) {
- hasDabFrequency = true;
- }
- }
- return !isDab || (hasDabEnsemble && hasDabFrequency);
+ return isValid(sel.primaryId);
}
ProgramIdentifier makeIdentifier(IdentifierType type, int64_t value) {
@@ -320,6 +311,12 @@
return sel;
}
+ProgramSelector makeSelectorDab(int64_t sidExt) {
+ ProgramSelector sel = {};
+ sel.primaryId = makeIdentifier(IdentifierType::DAB_SID_EXT, sidExt);
+ return sel;
+}
+
ProgramSelector makeSelectorDab(int64_t sidExt, int32_t ensemble, int64_t freq) {
ProgramSelector sel = {};
sel.primaryId = makeIdentifier(IdentifierType::DAB_SID_EXT, sidExt);
diff --git a/broadcastradio/common/utilsaidl/include/broadcastradio-utils-aidl/Utils.h b/broadcastradio/common/utilsaidl/include/broadcastradio-utils-aidl/Utils.h
index beebd03..ad075f2 100644
--- a/broadcastradio/common/utilsaidl/include/broadcastradio-utils-aidl/Utils.h
+++ b/broadcastradio/common/utilsaidl/include/broadcastradio-utils-aidl/Utils.h
@@ -138,6 +138,7 @@
ProgramIdentifier makeIdentifier(IdentifierType type, int64_t value);
ProgramSelector makeSelectorAmfm(int32_t frequency);
+ProgramSelector makeSelectorDab(int64_t sidExt);
ProgramSelector makeSelectorDab(int64_t sidExt, int32_t ensemble, int64_t freq);
bool satisfies(const ProgramFilter& filter, const ProgramSelector& sel);
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
index 632499d..24083ad 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
@@ -34,6 +34,6 @@
package android.hardware.camera.device;
@Backing(type="int") @VintfStability
enum CameraBlobId {
- JPEG = 255,
- JPEG_APP_SEGMENTS = 256,
+ JPEG = 0x00FF,
+ JPEG_APP_SEGMENTS = 0x100,
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
index b70b899..1f87aa3 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
@@ -40,5 +40,5 @@
VIDEO_SNAPSHOT = 4,
ZERO_SHUTTER_LAG = 5,
MANUAL = 6,
- VENDOR_TEMPLATE_START = 1073741824,
+ VENDOR_TEMPLATE_START = 0x40000000,
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
index f340578..97fd067 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
@@ -39,4 +39,5 @@
android.hardware.camera.device.CameraMetadata sessionParams;
int streamConfigCounter;
boolean multiResolutionInputImage;
+ long logId = 0;
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
index bdef412..ef7ec25 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
@@ -36,12 +36,12 @@
enum StreamConfigurationMode {
NORMAL_MODE = 0,
CONSTRAINED_HIGH_SPEED_MODE = 1,
- VENDOR_MODE_0 = 32768,
- VENDOR_MODE_1 = 32769,
- VENDOR_MODE_2 = 32770,
- VENDOR_MODE_3 = 32771,
- VENDOR_MODE_4 = 32772,
- VENDOR_MODE_5 = 32773,
- VENDOR_MODE_6 = 32774,
- VENDOR_MODE_7 = 32775,
+ VENDOR_MODE_0 = 0x8000,
+ VENDOR_MODE_1,
+ VENDOR_MODE_2,
+ VENDOR_MODE_3,
+ VENDOR_MODE_4,
+ VENDOR_MODE_5,
+ VENDOR_MODE_6,
+ VENDOR_MODE_7,
}
diff --git a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
index cacd32c..197d9af 100644
--- a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
@@ -62,7 +62,7 @@
*/
CameraMetadata sessionParams;
- /**
+ /**
* An incrementing counter used for HAL to keep track of the stream
* configuration and the paired oneway signalStreamFlush call. When the
* counter in signalStreamFlush call is less than the counter here, that
@@ -83,4 +83,13 @@
* any one of the supported multi-resolution input stream sizes.
*/
boolean multiResolutionInputImage;
+
+ /**
+ * Logging identifier to join HAL logs to logs collected by cameraservice. This field has no
+ * functional purpose.
+ *
+ * See documentation of 'mLogId' in frameworks/av/camera/include/camera/CameraSessionStats.h
+ * for specifics of this identifier and how it can be used to join with cameraservice logs.
+ */
+ long logId = 0;
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLensFacing.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
index 14ad26e..18917f7 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLensFacing.aidl
@@ -38,19 +38,19 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum AutomotiveLensFacing {
- ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER = 0,
- ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT = 1,
- ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR = 2,
- ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT = 3,
- ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT = 4,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER = 5,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT = 6,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER = 7,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT = 8,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT = 9,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER = 10,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT = 11,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT = 12,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER = 13,
- ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT = 14,
+ ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER,
+ ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR,
+ ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER,
+ ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLocation.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLocation.aidl
index 5417bdb..ad6003f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLocation.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/AutomotiveLocation.aidl
@@ -38,15 +38,15 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum AutomotiveLocation {
- ANDROID_AUTOMOTIVE_LOCATION_INTERIOR = 0,
- ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_OTHER = 1,
- ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_FRONT = 2,
- ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_REAR = 3,
- ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_LEFT = 4,
- ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT = 5,
- ANDROID_AUTOMOTIVE_LOCATION_EXTRA_OTHER = 6,
- ANDROID_AUTOMOTIVE_LOCATION_EXTRA_FRONT = 7,
- ANDROID_AUTOMOTIVE_LOCATION_EXTRA_REAR = 8,
- ANDROID_AUTOMOTIVE_LOCATION_EXTRA_LEFT = 9,
- ANDROID_AUTOMOTIVE_LOCATION_EXTRA_RIGHT = 10,
+ ANDROID_AUTOMOTIVE_LOCATION_INTERIOR,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_OTHER,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_FRONT,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_REAR,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_LEFT,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTRA_OTHER,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTRA_FRONT,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTRA_REAR,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTRA_LEFT,
+ ANDROID_AUTOMOTIVE_LOCATION_EXTRA_RIGHT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/BlackLevelLock.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/BlackLevelLock.aidl
index dcefa2f..1f3e76f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/BlackLevelLock.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/BlackLevelLock.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum BlackLevelLock {
- ANDROID_BLACK_LEVEL_LOCK_OFF = 0,
- ANDROID_BLACK_LEVEL_LOCK_ON = 1,
+ ANDROID_BLACK_LEVEL_LOCK_OFF,
+ ANDROID_BLACK_LEVEL_LOCK_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSection.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSection.aidl
index d99f16e..138101b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSection.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSection.aidl
@@ -38,39 +38,39 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum CameraMetadataSection {
- ANDROID_COLOR_CORRECTION = 0,
- ANDROID_CONTROL = 1,
- ANDROID_DEMOSAIC = 2,
- ANDROID_EDGE = 3,
- ANDROID_FLASH = 4,
- ANDROID_FLASH_INFO = 5,
- ANDROID_HOT_PIXEL = 6,
- ANDROID_JPEG = 7,
- ANDROID_LENS = 8,
- ANDROID_LENS_INFO = 9,
- ANDROID_NOISE_REDUCTION = 10,
- ANDROID_QUIRKS = 11,
- ANDROID_REQUEST = 12,
- ANDROID_SCALER = 13,
- ANDROID_SENSOR = 14,
- ANDROID_SENSOR_INFO = 15,
- ANDROID_SHADING = 16,
- ANDROID_STATISTICS = 17,
- ANDROID_STATISTICS_INFO = 18,
- ANDROID_TONEMAP = 19,
- ANDROID_LED = 20,
- ANDROID_INFO = 21,
- ANDROID_BLACK_LEVEL = 22,
- ANDROID_SYNC = 23,
- ANDROID_REPROCESS = 24,
- ANDROID_DEPTH = 25,
- ANDROID_LOGICAL_MULTI_CAMERA = 26,
- ANDROID_DISTORTION_CORRECTION = 27,
- ANDROID_HEIC = 28,
- ANDROID_HEIC_INFO = 29,
- ANDROID_AUTOMOTIVE = 30,
- ANDROID_AUTOMOTIVE_LENS = 31,
- ANDROID_EXTENSION = 32,
- ANDROID_JPEGR = 33,
- VENDOR_SECTION = 32768,
+ ANDROID_COLOR_CORRECTION,
+ ANDROID_CONTROL,
+ ANDROID_DEMOSAIC,
+ ANDROID_EDGE,
+ ANDROID_FLASH,
+ ANDROID_FLASH_INFO,
+ ANDROID_HOT_PIXEL,
+ ANDROID_JPEG,
+ ANDROID_LENS,
+ ANDROID_LENS_INFO,
+ ANDROID_NOISE_REDUCTION,
+ ANDROID_QUIRKS,
+ ANDROID_REQUEST,
+ ANDROID_SCALER,
+ ANDROID_SENSOR,
+ ANDROID_SENSOR_INFO,
+ ANDROID_SHADING,
+ ANDROID_STATISTICS,
+ ANDROID_STATISTICS_INFO,
+ ANDROID_TONEMAP,
+ ANDROID_LED,
+ ANDROID_INFO,
+ ANDROID_BLACK_LEVEL,
+ ANDROID_SYNC,
+ ANDROID_REPROCESS,
+ ANDROID_DEPTH,
+ ANDROID_LOGICAL_MULTI_CAMERA,
+ ANDROID_DISTORTION_CORRECTION,
+ ANDROID_HEIC,
+ ANDROID_HEIC_INFO,
+ ANDROID_AUTOMOTIVE,
+ ANDROID_AUTOMOTIVE_LENS,
+ ANDROID_EXTENSION,
+ ANDROID_JPEGR,
+ VENDOR_SECTION = 0x8000,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSectionStart.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSectionStart.aidl
index 0bcd846..85eee08 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSectionStart.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataSectionStart.aidl
@@ -38,39 +38,39 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum CameraMetadataSectionStart {
- ANDROID_COLOR_CORRECTION_START = 0,
- ANDROID_CONTROL_START = 65536,
- ANDROID_DEMOSAIC_START = 131072,
- ANDROID_EDGE_START = 196608,
- ANDROID_FLASH_START = 262144,
- ANDROID_FLASH_INFO_START = 327680,
- ANDROID_HOT_PIXEL_START = 393216,
- ANDROID_JPEG_START = 458752,
- ANDROID_LENS_START = 524288,
- ANDROID_LENS_INFO_START = 589824,
- ANDROID_NOISE_REDUCTION_START = 655360,
- ANDROID_QUIRKS_START = 720896,
- ANDROID_REQUEST_START = 786432,
- ANDROID_SCALER_START = 851968,
- ANDROID_SENSOR_START = 917504,
- ANDROID_SENSOR_INFO_START = 983040,
- ANDROID_SHADING_START = 1048576,
- ANDROID_STATISTICS_START = 1114112,
- ANDROID_STATISTICS_INFO_START = 1179648,
- ANDROID_TONEMAP_START = 1245184,
- ANDROID_LED_START = 1310720,
- ANDROID_INFO_START = 1376256,
- ANDROID_BLACK_LEVEL_START = 1441792,
- ANDROID_SYNC_START = 1507328,
- ANDROID_REPROCESS_START = 1572864,
- ANDROID_DEPTH_START = 1638400,
- ANDROID_LOGICAL_MULTI_CAMERA_START = 1703936,
- ANDROID_DISTORTION_CORRECTION_START = 1769472,
- ANDROID_HEIC_START = 1835008,
- ANDROID_HEIC_INFO_START = 1900544,
- ANDROID_AUTOMOTIVE_START = 1966080,
- ANDROID_AUTOMOTIVE_LENS_START = 2031616,
- ANDROID_EXTENSION_START = 2097152,
- ANDROID_JPEGR_START = 2162688,
- VENDOR_SECTION_START = -2147483648,
+ ANDROID_COLOR_CORRECTION_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_COLOR_CORRECTION << 16) /* 0 */,
+ ANDROID_CONTROL_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_CONTROL << 16) /* 65536 */,
+ ANDROID_DEMOSAIC_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_DEMOSAIC << 16) /* 131072 */,
+ ANDROID_EDGE_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_EDGE << 16) /* 196608 */,
+ ANDROID_FLASH_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_FLASH << 16) /* 262144 */,
+ ANDROID_FLASH_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_FLASH_INFO << 16) /* 327680 */,
+ ANDROID_HOT_PIXEL_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_HOT_PIXEL << 16) /* 393216 */,
+ ANDROID_JPEG_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_JPEG << 16) /* 458752 */,
+ ANDROID_LENS_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_LENS << 16) /* 524288 */,
+ ANDROID_LENS_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_LENS_INFO << 16) /* 589824 */,
+ ANDROID_NOISE_REDUCTION_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_NOISE_REDUCTION << 16) /* 655360 */,
+ ANDROID_QUIRKS_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_QUIRKS << 16) /* 720896 */,
+ ANDROID_REQUEST_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_REQUEST << 16) /* 786432 */,
+ ANDROID_SCALER_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_SCALER << 16) /* 851968 */,
+ ANDROID_SENSOR_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_SENSOR << 16) /* 917504 */,
+ ANDROID_SENSOR_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_SENSOR_INFO << 16) /* 983040 */,
+ ANDROID_SHADING_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_SHADING << 16) /* 1048576 */,
+ ANDROID_STATISTICS_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_STATISTICS << 16) /* 1114112 */,
+ ANDROID_STATISTICS_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_STATISTICS_INFO << 16) /* 1179648 */,
+ ANDROID_TONEMAP_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_TONEMAP << 16) /* 1245184 */,
+ ANDROID_LED_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_LED << 16) /* 1310720 */,
+ ANDROID_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_INFO << 16) /* 1376256 */,
+ ANDROID_BLACK_LEVEL_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_BLACK_LEVEL << 16) /* 1441792 */,
+ ANDROID_SYNC_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_SYNC << 16) /* 1507328 */,
+ ANDROID_REPROCESS_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_REPROCESS << 16) /* 1572864 */,
+ ANDROID_DEPTH_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_DEPTH << 16) /* 1638400 */,
+ ANDROID_LOGICAL_MULTI_CAMERA_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_LOGICAL_MULTI_CAMERA << 16) /* 1703936 */,
+ ANDROID_DISTORTION_CORRECTION_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_DISTORTION_CORRECTION << 16) /* 1769472 */,
+ ANDROID_HEIC_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_HEIC << 16) /* 1835008 */,
+ ANDROID_HEIC_INFO_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_HEIC_INFO << 16) /* 1900544 */,
+ ANDROID_AUTOMOTIVE_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_AUTOMOTIVE << 16) /* 1966080 */,
+ ANDROID_AUTOMOTIVE_LENS_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_AUTOMOTIVE_LENS << 16) /* 2031616 */,
+ ANDROID_EXTENSION_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_EXTENSION << 16) /* 2097152 */,
+ ANDROID_JPEGR_START = (android.hardware.camera.metadata.CameraMetadataSection.ANDROID_JPEGR << 16) /* 2162688 */,
+ VENDOR_SECTION_START = (android.hardware.camera.metadata.CameraMetadataSection.VENDOR_SECTION << 16) /* -2147483648 */,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
index b83eb2b..71d4e41 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -38,308 +38,308 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum CameraMetadataTag {
- ANDROID_COLOR_CORRECTION_MODE = 0,
- ANDROID_COLOR_CORRECTION_TRANSFORM = 1,
- ANDROID_COLOR_CORRECTION_GAINS = 2,
- ANDROID_COLOR_CORRECTION_ABERRATION_MODE = 3,
- ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = 4,
- ANDROID_CONTROL_AE_ANTIBANDING_MODE = 65536,
- ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION = 65537,
- ANDROID_CONTROL_AE_LOCK = 65538,
- ANDROID_CONTROL_AE_MODE = 65539,
- ANDROID_CONTROL_AE_REGIONS = 65540,
- ANDROID_CONTROL_AE_TARGET_FPS_RANGE = 65541,
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER = 65542,
- ANDROID_CONTROL_AF_MODE = 65543,
- ANDROID_CONTROL_AF_REGIONS = 65544,
- ANDROID_CONTROL_AF_TRIGGER = 65545,
- ANDROID_CONTROL_AWB_LOCK = 65546,
- ANDROID_CONTROL_AWB_MODE = 65547,
- ANDROID_CONTROL_AWB_REGIONS = 65548,
- ANDROID_CONTROL_CAPTURE_INTENT = 65549,
- ANDROID_CONTROL_EFFECT_MODE = 65550,
- ANDROID_CONTROL_MODE = 65551,
- ANDROID_CONTROL_SCENE_MODE = 65552,
- ANDROID_CONTROL_VIDEO_STABILIZATION_MODE = 65553,
- ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = 65554,
- ANDROID_CONTROL_AE_AVAILABLE_MODES = 65555,
- ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = 65556,
- ANDROID_CONTROL_AE_COMPENSATION_RANGE = 65557,
- ANDROID_CONTROL_AE_COMPENSATION_STEP = 65558,
- ANDROID_CONTROL_AF_AVAILABLE_MODES = 65559,
- ANDROID_CONTROL_AVAILABLE_EFFECTS = 65560,
- ANDROID_CONTROL_AVAILABLE_SCENE_MODES = 65561,
- ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = 65562,
- ANDROID_CONTROL_AWB_AVAILABLE_MODES = 65563,
- ANDROID_CONTROL_MAX_REGIONS = 65564,
- ANDROID_CONTROL_SCENE_MODE_OVERRIDES = 65565,
- ANDROID_CONTROL_AE_PRECAPTURE_ID = 65566,
- ANDROID_CONTROL_AE_STATE = 65567,
- ANDROID_CONTROL_AF_STATE = 65568,
- ANDROID_CONTROL_AF_TRIGGER_ID = 65569,
- ANDROID_CONTROL_AWB_STATE = 65570,
- ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = 65571,
- ANDROID_CONTROL_AE_LOCK_AVAILABLE = 65572,
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE = 65573,
- ANDROID_CONTROL_AVAILABLE_MODES = 65574,
- ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE = 65575,
- ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST = 65576,
- ANDROID_CONTROL_ENABLE_ZSL = 65577,
- ANDROID_CONTROL_AF_SCENE_CHANGE = 65578,
- ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES = 65579,
- ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES = 65580,
- ANDROID_CONTROL_EXTENDED_SCENE_MODE = 65581,
- ANDROID_CONTROL_ZOOM_RATIO_RANGE = 65582,
- ANDROID_CONTROL_ZOOM_RATIO = 65583,
- ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION = 65584,
+ ANDROID_COLOR_CORRECTION_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_COLOR_CORRECTION_START /* 0 */,
+ ANDROID_COLOR_CORRECTION_TRANSFORM,
+ ANDROID_COLOR_CORRECTION_GAINS,
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
+ ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_CONTROL_START /* 65536 */,
+ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
+ ANDROID_CONTROL_AE_LOCK,
+ ANDROID_CONTROL_AE_MODE,
+ ANDROID_CONTROL_AE_REGIONS,
+ ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
+ ANDROID_CONTROL_AF_MODE,
+ ANDROID_CONTROL_AF_REGIONS,
+ ANDROID_CONTROL_AF_TRIGGER,
+ ANDROID_CONTROL_AWB_LOCK,
+ ANDROID_CONTROL_AWB_MODE,
+ ANDROID_CONTROL_AWB_REGIONS,
+ ANDROID_CONTROL_CAPTURE_INTENT,
+ ANDROID_CONTROL_EFFECT_MODE,
+ ANDROID_CONTROL_MODE,
+ ANDROID_CONTROL_SCENE_MODE,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE,
+ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES,
+ ANDROID_CONTROL_AE_AVAILABLE_MODES,
+ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
+ ANDROID_CONTROL_AE_COMPENSATION_RANGE,
+ ANDROID_CONTROL_AE_COMPENSATION_STEP,
+ ANDROID_CONTROL_AF_AVAILABLE_MODES,
+ ANDROID_CONTROL_AVAILABLE_EFFECTS,
+ ANDROID_CONTROL_AVAILABLE_SCENE_MODES,
+ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
+ ANDROID_CONTROL_AWB_AVAILABLE_MODES,
+ ANDROID_CONTROL_MAX_REGIONS,
+ ANDROID_CONTROL_SCENE_MODE_OVERRIDES,
+ ANDROID_CONTROL_AE_PRECAPTURE_ID,
+ ANDROID_CONTROL_AE_STATE,
+ ANDROID_CONTROL_AF_STATE,
+ ANDROID_CONTROL_AF_TRIGGER_ID,
+ ANDROID_CONTROL_AWB_STATE,
+ ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS,
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE,
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
+ ANDROID_CONTROL_AVAILABLE_MODES,
+ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE,
+ ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST,
+ ANDROID_CONTROL_ENABLE_ZSL,
+ ANDROID_CONTROL_AF_SCENE_CHANGE,
+ ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES,
+ ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES,
+ ANDROID_CONTROL_EXTENDED_SCENE_MODE,
+ ANDROID_CONTROL_ZOOM_RATIO_RANGE,
+ ANDROID_CONTROL_ZOOM_RATIO,
+ ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION,
ANDROID_CONTROL_SETTINGS_OVERRIDE = 65588,
- ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES = 65589,
- ANDROID_CONTROL_SETTINGS_OVERRIDING_FRAME_NUMBER = 65590,
- ANDROID_CONTROL_AUTOFRAMING = 65591,
- ANDROID_CONTROL_AUTOFRAMING_AVAILABLE = 65592,
- ANDROID_CONTROL_AUTOFRAMING_STATE = 65593,
- ANDROID_DEMOSAIC_MODE = 131072,
- ANDROID_EDGE_MODE = 196608,
- ANDROID_EDGE_STRENGTH = 196609,
- ANDROID_EDGE_AVAILABLE_EDGE_MODES = 196610,
- ANDROID_FLASH_FIRING_POWER = 262144,
- ANDROID_FLASH_FIRING_TIME = 262145,
- ANDROID_FLASH_MODE = 262146,
- ANDROID_FLASH_COLOR_TEMPERATURE = 262147,
- ANDROID_FLASH_MAX_ENERGY = 262148,
- ANDROID_FLASH_STATE = 262149,
- ANDROID_FLASH_INFO_AVAILABLE = 327680,
- ANDROID_FLASH_INFO_CHARGE_DURATION = 327681,
- ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL = 327682,
- ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL = 327683,
- ANDROID_HOT_PIXEL_MODE = 393216,
- ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = 393217,
- ANDROID_JPEG_GPS_COORDINATES = 458752,
- ANDROID_JPEG_GPS_PROCESSING_METHOD = 458753,
- ANDROID_JPEG_GPS_TIMESTAMP = 458754,
- ANDROID_JPEG_ORIENTATION = 458755,
- ANDROID_JPEG_QUALITY = 458756,
- ANDROID_JPEG_THUMBNAIL_QUALITY = 458757,
- ANDROID_JPEG_THUMBNAIL_SIZE = 458758,
- ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES = 458759,
- ANDROID_JPEG_MAX_SIZE = 458760,
- ANDROID_JPEG_SIZE = 458761,
- ANDROID_LENS_APERTURE = 524288,
- ANDROID_LENS_FILTER_DENSITY = 524289,
- ANDROID_LENS_FOCAL_LENGTH = 524290,
- ANDROID_LENS_FOCUS_DISTANCE = 524291,
- ANDROID_LENS_OPTICAL_STABILIZATION_MODE = 524292,
- ANDROID_LENS_FACING = 524293,
- ANDROID_LENS_POSE_ROTATION = 524294,
- ANDROID_LENS_POSE_TRANSLATION = 524295,
- ANDROID_LENS_FOCUS_RANGE = 524296,
- ANDROID_LENS_STATE = 524297,
- ANDROID_LENS_INTRINSIC_CALIBRATION = 524298,
- ANDROID_LENS_RADIAL_DISTORTION = 524299,
- ANDROID_LENS_POSE_REFERENCE = 524300,
- ANDROID_LENS_DISTORTION = 524301,
- ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION = 524302,
- ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION = 524303,
- ANDROID_LENS_INFO_AVAILABLE_APERTURES = 589824,
- ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES = 589825,
- ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS = 589826,
- ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = 589827,
- ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE = 589828,
- ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE = 589829,
- ANDROID_LENS_INFO_SHADING_MAP_SIZE = 589830,
- ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION = 589831,
- ANDROID_NOISE_REDUCTION_MODE = 655360,
- ANDROID_NOISE_REDUCTION_STRENGTH = 655361,
- ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = 655362,
- ANDROID_QUIRKS_METERING_CROP_REGION = 720896,
- ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO = 720897,
- ANDROID_QUIRKS_USE_ZSL_FORMAT = 720898,
- ANDROID_QUIRKS_USE_PARTIAL_RESULT = 720899,
- ANDROID_QUIRKS_PARTIAL_RESULT = 720900,
- ANDROID_REQUEST_FRAME_COUNT = 786432,
- ANDROID_REQUEST_ID = 786433,
- ANDROID_REQUEST_INPUT_STREAMS = 786434,
- ANDROID_REQUEST_METADATA_MODE = 786435,
- ANDROID_REQUEST_OUTPUT_STREAMS = 786436,
- ANDROID_REQUEST_TYPE = 786437,
- ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS = 786438,
- ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS = 786439,
- ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS = 786440,
- ANDROID_REQUEST_PIPELINE_DEPTH = 786441,
- ANDROID_REQUEST_PIPELINE_MAX_DEPTH = 786442,
- ANDROID_REQUEST_PARTIAL_RESULT_COUNT = 786443,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES = 786444,
- ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS = 786445,
- ANDROID_REQUEST_AVAILABLE_RESULT_KEYS = 786446,
- ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = 786447,
- ANDROID_REQUEST_AVAILABLE_SESSION_KEYS = 786448,
- ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS = 786449,
- ANDROID_REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION = 786450,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP = 786451,
- ANDROID_REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE = 786452,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP = 786453,
- ANDROID_SCALER_CROP_REGION = 851968,
- ANDROID_SCALER_AVAILABLE_FORMATS = 851969,
- ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS = 851970,
- ANDROID_SCALER_AVAILABLE_JPEG_SIZES = 851971,
- ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = 851972,
- ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = 851973,
- ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES = 851974,
- ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS = 851975,
- ANDROID_SCALER_AVAILABLE_RAW_SIZES = 851976,
- ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = 851977,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS = 851978,
- ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS = 851979,
- ANDROID_SCALER_AVAILABLE_STALL_DURATIONS = 851980,
- ANDROID_SCALER_CROPPING_TYPE = 851981,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS = 851982,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP = 851983,
- ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = 851984,
- ANDROID_SCALER_ROTATE_AND_CROP = 851985,
- ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE = 851986,
- ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS = 851987,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 851988,
- ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 851989,
- ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION = 851990,
- ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION = 851991,
- ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED = 851992,
+ ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES,
+ ANDROID_CONTROL_SETTINGS_OVERRIDING_FRAME_NUMBER,
+ ANDROID_CONTROL_AUTOFRAMING,
+ ANDROID_CONTROL_AUTOFRAMING_AVAILABLE,
+ ANDROID_CONTROL_AUTOFRAMING_STATE,
+ ANDROID_DEMOSAIC_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_DEMOSAIC_START /* 131072 */,
+ ANDROID_EDGE_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_EDGE_START /* 196608 */,
+ ANDROID_EDGE_STRENGTH,
+ ANDROID_EDGE_AVAILABLE_EDGE_MODES,
+ ANDROID_FLASH_FIRING_POWER = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_FLASH_START /* 262144 */,
+ ANDROID_FLASH_FIRING_TIME,
+ ANDROID_FLASH_MODE,
+ ANDROID_FLASH_COLOR_TEMPERATURE,
+ ANDROID_FLASH_MAX_ENERGY,
+ ANDROID_FLASH_STATE,
+ ANDROID_FLASH_INFO_AVAILABLE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_FLASH_INFO_START /* 327680 */,
+ ANDROID_FLASH_INFO_CHARGE_DURATION,
+ ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL,
+ ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL,
+ ANDROID_HOT_PIXEL_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_HOT_PIXEL_START /* 393216 */,
+ ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES,
+ ANDROID_JPEG_GPS_COORDINATES = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_JPEG_START /* 458752 */,
+ ANDROID_JPEG_GPS_PROCESSING_METHOD,
+ ANDROID_JPEG_GPS_TIMESTAMP,
+ ANDROID_JPEG_ORIENTATION,
+ ANDROID_JPEG_QUALITY,
+ ANDROID_JPEG_THUMBNAIL_QUALITY,
+ ANDROID_JPEG_THUMBNAIL_SIZE,
+ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
+ ANDROID_JPEG_MAX_SIZE,
+ ANDROID_JPEG_SIZE,
+ ANDROID_LENS_APERTURE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_LENS_START /* 524288 */,
+ ANDROID_LENS_FILTER_DENSITY,
+ ANDROID_LENS_FOCAL_LENGTH,
+ ANDROID_LENS_FOCUS_DISTANCE,
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE,
+ ANDROID_LENS_FACING,
+ ANDROID_LENS_POSE_ROTATION,
+ ANDROID_LENS_POSE_TRANSLATION,
+ ANDROID_LENS_FOCUS_RANGE,
+ ANDROID_LENS_STATE,
+ ANDROID_LENS_INTRINSIC_CALIBRATION,
+ ANDROID_LENS_RADIAL_DISTORTION,
+ ANDROID_LENS_POSE_REFERENCE,
+ ANDROID_LENS_DISTORTION,
+ ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION,
+ ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION,
+ ANDROID_LENS_INFO_AVAILABLE_APERTURES = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_LENS_INFO_START /* 589824 */,
+ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES,
+ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS,
+ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
+ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE,
+ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE,
+ ANDROID_LENS_INFO_SHADING_MAP_SIZE,
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION,
+ ANDROID_NOISE_REDUCTION_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_NOISE_REDUCTION_START /* 655360 */,
+ ANDROID_NOISE_REDUCTION_STRENGTH,
+ ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES,
+ ANDROID_QUIRKS_METERING_CROP_REGION = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_QUIRKS_START /* 720896 */,
+ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO,
+ ANDROID_QUIRKS_USE_ZSL_FORMAT,
+ ANDROID_QUIRKS_USE_PARTIAL_RESULT,
+ ANDROID_QUIRKS_PARTIAL_RESULT,
+ ANDROID_REQUEST_FRAME_COUNT = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_REQUEST_START /* 786432 */,
+ ANDROID_REQUEST_ID,
+ ANDROID_REQUEST_INPUT_STREAMS,
+ ANDROID_REQUEST_METADATA_MODE,
+ ANDROID_REQUEST_OUTPUT_STREAMS,
+ ANDROID_REQUEST_TYPE,
+ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
+ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS,
+ ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
+ ANDROID_REQUEST_PIPELINE_DEPTH,
+ ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
+ ANDROID_REQUEST_PARTIAL_RESULT_COUNT,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES,
+ ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS,
+ ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,
+ ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
+ ANDROID_REQUEST_AVAILABLE_SESSION_KEYS,
+ ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS,
+ ANDROID_REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP,
+ ANDROID_REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP,
+ ANDROID_SCALER_CROP_REGION = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_SCALER_START /* 851968 */,
+ ANDROID_SCALER_AVAILABLE_FORMATS,
+ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_JPEG_SIZES,
+ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM,
+ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES,
+ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_RAW_SIZES,
+ ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
+ ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS,
+ ANDROID_SCALER_AVAILABLE_STALL_DURATIONS,
+ ANDROID_SCALER_CROPPING_TYPE,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP,
+ ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES,
+ ANDROID_SCALER_ROTATE_AND_CROP,
+ ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE,
+ ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION,
+ ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED,
ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES = 851994,
- ANDROID_SCALER_RAW_CROP_REGION = 851995,
- ANDROID_SENSOR_EXPOSURE_TIME = 917504,
- ANDROID_SENSOR_FRAME_DURATION = 917505,
- ANDROID_SENSOR_SENSITIVITY = 917506,
- ANDROID_SENSOR_REFERENCE_ILLUMINANT1 = 917507,
- ANDROID_SENSOR_REFERENCE_ILLUMINANT2 = 917508,
- ANDROID_SENSOR_CALIBRATION_TRANSFORM1 = 917509,
- ANDROID_SENSOR_CALIBRATION_TRANSFORM2 = 917510,
- ANDROID_SENSOR_COLOR_TRANSFORM1 = 917511,
- ANDROID_SENSOR_COLOR_TRANSFORM2 = 917512,
- ANDROID_SENSOR_FORWARD_MATRIX1 = 917513,
- ANDROID_SENSOR_FORWARD_MATRIX2 = 917514,
- ANDROID_SENSOR_BASE_GAIN_FACTOR = 917515,
- ANDROID_SENSOR_BLACK_LEVEL_PATTERN = 917516,
- ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY = 917517,
- ANDROID_SENSOR_ORIENTATION = 917518,
- ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS = 917519,
- ANDROID_SENSOR_TIMESTAMP = 917520,
- ANDROID_SENSOR_TEMPERATURE = 917521,
- ANDROID_SENSOR_NEUTRAL_COLOR_POINT = 917522,
- ANDROID_SENSOR_NOISE_PROFILE = 917523,
- ANDROID_SENSOR_PROFILE_HUE_SAT_MAP = 917524,
- ANDROID_SENSOR_PROFILE_TONE_CURVE = 917525,
- ANDROID_SENSOR_GREEN_SPLIT = 917526,
- ANDROID_SENSOR_TEST_PATTERN_DATA = 917527,
- ANDROID_SENSOR_TEST_PATTERN_MODE = 917528,
- ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES = 917529,
- ANDROID_SENSOR_ROLLING_SHUTTER_SKEW = 917530,
- ANDROID_SENSOR_OPTICAL_BLACK_REGIONS = 917531,
- ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL = 917532,
- ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL = 917533,
- ANDROID_SENSOR_OPAQUE_RAW_SIZE = 917534,
- ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION = 917535,
- ANDROID_SENSOR_PIXEL_MODE = 917536,
- ANDROID_SENSOR_RAW_BINNING_FACTOR_USED = 917537,
- ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = 983040,
- ANDROID_SENSOR_INFO_SENSITIVITY_RANGE = 983041,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = 983042,
- ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE = 983043,
- ANDROID_SENSOR_INFO_MAX_FRAME_DURATION = 983044,
- ANDROID_SENSOR_INFO_PHYSICAL_SIZE = 983045,
- ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE = 983046,
- ANDROID_SENSOR_INFO_WHITE_LEVEL = 983047,
- ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE = 983048,
- ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED = 983049,
- ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = 983050,
- ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983051,
- ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983052,
- ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION = 983053,
- ANDROID_SENSOR_INFO_BINNING_FACTOR = 983054,
- ANDROID_SHADING_MODE = 1048576,
- ANDROID_SHADING_STRENGTH = 1048577,
- ANDROID_SHADING_AVAILABLE_MODES = 1048578,
- ANDROID_STATISTICS_FACE_DETECT_MODE = 1114112,
- ANDROID_STATISTICS_HISTOGRAM_MODE = 1114113,
- ANDROID_STATISTICS_SHARPNESS_MAP_MODE = 1114114,
- ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE = 1114115,
- ANDROID_STATISTICS_FACE_IDS = 1114116,
- ANDROID_STATISTICS_FACE_LANDMARKS = 1114117,
- ANDROID_STATISTICS_FACE_RECTANGLES = 1114118,
- ANDROID_STATISTICS_FACE_SCORES = 1114119,
- ANDROID_STATISTICS_HISTOGRAM = 1114120,
- ANDROID_STATISTICS_SHARPNESS_MAP = 1114121,
- ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP = 1114122,
- ANDROID_STATISTICS_LENS_SHADING_MAP = 1114123,
- ANDROID_STATISTICS_PREDICTED_COLOR_GAINS = 1114124,
- ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM = 1114125,
- ANDROID_STATISTICS_SCENE_FLICKER = 1114126,
- ANDROID_STATISTICS_HOT_PIXEL_MAP = 1114127,
- ANDROID_STATISTICS_LENS_SHADING_MAP_MODE = 1114128,
- ANDROID_STATISTICS_OIS_DATA_MODE = 1114129,
- ANDROID_STATISTICS_OIS_TIMESTAMPS = 1114130,
- ANDROID_STATISTICS_OIS_X_SHIFTS = 1114131,
- ANDROID_STATISTICS_OIS_Y_SHIFTS = 1114132,
- ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 1179648,
- ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT = 1179649,
- ANDROID_STATISTICS_INFO_MAX_FACE_COUNT = 1179650,
- ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT = 1179651,
- ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE = 1179652,
- ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE = 1179653,
- ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = 1179654,
- ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = 1179655,
- ANDROID_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES = 1179656,
- ANDROID_TONEMAP_CURVE_BLUE = 1245184,
- ANDROID_TONEMAP_CURVE_GREEN = 1245185,
- ANDROID_TONEMAP_CURVE_RED = 1245186,
- ANDROID_TONEMAP_MODE = 1245187,
- ANDROID_TONEMAP_MAX_CURVE_POINTS = 1245188,
- ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES = 1245189,
- ANDROID_TONEMAP_GAMMA = 1245190,
- ANDROID_TONEMAP_PRESET_CURVE = 1245191,
- ANDROID_LED_TRANSMIT = 1310720,
- ANDROID_LED_AVAILABLE_LEDS = 1310721,
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL = 1376256,
- ANDROID_INFO_VERSION = 1376257,
- ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION = 1376258,
- ANDROID_INFO_DEVICE_STATE_ORIENTATIONS = 1376259,
- ANDROID_BLACK_LEVEL_LOCK = 1441792,
- ANDROID_SYNC_FRAME_NUMBER = 1507328,
- ANDROID_SYNC_MAX_LATENCY = 1507329,
- ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 1572864,
- ANDROID_REPROCESS_MAX_CAPTURE_STALL = 1572865,
- ANDROID_DEPTH_MAX_DEPTH_SAMPLES = 1638400,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = 1638401,
- ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = 1638402,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = 1638403,
- ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE = 1638404,
- ANDROID_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS = 1638405,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS = 1638406,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = 1638407,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS = 1638408,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1638409,
- ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1638410,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1638411,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1638412,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1638413,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1638414,
- ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = 1703936,
- ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE = 1703937,
- ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID = 1703938,
- ANDROID_DISTORTION_CORRECTION_MODE = 1769472,
- ANDROID_DISTORTION_CORRECTION_AVAILABLE_MODES = 1769473,
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = 1835008,
- ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS = 1835009,
- ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS = 1835010,
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 1835011,
- ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 1835012,
- ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION = 1835013,
- ANDROID_HEIC_INFO_SUPPORTED = 1900544,
- ANDROID_HEIC_INFO_MAX_JPEG_APP_SEGMENTS_COUNT = 1900545,
- ANDROID_AUTOMOTIVE_LOCATION = 1966080,
- ANDROID_AUTOMOTIVE_LENS_FACING = 2031616,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS = 2162688,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS = 2162689,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS = 2162690,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION = 2162691,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION = 2162692,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS_MAXIMUM_RESOLUTION = 2162693,
+ ANDROID_SCALER_RAW_CROP_REGION,
+ ANDROID_SENSOR_EXPOSURE_TIME = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_SENSOR_START /* 917504 */,
+ ANDROID_SENSOR_FRAME_DURATION,
+ ANDROID_SENSOR_SENSITIVITY,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT1,
+ ANDROID_SENSOR_REFERENCE_ILLUMINANT2,
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM1,
+ ANDROID_SENSOR_CALIBRATION_TRANSFORM2,
+ ANDROID_SENSOR_COLOR_TRANSFORM1,
+ ANDROID_SENSOR_COLOR_TRANSFORM2,
+ ANDROID_SENSOR_FORWARD_MATRIX1,
+ ANDROID_SENSOR_FORWARD_MATRIX2,
+ ANDROID_SENSOR_BASE_GAIN_FACTOR,
+ ANDROID_SENSOR_BLACK_LEVEL_PATTERN,
+ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,
+ ANDROID_SENSOR_ORIENTATION,
+ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS,
+ ANDROID_SENSOR_TIMESTAMP,
+ ANDROID_SENSOR_TEMPERATURE,
+ ANDROID_SENSOR_NEUTRAL_COLOR_POINT,
+ ANDROID_SENSOR_NOISE_PROFILE,
+ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP,
+ ANDROID_SENSOR_PROFILE_TONE_CURVE,
+ ANDROID_SENSOR_GREEN_SPLIT,
+ ANDROID_SENSOR_TEST_PATTERN_DATA,
+ ANDROID_SENSOR_TEST_PATTERN_MODE,
+ ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES,
+ ANDROID_SENSOR_ROLLING_SHUTTER_SKEW,
+ ANDROID_SENSOR_OPTICAL_BLACK_REGIONS,
+ ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL,
+ ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL,
+ ANDROID_SENSOR_OPAQUE_RAW_SIZE,
+ ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION,
+ ANDROID_SENSOR_PIXEL_MODE,
+ ANDROID_SENSOR_RAW_BINNING_FACTOR_USED,
+ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_SENSOR_INFO_START /* 983040 */,
+ ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
+ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
+ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION,
+ ANDROID_SENSOR_INFO_PHYSICAL_SIZE,
+ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,
+ ANDROID_SENSOR_INFO_WHITE_LEVEL,
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE,
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED,
+ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
+ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION,
+ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION,
+ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION,
+ ANDROID_SENSOR_INFO_BINNING_FACTOR,
+ ANDROID_SHADING_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_SHADING_START /* 1048576 */,
+ ANDROID_SHADING_STRENGTH,
+ ANDROID_SHADING_AVAILABLE_MODES,
+ ANDROID_STATISTICS_FACE_DETECT_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_STATISTICS_START /* 1114112 */,
+ ANDROID_STATISTICS_HISTOGRAM_MODE,
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE,
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE,
+ ANDROID_STATISTICS_FACE_IDS,
+ ANDROID_STATISTICS_FACE_LANDMARKS,
+ ANDROID_STATISTICS_FACE_RECTANGLES,
+ ANDROID_STATISTICS_FACE_SCORES,
+ ANDROID_STATISTICS_HISTOGRAM,
+ ANDROID_STATISTICS_SHARPNESS_MAP,
+ ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP,
+ ANDROID_STATISTICS_LENS_SHADING_MAP,
+ ANDROID_STATISTICS_PREDICTED_COLOR_GAINS,
+ ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM,
+ ANDROID_STATISTICS_SCENE_FLICKER,
+ ANDROID_STATISTICS_HOT_PIXEL_MAP,
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE,
+ ANDROID_STATISTICS_OIS_DATA_MODE,
+ ANDROID_STATISTICS_OIS_TIMESTAMPS,
+ ANDROID_STATISTICS_OIS_X_SHIFTS,
+ ANDROID_STATISTICS_OIS_Y_SHIFTS,
+ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_STATISTICS_INFO_START /* 1179648 */,
+ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT,
+ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE,
+ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE,
+ ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES,
+ ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES,
+ ANDROID_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES,
+ ANDROID_TONEMAP_CURVE_BLUE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_TONEMAP_START /* 1245184 */,
+ ANDROID_TONEMAP_CURVE_GREEN,
+ ANDROID_TONEMAP_CURVE_RED,
+ ANDROID_TONEMAP_MODE,
+ ANDROID_TONEMAP_MAX_CURVE_POINTS,
+ ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES,
+ ANDROID_TONEMAP_GAMMA,
+ ANDROID_TONEMAP_PRESET_CURVE,
+ ANDROID_LED_TRANSMIT = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_LED_START /* 1310720 */,
+ ANDROID_LED_AVAILABLE_LEDS,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_INFO_START /* 1376256 */,
+ ANDROID_INFO_VERSION,
+ ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION,
+ ANDROID_INFO_DEVICE_STATE_ORIENTATIONS,
+ ANDROID_BLACK_LEVEL_LOCK = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_BLACK_LEVEL_START /* 1441792 */,
+ ANDROID_SYNC_FRAME_NUMBER = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_SYNC_START /* 1507328 */,
+ ANDROID_SYNC_MAX_LATENCY,
+ ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_REPROCESS_START /* 1572864 */,
+ ANDROID_REPROCESS_MAX_CAPTURE_STALL,
+ ANDROID_DEPTH_MAX_DEPTH_SAMPLES = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_DEPTH_START /* 1638400 */,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS,
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE,
+ ANDROID_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_LOGICAL_MULTI_CAMERA_START /* 1703936 */,
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE,
+ ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID,
+ ANDROID_DISTORTION_CORRECTION_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_DISTORTION_CORRECTION_START /* 1769472 */,
+ ANDROID_DISTORTION_CORRECTION_AVAILABLE_MODES,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_HEIC_START /* 1835008 */,
+ ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS,
+ ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_HEIC_INFO_SUPPORTED = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_HEIC_INFO_START /* 1900544 */,
+ ANDROID_HEIC_INFO_MAX_JPEG_APP_SEGMENTS_COUNT,
+ ANDROID_AUTOMOTIVE_LOCATION = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_AUTOMOTIVE_START /* 1966080 */,
+ ANDROID_AUTOMOTIVE_LENS_FACING = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_AUTOMOTIVE_LENS_START /* 2031616 */,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_JPEGR_START /* 2162688 */,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS_MAXIMUM_RESOLUTION,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
index d04ffe3..0b976f3 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionAberrationMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ColorCorrectionAberrationMode {
- ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF = 0,
- ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST = 1,
- ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2,
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF,
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST,
+ ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
index 219c802..2381605 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ColorCorrectionMode {
- ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0,
- ANDROID_COLOR_CORRECTION_MODE_FAST = 1,
- ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY = 2,
+ ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX,
+ ANDROID_COLOR_CORRECTION_MODE_FAST,
+ ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
index 84fd718..0d5aad9 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeAntibandingMode.aidl
@@ -38,8 +38,8 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAeAntibandingMode {
- ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF = 0,
- ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ = 1,
- ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ = 2,
- ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO = 3,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ,
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLock.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLock.aidl
index f825f11..766b835 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLock.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLock.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAeLock {
- ANDROID_CONTROL_AE_LOCK_OFF = 0,
- ANDROID_CONTROL_AE_LOCK_ON = 1,
+ ANDROID_CONTROL_AE_LOCK_OFF,
+ ANDROID_CONTROL_AE_LOCK_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLockAvailable.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
index df7924e..a22c93e 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeLockAvailable.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAeLockAvailable {
- ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE = 0,
- ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE = 1,
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE,
+ ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeMode.aidl
index 75a3486..5e1b871 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeMode.aidl
@@ -38,10 +38,10 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAeMode {
- ANDROID_CONTROL_AE_MODE_OFF = 0,
- ANDROID_CONTROL_AE_MODE_ON = 1,
- ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH = 2,
- ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3,
- ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4,
- ANDROID_CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5,
+ ANDROID_CONTROL_AE_MODE_OFF,
+ ANDROID_CONTROL_AE_MODE_ON,
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH,
+ ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH,
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE,
+ ANDROID_CONTROL_AE_MODE_ON_EXTERNAL_FLASH,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
index 4678e01..20382c0 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePrecaptureTrigger.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAePrecaptureTrigger {
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0,
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START = 1,
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START,
+ ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeState.aidl
index 3be64ea..e52eafe 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAeState.aidl
@@ -38,10 +38,10 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAeState {
- ANDROID_CONTROL_AE_STATE_INACTIVE = 0,
- ANDROID_CONTROL_AE_STATE_SEARCHING = 1,
- ANDROID_CONTROL_AE_STATE_CONVERGED = 2,
- ANDROID_CONTROL_AE_STATE_LOCKED = 3,
- ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED = 4,
- ANDROID_CONTROL_AE_STATE_PRECAPTURE = 5,
+ ANDROID_CONTROL_AE_STATE_INACTIVE,
+ ANDROID_CONTROL_AE_STATE_SEARCHING,
+ ANDROID_CONTROL_AE_STATE_CONVERGED,
+ ANDROID_CONTROL_AE_STATE_LOCKED,
+ ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED,
+ ANDROID_CONTROL_AE_STATE_PRECAPTURE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfMode.aidl
index 155d3c9..6cd46c6 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfMode.aidl
@@ -38,10 +38,10 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAfMode {
- ANDROID_CONTROL_AF_MODE_OFF = 0,
- ANDROID_CONTROL_AF_MODE_AUTO = 1,
- ANDROID_CONTROL_AF_MODE_MACRO = 2,
- ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3,
- ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4,
- ANDROID_CONTROL_AF_MODE_EDOF = 5,
+ ANDROID_CONTROL_AF_MODE_OFF,
+ ANDROID_CONTROL_AF_MODE_AUTO,
+ ANDROID_CONTROL_AF_MODE_MACRO,
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO,
+ ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE,
+ ANDROID_CONTROL_AF_MODE_EDOF,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfSceneChange.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfSceneChange.aidl
index 4b31c84..ba853a1 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfSceneChange.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfSceneChange.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAfSceneChange {
- ANDROID_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0,
- ANDROID_CONTROL_AF_SCENE_CHANGE_DETECTED = 1,
+ ANDROID_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED,
+ ANDROID_CONTROL_AF_SCENE_CHANGE_DETECTED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfState.aidl
index 4aac8c8..25b6a1c 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfState.aidl
@@ -38,11 +38,11 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAfState {
- ANDROID_CONTROL_AF_STATE_INACTIVE = 0,
- ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN = 1,
- ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED = 2,
- ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN = 3,
- ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED = 4,
- ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5,
- ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6,
+ ANDROID_CONTROL_AF_STATE_INACTIVE,
+ ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN,
+ ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED,
+ ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN,
+ ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED,
+ ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED,
+ ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfTrigger.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfTrigger.aidl
index 3fbf94b..9d61b2d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfTrigger.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAfTrigger.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAfTrigger {
- ANDROID_CONTROL_AF_TRIGGER_IDLE = 0,
- ANDROID_CONTROL_AF_TRIGGER_START = 1,
- ANDROID_CONTROL_AF_TRIGGER_CANCEL = 2,
+ ANDROID_CONTROL_AF_TRIGGER_IDLE,
+ ANDROID_CONTROL_AF_TRIGGER_START,
+ ANDROID_CONTROL_AF_TRIGGER_CANCEL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl
index eeb7bcd..2daf00b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframing.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAutoframing {
- ANDROID_CONTROL_AUTOFRAMING_OFF = 0,
- ANDROID_CONTROL_AUTOFRAMING_ON = 1,
- ANDROID_CONTROL_AUTOFRAMING_AUTO = 2,
+ ANDROID_CONTROL_AUTOFRAMING_OFF,
+ ANDROID_CONTROL_AUTOFRAMING_ON,
+ ANDROID_CONTROL_AUTOFRAMING_AUTO,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
index b075c32..ab91bb4 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingAvailable.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAutoframingAvailable {
- ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_FALSE = 0,
- ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_TRUE = 1,
+ ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_FALSE,
+ ANDROID_CONTROL_AUTOFRAMING_AVAILABLE_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl
index 60df0d4..db0d288 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAutoframingState.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAutoframingState {
- ANDROID_CONTROL_AUTOFRAMING_STATE_INACTIVE = 0,
- ANDROID_CONTROL_AUTOFRAMING_STATE_FRAMING = 1,
- ANDROID_CONTROL_AUTOFRAMING_STATE_CONVERGED = 2,
+ ANDROID_CONTROL_AUTOFRAMING_STATE_INACTIVE,
+ ANDROID_CONTROL_AUTOFRAMING_STATE_FRAMING,
+ ANDROID_CONTROL_AUTOFRAMING_STATE_CONVERGED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLock.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLock.aidl
index 0e297a5..949b5e8 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLock.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLock.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAwbLock {
- ANDROID_CONTROL_AWB_LOCK_OFF = 0,
- ANDROID_CONTROL_AWB_LOCK_ON = 1,
+ ANDROID_CONTROL_AWB_LOCK_OFF,
+ ANDROID_CONTROL_AWB_LOCK_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
index d471d19..80c4c31 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbLockAvailable.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAwbLockAvailable {
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE = 0,
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE = 1,
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE,
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbMode.aidl
index a3463f8..6ed9ece 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbMode.aidl
@@ -38,13 +38,13 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAwbMode {
- ANDROID_CONTROL_AWB_MODE_OFF = 0,
- ANDROID_CONTROL_AWB_MODE_AUTO = 1,
- ANDROID_CONTROL_AWB_MODE_INCANDESCENT = 2,
- ANDROID_CONTROL_AWB_MODE_FLUORESCENT = 3,
- ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT = 4,
- ANDROID_CONTROL_AWB_MODE_DAYLIGHT = 5,
- ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6,
- ANDROID_CONTROL_AWB_MODE_TWILIGHT = 7,
- ANDROID_CONTROL_AWB_MODE_SHADE = 8,
+ ANDROID_CONTROL_AWB_MODE_OFF,
+ ANDROID_CONTROL_AWB_MODE_AUTO,
+ ANDROID_CONTROL_AWB_MODE_INCANDESCENT,
+ ANDROID_CONTROL_AWB_MODE_FLUORESCENT,
+ ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT,
+ ANDROID_CONTROL_AWB_MODE_DAYLIGHT,
+ ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT,
+ ANDROID_CONTROL_AWB_MODE_TWILIGHT,
+ ANDROID_CONTROL_AWB_MODE_SHADE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbState.aidl
index f1b0e40..c5b02d5 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAwbState.aidl
@@ -38,8 +38,8 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlAwbState {
- ANDROID_CONTROL_AWB_STATE_INACTIVE = 0,
- ANDROID_CONTROL_AWB_STATE_SEARCHING = 1,
- ANDROID_CONTROL_AWB_STATE_CONVERGED = 2,
- ANDROID_CONTROL_AWB_STATE_LOCKED = 3,
+ ANDROID_CONTROL_AWB_STATE_INACTIVE,
+ ANDROID_CONTROL_AWB_STATE_SEARCHING,
+ ANDROID_CONTROL_AWB_STATE_CONVERGED,
+ ANDROID_CONTROL_AWB_STATE_LOCKED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlCaptureIntent.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlCaptureIntent.aidl
index 283bb1b..fa1c0a9 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlCaptureIntent.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlCaptureIntent.aidl
@@ -38,12 +38,12 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlCaptureIntent {
- ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM = 0,
- ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW = 1,
- ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2,
- ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3,
- ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4,
- ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5,
- ANDROID_CONTROL_CAPTURE_INTENT_MANUAL = 6,
- ANDROID_CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7,
+ ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM,
+ ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW,
+ ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE,
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD,
+ ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT,
+ ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG,
+ ANDROID_CONTROL_CAPTURE_INTENT_MANUAL,
+ ANDROID_CONTROL_CAPTURE_INTENT_MOTION_TRACKING,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEffectMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEffectMode.aidl
index 911223d..471deed 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEffectMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEffectMode.aidl
@@ -38,13 +38,13 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlEffectMode {
- ANDROID_CONTROL_EFFECT_MODE_OFF = 0,
- ANDROID_CONTROL_EFFECT_MODE_MONO = 1,
- ANDROID_CONTROL_EFFECT_MODE_NEGATIVE = 2,
- ANDROID_CONTROL_EFFECT_MODE_SOLARIZE = 3,
- ANDROID_CONTROL_EFFECT_MODE_SEPIA = 4,
- ANDROID_CONTROL_EFFECT_MODE_POSTERIZE = 5,
- ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD = 6,
- ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD = 7,
- ANDROID_CONTROL_EFFECT_MODE_AQUA = 8,
+ ANDROID_CONTROL_EFFECT_MODE_OFF,
+ ANDROID_CONTROL_EFFECT_MODE_MONO,
+ ANDROID_CONTROL_EFFECT_MODE_NEGATIVE,
+ ANDROID_CONTROL_EFFECT_MODE_SOLARIZE,
+ ANDROID_CONTROL_EFFECT_MODE_SEPIA,
+ ANDROID_CONTROL_EFFECT_MODE_POSTERIZE,
+ ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD,
+ ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD,
+ ANDROID_CONTROL_EFFECT_MODE_AQUA,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEnableZsl.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEnableZsl.aidl
index 920def7..3f2d4a3 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEnableZsl.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlEnableZsl.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlEnableZsl {
- ANDROID_CONTROL_ENABLE_ZSL_FALSE = 0,
- ANDROID_CONTROL_ENABLE_ZSL_TRUE = 1,
+ ANDROID_CONTROL_ENABLE_ZSL_FALSE,
+ ANDROID_CONTROL_ENABLE_ZSL_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
index 2655d61..7838288 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlExtendedSceneMode.aidl
@@ -39,7 +39,7 @@
@Backing(type="int") @VintfStability
enum ControlExtendedSceneMode {
ANDROID_CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0,
- ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE = 1,
- ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS = 2,
- ANDROID_CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 64,
+ ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE,
+ ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS,
+ ANDROID_CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 0x40,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlMode.aidl
index f58491e..c5a8172 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlMode.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlMode {
- ANDROID_CONTROL_MODE_OFF = 0,
- ANDROID_CONTROL_MODE_AUTO = 1,
- ANDROID_CONTROL_MODE_USE_SCENE_MODE = 2,
- ANDROID_CONTROL_MODE_OFF_KEEP_STATE = 3,
- ANDROID_CONTROL_MODE_USE_EXTENDED_SCENE_MODE = 4,
+ ANDROID_CONTROL_MODE_OFF,
+ ANDROID_CONTROL_MODE_AUTO,
+ ANDROID_CONTROL_MODE_USE_SCENE_MODE,
+ ANDROID_CONTROL_MODE_OFF_KEEP_STATE,
+ ANDROID_CONTROL_MODE_USE_EXTENDED_SCENE_MODE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSceneMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSceneMode.aidl
index 994bbf3..62c67e3 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSceneMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSceneMode.aidl
@@ -39,25 +39,25 @@
@Backing(type="int") @VintfStability
enum ControlSceneMode {
ANDROID_CONTROL_SCENE_MODE_DISABLED = 0,
- ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY = 1,
- ANDROID_CONTROL_SCENE_MODE_ACTION = 2,
- ANDROID_CONTROL_SCENE_MODE_PORTRAIT = 3,
- ANDROID_CONTROL_SCENE_MODE_LANDSCAPE = 4,
- ANDROID_CONTROL_SCENE_MODE_NIGHT = 5,
- ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6,
- ANDROID_CONTROL_SCENE_MODE_THEATRE = 7,
- ANDROID_CONTROL_SCENE_MODE_BEACH = 8,
- ANDROID_CONTROL_SCENE_MODE_SNOW = 9,
- ANDROID_CONTROL_SCENE_MODE_SUNSET = 10,
- ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO = 11,
- ANDROID_CONTROL_SCENE_MODE_FIREWORKS = 12,
- ANDROID_CONTROL_SCENE_MODE_SPORTS = 13,
- ANDROID_CONTROL_SCENE_MODE_PARTY = 14,
- ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT = 15,
- ANDROID_CONTROL_SCENE_MODE_BARCODE = 16,
- ANDROID_CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17,
- ANDROID_CONTROL_SCENE_MODE_HDR = 18,
- ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19,
+ ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY,
+ ANDROID_CONTROL_SCENE_MODE_ACTION,
+ ANDROID_CONTROL_SCENE_MODE_PORTRAIT,
+ ANDROID_CONTROL_SCENE_MODE_LANDSCAPE,
+ ANDROID_CONTROL_SCENE_MODE_NIGHT,
+ ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT,
+ ANDROID_CONTROL_SCENE_MODE_THEATRE,
+ ANDROID_CONTROL_SCENE_MODE_BEACH,
+ ANDROID_CONTROL_SCENE_MODE_SNOW,
+ ANDROID_CONTROL_SCENE_MODE_SUNSET,
+ ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO,
+ ANDROID_CONTROL_SCENE_MODE_FIREWORKS,
+ ANDROID_CONTROL_SCENE_MODE_SPORTS,
+ ANDROID_CONTROL_SCENE_MODE_PARTY,
+ ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT,
+ ANDROID_CONTROL_SCENE_MODE_BARCODE,
+ ANDROID_CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO,
+ ANDROID_CONTROL_SCENE_MODE_HDR,
+ ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT,
ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100,
ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSettingsOverride.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSettingsOverride.aidl
index ed5d46f..404bbfa 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSettingsOverride.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlSettingsOverride.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlSettingsOverride {
- ANDROID_CONTROL_SETTINGS_OVERRIDE_OFF = 0,
- ANDROID_CONTROL_SETTINGS_OVERRIDE_ZOOM = 1,
- ANDROID_CONTROL_SETTINGS_OVERRIDE_VENDOR_START = 16384,
+ ANDROID_CONTROL_SETTINGS_OVERRIDE_OFF,
+ ANDROID_CONTROL_SETTINGS_OVERRIDE_ZOOM,
+ ANDROID_CONTROL_SETTINGS_OVERRIDE_VENDOR_START = 0x4000,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
index b3b24f7..2b199ef 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlVideoStabilizationMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ControlVideoStabilizationMode {
- ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0,
- ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON = 1,
- ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION = 2,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON,
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DemosaicMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DemosaicMode.aidl
index 26874a2..5770009 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DemosaicMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DemosaicMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DemosaicMode {
- ANDROID_DEMOSAIC_MODE_FAST = 0,
- ANDROID_DEMOSAIC_MODE_HIGH_QUALITY = 1,
+ ANDROID_DEMOSAIC_MODE_FAST,
+ ANDROID_DEMOSAIC_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
index 6a154ca..0cce2da 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DepthAvailableDepthStreamConfigurations {
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
index 23d6589..9be06db 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDepthStreamConfigurationsMaximumResolution.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DepthAvailableDepthStreamConfigurationsMaximumResolution {
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT = 0,
- ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT = 1,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
index f3ca039..c6aebaa 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DepthAvailableDynamicDepthStreamConfigurations {
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
index 46a4ce6..4d5161d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DepthAvailableDynamicDepthStreamConfigurationsMaximumResolution {
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT = 0,
- ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT = 1,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
index f5fc218..f7b69cd 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DepthDepthIsExclusive.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DepthDepthIsExclusive {
- ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE = 0,
- ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE = 1,
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE,
+ ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DistortionCorrectionMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
index 46327e0..6e965f6 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/DistortionCorrectionMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum DistortionCorrectionMode {
- ANDROID_DISTORTION_CORRECTION_MODE_OFF = 0,
- ANDROID_DISTORTION_CORRECTION_MODE_FAST = 1,
- ANDROID_DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2,
+ ANDROID_DISTORTION_CORRECTION_MODE_OFF,
+ ANDROID_DISTORTION_CORRECTION_MODE_FAST,
+ ANDROID_DISTORTION_CORRECTION_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/EdgeMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/EdgeMode.aidl
index 4b02e19..fdd32f4 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/EdgeMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/EdgeMode.aidl
@@ -38,8 +38,8 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum EdgeMode {
- ANDROID_EDGE_MODE_OFF = 0,
- ANDROID_EDGE_MODE_FAST = 1,
- ANDROID_EDGE_MODE_HIGH_QUALITY = 2,
- ANDROID_EDGE_MODE_ZERO_SHUTTER_LAG = 3,
+ ANDROID_EDGE_MODE_OFF,
+ ANDROID_EDGE_MODE_FAST,
+ ANDROID_EDGE_MODE_HIGH_QUALITY,
+ ANDROID_EDGE_MODE_ZERO_SHUTTER_LAG,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashInfoAvailable.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashInfoAvailable.aidl
index 10d07a5..83292fe 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashInfoAvailable.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashInfoAvailable.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum FlashInfoAvailable {
- ANDROID_FLASH_INFO_AVAILABLE_FALSE = 0,
- ANDROID_FLASH_INFO_AVAILABLE_TRUE = 1,
+ ANDROID_FLASH_INFO_AVAILABLE_FALSE,
+ ANDROID_FLASH_INFO_AVAILABLE_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashMode.aidl
index 1ab0560..e18ea3c 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum FlashMode {
- ANDROID_FLASH_MODE_OFF = 0,
- ANDROID_FLASH_MODE_SINGLE = 1,
- ANDROID_FLASH_MODE_TORCH = 2,
+ ANDROID_FLASH_MODE_OFF,
+ ANDROID_FLASH_MODE_SINGLE,
+ ANDROID_FLASH_MODE_TORCH,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashState.aidl
index a571e66..4343d4f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/FlashState.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum FlashState {
- ANDROID_FLASH_STATE_UNAVAILABLE = 0,
- ANDROID_FLASH_STATE_CHARGING = 1,
- ANDROID_FLASH_STATE_READY = 2,
- ANDROID_FLASH_STATE_FIRED = 3,
- ANDROID_FLASH_STATE_PARTIAL = 4,
+ ANDROID_FLASH_STATE_UNAVAILABLE,
+ ANDROID_FLASH_STATE_CHARGING,
+ ANDROID_FLASH_STATE_READY,
+ ANDROID_FLASH_STATE_FIRED,
+ ANDROID_FLASH_STATE_PARTIAL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
index d92c2db..3957267 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum HeicAvailableHeicStreamConfigurations {
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
index f02cf58..4eda538 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicStreamConfigurationsMaximumResolution.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum HeicAvailableHeicStreamConfigurationsMaximumResolution {
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT = 0,
- ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT = 1,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicInfoSupported.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicInfoSupported.aidl
index ae5a8e7..7079bbf 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicInfoSupported.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicInfoSupported.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum HeicInfoSupported {
- ANDROID_HEIC_INFO_SUPPORTED_FALSE = 0,
- ANDROID_HEIC_INFO_SUPPORTED_TRUE = 1,
+ ANDROID_HEIC_INFO_SUPPORTED_FALSE,
+ ANDROID_HEIC_INFO_SUPPORTED_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HotPixelMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HotPixelMode.aidl
index 1248c60..50b3446 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HotPixelMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HotPixelMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum HotPixelMode {
- ANDROID_HOT_PIXEL_MODE_OFF = 0,
- ANDROID_HOT_PIXEL_MODE_FAST = 1,
- ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY = 2,
+ ANDROID_HOT_PIXEL_MODE_OFF,
+ ANDROID_HOT_PIXEL_MODE_FAST,
+ ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
index 1272f27..7303ff5 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedBufferManagementVersion.aidl
@@ -38,5 +38,5 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum InfoSupportedBufferManagementVersion {
- ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_AIDL_DEVICE = 0,
+ ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_AIDL_DEVICE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
index 8ae39b0..3b50647 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/InfoSupportedHardwareLevel.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum InfoSupportedHardwareLevel {
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0,
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1,
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2,
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3,
- ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3,
+ ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
index cd005b5..cf9dbb7 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum JpegrAvailableJpegRStreamConfigurations {
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
index 68028db..0a95e1f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/JpegrAvailableJpegRStreamConfigurationsMaximumResolution.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum JpegrAvailableJpegRStreamConfigurationsMaximumResolution {
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT = 0,
- ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT = 1,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+ ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedAvailableLeds.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedAvailableLeds.aidl
index da558d2..b3beb2d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedAvailableLeds.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedAvailableLeds.aidl
@@ -38,5 +38,5 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LedAvailableLeds {
- ANDROID_LED_AVAILABLE_LEDS_TRANSMIT = 0,
+ ANDROID_LED_AVAILABLE_LEDS_TRANSMIT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedTransmit.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedTransmit.aidl
index 658b3cd..0cbf239 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedTransmit.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LedTransmit.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LedTransmit {
- ANDROID_LED_TRANSMIT_OFF = 0,
- ANDROID_LED_TRANSMIT_ON = 1,
+ ANDROID_LED_TRANSMIT_OFF,
+ ANDROID_LED_TRANSMIT_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensFacing.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensFacing.aidl
index 4db987b..d15674d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensFacing.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensFacing.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LensFacing {
- ANDROID_LENS_FACING_FRONT = 0,
- ANDROID_LENS_FACING_BACK = 1,
- ANDROID_LENS_FACING_EXTERNAL = 2,
+ ANDROID_LENS_FACING_FRONT,
+ ANDROID_LENS_FACING_BACK,
+ ANDROID_LENS_FACING_EXTERNAL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
index d83d67f..937347b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensInfoFocusDistanceCalibration.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LensInfoFocusDistanceCalibration {
- ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0,
- ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1,
- ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2,
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED,
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE,
+ ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
index f2f039c..550d9f3 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensOpticalStabilizationMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LensOpticalStabilizationMode {
- ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF = 0,
- ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON = 1,
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF,
+ ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensPoseReference.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensPoseReference.aidl
index b2d837a..6a3799d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensPoseReference.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensPoseReference.aidl
@@ -38,8 +38,8 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LensPoseReference {
- ANDROID_LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0,
- ANDROID_LENS_POSE_REFERENCE_GYROSCOPE = 1,
- ANDROID_LENS_POSE_REFERENCE_UNDEFINED = 2,
- ANDROID_LENS_POSE_REFERENCE_AUTOMOTIVE = 3,
+ ANDROID_LENS_POSE_REFERENCE_PRIMARY_CAMERA,
+ ANDROID_LENS_POSE_REFERENCE_GYROSCOPE,
+ ANDROID_LENS_POSE_REFERENCE_UNDEFINED,
+ ANDROID_LENS_POSE_REFERENCE_AUTOMOTIVE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensState.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensState.aidl
index 4b15b0f..4f98956 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensState.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LensState.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LensState {
- ANDROID_LENS_STATE_STATIONARY = 0,
- ANDROID_LENS_STATE_MOVING = 1,
+ ANDROID_LENS_STATE_STATIONARY,
+ ANDROID_LENS_STATE_MOVING,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
index 224a7fa..5eb5759 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/LogicalMultiCameraSensorSyncType.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum LogicalMultiCameraSensorSyncType {
- ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0,
- ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1,
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE,
+ ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/NoiseReductionMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/NoiseReductionMode.aidl
index ed0ebc1..8b589ce 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/NoiseReductionMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/NoiseReductionMode.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum NoiseReductionMode {
- ANDROID_NOISE_REDUCTION_MODE_OFF = 0,
- ANDROID_NOISE_REDUCTION_MODE_FAST = 1,
- ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY = 2,
- ANDROID_NOISE_REDUCTION_MODE_MINIMAL = 3,
- ANDROID_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4,
+ ANDROID_NOISE_REDUCTION_MODE_OFF,
+ ANDROID_NOISE_REDUCTION_MODE_FAST,
+ ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY,
+ ANDROID_NOISE_REDUCTION_MODE_MINIMAL,
+ ANDROID_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/QuirksPartialResult.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/QuirksPartialResult.aidl
index d217fe8..8ab6a05 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/QuirksPartialResult.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/QuirksPartialResult.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum QuirksPartialResult {
- ANDROID_QUIRKS_PARTIAL_RESULT_FINAL = 0,
- ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL = 1,
+ ANDROID_QUIRKS_PARTIAL_RESULT_FINAL,
+ ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
index 37b1dec..0564db8 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableCapabilities.aidl
@@ -38,25 +38,25 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum RequestAvailableCapabilities {
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW = 3,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA = 14,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING = 15,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR = 16,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING = 17,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT = 18,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE = 19,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES = 20,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
index 0d59ab0..74606bf 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
@@ -38,21 +38,8 @@
package android.hardware.camera.metadata;
@Backing(type="long") @VintfStability
enum RequestAvailableColorSpaceProfilesMap {
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED = -1,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB = 0,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_LINEAR_SRGB = 1,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_EXTENDED_SRGB = 2,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_LINEAR_EXTENDED_SRGB = 3,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT709 = 4,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020 = 5,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DCI_P3 = 6,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 = 7,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_NTSC_1953 = 8,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SMPTE_C = 9,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ADOBE_RGB = 10,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_PRO_PHOTO_RGB = 11,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ACES = 12,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ACESCG = 13,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_CIE_XYZ = 14,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_CIE_LAB = 15,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED = (-1L) /* -1 */,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB = 0L,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 = 7L,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG = 16L,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
index 16e38ba..45ffb1b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestAvailableDynamicRangeProfilesMap.aidl
@@ -38,17 +38,17 @@
package android.hardware.camera.metadata;
@Backing(type="long") @VintfStability
enum RequestAvailableDynamicRangeProfilesMap {
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 1,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 2,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 = 4,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS = 8,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF = 16,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO = 32,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM = 64,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO = 128,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF = 256,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO = 512,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM = 1024,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO = 2048,
- ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX = 4096,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 0x1L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 = 0x4L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS = 0x8L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF = 0x10L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO = 0x20L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM = 0x40L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO = 0x80L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF = 0x100L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO = 0x200L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM = 0x400L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO = 0x800L,
+ ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX = 0x1000L,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestMetadataMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestMetadataMode.aidl
index 90fba00..cede799 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestMetadataMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestMetadataMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum RequestMetadataMode {
- ANDROID_REQUEST_METADATA_MODE_NONE = 0,
- ANDROID_REQUEST_METADATA_MODE_FULL = 1,
+ ANDROID_REQUEST_METADATA_MODE_NONE,
+ ANDROID_REQUEST_METADATA_MODE_FULL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestType.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestType.aidl
index 4f38cfb..6b4ae71 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestType.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/RequestType.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum RequestType {
- ANDROID_REQUEST_TYPE_CAPTURE = 0,
- ANDROID_REQUEST_TYPE_REPROCESS = 1,
+ ANDROID_REQUEST_TYPE_CAPTURE,
+ ANDROID_REQUEST_TYPE_REPROCESS,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableFormats.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
index 41fd2c2..fdc2f60 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableFormats.aidl
@@ -38,14 +38,14 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerAvailableFormats {
- ANDROID_SCALER_AVAILABLE_FORMATS_RAW16 = 32,
- ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE = 36,
- ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 842094169,
- ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP = 17,
- ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED = 34,
- ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888 = 35,
- ANDROID_SCALER_AVAILABLE_FORMATS_BLOB = 33,
- ANDROID_SCALER_AVAILABLE_FORMATS_RAW10 = 37,
- ANDROID_SCALER_AVAILABLE_FORMATS_RAW12 = 38,
- ANDROID_SCALER_AVAILABLE_FORMATS_Y8 = 538982489,
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW16 = 0x20,
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE = 0x24,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 0x32315659,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP = 0x11,
+ ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED = 0x22,
+ ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888 = 0x23,
+ ANDROID_SCALER_AVAILABLE_FORMATS_BLOB = 0x21,
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW10 = 0x25,
+ ANDROID_SCALER_AVAILABLE_FORMATS_RAW12 = 0x26,
+ ANDROID_SCALER_AVAILABLE_FORMATS_Y8 = 0x20203859,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
index 85daa85..741a99d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableRecommendedStreamConfigurations.aidl
@@ -38,13 +38,13 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerAvailableRecommendedStreamConfigurations {
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW = 0,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD = 1,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT = 2,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT = 3,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL = 4,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW = 5,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT = 6,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_10BIT_OUTPUT = 8,
- ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START = 24,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW = 0x0,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD = 0x1,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT = 0x2,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT = 0x3,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL = 0x4,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW = 0x5,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT = 0x6,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_10BIT_OUTPUT = 0x8,
+ ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START = 0x18,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
index 1515ad5..4e2899d 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerAvailableStreamConfigurations {
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
index b9c3374..fb15815 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamConfigurationsMaximumResolution.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerAvailableStreamConfigurationsMaximumResolution {
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT = 0,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT = 1,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
index 958fa12..ff92f9e 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerAvailableStreamUseCases.aidl
@@ -38,12 +38,12 @@
package android.hardware.camera.metadata;
@Backing(type="long") @VintfStability
enum ScalerAvailableStreamUseCases {
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT = 0,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW = 1,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE = 2,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD = 3,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL = 4,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL = 5,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW = 6,
- ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START = 65536,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT = 0x0L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW = 0x1L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE = 0x2L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD = 0x3L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL = 0x4L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL = 0x5L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW = 0x6L,
+ ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START = 0x10000L,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerCroppingType.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerCroppingType.aidl
index 0487196..60782e4 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerCroppingType.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerCroppingType.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerCroppingType {
- ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY = 0,
- ANDROID_SCALER_CROPPING_TYPE_FREEFORM = 1,
+ ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY,
+ ANDROID_SCALER_CROPPING_TYPE_FREEFORM,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
index 711243f..e09d89c 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerMultiResolutionStreamSupported.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerMultiResolutionStreamSupported {
- ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE = 0,
- ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE = 1,
+ ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE,
+ ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
index 50bc097..64a0220 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerPhysicalCameraMultiResolutionStreamConfigurations.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerPhysicalCameraMultiResolutionStreamConfigurations {
- ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT = 0,
- ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT = 1,
+ ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT,
+ ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
index 3b9c5b8..bf5380e 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ScalerRotateAndCrop.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ScalerRotateAndCrop {
- ANDROID_SCALER_ROTATE_AND_CROP_NONE = 0,
- ANDROID_SCALER_ROTATE_AND_CROP_90 = 1,
- ANDROID_SCALER_ROTATE_AND_CROP_180 = 2,
- ANDROID_SCALER_ROTATE_AND_CROP_270 = 3,
- ANDROID_SCALER_ROTATE_AND_CROP_AUTO = 4,
+ ANDROID_SCALER_ROTATE_AND_CROP_NONE,
+ ANDROID_SCALER_ROTATE_AND_CROP_90,
+ ANDROID_SCALER_ROTATE_AND_CROP_180,
+ ANDROID_SCALER_ROTATE_AND_CROP_270,
+ ANDROID_SCALER_ROTATE_AND_CROP_AUTO,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
index 3400233..c96f3c5 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoColorFilterArrangement.aidl
@@ -38,11 +38,11 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorInfoColorFilterArrangement {
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO = 5,
- ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR = 6,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO,
+ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
index c8faaee..0153731 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoLensShadingApplied.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorInfoLensShadingApplied {
- ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE = 0,
- ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE = 1,
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE,
+ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
index 2a4b3dd..9a00cf1 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorInfoTimestampSource.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorInfoTimestampSource {
- ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0,
- ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1,
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN,
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorPixelMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorPixelMode.aidl
index e021434..5f055d6 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorPixelMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorPixelMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorPixelMode {
- ANDROID_SENSOR_PIXEL_MODE_DEFAULT = 0,
- ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION = 1,
+ ANDROID_SENSOR_PIXEL_MODE_DEFAULT,
+ ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
index a1f0c5f..851dae0 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorRawBinningFactorUsed.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorRawBinningFactorUsed {
- ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE = 0,
- ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE = 1,
+ ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE,
+ ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorTestPatternMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorTestPatternMode.aidl
index 3f49b9a..98f0ebe 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorTestPatternMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorTestPatternMode.aidl
@@ -38,11 +38,11 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SensorTestPatternMode {
- ANDROID_SENSOR_TEST_PATTERN_MODE_OFF = 0,
- ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1,
- ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2,
- ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3,
- ANDROID_SENSOR_TEST_PATTERN_MODE_PN9 = 4,
- ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK = 5,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_OFF,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_PN9,
+ ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK,
ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ShadingMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ShadingMode.aidl
index a2d2a32..ffc6a56 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ShadingMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ShadingMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum ShadingMode {
- ANDROID_SHADING_MODE_OFF = 0,
- ANDROID_SHADING_MODE_FAST = 1,
- ANDROID_SHADING_MODE_HIGH_QUALITY = 2,
+ ANDROID_SHADING_MODE_OFF,
+ ANDROID_SHADING_MODE_FAST,
+ ANDROID_SHADING_MODE_HIGH_QUALITY,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
index 1c65f99..48c6797 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsFaceDetectMode.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsFaceDetectMode {
- ANDROID_STATISTICS_FACE_DETECT_MODE_OFF = 0,
- ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE = 1,
- ANDROID_STATISTICS_FACE_DETECT_MODE_FULL = 2,
+ ANDROID_STATISTICS_FACE_DETECT_MODE_OFF,
+ ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE,
+ ANDROID_STATISTICS_FACE_DETECT_MODE_FULL,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHistogramMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
index 39a013e..354518b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHistogramMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsHistogramMode {
- ANDROID_STATISTICS_HISTOGRAM_MODE_OFF = 0,
- ANDROID_STATISTICS_HISTOGRAM_MODE_ON = 1,
+ ANDROID_STATISTICS_HISTOGRAM_MODE_OFF,
+ ANDROID_STATISTICS_HISTOGRAM_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
index 3a8c6c2..b96e4be 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsHotPixelMapMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsHotPixelMapMode {
- ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF = 0,
- ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_ON = 1,
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF,
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
index cc280ca..7d0b082 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsLensShadingMapMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsLensShadingMapMode {
- ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0,
- ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON = 1,
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF,
+ ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsOisDataMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
index 6607037..b80889b 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsOisDataMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsOisDataMode {
- ANDROID_STATISTICS_OIS_DATA_MODE_OFF = 0,
- ANDROID_STATISTICS_OIS_DATA_MODE_ON = 1,
+ ANDROID_STATISTICS_OIS_DATA_MODE_OFF,
+ ANDROID_STATISTICS_OIS_DATA_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
index bc286c3..a9268c0 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSceneFlicker.aidl
@@ -38,7 +38,7 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsSceneFlicker {
- ANDROID_STATISTICS_SCENE_FLICKER_NONE = 0,
- ANDROID_STATISTICS_SCENE_FLICKER_50HZ = 1,
- ANDROID_STATISTICS_SCENE_FLICKER_60HZ = 2,
+ ANDROID_STATISTICS_SCENE_FLICKER_NONE,
+ ANDROID_STATISTICS_SCENE_FLICKER_50HZ,
+ ANDROID_STATISTICS_SCENE_FLICKER_60HZ,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
index 774a43a..09a2003 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/StatisticsSharpnessMapMode.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum StatisticsSharpnessMapMode {
- ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF = 0,
- ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON = 1,
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF,
+ ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncFrameNumber.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncFrameNumber.aidl
index 12ccbb9..230f57e 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncFrameNumber.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncFrameNumber.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum SyncFrameNumber {
- ANDROID_SYNC_FRAME_NUMBER_CONVERGING = -1,
- ANDROID_SYNC_FRAME_NUMBER_UNKNOWN = -2,
+ ANDROID_SYNC_FRAME_NUMBER_CONVERGING = (-1) /* -1 */,
+ ANDROID_SYNC_FRAME_NUMBER_UNKNOWN = (-2) /* -2 */,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncMaxLatency.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncMaxLatency.aidl
index e0116e7..d484f45 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncMaxLatency.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SyncMaxLatency.aidl
@@ -39,5 +39,5 @@
@Backing(type="int") @VintfStability
enum SyncMaxLatency {
ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0,
- ANDROID_SYNC_MAX_LATENCY_UNKNOWN = -1,
+ ANDROID_SYNC_MAX_LATENCY_UNKNOWN = (-1) /* -1 */,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapMode.aidl
index 728b298..e729166 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapMode.aidl
@@ -38,9 +38,9 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum TonemapMode {
- ANDROID_TONEMAP_MODE_CONTRAST_CURVE = 0,
- ANDROID_TONEMAP_MODE_FAST = 1,
- ANDROID_TONEMAP_MODE_HIGH_QUALITY = 2,
- ANDROID_TONEMAP_MODE_GAMMA_VALUE = 3,
- ANDROID_TONEMAP_MODE_PRESET_CURVE = 4,
+ ANDROID_TONEMAP_MODE_CONTRAST_CURVE,
+ ANDROID_TONEMAP_MODE_FAST,
+ ANDROID_TONEMAP_MODE_HIGH_QUALITY,
+ ANDROID_TONEMAP_MODE_GAMMA_VALUE,
+ ANDROID_TONEMAP_MODE_PRESET_CURVE,
}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapPresetCurve.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapPresetCurve.aidl
index fc2e39b..2e5fbd3 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapPresetCurve.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/TonemapPresetCurve.aidl
@@ -38,6 +38,6 @@
package android.hardware.camera.metadata;
@Backing(type="int") @VintfStability
enum TonemapPresetCurve {
- ANDROID_TONEMAP_PRESET_CURVE_SRGB = 0,
- ANDROID_TONEMAP_PRESET_CURVE_REC709 = 1,
+ ANDROID_TONEMAP_PRESET_CURVE_SRGB,
+ ANDROID_TONEMAP_PRESET_CURVE_REC709,
}
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
index 1423305..b397dea 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/RequestAvailableColorSpaceProfilesMap.aidl
@@ -31,19 +31,6 @@
enum RequestAvailableColorSpaceProfilesMap {
ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED = -1L,
ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB = 0L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_LINEAR_SRGB = 1L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_EXTENDED_SRGB = 2L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_LINEAR_EXTENDED_SRGB = 3L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT709 = 4L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020 = 5L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DCI_P3 = 6L,
ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3 = 7L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_NTSC_1953 = 8L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SMPTE_C = 9L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ADOBE_RGB = 10L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_PRO_PHOTO_RGB = 11L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ACES = 12L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_ACESCG = 13L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_CIE_XYZ = 14L,
- ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_CIE_LAB = 15L,
+ ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG = 16L,
}
diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
index 50fb052..a755d57 100644
--- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
+++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
@@ -2025,16 +2025,7 @@
}
TEST_P(CameraAidlTest, process8BitColorSpaceRequests) {
- static int profiles[] = {
- ColorSpaceNamed::BT709,
- ColorSpaceNamed::DCI_P3,
- ColorSpaceNamed::DISPLAY_P3,
- ColorSpaceNamed::EXTENDED_SRGB,
- ColorSpaceNamed::LINEAR_EXTENDED_SRGB,
- ColorSpaceNamed::NTSC_1953,
- ColorSpaceNamed::SMPTE_C,
- ColorSpaceNamed::SRGB
- };
+ static int profiles[] = {ColorSpaceNamed::DISPLAY_P3, ColorSpaceNamed::SRGB};
for (int32_t i = 0; i < sizeof(profiles) / sizeof(profiles[0]); i++) {
processColorSpaceRequest(static_cast<RequestAvailableColorSpaceProfilesMap>(profiles[i]),
@@ -2059,10 +2050,10 @@
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
};
- // Process all dynamic range profiles with BT2020
+ // Process all dynamic range profiles with BT2020_HLG
for (int32_t i = 0; i < sizeof(dynamicRangeProfiles) / sizeof(dynamicRangeProfiles[0]); i++) {
processColorSpaceRequest(
- static_cast<RequestAvailableColorSpaceProfilesMap>(ColorSpaceNamed::BT2020),
+ static_cast<RequestAvailableColorSpaceProfilesMap>(ColorSpaceNamed::BT2020_HLG),
static_cast<RequestAvailableDynamicRangeProfilesMap>(dynamicRangeProfiles[i]));
}
}
@@ -3051,6 +3042,47 @@
configureStreamUseCaseInternal(previewStreamThreshold);
}
+// Validate the integrity of stream configuration metadata
+TEST_P(CameraAidlTest, validateStreamConfigurations) {
+ std::vector<std::string> cameraDeviceNames = getCameraDeviceNames(mProvider);
+ std::vector<AvailableStream> outputStreams;
+
+ const int32_t scalerSizesTag = ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS;
+ const int32_t scalerMinFrameDurationsTag = ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS;
+ const int32_t scalerStallDurationsTag = ANDROID_SCALER_AVAILABLE_STALL_DURATIONS;
+
+ for (const auto& name : cameraDeviceNames) {
+ CameraMetadata meta;
+ std::shared_ptr<ICameraDevice> cameraDevice;
+
+ openEmptyDeviceSession(name, mProvider, &mSession /*out*/, &meta /*out*/,
+ &cameraDevice /*out*/);
+ camera_metadata_t* staticMeta = reinterpret_cast<camera_metadata_t*>(meta.metadata.data());
+
+ if (is10BitDynamicRangeCapable(staticMeta)) {
+ std::vector<std::tuple<size_t, size_t>> supportedP010Sizes, supportedBlobSizes;
+
+ getSupportedSizes(staticMeta, scalerSizesTag, HAL_PIXEL_FORMAT_BLOB,
+ &supportedBlobSizes);
+ getSupportedSizes(staticMeta, scalerSizesTag, HAL_PIXEL_FORMAT_YCBCR_P010,
+ &supportedP010Sizes);
+ ASSERT_FALSE(supportedP010Sizes.empty());
+
+ std::vector<int64_t> blobMinDurations, blobStallDurations;
+ getSupportedDurations(staticMeta, scalerMinFrameDurationsTag, HAL_PIXEL_FORMAT_BLOB,
+ supportedP010Sizes, &blobMinDurations);
+ getSupportedDurations(staticMeta, scalerStallDurationsTag, HAL_PIXEL_FORMAT_BLOB,
+ supportedP010Sizes, &blobStallDurations);
+ ASSERT_FALSE(blobStallDurations.empty());
+ ASSERT_FALSE(blobMinDurations.empty());
+ ASSERT_EQ(supportedP010Sizes.size(), blobMinDurations.size());
+ ASSERT_EQ(blobMinDurations.size(), blobStallDurations.size());
+ }
+
+ // Validate other aspects of stream configuration metadata...
+ }
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(CameraAidlTest);
INSTANTIATE_TEST_SUITE_P(
PerInstance, CameraAidlTest,
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index 64507fe..c315879 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -3085,6 +3085,10 @@
return "CIE_XYZ";
case ColorSpaceNamed::CIE_LAB:
return "CIE_LAB";
+ case ColorSpaceNamed::BT2020_HLG:
+ return "BT2020_HLG";
+ case ColorSpaceNamed::BT2020_PQ:
+ return "BT2020_PQ";
default:
return "INVALID";
}
@@ -3333,7 +3337,6 @@
RequestAvailableColorSpaceProfilesMap colorSpace,
RequestAvailableDynamicRangeProfilesMap dynamicRangeProfile) {
std::vector<std::string> cameraDeviceNames = getCameraDeviceNames(mProvider);
- int64_t bufferId = 1;
CameraMetadata settings;
for (const auto& name : cameraDeviceNames) {
@@ -3452,12 +3455,12 @@
// Stream as long as needed to fill the Hal inflight queue
std::vector<CaptureRequest> requests(halStreams[0].maxBuffers);
- for (int32_t frameNumber = 0; frameNumber < requests.size(); frameNumber++) {
+ for (int32_t requestId = 0; requestId < requests.size(); requestId++) {
std::shared_ptr<InFlightRequest> inflightReq = std::make_shared<InFlightRequest>(
static_cast<ssize_t>(halStreams.size()), false, supportsPartialResults,
partialResultCount, std::unordered_set<std::string>(), resultQueue);
- CaptureRequest& request = requests[frameNumber];
+ CaptureRequest& request = requests[requestId];
std::vector<StreamBuffer>& outputBuffers = request.outputBuffers;
outputBuffers.resize(halStreams.size());
@@ -3466,6 +3469,7 @@
std::vector<buffer_handle_t> graphicBuffers;
graphicBuffers.reserve(halStreams.size());
+ auto bufferId = requestId + 1; // Buffer id value 0 is not valid
for (const auto& halStream : halStreams) {
buffer_handle_t buffer_handle;
if (useHalBufManager) {
@@ -3481,17 +3485,16 @@
inflightReq->mOutstandingBufferIds[halStream.id][bufferId] = buffer_handle;
graphicBuffers.push_back(buffer_handle);
- outputBuffers[k] = {halStream.id, bufferId,
- android::makeToAidl(buffer_handle), BufferStatus::OK, NativeHandle(),
- NativeHandle()};
- bufferId++;
+ outputBuffers[k] = {
+ halStream.id, bufferId, android::makeToAidl(buffer_handle),
+ BufferStatus::OK, NativeHandle(), NativeHandle()};
}
k++;
}
request.inputBuffer = {
-1, 0, NativeHandle(), BufferStatus::ERROR, NativeHandle(), NativeHandle()};
- request.frameNumber = frameNumber;
+ request.frameNumber = bufferId;
request.fmqSettingsSize = 0;
request.settings = settings;
request.inputWidth = 0;
@@ -3499,9 +3502,8 @@
{
std::unique_lock<std::mutex> l(mLock);
- mInflightMap[frameNumber] = inflightReq;
+ mInflightMap[bufferId] = inflightReq;
}
-
}
int32_t numRequestProcessed = 0;
@@ -3515,7 +3517,10 @@
std::vector<int32_t> {halStreams[0].id});
ASSERT_TRUE(returnStatus.isOk());
- for (int32_t frameNumber = 0; frameNumber < requests.size(); frameNumber++) {
+ // We are keeping frame numbers and buffer ids consistent. Buffer id value of 0
+ // is used to indicate a buffer that is not present/available so buffer ids as well
+ // as frame numbers begin with 1.
+ for (int32_t frameNumber = 1; frameNumber <= requests.size(); frameNumber++) {
const auto& inflightReq = mInflightMap[frameNumber];
std::unique_lock<std::mutex> l(mLock);
while (!inflightReq->errorCodeValid &&
@@ -3703,3 +3708,48 @@
ASSERT_TRUE(ret.isOk());
}
}
+
+void CameraAidlTest::getSupportedSizes(const camera_metadata_t* ch, uint32_t tag, int32_t format,
+ std::vector<std::tuple<size_t, size_t>>* sizes /*out*/) {
+ if (sizes == nullptr) {
+ return;
+ }
+
+ camera_metadata_ro_entry entry;
+ int retcode = find_camera_metadata_ro_entry(ch, tag, &entry);
+ if ((0 == retcode) && (entry.count > 0)) {
+ // Scaler entry contains 4 elements (format, width, height, type)
+ for (size_t i = 0; i < entry.count; i += 4) {
+ if ((entry.data.i32[i] == format) &&
+ (entry.data.i32[i + 3] == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT)) {
+ sizes->push_back(std::make_tuple(entry.data.i32[i + 1], entry.data.i32[i + 2]));
+ }
+ }
+ }
+}
+
+void CameraAidlTest::getSupportedDurations(const camera_metadata_t* ch, uint32_t tag,
+ int32_t format,
+ const std::vector<std::tuple<size_t, size_t>>& sizes,
+ std::vector<int64_t>* durations /*out*/) {
+ if (durations == nullptr) {
+ return;
+ }
+
+ camera_metadata_ro_entry entry;
+ int retcode = find_camera_metadata_ro_entry(ch, tag, &entry);
+ if ((0 == retcode) && (entry.count > 0)) {
+ // Duration entry contains 4 elements (format, width, height, duration)
+ for (const auto& size : sizes) {
+ int64_t width = std::get<0>(size);
+ int64_t height = std::get<1>(size);
+ for (size_t i = 0; i < entry.count; i += 4) {
+ if ((entry.data.i64[i] == format) && (entry.data.i64[i + 1] == width) &&
+ (entry.data.i64[i + 2] == height)) {
+ durations->push_back(entry.data.i64[i + 3]);
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/camera/provider/aidl/vts/camera_aidl_test.h b/camera/provider/aidl/vts/camera_aidl_test.h
index f13d6b2..4b4c039 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.h
+++ b/camera/provider/aidl/vts/camera_aidl_test.h
@@ -145,7 +145,9 @@
ACES,
ACESCG,
CIE_XYZ,
- CIE_LAB
+ CIE_LAB,
+ BT2020_HLG,
+ BT2020_PQ
};
struct AvailableZSLInputOutput {
@@ -418,6 +420,13 @@
bool supportsCroppedRawUseCase(const camera_metadata_t *staticMeta);
bool isPerFrameControl(const camera_metadata_t* staticMeta);
+ void getSupportedSizes(const camera_metadata_t* ch, uint32_t tag, int32_t format,
+ std::vector<std::tuple<size_t, size_t>>* sizes /*out*/);
+
+ void getSupportedDurations(const camera_metadata_t* ch, uint32_t tag, int32_t format,
+ const std::vector<std::tuple<size_t, size_t>>& sizes,
+ std::vector<int64_t>* durations /*out*/);
+
protected:
// In-flight queue for tracking completion of capture requests.
struct InFlightRequest {
diff --git a/common/fmq/aidl/Android.bp b/common/fmq/aidl/Android.bp
index 5772b7f..3b022fc 100644
--- a/common/fmq/aidl/Android.bp
+++ b/common/fmq/aidl/Android.bp
@@ -48,5 +48,10 @@
},
},
frozen: true,
- versions: ["1"],
+ versions_with_info: [
+ {
+ version: "1",
+ imports: ["android.hardware.common-V2"],
+ },
+ ],
}
diff --git a/compatibility_matrices/compatibility_matrix.4.xml b/compatibility_matrices/compatibility_matrix.4.xml
index c898aab..b9fb3f4 100644
--- a/compatibility_matrices/compatibility_matrix.4.xml
+++ b/compatibility_matrices/compatibility_matrix.4.xml
@@ -7,7 +7,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio</name>
<version>5.0</version>
<interface>
@@ -15,7 +15,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio.effect</name>
<version>5.0</version>
<interface>
@@ -199,7 +199,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.composer</name>
<version>2.1-3</version>
<interface>
@@ -207,7 +207,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.mapper</name>
<version>2.1</version>
<version>3.0</version>
diff --git a/compatibility_matrices/compatibility_matrix.5.xml b/compatibility_matrices/compatibility_matrix.5.xml
index c5a1dc2..b374c8c 100644
--- a/compatibility_matrices/compatibility_matrix.5.xml
+++ b/compatibility_matrices/compatibility_matrix.5.xml
@@ -7,7 +7,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio</name>
<version>6.0</version>
<interface>
@@ -15,7 +15,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio.effect</name>
<version>6.0</version>
<interface>
@@ -222,7 +222,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.composer</name>
<version>2.1-4</version>
<interface>
@@ -230,7 +230,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.mapper</name>
<!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test -->
<version>2.1</version>
@@ -367,7 +367,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.power</name>
<interface>
<name>IPower</name>
diff --git a/compatibility_matrices/compatibility_matrix.6.xml b/compatibility_matrices/compatibility_matrix.6.xml
index 1c76ee6..40ae655 100644
--- a/compatibility_matrices/compatibility_matrix.6.xml
+++ b/compatibility_matrices/compatibility_matrix.6.xml
@@ -7,7 +7,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio</name>
<version>6.0</version>
<version>7.0</version>
@@ -16,7 +16,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio.effect</name>
<version>6.0</version>
<version>7.0</version>
@@ -252,7 +252,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.composer</name>
<version>2.1-4</version>
<interface>
@@ -260,7 +260,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.graphics.mapper</name>
<!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test -->
<version>2.1</version>
@@ -423,7 +423,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.power</name>
<version>1-2</version>
<interface>
diff --git a/compatibility_matrices/compatibility_matrix.7.xml b/compatibility_matrices/compatibility_matrix.7.xml
index 67dd717..e5ef954 100644
--- a/compatibility_matrices/compatibility_matrix.7.xml
+++ b/compatibility_matrices/compatibility_matrix.7.xml
@@ -327,7 +327,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.health</name>
<version>1</version>
<interface>
@@ -493,7 +493,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.power</name>
<version>2-3</version>
<interface>
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index a7d1988..310eaa1 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -1,5 +1,5 @@
<compatibility-matrix version="1.0" type="framework" level="8">
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.audio</name>
<version>6.0</version>
<version>7.0-1</version>
@@ -62,7 +62,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.automotive.audiocontrol</name>
- <version>2</version>
+ <version>2-3</version>
<interface>
<name>IAudioControl</name>
<instance>default</instance>
@@ -94,6 +94,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.automotive.vehicle</name>
+ <version>1-2</version>
<interface>
<name>IVehicle</name>
<instance>default</instance>
@@ -273,7 +274,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.health</name>
<version>1-2</version>
<interface>
@@ -386,7 +387,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="false">
+ <hal format="aidl" optional="true">
<name>android.hardware.power</name>
<version>4</version>
<interface>
diff --git a/current.txt b/current.txt
index c40f9ea..754093f 100644
--- a/current.txt
+++ b/current.txt
@@ -936,5 +936,7 @@
a2fbd9747fbb9ceb8c1090b5a24138312246502d5af0654a8c2b603a9bf521fc android.hardware.gnss@1.0::IGnssCallback
889b59e3e7a59afa67bf19882a44f51a2f9e43b6556ec52baa9ec3efd1ef7fbe android.hardware.camera.device@3.2::types
db37a1c757e2e69b1ec9c75a981a6987bd87a131d92ab6acc00e04d19f374281 android.hardware.automotive.vehicle@2.0::types
+997017f581406fca1675d2f612f7ccd73f0d04eadd54bf6212e6cf5971d0872d android.hardware.automotive.vehicle@2.0::types
+06983ffe6d75e90a22503a6d9fd14417f983a36bb060a80ad5915240d69b8a40 android.hardware.automotive.vehicle@2.0::types
# There will be no more HIDL HALs. Use AIDL instead.
diff --git a/drm/aidl/Android.bp b/drm/aidl/Android.bp
index 6273a38..fb04d84 100644
--- a/drm/aidl/Android.bp
+++ b/drm/aidl/Android.bp
@@ -23,7 +23,7 @@
sdk_version: "module_current",
},
ndk: {
- min_sdk_version: "current",
+ min_sdk_version: "UpsideDownCake",
},
},
double_loadable: true,
diff --git a/drm/aidl/OWNERS b/drm/aidl/OWNERS
index fa8fd20..fe69725 100644
--- a/drm/aidl/OWNERS
+++ b/drm/aidl/OWNERS
@@ -1,4 +1,3 @@
# Bug component: 49079
-edwinwong@google.com
kelzhan@google.com
robertshih@google.com
diff --git a/drm/aidl/vts/OWNERS b/drm/aidl/vts/OWNERS
index e44b93e..fe69725 100644
--- a/drm/aidl/vts/OWNERS
+++ b/drm/aidl/vts/OWNERS
@@ -1,4 +1,3 @@
-edwinwong@google.com
-jtinker@google.com
+# Bug component: 49079
kelzhan@google.com
robertshih@google.com
diff --git a/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl b/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl
index ee21011..0200625 100644
--- a/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl
+++ b/gnss/aidl/android/hardware/gnss/IGnssCallback.aidl
@@ -214,9 +214,12 @@
/**
* Callback for the HAL to pass a vector of GnssSvInfo back to the client.
*
- * If GnssMeasurement is registered, the SvStatus report interval is the same as the measurement
- * interval, i.e., the interval the measurement engine runs at. If GnssMeasurement is not
- * registered, the SvStatus interval is the same as the location interval.
+ * If only GnssMeasurement is registered, the SvStatus reporting interval must be
+ * the same as the measurement interval, i.e., the interval the measurement
+ * engine runs at. If only location is registered, the SvStatus interval must
+ * be the same as the location interval. If both GnssMeasurement and location
+ * are registered, then the SvStatus interval is the same as the lesser interval
+ * between the two.
*
* @param svInfo SV status information from HAL.
*/
diff --git a/gnss/aidl/default/Gnss.cpp b/gnss/aidl/default/Gnss.cpp
index ec86d2e..f1b9cbf 100644
--- a/gnss/aidl/default/Gnss.cpp
+++ b/gnss/aidl/default/Gnss.cpp
@@ -325,6 +325,7 @@
ALOGD("getExtensionGnssMeasurement");
if (mGnssMeasurementInterface == nullptr) {
mGnssMeasurementInterface = SharedRefBase::make<GnssMeasurementInterface>();
+ mGnssMeasurementInterface->setGnssInterface(static_cast<std::shared_ptr<Gnss>>(this));
}
*iGnssMeasurement = mGnssMeasurementInterface;
return ScopedAStatus::ok();
diff --git a/gnss/aidl/default/Gnss.h b/gnss/aidl/default/Gnss.h
index df10fc8..00540cd 100644
--- a/gnss/aidl/default/Gnss.h
+++ b/gnss/aidl/default/Gnss.h
@@ -84,13 +84,13 @@
IMeasurementCorrectionsInterface>* iMeasurementCorrections)
override;
+ void reportSvStatus() const;
std::shared_ptr<GnssConfiguration> mGnssConfiguration;
std::shared_ptr<GnssPowerIndication> mGnssPowerIndication;
std::shared_ptr<GnssMeasurementInterface> mGnssMeasurementInterface;
private:
void reportLocation(const GnssLocation&) const;
- void reportSvStatus() const;
void reportSvStatus(const std::vector<IGnssCallback::GnssSvInfo>& svInfoList) const;
std::vector<IGnssCallback::GnssSvInfo> filterBlocklistedSatellites(
std::vector<IGnssCallback::GnssSvInfo> gnssSvInfoList) const;
diff --git a/gnss/aidl/default/GnssMeasurementInterface.cpp b/gnss/aidl/default/GnssMeasurementInterface.cpp
index 90056ce..aab9e03 100644
--- a/gnss/aidl/default/GnssMeasurementInterface.cpp
+++ b/gnss/aidl/default/GnssMeasurementInterface.cpp
@@ -20,6 +20,7 @@
#include <aidl/android/hardware/gnss/BnGnss.h>
#include <log/log.h>
#include "DeviceFileReader.h"
+#include "Gnss.h"
#include "GnssRawMeasurementParser.h"
#include "GnssReplayUtils.h"
#include "Utils.h"
@@ -126,6 +127,9 @@
auto measurement =
Utils::getMockMeasurement(enableCorrVecOutputs, enableFullTracking);
this->reportMeasurement(measurement);
+ if (!mLocationEnabled) {
+ mGnss->reportSvStatus();
+ }
}
intervalMs =
(mLocationEnabled) ? std::min(mLocationIntervalMs, mIntervalMs) : mIntervalMs;
@@ -164,6 +168,10 @@
mLocationEnabled = enabled;
}
+void GnssMeasurementInterface::setGnssInterface(const std::shared_ptr<Gnss>& gnss) {
+ mGnss = gnss;
+}
+
void GnssMeasurementInterface::waitForStoppingThreads() {
for (auto& future : mFutures) {
ALOGD("Stopping previous thread.");
diff --git a/gnss/aidl/default/GnssMeasurementInterface.h b/gnss/aidl/default/GnssMeasurementInterface.h
index d2737e5..926a4e7 100644
--- a/gnss/aidl/default/GnssMeasurementInterface.h
+++ b/gnss/aidl/default/GnssMeasurementInterface.h
@@ -25,6 +25,7 @@
#include "Utils.h"
namespace aidl::android::hardware::gnss {
+class Gnss;
struct GnssMeasurementInterface : public BnGnssMeasurementInterface {
public:
@@ -39,6 +40,7 @@
const Options& options) override;
void setLocationInterval(const int intervalMs);
void setLocationEnabled(const bool enabled);
+ void setGnssInterface(const std::shared_ptr<Gnss>& gnss);
private:
void start(const bool enableCorrVecOutputs, const bool enableFullTracking);
@@ -59,6 +61,8 @@
// Synchronization lock for sCallback
mutable std::mutex mMutex;
+
+ std::shared_ptr<Gnss> mGnss;
};
} // namespace aidl::android::hardware::gnss
diff --git a/gnss/aidl/vts/GnssCallbackAidl.cpp b/gnss/aidl/vts/GnssCallbackAidl.cpp
index d3be414..2e34921 100644
--- a/gnss/aidl/vts/GnssCallbackAidl.cpp
+++ b/gnss/aidl/vts/GnssCallbackAidl.cpp
@@ -18,6 +18,7 @@
#include "GnssCallbackAidl.h"
#include <log/log.h>
+#include <utils/SystemClock.h>
using android::binder::Status;
using android::hardware::gnss::GnssLocation;
@@ -53,6 +54,7 @@
Status GnssCallbackAidl::gnssSvStatusCb(const std::vector<GnssSvInfo>& svInfoList) {
ALOGI("gnssSvStatusCb. Size = %d", (int)svInfoList.size());
sv_info_list_cbq_.store(svInfoList);
+ sv_info_list_timestamps_millis_cbq_.store(::android::elapsedRealtime());
return Status::ok();
}
diff --git a/gnss/aidl/vts/GnssCallbackAidl.h b/gnss/aidl/vts/GnssCallbackAidl.h
index 06526d3..82a0df4 100644
--- a/gnss/aidl/vts/GnssCallbackAidl.h
+++ b/gnss/aidl/vts/GnssCallbackAidl.h
@@ -29,6 +29,7 @@
info_cbq_("system_info"),
location_cbq_("location"),
sv_info_list_cbq_("sv_info"),
+ sv_info_list_timestamps_millis_cbq_("sv_info_timestamps"),
nmea_cbq_("nmea"){};
~GnssCallbackAidl(){};
@@ -64,6 +65,8 @@
android::hardware::gnss::common::GnssCallbackEventQueue<
std::vector<android::hardware::gnss::IGnssCallback::GnssSvInfo>>
sv_info_list_cbq_;
+ android::hardware::gnss::common::GnssCallbackEventQueue<long>
+ sv_info_list_timestamps_millis_cbq_;
android::hardware::gnss::common::GnssCallbackEventQueue<std::pair<int64_t, std::string>>
nmea_cbq_;
};
\ No newline at end of file
diff --git a/gnss/aidl/vts/gnss_hal_test.cpp b/gnss/aidl/vts/gnss_hal_test.cpp
index fb9af52..4f5e6a0 100644
--- a/gnss/aidl/vts/gnss_hal_test.cpp
+++ b/gnss/aidl/vts/gnss_hal_test.cpp
@@ -478,6 +478,30 @@
}
}
+void GnssHalTest::collectSvInfoListTimestamps(const int numMeasurementEvents,
+ const int timeoutSeconds,
+ std::vector<int>& deltasMs) {
+ aidl_gnss_cb_->sv_info_list_timestamps_millis_cbq_.reset();
+ aidl_gnss_cb_->sv_info_list_cbq_.reset();
+
+ auto status = aidl_gnss_hal_->startSvStatus();
+ EXPECT_TRUE(status.isOk());
+ ASSERT_TRUE(aidl_gnss_cb_->sv_info_list_timestamps_millis_cbq_.size() ==
+ aidl_gnss_cb_->sv_info_list_cbq_.size());
+ long lastElapsedRealtimeMillis = 0;
+ for (int i = 0; i < numMeasurementEvents; i++) {
+ long timeStamp;
+ ASSERT_TRUE(aidl_gnss_cb_->sv_info_list_timestamps_millis_cbq_.retrieve(timeStamp,
+ timeoutSeconds));
+ if (lastElapsedRealtimeMillis != 0) {
+ deltasMs.push_back(timeStamp - lastElapsedRealtimeMillis);
+ }
+ lastElapsedRealtimeMillis = timeStamp;
+ }
+ status = aidl_gnss_hal_->stopSvStatus();
+ EXPECT_TRUE(status.isOk());
+}
+
void GnssHalTest::checkGnssDataFields(const sp<GnssMeasurementCallbackAidl>& callback,
const int numMeasurementEvents, const int timeoutSeconds,
const bool isFullTracking) {
diff --git a/gnss/aidl/vts/gnss_hal_test.h b/gnss/aidl/vts/gnss_hal_test.h
index 470294c..88d01c1 100644
--- a/gnss/aidl/vts/gnss_hal_test.h
+++ b/gnss/aidl/vts/gnss_hal_test.h
@@ -101,6 +101,8 @@
void collectMeasurementIntervals(const sp<GnssMeasurementCallbackAidl>& callback,
const int numMeasurementEvents, const int timeoutSeconds,
std::vector<int>& deltaMs);
+ void collectSvInfoListTimestamps(const int numMeasurementEvents, const int timeoutSeconds,
+ std::vector<int>& deltasMs);
void checkGnssDataFields(const sp<GnssMeasurementCallbackAidl>& callback,
const int numMeasurementEvents, const int timeoutSeconds,
const bool isFullTracking);
diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp
index 96dece4..aa8bdfd 100644
--- a/gnss/aidl/vts/gnss_hal_test_cases.cpp
+++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp
@@ -1132,8 +1132,10 @@
status = iAGnssRil->setRefLocation(agnssReflocation);
ASSERT_TRUE(status.isOk());
- status = iAGnssRil->injectNiSuplMessageData(std::vector<uint8_t>(), 0);
- ASSERT_FALSE(status.isOk());
+ if (aidl_gnss_hal_->getInterfaceVersion() >= 3) {
+ status = iAGnssRil->injectNiSuplMessageData(std::vector<uint8_t>(), 0);
+ ASSERT_FALSE(status.isOk());
+ }
}
/*
@@ -1407,6 +1409,7 @@
* TestGnssMeasurementIntervals_WithoutLocation:
* 1. Start measurement at intervals
* 2. Verify measurement are received at expected intervals
+ * 3. Verify status are reported at expected intervals
*/
TEST_P(GnssHalTest, TestGnssMeasurementIntervals_WithoutLocation) {
if (aidl_gnss_hal_->getInterfaceVersion() <= 1) {
@@ -1426,13 +1429,24 @@
auto callback = sp<GnssMeasurementCallbackAidl>::make();
startMeasurementWithInterval(intervals[i], iGnssMeasurement, callback);
- std::vector<int> deltas;
- collectMeasurementIntervals(callback, numEvents[i], /* timeoutSeconds= */ 10, deltas);
+ std::vector<int> measurementDeltas;
+ std::vector<int> svInfoListTimestampsDeltas;
+ collectMeasurementIntervals(callback, numEvents[i], /* timeoutSeconds= */ 10,
+ measurementDeltas);
+ if (aidl_gnss_hal_->getInterfaceVersion() >= 3) {
+ collectSvInfoListTimestamps(numEvents[i], /* timeoutSeconds= */ 10,
+ svInfoListTimestampsDeltas);
+ }
status = iGnssMeasurement->close();
ASSERT_TRUE(status.isOk());
- assertMeanAndStdev(intervals[i], deltas);
+ assertMeanAndStdev(intervals[i], measurementDeltas);
+
+ if (aidl_gnss_hal_->getInterfaceVersion() >= 3) {
+ assertMeanAndStdev(intervals[i], svInfoListTimestampsDeltas);
+ EXPECT_TRUE(aidl_gnss_cb_->sv_info_list_cbq_.size() > 0);
+ }
}
}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl b/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
index b44e613..4f2a087 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/Dataspace.aidl
@@ -87,7 +87,7 @@
* Use the unadjusted KR = 0.2126, KB = 0.0722 luminance interpretation
* for RGB conversion.
*/
- STANDARD_BT709 = 1 << 16, // 1 << STANDARD_SHIFT
+ STANDARD_BT709 = 1 << 16, // 1 << STANDARD_SHIFT
/**
* Primaries: x y
@@ -377,11 +377,19 @@
RANGE_LIMITED = 2 << 27, // 2 << RANGE_SHIFT = 0x10000000
/**
- * Extended range is used for scRGB. Intended for use with
- * floating point pixel formats. [0.0 - 1.0] is the standard
- * sRGB space. Values outside the range 0.0 - 1.0 can encode
- * color outside the sRGB gamut.
- * Used to blend / merge multiple dataspaces on a single display.
+ * Extended range can be used in combination with FP16 to communicate scRGB or with
+ * SurfaceControl's setExtendedRangeBrightness(SurfaceControl, float, float)
+ * to indicate an HDR range.
+ *
+ * When used with floating point pixel formats and #STANDARD_BT709 then [0.0 - 1.0] is the
+ * standard sRGB space and values outside the range [0.0 - 1.0] can encode
+ * color outside the sRGB gamut. [-0.5, 7.5] is the standard scRGB range.
+ * Used to blend/merge multiple dataspaces on a single display.
+ *
+ * As of Android U in combination with composer3's mixed SDR/HDR feature then this may
+ * be combined with SurfaceControl's setExtendedRangeBrightness(SurfaceControl, float, float)
+ * and other formats such as RGBA_8888 or RGBA_1010102 to communicate a variable HDR
+ * brightness range, which in turn will influence that layer's dimming ratio when composited
*/
RANGE_EXTENDED = 3 << 27, // 3 << RANGE_SHIFT = 0x18000000
@@ -397,7 +405,6 @@
*/
SRGB_LINEAR = 1 << 16 | 1 << 22 | 1 << 27, // STANDARD_BT709 | TRANSFER_LINEAR | RANGE_FULL
-
/**
* scRGB linear encoding:
*
@@ -412,7 +419,6 @@
*/
SCRGB_LINEAR = 1 << 16 | 1 << 22 | 3 << 27, // STANDARD_BT709 | TRANSFER_LINEAR | RANGE_EXTENDED
-
/**
* sRGB gamma encoding:
*
@@ -428,7 +434,6 @@
*/
SRGB = 1 << 16 | 2 << 22 | 1 << 27, // STANDARD_BT709 | TRANSFER_SRGB | RANGE_FULL
-
/**
* scRGB:
*
@@ -470,8 +475,8 @@
*
* Use limited range, SMPTE 170M transfer and BT.601_625 standard.
*/
- BT601_625 = 2 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_LIMITED
-
+ BT601_625 =
+ 2 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_LIMITED
/**
* ITU-R Recommendation 601 (BT.601) - 525-line
@@ -480,7 +485,8 @@
*
* Use limited range, SMPTE 170M transfer and BT.601_525 standard.
*/
- BT601_525 = 4 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT601_525 | TRANSFER_SMPTE_170M | RANGE_LIMITED
+ BT601_525 =
+ 4 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT601_525 | TRANSFER_SMPTE_170M | RANGE_LIMITED
/**
* ITU-R Recommendation 709 (BT.709)
@@ -491,7 +497,6 @@
*/
BT709 = 1 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_LIMITED
-
/**
* SMPTE EG 432-1 and SMPTE RP 431-2.
*
@@ -501,7 +506,6 @@
*/
DCI_P3_LINEAR = 10 << 16 | 1 << 22 | 1 << 27, // STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL
-
/**
* SMPTE EG 432-1 and SMPTE RP 431-2.
*
@@ -513,15 +517,14 @@
*/
DCI_P3 = 10 << 16 | 5 << 22 | 1 << 27, // STANDARD_DCI_P3 | TRANSFER_GAMMA2_6 | RANGE_FULL
-
/**
* Display P3
*
* Display P3 uses same primaries and white-point as DCI-P3
* linear transfer function makes this the same as DCI_P3_LINEAR.
*/
- DISPLAY_P3_LINEAR = 10 << 16 | 1 << 22 | 1 << 27, // STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL
-
+ DISPLAY_P3_LINEAR =
+ 10 << 16 | 1 << 22 | 1 << 27, // STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL
/**
* Display P3
@@ -531,7 +534,6 @@
*/
DISPLAY_P3 = 10 << 16 | 2 << 22 | 1 << 27, // STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_FULL
-
/**
* Adobe RGB
*
@@ -541,7 +543,6 @@
*/
ADOBE_RGB = 11 << 16 | 4 << 22 | 1 << 27, // STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2 | RANGE_FULL
-
/**
* ITU-R Recommendation 2020 (BT.2020)
*
@@ -551,7 +552,6 @@
*/
BT2020_LINEAR = 6 << 16 | 1 << 22 | 1 << 27, // STANDARD_BT2020 | TRANSFER_LINEAR | RANGE_FULL
-
/**
* ITU-R Recommendation 2020 (BT.2020)
*
@@ -570,7 +570,6 @@
*/
BT2020_PQ = 6 << 16 | 7 << 22 | 1 << 27, // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL
-
/**
* Data spaces for non-color formats
*/
@@ -611,7 +610,8 @@
*
* Use limited range, SMPTE 170M transfer and BT2020 standard
*/
- BT2020_ITU = 6 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_LIMITED
+ BT2020_ITU =
+ 6 << 16 | 3 << 22 | 2 << 27, // STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_LIMITED
/**
* ITU-R Recommendation 2100 (BT.2100)
@@ -621,7 +621,8 @@
* Use limited/full range, PQ/HLG transfer, and BT2020 standard
* limited range is the preferred / normative definition for BT.2100
*/
- BT2020_ITU_PQ = 6 << 16 | 7 << 22 | 2 << 27, // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_LIMITED
+ BT2020_ITU_PQ =
+ 6 << 16 | 7 << 22 | 2 << 27, // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_LIMITED
BT2020_ITU_HLG = 6 << 16 | 8 << 22 | 2 << 27, // STANDARD_BT2020 | TRANSFER_HLG | RANGE_LIMITED
BT2020_HLG = 6 << 16 | 8 << 22 | 1 << 27, // STANDARD_BT2020 | TRANSFER_HLG | RANGE_FULL
@@ -687,5 +688,6 @@
*
* Use full range, SMPTE 170M transfer and BT.709 standard.
*/
- BT709_FULL_RANGE = 1 << 16 | 3 << 22 | 1 << 27, // STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_FULL
+ BT709_FULL_RANGE =
+ 1 << 16 | 3 << 22 | 1 << 27, // STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_FULL
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
index 0e2d72b..6eba887 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -42,5 +42,4 @@
AUTO_LOW_LATENCY_MODE = 5,
SUSPEND = 6,
DISPLAY_IDLE_TIMER = 7,
- MULTI_THREADED_PRESENT = 8,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
index 7154d74..f4b2984 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -80,20 +80,4 @@
* IComposerCallback.onVsyncIdle.
*/
DISPLAY_IDLE_TIMER = 7,
- /**
- * Indicates that both the composer HAL implementation and the given display
- * support calling executeCommands concurrently from separate threads.
- * executeCommands for a particular display will never run concurrently to
- * any other executeCommands for the same display. In addition, the
- * CommandResultPayload must only reference displays included in the
- * DisplayCommands passed to executeCommands. Displays referenced from
- * separate threads must have minimal interference with one another. If a
- * HWC-managed display has this capability, SurfaceFlinger can run
- * executeCommands for this display concurrently with other displays with the
- * same capability.
- * @see IComposerClient.executeCommands
- * @see DisplayCommand.presentDisplay
- * @see DisplayCommand.validateDisplay
- */
- MULTI_THREADED_PRESENT = 8,
}
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index 2b1b753..3ea5bf5 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -118,6 +118,12 @@
[&](const Capability& activeCapability) { return activeCapability == capability; });
}
+ int getInterfaceVersion() {
+ const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
+ EXPECT_TRUE(versionStatus.isOk());
+ return version;
+ }
+
const VtsDisplay& getPrimaryDisplay() const { return mDisplays[0]; }
int64_t getPrimaryDisplayId() const { return getPrimaryDisplay().getDisplayId(); }
@@ -874,9 +880,7 @@
}
TEST_P(GraphicsComposerAidlTest, GetOverlaySupport) {
- const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
- ASSERT_TRUE(versionStatus.isOk());
- if (version == 1) {
+ if (getInterfaceVersion() <= 1) {
GTEST_SUCCEED() << "Device does not support the new API for overlay support";
return;
}
@@ -2392,6 +2396,11 @@
}
TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Unsupported) {
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
+ "not supported on older version of the service";
+ return;
+ }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
auto status = mComposerClient->setRefreshRateChangedCallbackDebugEnabled(
getPrimaryDisplayId(), /*enabled*/ true);
@@ -2408,6 +2417,11 @@
}
TEST_P(GraphicsComposerAidlCommandTest, SetRefreshRateChangedCallbackDebug_Enabled) {
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
+ "not supported on older version of the service";
+ return;
+ }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2437,6 +2451,11 @@
TEST_P(GraphicsComposerAidlCommandTest,
SetRefreshRateChangedCallbackDebugEnabled_noCallbackWhenIdle) {
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
+ "not supported on older version of the service";
+ return;
+ }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2494,6 +2513,11 @@
TEST_P(GraphicsComposerAidlCommandTest,
SetRefreshRateChangedCallbackDebugEnabled_SetActiveConfigWithConstraints) {
+ if (getInterfaceVersion() <= 1) {
+ GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is "
+ "not supported on older version of the service";
+ return;
+ }
if (!hasCapability(Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG)) {
GTEST_SUCCEED() << "Capability::REFRESH_RATE_CHANGED_CALLBACK_DEBUG is not supported";
return;
@@ -2596,29 +2620,13 @@
}
}
-TEST_P(GraphicsComposerAidlCommandTest, MultiThreadedPresent) {
- std::vector<VtsDisplay*> displays;
- for (auto& display : mDisplays) {
- if (hasDisplayCapability(display.getDisplayId(),
- DisplayCapability::MULTI_THREADED_PRESENT)) {
- displays.push_back(&display);
- }
- }
- if (displays.size() <= 1u) {
- return;
- }
- // TODO(b/251842321): Try to present on multiple threads.
-}
-
/**
* Test Capability::SKIP_VALIDATE
*
* Capability::SKIP_VALIDATE has been deprecated and should not be enabled.
*/
TEST_P(GraphicsComposerAidlCommandTest, SkipValidateDeprecatedTest) {
- const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
- ASSERT_TRUE(versionStatus.isOk());
- if (version <= 1) {
+ if (getInterfaceVersion() <= 1) {
GTEST_SUCCEED() << "HAL at version 1 or lower can contain Capability::SKIP_VALIDATE.";
return;
}
diff --git a/graphics/mapper/2.0/default/passthrough.cpp b/graphics/mapper/2.0/default/passthrough.cpp
index 93d6d99..e18b88f 100644
--- a/graphics/mapper/2.0/default/passthrough.cpp
+++ b/graphics/mapper/2.0/default/passthrough.cpp
@@ -19,14 +19,6 @@
using android::hardware::graphics::mapper::V2_0::IMapper;
using android::hardware::graphics::mapper::V2_0::passthrough::GrallocLoader;
-// Preload the gralloc module such that GraphicBufferMapper::preloadHal is
-// meaningful
-class GrallocPreloader {
-public:
- GrallocPreloader() { GrallocLoader::loadModule(); }
-};
-static GrallocPreloader sGrallocPreloader;
-
extern "C" IMapper* HIDL_FETCH_IMapper(const char* /*name*/) {
return GrallocLoader::load();
}
diff --git a/graphics/mapper/2.1/default/passthrough.cpp b/graphics/mapper/2.1/default/passthrough.cpp
index c99c984..c7f0cf5 100644
--- a/graphics/mapper/2.1/default/passthrough.cpp
+++ b/graphics/mapper/2.1/default/passthrough.cpp
@@ -19,14 +19,6 @@
using android::hardware::graphics::mapper::V2_1::IMapper;
using android::hardware::graphics::mapper::V2_1::passthrough::GrallocLoader;
-// Preload the gralloc module such that GraphicBufferMapper::preloadHal is
-// meaningful
-class GrallocPreloader {
-public:
- GrallocPreloader() { GrallocLoader::loadModule(); }
-};
-static GrallocPreloader sGrallocPreloader;
-
extern "C" IMapper* HIDL_FETCH_IMapper(const char* /*name*/) {
return GrallocLoader::load();
}
diff --git a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
index 69d4789..783ce11 100644
--- a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
+++ b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
@@ -257,7 +257,7 @@
BatteryChargingPolicy value;
/* set ChargingPolicy*/
- status = health->setChargingPolicy(static_cast<BatteryChargingPolicy>(2)); // LONG_LIFE
+ status = health->setChargingPolicy(BatteryChargingPolicy::LONG_LIFE);
ASSERT_THAT(status, AnyOf(IsOk(), ExceptionIs(EX_UNSUPPORTED_OPERATION)));
if (!status.isOk()) return;
@@ -265,7 +265,9 @@
status = health->getChargingPolicy(&value);
ASSERT_THAT(status, AnyOf(IsOk(), ExceptionIs(EX_UNSUPPORTED_OPERATION)));
if (!status.isOk()) return;
- ASSERT_THAT(static_cast<int>(value), Eq(2));
+ // the result of getChargingPolicy will be one of default(1), ADAPTIVE_AON(2)
+ // ADAPTIVE_AC(3) or LONG_LIFE(4). default(1) means NOT_SUPPORT
+ ASSERT_THAT(static_cast<int>(value), AnyOf(Eq(1), Eq(4)));
}
MATCHER(IsValidHealthData, "") {
diff --git a/identity/OWNERS b/identity/OWNERS
index 6969910..9353bbc 100644
--- a/identity/OWNERS
+++ b/identity/OWNERS
@@ -1,2 +1,4 @@
+# Bug component: 1084909
+
swillden@google.com
zeuthen@google.com
diff --git a/identity/aidl/vts/Android.bp b/identity/aidl/vts/Android.bp
index 5e303bb..6f7ab54 100644
--- a/identity/aidl/vts/Android.bp
+++ b/identity/aidl/vts/Android.bp
@@ -61,16 +61,3 @@
],
require_root: true,
}
-
-java_test_host {
- name: "IdentityCredentialImplementedTest",
- libs: [
- "tradefed",
- "vts-core-tradefed-harness",
- ],
- srcs: ["src/**/*.java"],
- test_suites: [
- "vts",
- ],
- test_config: "IdentityCredentialImplementedTest.xml",
-}
diff --git a/identity/aidl/vts/IdentityCredentialImplementedTest.xml b/identity/aidl/vts/IdentityCredentialImplementedTest.xml
deleted file mode 100644
index 4276ae6..0000000
--- a/identity/aidl/vts/IdentityCredentialImplementedTest.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2022 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<configuration description="Runs IdentityCredentialImplementedTest">
- <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
-
- <test class="com.android.tradefed.testtype.HostTest" >
- <option name="jar" value="IdentityCredentialImplementedTest.jar" />
- </test>
-</configuration>
diff --git a/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java b/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java
deleted file mode 100644
index 4936f8c..0000000
--- a/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.tests.security.identity;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import android.platform.test.annotations.RequiresDevice;
-import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
-import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-// This is a host-test which executes shell commands on the device. It would be
-// nicer to have this be a Device test (like CTS) but this is currently not
-// possible, see https://source.android.com/docs/core/tests/vts
-
-@RunWith(DeviceJUnit4ClassRunner.class)
-public class IdentityCredentialImplementedTest extends BaseHostJUnit4Test {
- // Returns the ro.vendor.api_level or 0 if not set.
- //
- // Throws NumberFormatException if ill-formatted.
- //
- // Throws DeviceNotAvailableException if device is not available.
- //
- private int getVendorApiLevel() throws NumberFormatException, DeviceNotAvailableException {
- String vendorApiLevelString =
- getDevice().executeShellCommand("getprop ro.vendor.api_level").trim();
- if (vendorApiLevelString.isEmpty()) {
- return 0;
- }
- return Integer.parseInt(vendorApiLevelString);
- }
-
- // As of Android 14 VSR (vendor API level 34), Identity Credential is required at feature
- // version 202301 or later.
- @RequiresDevice
- @Test
- public void testIdentityCredentialIsImplemented() throws Exception {
- int vendorApiLevel = getVendorApiLevel();
- assumeTrue(vendorApiLevel >= 34);
-
- final String minimumFeatureVersionNeeded = "202301";
-
- String result = getDevice().executeShellCommand(
- "pm has-feature android.hardware.identity_credential "
- + minimumFeatureVersionNeeded);
- if (!result.trim().equals("true")) {
- fail("Identity Credential feature version " + minimumFeatureVersionNeeded
- + " required but not found");
- }
- }
-}
diff --git a/neuralnetworks/aidl/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/aidl/vts/functional/GeneratedTestHarness.cpp
index dcf8451..e344458 100644
--- a/neuralnetworks/aidl/vts/functional/GeneratedTestHarness.cpp
+++ b/neuralnetworks/aidl/vts/functional/GeneratedTestHarness.cpp
@@ -736,8 +736,8 @@
// If a sync fence is returned, try start another run waiting for the sync
// fence.
if (testConfig.reusable) {
- ret = execution->executeFenced(waitFor, kNoDeadline, kNoDuration,
- &executionResult);
+ // Nothing to do because at most one execution may occur on a reusable
+ // execution object at any given time.
} else if (testConfig.useConfig) {
ret = preparedModel->executeFencedWithConfig(
request, waitFor,
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index 152858f..316c308 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -564,23 +564,23 @@
TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
- bandP900.geranBands() = {GeranBands::BAND_P900};
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
- band850.geranBands() = {GeranBands::BAND_850};
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
- .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = bandP900,
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band17;
+ band17.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_17});
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band20;
+ band20.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_20});
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier17 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
+ .bands = band17,
.channels = {1, 2}};
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
- .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = band850,
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier20 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
+ .bands = band20,
.channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifierP900, specifier850},
+ .specifiers = {specifier17, specifier20},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -595,12 +595,17 @@
if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
- // OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do
- // not support the required manual GSM search functionality. This is
- // tracked in b/112206766. Modems have "GSM" rat scan need to
+ // Modems support 3GPP RAT family need to
// support scanning requests combined with some parameters.
- ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
- {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
+ if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
+ } else {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_5->rspInfo.error,
+ {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
+ RadioError::REQUEST_NOT_SUPPORTED, RadioError::INVALID_ARGUMENTS}));
+ }
}
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 3d6dbe7..7d9986b 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -856,20 +856,20 @@
TEST_P(RadioNetworkTest, startNetworkScan) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifierBands bandP900 =
- RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>(
- {GeranBands::BAND_P900});
- RadioAccessSpecifierBands band850 =
- RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::geranBands>(
- {GeranBands::BAND_850});
- RadioAccessSpecifier specifierP900 = {
- .accessNetwork = AccessNetwork::GERAN, .bands = bandP900, .channels = {1, 2}};
- RadioAccessSpecifier specifier850 = {
- .accessNetwork = AccessNetwork::GERAN, .bands = band850, .channels = {128, 129}};
+ RadioAccessSpecifierBands band17 =
+ RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
+ {EutranBands::BAND_17});
+ RadioAccessSpecifierBands band20 =
+ RadioAccessSpecifierBands::make<RadioAccessSpecifierBands::eutranBands>(
+ {EutranBands::BAND_20});
+ RadioAccessSpecifier specifier17 = {
+ .accessNetwork = AccessNetwork::EUTRAN, .bands = band17, .channels = {1, 2}};
+ RadioAccessSpecifier specifier20 = {
+ .accessNetwork = AccessNetwork::EUTRAN, .bands = band20, .channels = {128, 129}};
NetworkScanRequest request = {.type = NetworkScanRequest::SCAN_TYPE_ONE_SHOT,
.interval = 60,
- .specifiers = {specifierP900, specifier850},
+ .specifiers = {specifier17, specifier20},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -885,12 +885,17 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::SIM_ABSENT}));
} else if (cardStatus.cardState == CardStatus::STATE_PRESENT) {
- // OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do
- // not support the required manual GSM search functionality. This is
- // tracked in b/112206766. Modems have "GSM" rat scan need to
- // support scanning requests combined with some parameters.
- ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
- {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
+ if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
+ // Modems support 3GPP RAT family need to
+ // support scanning requests combined with some parameters.
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+ {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
+ } else {
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_network->rspInfo.error,
+ {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED, RadioError::NONE,
+ RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
+ }
}
if (radioRsp_network->rspInfo.error == RadioError::NONE) {
diff --git a/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl b/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
index 8c0dd6d..800494a 100644
--- a/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
+++ b/secure_element/aidl/android/hardware/secure_element/ISecureElement.aidl
@@ -117,6 +117,9 @@
* closed by this operation.
* HAL service must send onStateChange() with connected equal to true
* after resetting and all the re-initialization has been successfully completed.
+ *
+ * @throws ServiceSpecificException on error with the following code:
+ * - FAILED if the service was unable to reset the secure element.
*/
void reset();
diff --git a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
index 0925a21..97b4e27 100644
--- a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
+++ b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
@@ -83,10 +83,15 @@
void expectCallbackHistory(std::vector<bool>&& want) {
std::unique_lock<std::mutex> l(m);
- cv.wait_for(l, 2s, [&]() { return history.size() >= want.size(); });
+ cv.wait_for(l, 5s, [&]() { return history.size() >= want.size(); });
EXPECT_THAT(history, ElementsAreArray(want));
}
+ void resetCallbackHistory() {
+ std::unique_lock<std::mutex> l(m);
+ history.clear();
+ }
+
private:
std::mutex m; // guards history
std::condition_variable cv;
@@ -118,7 +123,9 @@
}
void TearDown() override {
+ secure_element_callback_->resetCallbackHistory();
EXPECT_OK(secure_element_->reset());
+ secure_element_callback_->expectCallbackHistory({false, true});
secure_element_ = nullptr;
secure_element_callback_ = nullptr;
}
@@ -284,14 +291,21 @@
TEST_P(SecureElementAidl, transmit) {
std::vector<uint8_t> response;
+ LogicalChannelResponse logical_channel_response;
- // transmit called after init shall succeed.
- // Note: no channel is opened for this test and the transmit
- // response will have the status SW_LOGICAL_CHANNEL_NOT_SUPPORTED.
- // The transmit response shall be larger than 2 bytes as it includes the
- // status code.
- EXPECT_OK(secure_element_->transmit(kDataApdu, &response));
- EXPECT_GE(response.size(), 2u);
+ // Note: no channel is opened for this test
+ // transmit() will return an empty response with the error
+ // code CHANNEL_NOT_AVAILABLE when the SE cannot be
+ // communicated with.
+ EXPECT_ERR(secure_element_->transmit(kDataApdu, &response));
+
+ EXPECT_OK(secure_element_->openLogicalChannel(kSelectableAid, 0x00, &logical_channel_response));
+ EXPECT_GE(logical_channel_response.selectResponse.size(), 2u);
+ EXPECT_GE(logical_channel_response.channelNumber, 1u);
+ EXPECT_LE(logical_channel_response.channelNumber, 19u);
+
+ // transmit called on the logical channel should succeed.
+ EXPECT_EQ(transmit(logical_channel_response.channelNumber), 0x9000);
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SecureElementAidl);
diff --git a/security/keymint/aidl/default/Android.bp b/security/keymint/aidl/default/Android.bp
index 17520b7..953630b 100644
--- a/security/keymint/aidl/default/Android.bp
+++ b/security/keymint/aidl/default/Android.bp
@@ -42,7 +42,6 @@
"service.cpp",
],
required: [
- "RemoteProvisioner",
"android.hardware.hardware_keystore.xml",
],
}
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 1dec8d7..5e27bd0 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1292,6 +1292,19 @@
return retval;
}
+
+bool KeyMintAidlTestBase::IsRkpSupportRequired() const {
+ if (get_vsr_api_level() >= __ANDROID_API_T__) {
+ return true;
+ }
+
+ if (get_vsr_api_level() >= __ANDROID_API_S__) {
+ return SecLevel() != SecurityLevel::STRONGBOX;
+ }
+
+ return false;
+}
+
vector<uint32_t> KeyMintAidlTestBase::ValidKeySizes(Algorithm algorithm) {
switch (algorithm) {
case Algorithm::RSA:
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 3c753d1..3245ca9 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -309,6 +309,7 @@
}
bool IsSecure() const { return securityLevel_ != SecurityLevel::SOFTWARE; }
SecurityLevel SecLevel() const { return securityLevel_; }
+ bool IsRkpSupportRequired() const;
vector<uint32_t> ValidKeySizes(Algorithm algorithm);
vector<uint32_t> InvalidKeySizes(Algorithm algorithm);
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 9e66f08..63b2e73 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -26,6 +26,7 @@
#include <openssl/ec.h>
#include <openssl/evp.h>
#include <openssl/mem.h>
+#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <cutils/properties.h>
@@ -590,8 +591,7 @@
return name.substr(pos + 1);
}
-bool matching_rp_instance(const string& km_name,
- std::shared_ptr<IRemotelyProvisionedComponent>* rp) {
+std::shared_ptr<IRemotelyProvisionedComponent> matching_rp_instance(const std::string& km_name) {
string km_suffix = device_suffix(km_name);
vector<string> rp_names =
@@ -601,11 +601,10 @@
// KeyMint instance, assume they match.
if (device_suffix(rp_name) == km_suffix && AServiceManager_isDeclared(rp_name.c_str())) {
::ndk::SpAIBinder binder(AServiceManager_waitForService(rp_name.c_str()));
- *rp = IRemotelyProvisionedComponent::fromBinder(binder);
- return true;
+ return IRemotelyProvisionedComponent::fromBinder(binder);
}
}
- return false;
+ return nullptr;
}
} // namespace
@@ -1061,6 +1060,42 @@
}
/*
+ * NewKeyGenerationTest.RsaWithSpecifiedValidity
+ *
+ * Verifies that KeyMint respects specified NOT_BEFORE and NOT_AFTER certificate dates.
+ */
+TEST_P(NewKeyGenerationTest, RsaWithSpecifiedValidity) {
+ vector<uint8_t> key_blob;
+ vector<KeyCharacteristics> key_characteristics;
+ ASSERT_EQ(ErrorCode::OK,
+ GenerateKey(AuthorizationSetBuilder()
+ .RsaSigningKey(2048, 65537)
+ .Digest(Digest::NONE)
+ .Padding(PaddingMode::NONE)
+ .Authorization(TAG_CERTIFICATE_NOT_BEFORE,
+ 1183806000000 /* 2007-07-07T11:00:00Z */)
+ .Authorization(TAG_CERTIFICATE_NOT_AFTER,
+ 1916049600000 /* 2030-09-19T12:00:00Z */),
+ &key_blob, &key_characteristics));
+ ASSERT_GT(cert_chain_.size(), 0);
+
+ X509_Ptr cert(parse_cert_blob(cert_chain_[0].encodedCertificate));
+ ASSERT_TRUE(!!cert.get());
+
+ const ASN1_TIME* not_before = X509_get0_notBefore(cert.get());
+ ASSERT_NE(not_before, nullptr);
+ time_t not_before_time;
+ ASSERT_EQ(ASN1_TIME_to_time_t(not_before, ¬_before_time), 1);
+ EXPECT_EQ(not_before_time, 1183806000);
+
+ const ASN1_TIME* not_after = X509_get0_notAfter(cert.get());
+ ASSERT_NE(not_after, nullptr);
+ time_t not_after_time;
+ ASSERT_EQ(ASN1_TIME_to_time_t(not_after, ¬_after_time), 1);
+ EXPECT_EQ(not_after_time, 1916049600);
+}
+
+/*
* NewKeyGenerationTest.RsaWithAttestation
*
* Verifies that keymint can generate all required RSA key sizes with attestation, and that the
@@ -1136,15 +1171,18 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, RsaWithRkpAttestation) {
- if (get_vsr_api_level() < __ANDROID_API_T__ || AidlVersion() < 2) {
- GTEST_SKIP() << "Only required for VSR 12+ and KeyMint 2+";
+ if (!IsRkpSupportRequired()) {
+ GTEST_SKIP() << "RKP support is not required on this platform";
}
- // There should be an IRemotelyProvisionedComponent instance associated with the KeyMint
- // instance.
- std::shared_ptr<IRemotelyProvisionedComponent> rp;
- ASSERT_TRUE(matching_rp_instance(GetParam(), &rp))
- << "No IRemotelyProvisionedComponent found that matches KeyMint device " << GetParam();
+ // Check for an IRemotelyProvisionedComponent instance associated with the
+ // KeyMint instance.
+ std::shared_ptr<IRemotelyProvisionedComponent> rp = matching_rp_instance(GetParam());
+ if (rp == nullptr && SecLevel() == SecurityLevel::STRONGBOX) {
+ GTEST_SKIP() << "Encountered StrongBox implementation that does not support RKP";
+ }
+ ASSERT_NE(rp, nullptr) << "No IRemotelyProvisionedComponent found that matches KeyMint device "
+ << GetParam();
// Generate a P-256 keypair to use as an attestation key.
MacedPublicKey macedPubKey;
@@ -1214,15 +1252,18 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, EcdsaWithRkpAttestation) {
- if (get_vsr_api_level() < __ANDROID_API_T__ || AidlVersion() < 2) {
- GTEST_SKIP() << "Only required for VSR 12+ and KeyMint 2+";
+ if (!IsRkpSupportRequired()) {
+ GTEST_SKIP() << "RKP support is not required on this platform";
}
- // There should be an IRemotelyProvisionedComponent instance associated with the KeyMint
- // instance.
- std::shared_ptr<IRemotelyProvisionedComponent> rp;
- ASSERT_TRUE(matching_rp_instance(GetParam(), &rp))
- << "No IRemotelyProvisionedComponent found that matches KeyMint device " << GetParam();
+ // Check for an IRemotelyProvisionedComponent instance associated with the
+ // KeyMint instance.
+ std::shared_ptr<IRemotelyProvisionedComponent> rp = matching_rp_instance(GetParam());
+ if (rp == nullptr && SecLevel() == SecurityLevel::STRONGBOX) {
+ GTEST_SKIP() << "Encountered StrongBox implementation that does not support RKP";
+ }
+ ASSERT_NE(rp, nullptr) << "No IRemotelyProvisionedComponent found that matches KeyMint device "
+ << GetParam();
// Generate a P-256 keypair to use as an attestation key.
MacedPublicKey macedPubKey;
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 491b757..ffcaa95 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -22,6 +22,7 @@
#include "aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h"
#include <aidl/android/hardware/security/keymint/RpcHardwareInfo.h>
+#include <android-base/macros.h>
#include <android-base/properties.h>
#include <cppbor.h>
#include <hwtrust/hwtrust.h>
@@ -43,6 +44,7 @@
constexpr int32_t kBccPayloadSubjPubKey = -4670552;
constexpr int32_t kBccPayloadKeyUsage = -4670553;
constexpr int kP256AffinePointSize = 32;
+constexpr uint32_t kNumTeeDeviceInfoEntries = 14;
using EC_KEY_Ptr = bssl::UniquePtr<EC_KEY>;
using EVP_PKEY_Ptr = bssl::UniquePtr<EVP_PKEY>;
@@ -290,11 +292,12 @@
return chain.encode();
}
-ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc) {
+ErrMsgOr<std::vector<BccEntryData>> validateBcc(const cppbor::Array* bcc,
+ hwtrust::DiceChain::Kind kind) {
auto encodedBcc = bcc->encode();
- auto chain = hwtrust::DiceChain::verify(encodedBcc);
+ auto chain = hwtrust::DiceChain::Verify(encodedBcc, kind);
if (!chain.ok()) return chain.error().message();
- auto keys = chain->cose_public_keys();
+ auto keys = chain->CosePublicKeys();
if (!keys.ok()) return keys.error().message();
std::vector<BccEntryData> result;
for (auto& key : *keys) {
@@ -387,6 +390,11 @@
return entryName + " has an invalid value.\n";
}
+bool isTeeDeviceInfo(const cppbor::Map& devInfo) {
+ return devInfo.get("security_level") && devInfo.get("security_level")->asTstr() &&
+ devInfo.get("security_level")->asTstr()->value() == "tee";
+}
+
ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateDeviceInfo(
const std::vector<uint8_t>& deviceInfoBytes, IRemotelyProvisionedComponent* provisionable,
bool isFactory) {
@@ -395,6 +403,21 @@
const cppbor::Array kValidSecurityLevels = {"tee", "strongbox"};
const cppbor::Array kValidAttIdStates = {"locked", "open"};
const cppbor::Array kValidFused = {0, 1};
+ constexpr std::array<std::string_view, kNumTeeDeviceInfoEntries> kDeviceInfoKeys = {
+ "brand",
+ "manufacturer",
+ "product",
+ "model",
+ "device",
+ "vb_state",
+ "bootloader_state",
+ "vbmeta_digest",
+ "os_version",
+ "system_patch_level",
+ "boot_patch_level",
+ "vendor_patch_level",
+ "security_level",
+ "fused"};
struct AttestationIdEntry {
const char* id;
@@ -438,20 +461,48 @@
}
std::string error;
+ std::string tmp;
+ std::set<std::string_view> previousKeys;
switch (info.versionNumber) {
case 3:
+ if (isTeeDeviceInfo(*parsed) && parsed->size() != kNumTeeDeviceInfoEntries) {
+ error += fmt::format(
+ "Err: Incorrect number of device info entries. Expected {} but got "
+ "{}\n",
+ kNumTeeDeviceInfoEntries, parsed->size());
+ }
+ // TEE IRPC instances require all entries to be present in DeviceInfo. Non-TEE instances
+ // may omit `os_version`
+ if (!isTeeDeviceInfo(*parsed) && (parsed->size() != kNumTeeDeviceInfoEntries &&
+ parsed->size() != kNumTeeDeviceInfoEntries - 1)) {
+ error += fmt::format(
+ "Err: Incorrect number of device info entries. Expected {} or {} but got "
+ "{}\n",
+ kNumTeeDeviceInfoEntries - 1, kNumTeeDeviceInfoEntries, parsed->size());
+ }
+ for (auto& [key, _] : *parsed) {
+ const std::string& keyValue = key->asTstr()->value();
+ if (!previousKeys.insert(keyValue).second) {
+ error += "Err: Duplicate device info entry: <" + keyValue + ">,\n";
+ }
+ if (std::find(kDeviceInfoKeys.begin(), kDeviceInfoKeys.end(), keyValue) ==
+ kDeviceInfoKeys.end()) {
+ error += "Err: Unrecognized key entry: <" + key->asTstr()->value() + ">,\n";
+ }
+ }
+ FALLTHROUGH_INTENDED;
case 2:
for (const auto& entry : kAttestationIdEntrySet) {
- error += checkMapEntry(isFactory && !entry.alwaysValidate, *parsed, cppbor::TSTR,
- entry.id);
+ tmp = checkMapEntry(isFactory && !entry.alwaysValidate, *parsed, cppbor::TSTR,
+ entry.id);
}
- if (!error.empty()) {
- return error +
- "Attestation IDs are missing or malprovisioned. If this test is being\n"
- "run against an early proto or EVT build, this error is probably WAI\n"
- "and indicates that Device IDs were not provisioned in the factory. If\n"
- "this error is returned on a DVT or later build revision, then\n"
- "something is likely wrong with the factory provisioning process.";
+ if (!tmp.empty()) {
+ error += tmp +
+ "Attestation IDs are missing or malprovisioned. If this test is being\n"
+ "run against an early proto or EVT build, this error is probably WAI\n"
+ "and indicates that Device IDs were not provisioned in the factory. If\n"
+ "this error is returned on a DVT or later build revision, then\n"
+ "something is likely wrong with the factory provisioning process.";
}
// TODO: Refactor the KeyMint code that validates these fields and include it here.
error += checkMapEntry(isFactory, *parsed, cppbor::TSTR, "vb_state", kValidVbStates);
@@ -464,8 +515,7 @@
error += checkMapEntry(isFactory, *parsed, cppbor::UINT, "fused", kValidFused);
error += checkMapEntry(isFactory, *parsed, cppbor::TSTR, "security_level",
kValidSecurityLevels);
- if (parsed->get("security_level") && parsed->get("security_level")->asTstr() &&
- parsed->get("security_level")->asTstr()->value() == "tee") {
+ if (isTeeDeviceInfo(*parsed)) {
error += checkMapEntry(isFactory, *parsed, cppbor::TSTR, "os_version");
}
break;
@@ -569,7 +619,7 @@
}
// BCC is [ pubkey, + BccEntry]
- auto bccContents = validateBcc(bcc->asArray());
+ auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr13);
if (!bccContents) {
return bccContents.message() + "\n" + prettyPrint(bcc.get());
}
@@ -859,8 +909,8 @@
return "AuthenticatedRequest SignedData must be an Array.";
}
- // DICE chain is [ pubkey, + DiceChainEntry ]. Its format is the same as BCC from RKP v1-2.
- auto diceContents = validateBcc(diceCertChain);
+ // DICE chain is [ pubkey, + DiceChainEntry ].
+ auto diceContents = validateBcc(diceCertChain, hwtrust::DiceChain::Kind::kVsr14);
if (!diceContents) {
return diceContents.message() + "\n" + prettyPrint(diceCertChain);
}
diff --git a/security/rkp/CHANGELOG.md b/security/rkp/CHANGELOG.md
index 9409a6d..f425284 100644
--- a/security/rkp/CHANGELOG.md
+++ b/security/rkp/CHANGELOG.md
@@ -31,7 +31,7 @@
* IRemotelyProvisionedComponent
* The need for an EEK has been removed. There is no longer an encrypted portion of the CSR.
* Keys for new CSR format must be generated with test mode set to false, effectively removing test
- mode in the new CSR flow. Old behavior is kept unchanged for backwards compatibility.
+ mode in the new CSR flow.
* The schema for the CSR itself has been significantly simplified, please see
IRemotelyProvisionedComponent.aidl for more details. Notably,
* the chain of signing, MACing, and encryption operations has been replaced with a single
diff --git a/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash b/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
index 8700d33..4b3b2a6 100644
--- a/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
+++ b/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
@@ -1 +1,2 @@
+207c9f218b9b9e4e74ff5232eb16511eca9d7d2e
c8d34e56ae0807b61f028019622d8b60a37e0a8b
diff --git a/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl b/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl
index f0af619..8456148 100644
--- a/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl
+++ b/security/rkp/aidl/android/hardware/security/keymint/DeviceInfo.aidl
@@ -17,11 +17,11 @@
package android.hardware.security.keymint;
/**
- * DeviceInfo contains information about the device that's fed in as AAD in the signature of the
- * device private key over the MAC key used for the bundle of public keys. These values are intended
- * to be checked by the server to verify that the certificate signing request crafted by
- * an IRemotelyProvisionedComponent HAL instance is coming from the expected device based
- * on values initially uploaded during device manufacture in the factory.
+ * DeviceInfo contains information about the device that's signed by the
+ * IRemotelyProvisionedComponent HAL. These values are intended to be checked by the server to
+ * verify that the certificate signing request crafted by an IRemotelyProvisionedComponent HAL
+ * instance is coming from the expected device based on values initially uploaded during device
+ * manufacture in the factory.
* @hide
*/
@VintfStability
@@ -31,6 +31,11 @@
* canonicalized according to the specification in RFC 7049. The ordering presented here is
* non-canonical to group similar entries semantically.
*
+ * The DeviceInfo has changed across versions 1, 2, and 3 of the HAL. All versions of the
+ * DeviceInfo CDDL are described as follows. Please refer to the CDDL structure version
+ * that corresponds to the HAL version you are working with:
+ *
+ * Version 3, introduced in Android 14:
* DeviceInfo = {
* "brand" : tstr,
* "manufacturer" : tstr,
@@ -43,13 +48,63 @@
* ? "os_version" : tstr, ; Same as
* ; android.os.Build.VERSION.release
* ; Not optional for TEE.
- * "system_patch_level" : uint, ; YYYYMMDD
- * "boot_patch_level" : uint, ; YYYYMMDD
- * "vendor_patch_level" : uint, ; YYYYMMDD
+ * "system_patch_level" : uint, ; YYYYMM, must match KeyMint OS_PATCHLEVEL
+ * "boot_patch_level" : uint, ; YYYYMMDD, must match KeyMint BOOT_PATCHLEVEL
+ * "vendor_patch_level" : uint, ; YYYYMMDD, must match KeyMint VENDOR_PATCHLEVEL
* "security_level" : "tee" / "strongbox",
* "fused": 1 / 0, ; 1 if secure boot is enforced for the processor that the IRPC
* ; implementation is contained in. 0 otherwise.
* }
+ *
+ * ---------------------------------------------------------------------------------------------
+ *
+ * Version 2, introduced in Android 13:
+ * DeviceInfo = {
+ * "brand" : tstr,
+ * "manufacturer" : tstr,
+ * "product" : tstr,
+ * "model" : tstr,
+ * "device" : tstr,
+ * "vb_state" : "green" / "yellow" / "orange", ; Taken from the AVB values
+ * "bootloader_state" : "locked" / "unlocked", ; Taken from the AVB values
+ * "vbmeta_digest": bstr, ; Taken from the AVB values
+ * ? "os_version" : tstr, ; Same as
+ * ; android.os.Build.VERSION.release
+ * ; Not optional for TEE.
+ * "system_patch_level" : uint, ; YYYYMM, must match KeyMint OS_PATCHLEVEL
+ * "boot_patch_level" : uint, ; YYYYMMDD, must match KeyMint BOOT_PATCHLEVEL
+ * "vendor_patch_level" : uint, ; YYYYMMDD, must match KeyMint VENDOR_PATCHLEVEL
+ * "version" : 2, ; The CDDL schema version.
+ * "security_level" : "tee" / "strongbox",
+ * "fused": 1 / 0, ; 1 if secure boot is enforced for the processor that the IRPC
+ * ; implementation is contained in. 0 otherwise.
+ *
+ * ---------------------------------------------------------------------------------------------
+ *
+ * Version 1, introduced in Android 12:
+ * DeviceInfo = {
+ * ? "brand" : tstr,
+ * ? "manufacturer" : tstr,
+ * ? "product" : tstr,
+ * ? "model" : tstr,
+ * ? "board" : tstr,
+ * ? "vb_state" : "green" / "yellow" / "orange", ; Taken from the AVB values
+ * ? "bootloader_state" : "locked" / "unlocked", ; Taken from the AVB values
+ * ? "vbmeta_digest": bstr, ; Taken from the AVB values
+ * ? "os_version" : tstr, ; Same as
+ * ; android.os.Build.VERSION.release
+ * ? "system_patch_level" : uint, ; YYYYMM, must match KeyMint OS_PATCHLEVEL
+ * ? "boot_patch_level" : uint, ; YYYYMMDD, must match KeyMint BOOT_PATCHLEVEL
+ * ? "vendor_patch_level" : uint, ; YYYYMMDD, must match KeyMint VENDOR_PATCHLEVEL
+ * "version" : 1, ; The CDDL schema version.
+ * "security_level" : "tee" / "strongbox"
+ * "att_id_state": "locked" / "open", ; Attestation IDs State. If "locked", this
+ * ; indicates a device's attestable IDs are
+ * ; factory-locked and immutable. If "open",
+ * ; this indicates the device is still in a
+ * ; provisionable state and the attestable IDs
+ * ; are not yet frozen.
+ * }
*/
byte[] deviceInfo;
}
diff --git a/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl b/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
index 35b83dd..7960c7f 100644
--- a/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
+++ b/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
@@ -144,9 +144,9 @@
byte[] generateEcdsaP256KeyPair(in boolean testMode, out MacedPublicKey macedPublicKey);
/**
- * This method can be removed in version 3 of the HAL. The header is kept around for
- * backwards compatibility purposes. From v3, this method is allowed to raise a
- * ServiceSpecificException with an error code of STATUS_REMOVED.
+ * This method has been deprecated since version 3 of the HAL. The header is kept around for
+ * backwards compatibility purposes. From v3, this method must raise a ServiceSpecificException
+ * with an error code of STATUS_REMOVED.
*
* For v1 and v2 implementations:
* generateCertificateRequest creates a certificate request to be sent to the provisioning
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index bf40976..9f68bfa 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -408,16 +408,8 @@
ASSERT_FALSE(HasFatalFailure());
if (rpcHardwareInfo.versionNumber >= VERSION_WITHOUT_TEST_MODE) {
- bytevec keysToSignMac;
- DeviceInfo deviceInfo;
- ProtectedData protectedData;
- auto status = provisionable_->generateCertificateRequest(
- false, {}, {}, {}, &deviceInfo, &protectedData, &keysToSignMac);
- if (!status.isOk() && (status.getServiceSpecificError() ==
- BnRemotelyProvisionedComponent::STATUS_REMOVED)) {
- GTEST_SKIP() << "This test case applies to RKP v3+ only if "
- << "generateCertificateRequest() is implemented.";
- }
+ GTEST_SKIP() << "This test case only applies to RKP v1 and v2. "
+ << "RKP version discovered: " << rpcHardwareInfo.versionNumber;
}
}
};
@@ -798,6 +790,20 @@
BnRemotelyProvisionedComponent::STATUS_TEST_KEY_IN_PRODUCTION_REQUEST);
}
+/**
+ * Call generateCertificateRequest(). Make sure it's removed.
+ */
+TEST_P(CertificateRequestV2Test, CertificateRequestV1Removed) {
+ bytevec keysToSignMac;
+ DeviceInfo deviceInfo;
+ ProtectedData protectedData;
+ auto status = provisionable_->generateCertificateRequest(
+ true /* testMode */, {} /* keysToSign */, {} /* EEK chain */, challenge_, &deviceInfo,
+ &protectedData, &keysToSignMac);
+ ASSERT_FALSE(status.isOk()) << status.getMessage();
+ EXPECT_EQ(status.getServiceSpecificError(), BnRemotelyProvisionedComponent::STATUS_REMOVED);
+}
+
void parse_root_of_trust(const vector<uint8_t>& attestation_cert,
vector<uint8_t>* verified_boot_key, VerifiedBoot* verified_boot_state,
bool* device_locked, vector<uint8_t>* verified_boot_hash) {
diff --git a/sensors/aidl/convert/convert.cpp b/sensors/aidl/convert/convert.cpp
index abd4d55..2dc7a17 100644
--- a/sensors/aidl/convert/convert.cpp
+++ b/sensors/aidl/convert/convert.cpp
@@ -462,7 +462,6 @@
limitedAxesImuUncal.z = src.limited_axes_imu_uncalibrated.z_uncalib;
limitedAxesImuUncal.xBias = src.limited_axes_imu_uncalibrated.x_bias;
limitedAxesImuUncal.yBias = src.limited_axes_imu_uncalibrated.y_bias;
- limitedAxesImuUncal.yBias = src.limited_axes_imu_uncalibrated.y_bias;
limitedAxesImuUncal.zBias = src.limited_axes_imu_uncalibrated.z_bias;
limitedAxesImuUncal.xSupported = src.limited_axes_imu_uncalibrated.x_supported;
limitedAxesImuUncal.ySupported = src.limited_axes_imu_uncalibrated.y_supported;
diff --git a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
index ad58e21..618acbb 100644
--- a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
+++ b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp
@@ -98,6 +98,7 @@
CHECK_TYPE_STRING_FOR_SENSOR_TYPE(TILT_DETECTOR);
CHECK_TYPE_STRING_FOR_SENSOR_TYPE(WAKE_GESTURE);
CHECK_TYPE_STRING_FOR_SENSOR_TYPE(WRIST_TILT_GESTURE);
+ CHECK_TYPE_STRING_FOR_SENSOR_TYPE(HINGE_ANGLE);
default:
FAIL() << "Type " << static_cast<int>(type)
<< " in android defined range is not checked, "
diff --git a/sensors/common/default/2.X/multihal/tests/fake_subhal/Sensor.cpp b/sensors/common/default/2.X/multihal/tests/fake_subhal/Sensor.cpp
index a0bb67a..d8e292a 100644
--- a/sensors/common/default/2.X/multihal/tests/fake_subhal/Sensor.cpp
+++ b/sensors/common/default/2.X/multihal/tests/fake_subhal/Sensor.cpp
@@ -76,6 +76,7 @@
static_cast<int64_t>(mSensorInfo.minDelay) * 1000,
static_cast<int64_t>(mSensorInfo.maxDelay) * 1000);
+ std::unique_lock<std::mutex> lock(mRunMutex);
if (mSamplingPeriodNs != samplingPeriodNs) {
mSamplingPeriodNs = samplingPeriodNs;
// Wake up the 'run' thread to check if a new event should be generated now
diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
index 7e22b19..aa6e881 100644
--- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
+++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
@@ -559,6 +559,11 @@
}
TEST_P(SensorsHidlTest, CleanupConnectionsOnInitialize) {
+ if (getSensorsList().size() == 0) {
+ // No sensors
+ return;
+ }
+
activateAllSensors(true);
// Verify that events are received
diff --git a/tests/extension/vibrator/aidl/Android.bp b/tests/extension/vibrator/aidl/Android.bp
index 20df5bb..0306dca 100644
--- a/tests/extension/vibrator/aidl/Android.bp
+++ b/tests/extension/vibrator/aidl/Android.bp
@@ -38,5 +38,11 @@
enabled: false,
},
},
- versions: ["1"],
+ frozen: true,
+ versions_with_info: [
+ {
+ version: "1",
+ imports: ["android.hardware.vibrator-V2"],
+ },
+ ],
}
diff --git a/tests/extension/vibrator/aidl/default/Android.bp b/tests/extension/vibrator/aidl/default/Android.bp
index 0f3895f..5e156af 100644
--- a/tests/extension/vibrator/aidl/default/Android.bp
+++ b/tests/extension/vibrator/aidl/default/Android.bp
@@ -29,6 +29,6 @@
"libbase",
"libbinder_ndk",
"android.hardware.vibrator-V2-ndk",
- "android.hardware.tests.extension.vibrator-V2-ndk",
+ "android.hardware.tests.extension.vibrator-V1-ndk",
],
}
diff --git a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
index 05cc8e0..835fbfa 100644
--- a/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
+++ b/thermal/aidl/vts/VtsHalThermalTargetTest.cpp
@@ -134,7 +134,6 @@
// Expect to succeed with different callback
status = mThermal->registerThermalChangedCallback(localThermalCallback);
ASSERT_TRUE(status.isOk()) << status.getMessage();
- ASSERT_TRUE(localThermalCallback->waitForCallback(200ms));
// Remove the local callback
status = mThermal->unregisterThermalChangedCallback(localThermalCallback);
ASSERT_TRUE(status.isOk()) << status.getMessage();
@@ -158,7 +157,6 @@
status = mThermal->registerThermalChangedCallbackWithType(localThermalCallback,
TemperatureType::SKIN);
ASSERT_TRUE(status.isOk()) << status.getMessage();
- ASSERT_TRUE(localThermalCallback->waitForCallback(200ms));
// Remove the local callback
status = mThermal->unregisterThermalChangedCallback(localThermalCallback);
ASSERT_TRUE(status.isOk()) << status.getMessage();
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
index a033903..3006198 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
@@ -36,5 +36,5 @@
enum TvMessageEventType {
WATERMARK = 1,
CLOSED_CAPTION = 2,
- OTHER = 3,
+ OTHER = 1000,
}
diff --git a/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
index 5a5f472..518c7fc 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
@@ -21,5 +21,5 @@
enum TvMessageEventType {
WATERMARK = 1,
CLOSED_CAPTION = 2,
- OTHER = 3,
+ OTHER = 1000,
}
diff --git a/tv/tuner/1.0/vts/functional/DvrTests.cpp b/tv/tuner/1.0/vts/functional/DvrTests.cpp
index 83f9858..cab5867 100644
--- a/tv/tuner/1.0/vts/functional/DvrTests.cpp
+++ b/tv/tuner/1.0/vts/functional/DvrTests.cpp
@@ -203,7 +203,6 @@
void DvrCallback::stopRecordThread() {
mKeepReadingRecordFMQ = false;
mRecordThreadRunning = false;
- android::Mutex::Autolock autoLock(mRecordThreadLock);
}
AssertionResult DvrTests::openDvrInDemux(DvrType type, uint32_t bufferSize) {
diff --git a/tv/tuner/config/TunerTestingConfigReaderV1_0.h b/tv/tuner/config/TunerTestingConfigReaderV1_0.h
index d049b07..fb76de7 100644
--- a/tv/tuner/config/TunerTestingConfigReaderV1_0.h
+++ b/tv/tuner/config/TunerTestingConfigReaderV1_0.h
@@ -65,6 +65,7 @@
using android::hardware::tv::tuner::V1_0::LnbVoltage;
using android::hardware::tv::tuner::V1_0::PlaybackSettings;
using android::hardware::tv::tuner::V1_0::RecordSettings;
+using android::hardware::tv::tuner::V1_0::FrontendAtscSettings;
const string emptyHardwareId = "";
@@ -241,6 +242,7 @@
break;
case FrontendTypeEnum::ATSC:
type = FrontendType::ATSC;
+ frontendMap[id].settings.atsc(readAtscFrontendSettings(feConfig));
break;
case FrontendTypeEnum::ATSC3:
type = FrontendType::ATSC3;
@@ -627,6 +629,13 @@
return dvbsSettings;
}
+ static FrontendAtscSettings readAtscFrontendSettings(Frontend feConfig) {
+ FrontendAtscSettings atscSettings{
+ .frequency = (uint32_t)feConfig.getFrequency(),
+ };
+ return atscSettings;
+ }
+
static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type,
DemuxFilterSettings& settings) {
auto mainType = filterConfig.getMainType();
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
index d1f1256..a438cbe 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
@@ -35,5 +35,6 @@
@Backing(type="int") @VintfStability
enum UwbVendorReasonCodes {
REASON_ERROR_INVALID_CHANNEL_WITH_AOA = 128,
- REASON_REGULATION_UWB_OFF = 129,
+ REASON_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 129,
+ REASON_REGULATION_UWB_OFF = 130,
}
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
index 8413f06..c3ac401 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
@@ -40,6 +40,7 @@
CCC_UWB_CONFIG_ID = 164,
CCC_PULSESHAPE_COMBO = 165,
CCC_URSK_TTL = 166,
+ CCC_LAST_INDEX_USED = 168,
NB_OF_RANGE_MEASUREMENTS = 227,
NB_OF_AZIMUTH_MEASUREMENTS = 228,
NB_OF_ELEVATION_MEASUREMENTS = 229,
diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
index 768ef8c..28cf7fe 100644
--- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
+++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
@@ -36,5 +36,6 @@
enum UwbVendorStatusCodes {
STATUS_ERROR_CCC_SE_BUSY = 80,
STATUS_ERROR_CCC_LIFECYCLE = 81,
- STATUS_REGULATION_UWB_OFF = 82,
+ STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 82,
+ STATUS_REGULATION_UWB_OFF = 83,
}
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
index a64a188..4207574 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorReasonCodes.aidl
@@ -31,6 +31,8 @@
/** Fira specific */
/** The channel requested is not available for AoA */
REASON_ERROR_INVALID_CHANNEL_WITH_AOA = 0x80,
+ /** UWB stopped caused by other session conflict */
+ REASON_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 0x81,
/** UWB has been disabled (eg: country code change leads to UWB unsupported) */
- REASON_REGULATION_UWB_OFF = 0x81,
+ REASON_REGULATION_UWB_OFF = 0x82,
}
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
index f303ed9..65bb1c9 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionAppConfigTlvTypes.aidl
@@ -46,6 +46,8 @@
CCC_PULSESHAPE_COMBO = 0xA5,
/** 2 byte data */
CCC_URSK_TTL = 0xA6,
+ /** 4 byte data */
+ CCC_LAST_INDEX_USED = 0xA8,
/**
* Range 0xE3 - 0xFF is reserved for proprietary use in the FIRA spec.
diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
index f1eea9d..f952334 100644
--- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
+++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorStatusCodes.aidl
@@ -33,6 +33,8 @@
STATUS_ERROR_CCC_SE_BUSY = 0x50,
/** CCC Lifecycle error */
STATUS_ERROR_CCC_LIFECYCLE = 0x51,
+ /** Other session conflict */
+ STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 0x52,
/** UWB Regulation Off */
- STATUS_REGULATION_UWB_OFF = 0x52,
+ STATUS_REGULATION_UWB_OFF = 0x53,
}
diff --git a/vibrator/aidl/default/example_java_client/Android.bp b/vibrator/aidl/default/example_java_client/Android.bp
new file mode 100644
index 0000000..17a649c
--- /dev/null
+++ b/vibrator/aidl/default/example_java_client/Android.bp
@@ -0,0 +1,54 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+cc_library {
+ name: "libexample_vib_getter",
+ srcs: ["getter.cpp"],
+ product_available: true,
+ vendor_available: true,
+ shared_libs: [
+ "liblog",
+ "libbinder_ndk",
+ ],
+ header_libs: ["jni_headers"],
+ stl: "c++_shared",
+ visibility: [":__subpackages__"],
+}
+
+android_app {
+ name: "ExampleVibratorJavaVendorClient",
+ vendor: true,
+ static_libs: ["android.hardware.vibrator-V1-java"],
+ jni_libs: ["libexample_vib_getter"],
+ use_embedded_native_libs: true,
+ jarjar_rules: "jarjar.txt",
+ stl: "c++_shared",
+ srcs: ["example/vib/MyActivity.java"],
+ sdk_version: "system_current",
+ visibility: [":__subpackages__"],
+}
+
+android_app {
+ name: "ExampleVibratorJavaProductClient",
+ product_specific: true,
+ static_libs: ["android.hardware.vibrator-V1-java"],
+ jni_libs: ["libexample_vib_getter"],
+ use_embedded_native_libs: true,
+ jarjar_rules: "jarjar.txt",
+ stl: "c++_shared",
+ srcs: ["example/vib/MyActivity.java"],
+ sdk_version: "system_current",
+ visibility: [":__subpackages__"],
+ // If PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is not true, product apps
+ // may use unstable APIs. jni_uses_platform_apis must set to use the
+ // non-SDK jni libs in this case.
+ // This is not required if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is
+ // set to true.
+ jni_uses_platform_apis: true,
+}
diff --git a/vibrator/aidl/default/example_vendor_java_client/AndroidManifest.xml b/vibrator/aidl/default/example_java_client/AndroidManifest.xml
similarity index 100%
rename from vibrator/aidl/default/example_vendor_java_client/AndroidManifest.xml
rename to vibrator/aidl/default/example_java_client/AndroidManifest.xml
diff --git a/vibrator/aidl/default/example_vendor_java_client/example/vib/MyActivity.java b/vibrator/aidl/default/example_java_client/example/vib/MyActivity.java
similarity index 100%
rename from vibrator/aidl/default/example_vendor_java_client/example/vib/MyActivity.java
rename to vibrator/aidl/default/example_java_client/example/vib/MyActivity.java
diff --git a/vibrator/aidl/default/example_vendor_java_client/getter.cpp b/vibrator/aidl/default/example_java_client/getter.cpp
similarity index 100%
rename from vibrator/aidl/default/example_vendor_java_client/getter.cpp
rename to vibrator/aidl/default/example_java_client/getter.cpp
diff --git a/vibrator/aidl/default/example_vendor_java_client/jarjar.txt b/vibrator/aidl/default/example_java_client/jarjar.txt
similarity index 100%
rename from vibrator/aidl/default/example_vendor_java_client/jarjar.txt
rename to vibrator/aidl/default/example_java_client/jarjar.txt
diff --git a/vibrator/aidl/default/example_vendor_java_client/Android.bp b/vibrator/aidl/default/example_vendor_java_client/Android.bp
deleted file mode 100644
index f615cb1..0000000
--- a/vibrator/aidl/default/example_vendor_java_client/Android.bp
+++ /dev/null
@@ -1,34 +0,0 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "hardware_interfaces_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
-cc_library {
- name: "libexample_vib_getter",
- srcs: ["getter.cpp"],
- vendor: true,
- shared_libs: [
- "liblog",
- "libbinder_ndk",
- ],
- header_libs: ["jni_headers"],
- stl: "c++_shared",
- visibility: [":__subpackages__"],
-}
-
-android_app {
- name: "ExampleVibratorJavaVendorClient",
- privileged: true,
- vendor: true,
- static_libs: ["android.hardware.vibrator-V1-java"],
- jni_libs: ["libexample_vib_getter"],
- jarjar_rules: "jarjar.txt",
- stl: "c++_shared",
- srcs: ["example/vib/MyActivity.java"],
- sdk_version: "system_current",
- visibility: [":__subpackages__"],
-}
diff --git a/wifi/1.6/default/Android.bp b/wifi/1.6/default/Android.bp
index 0f98e71..6038e36 100644
--- a/wifi/1.6/default/Android.bp
+++ b/wifi/1.6/default/Android.bp
@@ -26,6 +26,7 @@
"hidl_feature_disable_ap", // WIFI_HIDL_FEATURE_DISABLE_AP
"hidl_feature_disable_ap_mac_randomization", // WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION
"avoid_iface_reset_mac_change", // WIFI_AVOID_IFACE_RESET_MAC_CHANGE
+ "wifi_skip_state_toggle_off_on_for_nan", // WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
],
value_variables: [
"hal_interface_combinations", // WIFI_HAL_INTERFACE_COMBINATIONS
@@ -53,6 +54,9 @@
avoid_iface_reset_mac_change: {
cppflags: ["-DWIFI_AVOID_IFACE_RESET_MAC_CHANGE"],
},
+ wifi_skip_state_toggle_off_on_for_nan: {
+ cppflags: ["-DWIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN"],
+ },
hal_interface_combinations: {
cppflags: ["-DWIFI_HAL_INTERFACE_COMBINATIONS=%s"],
},
diff --git a/wifi/1.6/default/wifi_nan_iface.cpp b/wifi/1.6/default/wifi_nan_iface.cpp
index ac2ebc9..4c61ba7 100644
--- a/wifi/1.6/default/wifi_nan_iface.cpp
+++ b/wifi/1.6/default/wifi_nan_iface.cpp
@@ -453,6 +453,7 @@
// Register for iface state toggle events.
iface_util::IfaceEventHandlers event_handlers = {};
+#ifndef WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
event_handlers.on_state_toggle_off_on = [weak_ptr_this](const std::string& /* iface_name */) {
const auto shared_ptr_this = weak_ptr_this.promote();
if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
@@ -467,6 +468,7 @@
}
}
};
+#endif
iface_util_.lock()->registerIfaceEventHandlers(ifname_, event_handlers);
}
diff --git a/wifi/aidl/Android.bp b/wifi/aidl/Android.bp
index c0ca667..0c8572c 100644
--- a/wifi/aidl/Android.bp
+++ b/wifi/aidl/Android.bp
@@ -37,6 +37,8 @@
],
min_sdk_version: "30",
lint: {
+ // Disable linter to avoid error about fixed size arrays.
+ // Interface will only be accessed on devices >= U.
enabled: false,
},
},
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AfcChannelAllowance.aidl
similarity index 85%
rename from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
rename to wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AfcChannelAllowance.aidl
index 925f447..4d3cd6e 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringState.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AfcChannelAllowance.aidl
@@ -31,10 +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.automotive.vehicle;
-@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringState {
- OTHER = 0,
- DISTRACTED = 1,
- NOT_DISTRACTED = 2,
+package android.hardware.wifi;
+@VintfStability
+parcelable AfcChannelAllowance {
+ android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfos;
+ android.hardware.wifi.AvailableAfcChannelInfo[] availableAfcChannelInfos;
+ long availabilityExpireTimeMs;
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
similarity index 90%
rename from automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
rename to wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
index 758b251..d238640 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/DriverAttentionMonitoringWarning.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcChannelInfo.aidl
@@ -31,10 +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.automotive.vehicle;
-@Backing(type="int") @VintfStability
-enum DriverAttentionMonitoringWarning {
- OTHER = 0,
- NO_WARNING = 1,
- WARNING = 2,
+package android.hardware.wifi;
+@VintfStability
+parcelable AvailableAfcChannelInfo {
+ int globalOperatingClass;
+ int channelCfi;
+ int maxEirpDbm;
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
index a102b97..e71dde4 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
@@ -38,7 +38,6 @@
String[] getBridgedInstances();
byte[6] getFactoryMacAddress();
void setCountryCode(in byte[2] code);
- int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
void resetToFactoryMacAddress();
void setMacAddress(in byte[6] mac);
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
index 23f4030..4ea2081 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
@@ -47,7 +47,7 @@
@PropagateAllowBlocking android.hardware.wifi.IWifiApIface getApIface(in String ifname);
String[] getApIfaceNames();
android.hardware.wifi.IWifiChip.ChipMode[] getAvailableModes();
- int getCapabilities();
+ int getFeatureSet();
android.hardware.wifi.WifiDebugHostWakeReasonStats getDebugHostWakeReasonStats();
android.hardware.wifi.WifiDebugRingBufferStatus[] getDebugRingBuffersStatus();
int getId();
@@ -61,7 +61,7 @@
android.hardware.wifi.WifiRadioCombination[] getSupportedRadioCombinations();
android.hardware.wifi.WifiChipCapabilities getWifiChipCapabilities();
android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in int ifaceModeMask, in int filterMask);
- void setAfcChannelAllowance(in android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo);
+ void setAfcChannelAllowance(in android.hardware.wifi.AfcChannelAllowance afcChannelAllowance);
void registerEventCallback(in android.hardware.wifi.IWifiChipEventCallback callback);
void removeApIface(in String ifname);
void removeIfaceInstanceFromBridgedApIface(in String brIfaceName, in String ifaceInstanceName);
@@ -85,7 +85,7 @@
void setMloMode(in android.hardware.wifi.IWifiChip.ChipMloMode mode);
const int NO_POWER_CAP_CONSTANT = 0x7FFFFFFF;
@Backing(type="int") @VintfStability
- enum ChipCapabilityMask {
+ enum FeatureSetMask {
SET_TX_POWER_LIMIT = (1 << 0) /* 1 */,
D2D_RTT = (1 << 1) /* 2 */,
D2AP_RTT = (1 << 2) /* 4 */,
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
index a7f2081..923deff 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
@@ -41,13 +41,12 @@
void enableNdOffload(in boolean enable);
android.hardware.wifi.StaApfPacketFilterCapabilities getApfPacketFilterCapabilities();
android.hardware.wifi.StaBackgroundScanCapabilities getBackgroundScanCapabilities();
- int getCapabilities();
+ int getFeatureSet();
android.hardware.wifi.WifiDebugRxPacketFateReport[] getDebugRxPacketFates();
android.hardware.wifi.WifiDebugTxPacketFateReport[] getDebugTxPacketFates();
byte[6] getFactoryMacAddress();
android.hardware.wifi.StaLinkLayerStats getLinkLayerStats();
android.hardware.wifi.StaRoamingCapabilities getRoamingCapabilities();
- int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
void installApfPacketFilter(in byte[] program);
byte[] readApfPacketFilterData();
void registerEventCallback(in android.hardware.wifi.IWifiStaIfaceEventCallback callback);
@@ -63,7 +62,7 @@
void stopSendingKeepAlivePackets(in int cmdId);
void setDtimMultiplier(in int multiplier);
@Backing(type="int") @VintfStability
- enum StaIfaceCapabilityMask {
+ enum FeatureSetMask {
APF = (1 << 0) /* 1 */,
BACKGROUND_SCAN = (1 << 1) /* 2 */,
LINK_LAYER_STATS = (1 << 2) /* 4 */,
diff --git a/wifi/aidl/android/hardware/wifi/AfcChannelAllowance.aidl b/wifi/aidl/android/hardware/wifi/AfcChannelAllowance.aidl
new file mode 100644
index 0000000..289383c
--- /dev/null
+++ b/wifi/aidl/android/hardware/wifi/AfcChannelAllowance.aidl
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi;
+
+import android.hardware.wifi.AvailableAfcChannelInfo;
+import android.hardware.wifi.AvailableAfcFrequencyInfo;
+
+/**
+ * Defines the maximum permissible power spectral density to support 6Ghz with standard power for
+ * AFC. The maximum power can be either defined based on frequencies or channel number.
+ *
+ * Note, based on AFC server support, either availableAfcFrequencyInfos or availableAfcChannelInfos
+ * may be empty. If one of them is empty while the other is not, use the non-empty one and ignore
+ * the empty one. If both are empty then it means 6Ghz standard power should not be supported at
+ * all.
+ *
+ * If availableAfcFrequencyInfos is non-empty, set the max permissible power according to the maxPsd
+ * per frequency range, and disallow emmision on 6Ghz frequencies not included in the structure.
+ *
+ * If availableAfcChannelInfos is non-empty, set the max permissible power according to the
+ * maxEirpDbm per channel, and disallow emmision on 6Ghz channels not included in the structure.
+ */
+@VintfStability
+parcelable AfcChannelAllowance {
+ /**
+ * AFC max permissible information queried from AFC server based on frequency.
+ */
+ AvailableAfcFrequencyInfo[] availableAfcFrequencyInfos;
+ /**
+ * AFC max permissible information queried from AFC server on channel number.
+ */
+ AvailableAfcChannelInfo[] availableAfcChannelInfos;
+ /**
+ * The time in UTC at which this information expires, as the difference, measured in
+ * milliseconds between the expiration time and midnight, January 1, 1970 UTC.
+ */
+ long availabilityExpireTimeMs;
+}
diff --git a/wifi/aidl/android/hardware/wifi/AvailableAfcChannelInfo.aidl b/wifi/aidl/android/hardware/wifi/AvailableAfcChannelInfo.aidl
new file mode 100644
index 0000000..398cd12
--- /dev/null
+++ b/wifi/aidl/android/hardware/wifi/AvailableAfcChannelInfo.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi;
+
+/**
+ * Defines the maximum EIRP per channel for supporting 6Ghz standard power for AFC. The format of
+ * the data structure is derived from the Wi-Fi Alliance AFC System to AFC Device Interface
+ * Specification: AvailableChannelInfo object.
+ */
+@VintfStability
+parcelable AvailableAfcChannelInfo {
+ /**
+ * The global operating class used to define the channel center frequency indices
+ * and operating bandwidth.
+ */
+ int globalOperatingClass;
+
+ /**
+ * The channel center frequency index.
+ */
+ int channelCfi;
+
+ /**
+ * The maximum permissible EIRP in units of dBm available for the channel
+ * specified by channelCfi. In addition, in any portion of the channel, the conducted PSD plus
+ * the maximum antenna gain cannot exceed the maxEirp divided by the channel width defined by
+ * the globalOperatingClass.
+ */
+ int maxEirpDbm;
+}
diff --git a/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
index 71ea385..b14a800 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
@@ -68,20 +68,6 @@
void setCountryCode(in byte[2] code);
/**
- * Used to query the list of valid frequencies (depending on country code set)
- * for the provided band.
- *
- * @param band Band for which the frequency list is being generated.
- * @return Vector of valid frequencies for the provided band.
- * @throws ServiceSpecificException with one of the following values:
- * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
- * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
- * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
- * |WifiStatusCode.ERROR_UNKNOWN|
- */
- int[] getValidFrequenciesForBand(in WifiBand band);
-
- /**
* Reset all of the AP interfaces' MAC address to the factory MAC address.
*
* @throws ServiceSpecificException with one of the following values:
diff --git a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
index 1710f63..c1caa7e 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
@@ -16,7 +16,7 @@
package android.hardware.wifi;
-import android.hardware.wifi.AvailableAfcFrequencyInfo;
+import android.hardware.wifi.AfcChannelAllowance;
import android.hardware.wifi.IWifiApIface;
import android.hardware.wifi.IWifiChipEventCallback;
import android.hardware.wifi.IWifiNanIface;
@@ -44,7 +44,7 @@
*/
@VintfStability
@Backing(type="int")
- enum ChipCapabilityMask {
+ enum FeatureSetMask {
/**
* Set/Reset Tx Power limits.
*/
@@ -582,15 +582,15 @@
ChipMode[] getAvailableModes();
/**
- * Get the capabilities supported by this chip.
+ * Get the features supported by this chip.
*
- * @return Bitset of |ChipCapabilityMask| values.
+ * @return Bitset of |FeatureSetMask| values.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
* |WifiStatusCode.ERROR_NOT_AVAILABLE|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
- int getCapabilities();
+ int getFeatureSet();
/**
* API to retrieve the wifi wake up reason stats for debugging.
@@ -811,16 +811,12 @@
in WifiBand band, in int ifaceModeMask, in int filterMask);
/*
- * Set the max power level the chip is allowed to transmit on for 6Ghz AFC
- * using an array of AvailableAfcFrequencyInfo. The max power for
- * frequencies not included in the input frequency ranges will be reset to
- * their respective default values.
- * @param availableAfcFrequencyInfo The list of frequency ranges and
- * corresponding max allowed power.
+ * Set the max power level the chip is allowed to transmit on for 6Ghz AFC.
+ * @param afcChannelAllowance Specifies the power limitations for 6Ghz AFC.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_NOT_SUPPORTED|
*/
- void setAfcChannelAllowance(in AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo);
+ void setAfcChannelAllowance(in AfcChannelAllowance afcChannelAllowance);
/**
* Requests notifications of significant events on this chip. Multiple calls
diff --git a/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
index 8e9a06d..2c81984 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
@@ -38,7 +38,7 @@
*/
@VintfStability
@Backing(type="int")
- enum StaIfaceCapabilityMask {
+ enum FeatureSetMask {
/**
* Support for APF APIs. APF (Android Packet Filter) is a
* BPF-like packet filtering bytecode executed by the firmware.
@@ -190,15 +190,15 @@
StaBackgroundScanCapabilities getBackgroundScanCapabilities();
/**
- * Get the capabilities supported by this STA iface.
+ * Get the features supported by this STA iface.
*
- * @return Bitset of |StaIfaceCapabilityMask| values.
+ * @return Bitset of |FeatureSetMask| values.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_NOT_AVAILABLE|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
- int getCapabilities();
+ int getFeatureSet();
/**
* API to retrieve the fates of inbound packets.
@@ -288,22 +288,6 @@
StaRoamingCapabilities getRoamingCapabilities();
/**
- * Used to query the list of valid frequencies (depending on the country
- * code set) for the provided band. These channels may be specified in the
- * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
- * request.
- *
- * @param band Band for which the frequency list is being generated.
- * @return Vector of valid frequencies for the provided band.
- * @throws ServiceSpecificException with one of the following values:
- * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
- * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
- * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
- * |WifiStatusCode.ERROR_UNKNOWN|
- */
- int[] getValidFrequenciesForBand(in WifiBand band);
-
- /**
* Installs an APF program on this iface, replacing an existing
* program if present.
* Must fail if |StaIfaceCapabilityMask.APF| is not set.
diff --git a/wifi/aidl/default/Android.bp b/wifi/aidl/default/Android.bp
index 441d461..91d609d 100644
--- a/wifi/aidl/default/Android.bp
+++ b/wifi/aidl/default/Android.bp
@@ -26,6 +26,7 @@
"hidl_feature_disable_ap", // WIFI_HIDL_FEATURE_DISABLE_AP
"hidl_feature_disable_ap_mac_randomization", // WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION
"avoid_iface_reset_mac_change", // WIFI_AVOID_IFACE_RESET_MAC_CHANGE
+ "wifi_skip_state_toggle_off_on_for_nan", // WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
],
value_variables: [
"hal_interface_combinations", // WIFI_HAL_INTERFACE_COMBINATIONS
@@ -53,6 +54,9 @@
avoid_iface_reset_mac_change: {
cppflags: ["-DWIFI_AVOID_IFACE_RESET_MAC_CHANGE"],
},
+ wifi_skip_state_toggle_off_on_for_nan: {
+ cppflags: ["-DWIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN"],
+ },
hal_interface_combinations: {
cppflags: ["-DWIFI_HAL_INTERFACE_COMBINATIONS=%s"],
},
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index 4acdd2f..7bc2eeb 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -41,68 +41,67 @@
return std::vector<int32_t>(in.begin(), in.end());
}
-IWifiChip::ChipCapabilityMask convertLegacyFeatureToAidlChipCapability(uint64_t feature) {
+IWifiChip::FeatureSetMask convertLegacyChipFeatureToAidl(uint64_t feature) {
switch (feature) {
case WIFI_FEATURE_SET_TX_POWER_LIMIT:
- return IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT;
+ return IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT;
case WIFI_FEATURE_USE_BODY_HEAD_SAR:
- return IWifiChip::ChipCapabilityMask::USE_BODY_HEAD_SAR;
+ return IWifiChip::FeatureSetMask::USE_BODY_HEAD_SAR;
case WIFI_FEATURE_D2D_RTT:
- return IWifiChip::ChipCapabilityMask::D2D_RTT;
+ return IWifiChip::FeatureSetMask::D2D_RTT;
case WIFI_FEATURE_D2AP_RTT:
- return IWifiChip::ChipCapabilityMask::D2AP_RTT;
+ return IWifiChip::FeatureSetMask::D2AP_RTT;
case WIFI_FEATURE_INFRA_60G:
- return IWifiChip::ChipCapabilityMask::WIGIG;
+ return IWifiChip::FeatureSetMask::WIGIG;
case WIFI_FEATURE_SET_LATENCY_MODE:
- return IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE;
+ return IWifiChip::FeatureSetMask::SET_LATENCY_MODE;
case WIFI_FEATURE_P2P_RAND_MAC:
- return IWifiChip::ChipCapabilityMask::P2P_RAND_MAC;
+ return IWifiChip::FeatureSetMask::P2P_RAND_MAC;
case WIFI_FEATURE_AFC_CHANNEL:
- return IWifiChip::ChipCapabilityMask::SET_AFC_CHANNEL_ALLOWANCE;
+ return IWifiChip::FeatureSetMask::SET_AFC_CHANNEL_ALLOWANCE;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
}
-IWifiStaIface::StaIfaceCapabilityMask convertLegacyFeatureToAidlStaIfaceCapability(
- uint64_t feature) {
+IWifiStaIface::FeatureSetMask convertLegacyStaIfaceFeatureToAidl(uint64_t feature) {
switch (feature) {
case WIFI_FEATURE_GSCAN:
- return IWifiStaIface::StaIfaceCapabilityMask::BACKGROUND_SCAN;
+ return IWifiStaIface::FeatureSetMask::BACKGROUND_SCAN;
case WIFI_FEATURE_LINK_LAYER_STATS:
- return IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS;
+ return IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS;
case WIFI_FEATURE_RSSI_MONITOR:
- return IWifiStaIface::StaIfaceCapabilityMask::RSSI_MONITOR;
+ return IWifiStaIface::FeatureSetMask::RSSI_MONITOR;
case WIFI_FEATURE_CONTROL_ROAMING:
- return IWifiStaIface::StaIfaceCapabilityMask::CONTROL_ROAMING;
+ return IWifiStaIface::FeatureSetMask::CONTROL_ROAMING;
case WIFI_FEATURE_IE_WHITELIST:
- return IWifiStaIface::StaIfaceCapabilityMask::PROBE_IE_ALLOWLIST;
+ return IWifiStaIface::FeatureSetMask::PROBE_IE_ALLOWLIST;
case WIFI_FEATURE_SCAN_RAND:
- return IWifiStaIface::StaIfaceCapabilityMask::SCAN_RAND;
+ return IWifiStaIface::FeatureSetMask::SCAN_RAND;
case WIFI_FEATURE_INFRA_5G:
- return IWifiStaIface::StaIfaceCapabilityMask::STA_5G;
+ return IWifiStaIface::FeatureSetMask::STA_5G;
case WIFI_FEATURE_HOTSPOT:
- return IWifiStaIface::StaIfaceCapabilityMask::HOTSPOT;
+ return IWifiStaIface::FeatureSetMask::HOTSPOT;
case WIFI_FEATURE_PNO:
- return IWifiStaIface::StaIfaceCapabilityMask::PNO;
+ return IWifiStaIface::FeatureSetMask::PNO;
case WIFI_FEATURE_TDLS:
- return IWifiStaIface::StaIfaceCapabilityMask::TDLS;
+ return IWifiStaIface::FeatureSetMask::TDLS;
case WIFI_FEATURE_TDLS_OFFCHANNEL:
- return IWifiStaIface::StaIfaceCapabilityMask::TDLS_OFFCHANNEL;
+ return IWifiStaIface::FeatureSetMask::TDLS_OFFCHANNEL;
case WIFI_FEATURE_CONFIG_NDO:
- return IWifiStaIface::StaIfaceCapabilityMask::ND_OFFLOAD;
+ return IWifiStaIface::FeatureSetMask::ND_OFFLOAD;
case WIFI_FEATURE_MKEEP_ALIVE:
- return IWifiStaIface::StaIfaceCapabilityMask::KEEP_ALIVE;
+ return IWifiStaIface::FeatureSetMask::KEEP_ALIVE;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
}
-bool convertLegacyFeaturesToAidlChipCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps) {
- if (!aidl_caps) {
+bool convertLegacyChipFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set) {
+ if (!aidl_feature_set) {
return false;
}
- *aidl_caps = {};
+ *aidl_feature_set = 0;
std::vector<uint64_t> features = {WIFI_FEATURE_SET_TX_POWER_LIMIT,
WIFI_FEATURE_USE_BODY_HEAD_SAR,
WIFI_FEATURE_D2D_RTT,
@@ -113,7 +112,7 @@
WIFI_FEATURE_AFC_CHANNEL};
for (const auto feature : features) {
if (feature & legacy_feature_set) {
- *aidl_caps |= static_cast<uint32_t>(convertLegacyFeatureToAidlChipCapability(feature));
+ *aidl_feature_set |= static_cast<uint32_t>(convertLegacyChipFeatureToAidl(feature));
}
}
@@ -449,24 +448,23 @@
return true;
}
-bool convertLegacyFeaturesToAidlStaCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps) {
- if (!aidl_caps) {
+bool convertLegacyStaIfaceFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set) {
+ if (!aidl_feature_set) {
return false;
}
- *aidl_caps = {};
+ *aidl_feature_set = 0;
for (const auto feature :
{WIFI_FEATURE_GSCAN, WIFI_FEATURE_LINK_LAYER_STATS, WIFI_FEATURE_RSSI_MONITOR,
WIFI_FEATURE_CONTROL_ROAMING, WIFI_FEATURE_IE_WHITELIST, WIFI_FEATURE_SCAN_RAND,
WIFI_FEATURE_INFRA_5G, WIFI_FEATURE_HOTSPOT, WIFI_FEATURE_PNO, WIFI_FEATURE_TDLS,
WIFI_FEATURE_TDLS_OFFCHANNEL, WIFI_FEATURE_CONFIG_NDO, WIFI_FEATURE_MKEEP_ALIVE}) {
if (feature & legacy_feature_set) {
- *aidl_caps |=
- static_cast<uint32_t>(convertLegacyFeatureToAidlStaIfaceCapability(feature));
+ *aidl_feature_set |= static_cast<uint32_t>(convertLegacyStaIfaceFeatureToAidl(feature));
}
}
// There is no flag for this one in the legacy feature set. Adding it to the
// set because all the current devices support it.
- *aidl_caps |= static_cast<uint32_t>(IWifiStaIface::StaIfaceCapabilityMask::APF);
+ *aidl_feature_set |= static_cast<uint32_t>(IWifiStaIface::FeatureSetMask::APF);
return true;
}
diff --git a/wifi/aidl/default/aidl_struct_util.h b/wifi/aidl/default/aidl_struct_util.h
index 9a13672..e4ff963 100644
--- a/wifi/aidl/default/aidl_struct_util.h
+++ b/wifi/aidl/default/aidl_struct_util.h
@@ -40,7 +40,7 @@
namespace aidl_struct_util {
// Chip conversion methods.
-bool convertLegacyFeaturesToAidlChipCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps);
+bool convertLegacyChipFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set);
bool convertLegacyDebugRingBufferStatusToAidl(
const legacy_hal::wifi_ring_buffer_status& legacy_status,
WifiDebugRingBufferStatus* aidl_status);
@@ -74,7 +74,7 @@
legacy_hal::wifi_iface_concurrency_matrix& legacy_matrix, IWifiChip::ChipMode* chip_mode);
// STA iface conversion methods.
-bool convertLegacyFeaturesToAidlStaCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps);
+bool convertLegacyStaIfaceFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set);
bool convertLegacyApfCapabilitiesToAidl(const legacy_hal::PacketFilterCapabilities& legacy_caps,
StaApfPacketFilterCapabilities* aidl_caps);
bool convertLegacyGscanCapabilitiesToAidl(const legacy_hal::wifi_gscan_capabilities& legacy_caps,
diff --git a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
index 4bd77ac..5c334f8 100644
--- a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
+++ b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
@@ -658,16 +658,16 @@
}
TEST_F(AidlStructUtilTest, CanConvertLegacyFeaturesToAidl) {
- using AidlChipCaps = IWifiChip::ChipCapabilityMask;
+ using AidlChipCaps = IWifiChip::FeatureSetMask;
- uint32_t aidl_caps;
+ uint32_t aidl_features;
uint32_t legacy_feature_set = WIFI_FEATURE_D2D_RTT | WIFI_FEATURE_SET_LATENCY_MODE;
- ASSERT_TRUE(aidl_struct_util::convertLegacyFeaturesToAidlChipCapabilities(legacy_feature_set,
- &aidl_caps));
+ ASSERT_TRUE(
+ aidl_struct_util::convertLegacyChipFeaturesToAidl(legacy_feature_set, &aidl_features));
EXPECT_EQ((uint32_t)AidlChipCaps::D2D_RTT | (uint32_t)AidlChipCaps::SET_LATENCY_MODE,
- aidl_caps);
+ aidl_features);
}
void insertRadioCombination(legacy_hal::wifi_radio_combination* dst_radio_combination_ptr,
diff --git a/wifi/aidl/default/wifi_ap_iface.cpp b/wifi/aidl/default/wifi_ap_iface.cpp
index 6cd932d..7779750 100644
--- a/wifi/aidl/default/wifi_ap_iface.cpp
+++ b/wifi/aidl/default/wifi_ap_iface.cpp
@@ -64,12 +64,6 @@
&WifiApIface::setCountryCodeInternal, in_code);
}
-ndk::ScopedAStatus WifiApIface::getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) {
- return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiApIface::getValidFrequenciesForBandInternal, _aidl_return, in_band);
-}
-
ndk::ScopedAStatus WifiApIface::setMacAddress(const std::array<uint8_t, 6>& in_mac) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
&WifiApIface::setMacAddressInternal, in_mac);
@@ -101,18 +95,6 @@
return createWifiStatusFromLegacyError(legacy_status);
}
-std::pair<std::vector<int32_t>, ndk::ScopedAStatus> WifiApIface::getValidFrequenciesForBandInternal(
- WifiBand band) {
- static_assert(sizeof(WifiChannelWidthInMhz) == sizeof(int32_t), "Size mismatch");
- legacy_hal::wifi_error legacy_status;
- std::vector<uint32_t> valid_frequencies;
- std::tie(legacy_status, valid_frequencies) = legacy_hal_.lock()->getValidFrequenciesForBand(
- instances_.size() > 0 ? instances_[0] : ifname_,
- aidl_struct_util::convertAidlWifiBandToLegacy(band));
- return {std::vector<int32_t>(valid_frequencies.begin(), valid_frequencies.end()),
- createWifiStatusFromLegacyError(legacy_status)};
-}
-
ndk::ScopedAStatus WifiApIface::setMacAddressInternal(const std::array<uint8_t, 6>& mac) {
// Support random MAC up to 2 interfaces
if (instances_.size() == 2) {
diff --git a/wifi/aidl/default/wifi_ap_iface.h b/wifi/aidl/default/wifi_ap_iface.h
index b5673fc..7378f98 100644
--- a/wifi/aidl/default/wifi_ap_iface.h
+++ b/wifi/aidl/default/wifi_ap_iface.h
@@ -45,8 +45,6 @@
// AIDL methods exposed.
ndk::ScopedAStatus getName(std::string* _aidl_return) override;
ndk::ScopedAStatus setCountryCode(const std::array<uint8_t, 2>& in_code) override;
- ndk::ScopedAStatus getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) override;
ndk::ScopedAStatus setMacAddress(const std::array<uint8_t, 6>& in_mac) override;
ndk::ScopedAStatus getFactoryMacAddress(std::array<uint8_t, 6>* _aidl_return) override;
ndk::ScopedAStatus resetToFactoryMacAddress() override;
@@ -56,8 +54,6 @@
// Corresponding worker functions for the AIDL methods.
std::pair<std::string, ndk::ScopedAStatus> getNameInternal();
ndk::ScopedAStatus setCountryCodeInternal(const std::array<uint8_t, 2>& code);
- std::pair<std::vector<int32_t>, ndk::ScopedAStatus> getValidFrequenciesForBandInternal(
- WifiBand band);
ndk::ScopedAStatus setMacAddressInternal(const std::array<uint8_t, 6>& mac);
std::pair<std::array<uint8_t, 6>, ndk::ScopedAStatus> getFactoryMacAddressInternal(
const std::string& ifaceName);
diff --git a/wifi/aidl/default/wifi_chip.cpp b/wifi/aidl/default/wifi_chip.cpp
index dd24e6b..f9f5528 100644
--- a/wifi/aidl/default/wifi_chip.cpp
+++ b/wifi/aidl/default/wifi_chip.cpp
@@ -455,9 +455,9 @@
&WifiChip::registerEventCallbackInternal, event_callback);
}
-ndk::ScopedAStatus WifiChip::getCapabilities(int32_t* _aidl_return) {
+ndk::ScopedAStatus WifiChip::getFeatureSet(int32_t* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
- &WifiChip::getCapabilitiesInternal, _aidl_return);
+ &WifiChip::getFeatureSetInternal, _aidl_return);
}
ndk::ScopedAStatus WifiChip::getAvailableModes(std::vector<IWifiChip::ChipMode>* _aidl_return) {
@@ -701,9 +701,9 @@
}
ndk::ScopedAStatus WifiChip::setAfcChannelAllowance(
- const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) {
+ const AfcChannelAllowance& afcChannelAllowance) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
- &WifiChip::setAfcChannelAllowanceInternal, availableAfcFrequencyInfo);
+ &WifiChip::setAfcChannelAllowanceInternal, afcChannelAllowance);
}
ndk::ScopedAStatus WifiChip::triggerSubsystemRestart() {
@@ -786,7 +786,7 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<int32_t, ndk::ScopedAStatus> WifiChip::getCapabilitiesInternal() {
+std::pair<int32_t, ndk::ScopedAStatus> WifiChip::getFeatureSetInternal() {
legacy_hal::wifi_error legacy_status;
uint64_t legacy_feature_set;
uint32_t legacy_logger_feature_set;
@@ -802,12 +802,11 @@
// some devices don't support querying logger feature set
legacy_logger_feature_set = 0;
}
- uint32_t aidl_caps;
- if (!aidl_struct_util::convertLegacyFeaturesToAidlChipCapabilities(legacy_feature_set,
- &aidl_caps)) {
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyChipFeaturesToAidl(legacy_feature_set, &aidl_feature_set)) {
return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {aidl_caps, ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<std::vector<IWifiChip::ChipMode>, ndk::ScopedAStatus>
@@ -1431,8 +1430,12 @@
}
ndk::ScopedAStatus WifiChip::setAfcChannelAllowanceInternal(
- const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) {
- LOG(INFO) << "setAfcChannelAllowance is not yet supported " << availableAfcFrequencyInfo.size();
+ const AfcChannelAllowance& afcChannelAllowance) {
+ LOG(INFO) << "setAfcChannelAllowance is not yet supported. availableAfcFrequencyInfos size="
+ << afcChannelAllowance.availableAfcFrequencyInfos.size()
+ << " availableAfcChannelInfos size="
+ << afcChannelAllowance.availableAfcChannelInfos.size()
+ << " availabilityExpireTimeMs=" << afcChannelAllowance.availabilityExpireTimeMs;
return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED);
}
diff --git a/wifi/aidl/default/wifi_chip.h b/wifi/aidl/default/wifi_chip.h
index c5dcee7..4ddee92 100644
--- a/wifi/aidl/default/wifi_chip.h
+++ b/wifi/aidl/default/wifi_chip.h
@@ -85,7 +85,7 @@
ndk::ScopedAStatus getId(int32_t* _aidl_return) override;
ndk::ScopedAStatus registerEventCallback(
const std::shared_ptr<IWifiChipEventCallback>& in_callback) override;
- ndk::ScopedAStatus getCapabilities(int32_t* _aidl_return) override;
+ ndk::ScopedAStatus getFeatureSet(int32_t* _aidl_return) override;
ndk::ScopedAStatus getAvailableModes(std::vector<IWifiChip::ChipMode>* _aidl_return) override;
ndk::ScopedAStatus configureChip(int32_t in_modeId) override;
ndk::ScopedAStatus getMode(int32_t* _aidl_return) override;
@@ -142,7 +142,7 @@
int32_t in_filterMask,
std::vector<WifiUsableChannel>* _aidl_return) override;
ndk::ScopedAStatus setAfcChannelAllowance(
- const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) override;
+ const AfcChannelAllowance& afcChannelAllowance) override;
ndk::ScopedAStatus triggerSubsystemRestart() override;
ndk::ScopedAStatus getSupportedRadioCombinations(
std::vector<WifiRadioCombination>* _aidl_return) override;
@@ -162,7 +162,7 @@
std::pair<int32_t, ndk::ScopedAStatus> getIdInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiChipEventCallback>& event_callback);
- std::pair<int32_t, ndk::ScopedAStatus> getCapabilitiesInternal();
+ std::pair<int32_t, ndk::ScopedAStatus> getFeatureSetInternal();
std::pair<std::vector<IWifiChip::ChipMode>, ndk::ScopedAStatus> getAvailableModesInternal();
ndk::ScopedAStatus configureChipInternal(std::unique_lock<std::recursive_mutex>* lock,
int32_t mode_id);
@@ -220,7 +220,7 @@
WifiBand band, int32_t ifaceModeMask, int32_t filterMask);
ndk::ScopedAStatus enableStaChannelForPeerNetworkInternal(int32_t channelCategoryEnableFlag);
ndk::ScopedAStatus setAfcChannelAllowanceInternal(
- const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo);
+ const AfcChannelAllowance& afcChannelAllowance);
ndk::ScopedAStatus handleChipConfiguration(std::unique_lock<std::recursive_mutex>* lock,
int32_t mode_id);
ndk::ScopedAStatus registerDebugRingBufferCallback();
diff --git a/wifi/aidl/default/wifi_nan_iface.cpp b/wifi/aidl/default/wifi_nan_iface.cpp
index 8e3a191..cefe7f7 100644
--- a/wifi/aidl/default/wifi_nan_iface.cpp
+++ b/wifi/aidl/default/wifi_nan_iface.cpp
@@ -623,6 +623,7 @@
// Register for iface state toggle events.
iface_util::IfaceEventHandlers event_handlers = {};
+#ifndef WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
event_handlers.on_state_toggle_off_on = [weak_ptr_this](const std::string& /* iface_name */) {
const auto shared_ptr_this = weak_ptr_this.lock();
if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
@@ -637,6 +638,7 @@
}
}
};
+#endif
iface_util_.lock()->registerIfaceEventHandlers(ifname_, event_handlers);
}
diff --git a/wifi/aidl/default/wifi_sta_iface.cpp b/wifi/aidl/default/wifi_sta_iface.cpp
index eceeeb5..800813f 100644
--- a/wifi/aidl/default/wifi_sta_iface.cpp
+++ b/wifi/aidl/default/wifi_sta_iface.cpp
@@ -82,9 +82,9 @@
&WifiStaIface::registerEventCallbackInternal, in_callback);
}
-ndk::ScopedAStatus WifiStaIface::getCapabilities(int32_t* _aidl_return) {
+ndk::ScopedAStatus WifiStaIface::getFeatureSet(int32_t* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getCapabilitiesInternal, _aidl_return);
+ &WifiStaIface::getFeatureSetInternal, _aidl_return);
}
ndk::ScopedAStatus WifiStaIface::getApfPacketFilterCapabilities(
@@ -109,13 +109,6 @@
&WifiStaIface::getBackgroundScanCapabilitiesInternal, _aidl_return);
}
-ndk::ScopedAStatus WifiStaIface::getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) {
- return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getValidFrequenciesForBandInternal, _aidl_return,
- in_band);
-}
-
ndk::ScopedAStatus WifiStaIface::startBackgroundScan(int32_t in_cmdId,
const StaBackgroundScanParameters& in_params) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
@@ -238,7 +231,7 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<int32_t, ndk::ScopedAStatus> WifiStaIface::getCapabilitiesInternal() {
+std::pair<int32_t, ndk::ScopedAStatus> WifiStaIface::getFeatureSetInternal() {
legacy_hal::wifi_error legacy_status;
uint64_t legacy_feature_set;
std::tie(legacy_status, legacy_feature_set) =
@@ -246,12 +239,12 @@
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
return {0, createWifiStatusFromLegacyError(legacy_status)};
}
- uint32_t aidl_caps;
- if (!aidl_struct_util::convertLegacyFeaturesToAidlStaCapabilities(legacy_feature_set,
- &aidl_caps)) {
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyStaIfaceFeaturesToAidl(legacy_feature_set,
+ &aidl_feature_set)) {
return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {aidl_caps, ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<StaApfPacketFilterCapabilities, ndk::ScopedAStatus>
@@ -298,17 +291,6 @@
return {aidl_caps, ndk::ScopedAStatus::ok()};
}
-std::pair<std::vector<int32_t>, ndk::ScopedAStatus>
-WifiStaIface::getValidFrequenciesForBandInternal(WifiBand band) {
- static_assert(sizeof(WifiChannelWidthInMhz) == sizeof(int32_t), "Size mismatch");
- legacy_hal::wifi_error legacy_status;
- std::vector<uint32_t> valid_frequencies;
- std::tie(legacy_status, valid_frequencies) = legacy_hal_.lock()->getValidFrequenciesForBand(
- ifname_, aidl_struct_util::convertAidlWifiBandToLegacy(band));
- return {std::vector<int32_t>(valid_frequencies.begin(), valid_frequencies.end()),
- createWifiStatusFromLegacyError(legacy_status)};
-}
-
ndk::ScopedAStatus WifiStaIface::startBackgroundScanInternal(
int32_t cmd_id, const StaBackgroundScanParameters& params) {
legacy_hal::wifi_scan_cmd_params legacy_params;
diff --git a/wifi/aidl/default/wifi_sta_iface.h b/wifi/aidl/default/wifi_sta_iface.h
index 0831e16..3d7ec4d 100644
--- a/wifi/aidl/default/wifi_sta_iface.h
+++ b/wifi/aidl/default/wifi_sta_iface.h
@@ -54,15 +54,13 @@
ndk::ScopedAStatus getName(std::string* _aidl_return) override;
ndk::ScopedAStatus registerEventCallback(
const std::shared_ptr<IWifiStaIfaceEventCallback>& in_callback) override;
- ndk::ScopedAStatus getCapabilities(int32_t* _aidl_return) override;
+ ndk::ScopedAStatus getFeatureSet(int32_t* _aidl_return) override;
ndk::ScopedAStatus getApfPacketFilterCapabilities(
StaApfPacketFilterCapabilities* _aidl_return) override;
ndk::ScopedAStatus installApfPacketFilter(const std::vector<uint8_t>& in_program) override;
ndk::ScopedAStatus readApfPacketFilterData(std::vector<uint8_t>* _aidl_return) override;
ndk::ScopedAStatus getBackgroundScanCapabilities(
StaBackgroundScanCapabilities* _aidl_return) override;
- ndk::ScopedAStatus getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) override;
ndk::ScopedAStatus startBackgroundScan(int32_t in_cmdId,
const StaBackgroundScanParameters& in_params) override;
ndk::ScopedAStatus stopBackgroundScan(int32_t in_cmdId) override;
@@ -98,15 +96,13 @@
std::pair<std::string, ndk::ScopedAStatus> getNameInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiStaIfaceEventCallback>& callback);
- std::pair<int32_t, ndk::ScopedAStatus> getCapabilitiesInternal();
+ std::pair<int32_t, ndk::ScopedAStatus> getFeatureSetInternal();
std::pair<StaApfPacketFilterCapabilities, ndk::ScopedAStatus>
getApfPacketFilterCapabilitiesInternal();
ndk::ScopedAStatus installApfPacketFilterInternal(const std::vector<uint8_t>& program);
std::pair<std::vector<uint8_t>, ndk::ScopedAStatus> readApfPacketFilterDataInternal();
std::pair<StaBackgroundScanCapabilities, ndk::ScopedAStatus>
getBackgroundScanCapabilitiesInternal();
- std::pair<std::vector<int32_t>, ndk::ScopedAStatus> getValidFrequenciesForBandInternal(
- WifiBand band);
ndk::ScopedAStatus startBackgroundScanInternal(int32_t cmd_id,
const StaBackgroundScanParameters& params);
ndk::ScopedAStatus stopBackgroundScanInternal(int32_t cmd_id);
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
index 4cf14a2..ca3c4b7 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
@@ -207,10 +207,10 @@
}
}
-int32_t getChipCapabilities(const std::shared_ptr<IWifiChip>& wifi_chip) {
- int32_t caps = 0;
- if (wifi_chip->getCapabilities(&caps).isOk()) {
- return caps;
+int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip) {
+ int32_t features = 0;
+ if (wifi_chip->getFeatureSet(&features).isOk()) {
+ return features;
}
return 0;
}
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
index 2eac950..0d70c3b 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
@@ -44,6 +44,6 @@
IfaceConcurrencyType type, int* configured_mode_id);
// Used to trigger IWifi.stop() at the end of every test.
void stopWifiService(const char* instance_name);
-int32_t getChipCapabilities(const std::shared_ptr<IWifiChip>& wifi_chip);
+int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip);
bool checkStatusCode(ndk::ScopedAStatus* status, WifiStatusCode expected_code);
bool isAidlServiceAvailable(const char* instance_name);
diff --git a/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
index 0eaf660..d39cfb4 100644
--- a/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
@@ -68,19 +68,6 @@
}
/*
- * GetValidFrequenciesForBand
- * Ensures that we can retrieve valid frequencies for the 2.4 GHz band.
- */
-TEST_P(WifiApIfaceAidlTest, GetValidFrequenciesForBand) {
- std::shared_ptr<IWifiApIface> wifi_ap_iface = getWifiApIface(getInstanceName());
- ASSERT_NE(nullptr, wifi_ap_iface.get());
-
- std::vector<int32_t> freqs;
- EXPECT_TRUE(wifi_ap_iface->getValidFrequenciesForBand(WifiBand::BAND_24GHZ, &freqs).isOk());
- EXPECT_NE(freqs.size(), 0);
-}
-
-/*
* GetFactoryMacAddress
*/
TEST_P(WifiApIfaceAidlTest, GetFactoryMacAddress) {
diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
index dbff949..ca88d8e 100644
--- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
@@ -185,12 +185,12 @@
}
/*
- * GetCapabilities
+ * GetFeatureSet
*/
-TEST_P(WifiChipAidlTest, GetCapabilities) {
+TEST_P(WifiChipAidlTest, GetFeatureSet) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
- EXPECT_NE(static_cast<int32_t>(caps), 0);
+ int32_t features = getChipFeatureSet(wifi_chip_);
+ EXPECT_NE(features, 0);
}
/*
@@ -269,9 +269,9 @@
*/
TEST_P(WifiChipAidlTest, SetLatencyMode_normal) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->setLatencyMode(IWifiChip::LatencyMode::NORMAL);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_LATENCY_MODE)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -284,9 +284,9 @@
*/
TEST_P(WifiChipAidlTest, SetLatencyMode_low) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->setLatencyMode(IWifiChip::LatencyMode::LOW);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_LATENCY_MODE)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -366,12 +366,12 @@
*/
TEST_P(WifiChipAidlTest, SelectTxPowerScenario_body) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
- int32_t expected_caps =
- static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT) |
- static_cast<int32_t>(IWifiChip::ChipCapabilityMask::USE_BODY_HEAD_SAR);
+ int32_t features = getChipFeatureSet(wifi_chip_);
+ int32_t expected_features =
+ static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT) |
+ static_cast<int32_t>(IWifiChip::FeatureSetMask::USE_BODY_HEAD_SAR);
auto status = wifi_chip_->selectTxPowerScenario(IWifiChip::TxPowerScenario::ON_BODY_CELL_OFF);
- if (caps & expected_caps) {
+ if (features & expected_features) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -383,9 +383,9 @@
*/
TEST_P(WifiChipAidlTest, SelectTxPowerScenario_voiceCall) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->selectTxPowerScenario(IWifiChip::TxPowerScenario::VOICE_CALL);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -397,9 +397,9 @@
*/
TEST_P(WifiChipAidlTest, ResetTxPowerScenario) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->resetTxPowerScenario();
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
diff --git a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
index b772bc3..adc9b73 100644
--- a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
@@ -53,10 +53,10 @@
void TearDown() override { stopWifiService(getInstanceName()); }
protected:
- bool isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask expected) {
- int32_t caps = 0;
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- return caps & static_cast<int32_t>(expected);
+ bool isFeatureSupported(IWifiStaIface::FeatureSetMask expected) {
+ int32_t features = 0;
+ EXPECT_TRUE(wifi_sta_iface_->getFeatureSet(&features).isOk());
+ return features & static_cast<int32_t>(expected);
}
ndk::ScopedAStatus createStaIface(std::shared_ptr<IWifiStaIface>* sta_iface) {
@@ -83,30 +83,37 @@
}
/*
- * GetCapabilities
+ * GetFeatureSet
*/
-TEST_P(WifiStaIfaceAidlTest, GetCapabilities) {
- int32_t caps = 0;
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- EXPECT_NE(caps, 0);
+TEST_P(WifiStaIfaceAidlTest, GetFeatureSet) {
+ int32_t features = 0;
+ EXPECT_TRUE(wifi_sta_iface_->getFeatureSet(&features).isOk());
+ EXPECT_NE(features, 0);
}
/*
- * GetApfPacketFilterCapabilities
+ * CheckApfIsSupported:
+ * Ensures the APF packet filter is fully supported as required in VSR 14:
+ * https://docs.partner.android.com/gms/policies/vsr/vsr-14
*/
-TEST_P(WifiStaIfaceAidlTest, GetApfPacketFilterCapabilities) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::APF)) {
- GTEST_SKIP() << "APF packet filter capabilities are not supported.";
- }
+TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
+ // It is not required to check the vendor API level is at least U here
+ // because the Wi-Fi AIDL interface is launched with Android U(VSR-14).
+ // TODO: Add wavier list to the chipsets that doesn't support APF.
+ EXPECT_TRUE(isFeatureSupported(IWifiStaIface::FeatureSetMask::APF));
StaApfPacketFilterCapabilities apf_caps = {};
EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
+ // The APF version must be 4 and the usable memory must be at least
+ // 1024 bytes.
+ EXPECT_EQ(apf_caps.version, 4);
+ EXPECT_GE(apf_caps.maxLength, 1024);
}
/*
* GetBackgroundScanCapabilities
*/
TEST_P(WifiStaIfaceAidlTest, GetBackgroundScanCapabilities) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::BACKGROUND_SCAN)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::BACKGROUND_SCAN)) {
GTEST_SKIP() << "Background scan capabilities are not supported.";
}
StaBackgroundScanCapabilities caps = {};
@@ -114,22 +121,12 @@
}
/*
- * GetValidFrequenciesForBand
- * Ensures that we can retrieve valid frequencies for the 2.4 GHz band.
- */
-TEST_P(WifiStaIfaceAidlTest, GetValidFrequenciesForBand) {
- std::vector<int> freqs;
- EXPECT_TRUE(wifi_sta_iface_->getValidFrequenciesForBand(WifiBand::BAND_24GHZ, &freqs).isOk());
- EXPECT_NE(freqs.size(), 0);
-}
-
-/*
* GetLinkLayerStats
* Ensures that calls to getLinkLayerStats will retrieve a non-empty
* StaLinkLayerStats after link layer stats collection is enabled.
*/
TEST_P(WifiStaIfaceAidlTest, GetLinkLayerStats) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS)) {
GTEST_SKIP() << "Skipping this test since link layer stats are not supported.";
}
@@ -176,7 +173,7 @@
* LinkLayerStatsCollection
*/
TEST_P(WifiStaIfaceAidlTest, LinkLayerStatsCollection) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS)) {
GTEST_SKIP() << "Link layer stats collection is not supported.";
}
@@ -197,7 +194,7 @@
* if the device is not connected to an AP.
*/
TEST_P(WifiStaIfaceAidlTest, RSSIMonitoring) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::RSSI_MONITOR)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::RSSI_MONITOR)) {
GTEST_SKIP() << "RSSI monitoring is not supported.";
}
@@ -213,7 +210,7 @@
* RoamingControl
*/
TEST_P(WifiStaIfaceAidlTest, RoamingControl) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::CONTROL_ROAMING)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::CONTROL_ROAMING)) {
GTEST_SKIP() << "Roaming control is not supported.";
}
@@ -245,7 +242,7 @@
* EnableNDOffload
*/
TEST_P(WifiStaIfaceAidlTest, EnableNDOffload) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::ND_OFFLOAD)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::ND_OFFLOAD)) {
GTEST_SKIP() << "ND offload is not supported.";
}
EXPECT_TRUE(wifi_sta_iface_->enableNdOffload(true).isOk());
diff --git a/wifi/supplicant/aidl/Android.bp b/wifi/supplicant/aidl/Android.bp
index 9cb4e51..c4d3767 100644
--- a/wifi/supplicant/aidl/Android.bp
+++ b/wifi/supplicant/aidl/Android.bp
@@ -36,6 +36,11 @@
"com.android.wifi",
],
min_sdk_version: "30",
+ lint: {
+ // Disable linter to avoid error about fixed size arrays.
+ // Interface will only be accessed on devices >= T.
+ enabled: false,
+ },
},
ndk: {
gen_trace: true,
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLink.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLink.aidl
index 8783c40..8bda324 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLink.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLink.aidl
@@ -38,6 +38,6 @@
byte[] staLinkMacAddress;
byte tidsUplinkMap;
byte tidsDownlinkMap;
- @nullable byte[] apLinkMacAddress;
+ @nullable byte[6] apLinkMacAddress;
int frequencyMHz;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLinksInfo.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLinksInfo.aidl
index cd98f7f..3dac2d6 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLinksInfo.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/MloLinksInfo.aidl
@@ -36,5 +36,5 @@
parcelable MloLinksInfo {
android.hardware.wifi.supplicant.MloLink[] links;
int apMloLinkId;
- @nullable byte[] apMldMacAddress;
+ @nullable byte[6] apMldMacAddress;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
index 614b49e..5465a86 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
@@ -41,8 +41,8 @@
byte[] psk;
String passphrase;
boolean isPersistent;
- byte[] goDeviceAddress;
- byte[] goInterfaceAddress;
+ byte[6] goDeviceAddress;
+ byte[6] goInterfaceAddress;
boolean isP2pClientEapolIpAddressInfoPresent;
android.hardware.wifi.supplicant.P2pClientEapolIpAddressInfo p2pClientIpInfo;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/PmkSaCacheData.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
index 436d0c0..c31b167 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
@@ -34,7 +34,7 @@
package android.hardware.wifi.supplicant;
@VintfStability
parcelable PmkSaCacheData {
- byte[] bssid;
+ byte[6] bssid;
long expirationTimeInSec;
byte[] serializedEntry;
}
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
index e6bb859..1d37635 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
@@ -37,7 +37,7 @@
android.hardware.wifi.supplicant.StaIfaceCallbackState newState;
int id;
byte[] ssid;
- byte[] bssid;
+ byte[6] bssid;
android.hardware.wifi.supplicant.KeyMgmtMask keyMgmtMask;
int frequencyMhz;
boolean filsHlpSent;
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/INonStandardCertCallback.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/INonStandardCertCallback.aidl
index 2f9e528..2e11c76 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/INonStandardCertCallback.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/INonStandardCertCallback.aidl
@@ -18,7 +18,8 @@
/**
* Callback to allow supplicant to retrieve non-standard certificate types
- * from the client.
+ * from the framework. Certificates can be stored in the framework using
+ * the WifiKeystore#put system API.
*
* Must be registered by the client at initialization, so that
* supplicant can call into the client to retrieve any values.
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLink.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLink.aidl
index ed6528c..0b4d66e 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLink.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLink.aidl
@@ -61,7 +61,7 @@
/**
* AP Link MAC Address
*/
- @nullable byte[/* 6 */] apLinkMacAddress;
+ @nullable byte[6] apLinkMacAddress;
/**
* Frequency on which the link operates in MHz.
*/
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLinksInfo.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLinksInfo.aidl
index d954d16..3b81df8 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLinksInfo.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/MloLinksInfo.aidl
@@ -35,5 +35,5 @@
/**
* AP MLD MAC address.
*/
- @nullable byte[/* 6 */] apMldMacAddress;
+ @nullable byte[6] apMldMacAddress;
}
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
index ccd536c..96f1e16 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/P2pGroupStartedEventParams.aidl
@@ -45,10 +45,10 @@
boolean isPersistent;
/** MAC Address of the owner of this group. */
- byte[/* 6 */] goDeviceAddress;
+ byte[6] goDeviceAddress;
/** MAC Address of the P2P interface of the owner of this group. */
- byte[/* 6 */] goInterfaceAddress;
+ byte[6] goInterfaceAddress;
/**
* Flag to indicate that the P2P Client IP address is allocated via EAPOL exchange.
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/PmkSaCacheData.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
index bc28ff5..e0f1d31 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/PmkSaCacheData.aidl
@@ -24,7 +24,7 @@
/**
* BSSID of the access point to which the station is associated.
*/
- byte[/* 6 */] bssid;
+ byte[6] bssid;
/**
* PMK expiration time in seconds.
*/
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
index 8fa5dc7..f7c66e0 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/SupplicantStateChangeData.aidl
@@ -46,7 +46,7 @@
* change event. This must be zero'ed if this event is not
* specific to a particular network.
*/
- byte[/* 6 */] bssid;
+ byte[6] bssid;
/**
* Currently used key mgmt mask.